summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-01-18 10:10:13 -0500
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-01-19 16:24:40 -0500
commit7439e7a8b2bd37141b7c1591bc4ffce8909bf6a6 (patch)
treec3526bd20945536a6e48fcc49f218d71bdbbf104
parenta91a32e0dbd0ccb80a5fe77a7f0811b442e9f439 (diff)
Entity style fix
-rw-r--r--telepathy-logger/entity-internal.h5
-rw-r--r--telepathy-logger/entity.c21
-rw-r--r--telepathy-logger/entity.h8
3 files changed, 18 insertions, 16 deletions
diff --git a/telepathy-logger/entity-internal.h b/telepathy-logger/entity-internal.h
index 1eaf16d77..3b63b7735 100644
--- a/telepathy-logger/entity-internal.h
+++ b/telepathy-logger/entity-internal.h
@@ -37,8 +37,9 @@ typedef struct
GObjectClass parent_class;
} TplEntityClass;
-TplEntity *_tpl_entity_from_tp_contact (TpContact *contact);
TplEntity *_tpl_entity_new (const gchar *identifier);
+TplEntity *_tpl_entity_from_tp_contact (TpContact *contact);
+TplEntity *_tpl_entity_from_room_id (const gchar *chatroom_id);
void _tpl_entity_set_alias (TplEntity *self,
const gchar *data);
@@ -52,7 +53,5 @@ void _tpl_entity_set_entity_type (TplEntity *self,
void _tpl_entity_set_avatar_token (TplEntity *self,
const gchar *data);
-TplEntity * _tpl_entity_from_room_id (const gchar *chatroom_id);
-
G_END_DECLS
#endif // __TPL_ENTITY_INTERNAL_H__
diff --git a/telepathy-logger/entity.c b/telepathy-logger/entity.c
index ca8dccb85..f574db7a1 100644
--- a/telepathy-logger/entity.c
+++ b/telepathy-logger/entity.c
@@ -186,6 +186,16 @@ tpl_entity_init (TplEntity *self)
}
+TplEntity *
+_tpl_entity_new (const gchar *identifier)
+{
+ g_return_val_if_fail (!TPL_STR_EMPTY (identifier), NULL);
+
+ return g_object_new (TPL_TYPE_ENTITY,
+ "identifier", identifier, NULL);
+}
+
+
/* _tpl_entity_from_room_id:
* @chatroom_id: the chatroom id which will be the identifier for the entity
*
@@ -244,15 +254,6 @@ _tpl_entity_from_tp_contact (TpContact *contact)
}
-TplEntity *
-_tpl_entity_new (const gchar *identifier)
-{
- g_return_val_if_fail (!TPL_STR_EMPTY (identifier), NULL);
-
- return g_object_new (TPL_TYPE_ENTITY,
- "identifier", identifier, NULL);
-}
-
/**
* tpl_entity_get_alias:
* @self: a #TplEntity
@@ -267,6 +268,7 @@ tpl_entity_get_alias (TplEntity *self)
return self->priv->alias;
}
+
/**
* tpl_entity_get_identifier:
* @self: a #TplEntity
@@ -281,6 +283,7 @@ tpl_entity_get_identifier (TplEntity *self)
return self->priv->identifier;
}
+
/**
* tpl_entity_get_entity_type:
* @self: a #TplEntity
diff --git a/telepathy-logger/entity.h b/telepathy-logger/entity.h
index 52714cdb8..809186f1f 100644
--- a/telepathy-logger/entity.h
+++ b/telepathy-logger/entity.h
@@ -26,10 +26,10 @@
#include <telepathy-glib/contact.h>
G_BEGIN_DECLS
-#define TPL_TYPE_ENTITY (tpl_entity_get_type ())
-#define TPL_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TPL_TYPE_ENTITY, TplEntity))
-#define TPL_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TPL_TYPE_ENTITY, TplEntityClass))
-#define TPL_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TPL_TYPE_ENTITY))
+#define TPL_TYPE_ENTITY (tpl_entity_get_type ())
+#define TPL_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TPL_TYPE_ENTITY, TplEntity))
+#define TPL_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TPL_TYPE_ENTITY, TplEntityClass))
+#define TPL_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TPL_TYPE_ENTITY))
#define TPL_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TPL_TYPE_ENTITY))
#define TPL_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TPL_TYPE_ENTITY, TplEntityClass))