diff options
Diffstat (limited to 'telepathy-logger')
-rw-r--r-- | telepathy-logger/Makefile.am | 2 | ||||
-rw-r--r-- | telepathy-logger/entity.c | 11 | ||||
-rw-r--r-- | telepathy-logger/entity.h | 20 | ||||
-rw-r--r-- | telepathy-logger/event.c | 2 | ||||
-rw-r--r-- | telepathy-logger/log-manager.c | 5 | ||||
-rw-r--r-- | telepathy-logger/log-manager.h | 24 | ||||
-rw-r--r-- | telepathy-logger/log-store.c | 2 | ||||
-rw-r--r-- | telepathy-logger/text-event.c | 2 |
8 files changed, 45 insertions, 23 deletions
diff --git a/telepathy-logger/Makefile.am b/telepathy-logger/Makefile.am index 809b14e..6fa6519 100644 --- a/telepathy-logger/Makefile.am +++ b/telepathy-logger/Makefile.am @@ -12,7 +12,7 @@ AM_CPPFLAGS = \ $(WARN_CFLAGS) pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = telepathy-logger-0.1.pc +pkgconfig_DATA = telepathy-logger-0.2.pc lib_LTLIBRARIES = libtelepathy-logger.la diff --git a/telepathy-logger/entity.c b/telepathy-logger/entity.c index bb7fd12..abc7f2d 100644 --- a/telepathy-logger/entity.c +++ b/telepathy-logger/entity.c @@ -20,6 +20,7 @@ */ #include "config.h" +#include "entity.h" #include "entity-internal.h" #include <telepathy-glib/util.h> @@ -247,10 +248,11 @@ tpl_entity_new (const gchar *id, return ret; } -/** tpl_entity_new_from_room_id: +/** + * tpl_entity_new_from_room_id: * @room_id: the room id which will be the identifier for the entity * - * Return a TplEntity instance with identifier, alias copied from + * Returns: a TplEntity instance with identifier, alias copied from * @room_id. It also sets %TPL_ENTITY_ROOM as type for * the #TplEntity returned. */ @@ -261,11 +263,12 @@ tpl_entity_new_from_room_id (const gchar *room_id) } -/** tpl_entity_new_from_tp_contact: +/** + * tpl_entity_new_from_tp_contact: * @contact: the TpContact instance to create the TplEntity from * @type: the #TplEntity type * - * Return a TplEntity instance with identifier, alias and + * Returns: a TplEntity instance with identifier, alias and * avatar's token copied. Type parameter is useful to differentiate between * normal contact and self contact, thus only %TPL_ENTITY_CONTACT and * %TPL_ENTITY_SELF are accepted. diff --git a/telepathy-logger/entity.h b/telepathy-logger/entity.h index 474e6a9..ba95ee3 100644 --- a/telepathy-logger/entity.h +++ b/telepathy-logger/entity.h @@ -33,36 +33,34 @@ G_BEGIN_DECLS #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)) -/* TplEntityType: - * +/** + * TplEntityType: * @TPL_ENTITY_UNKNOWN: the current contact's type is unknown * @TPL_ENTITY_CONTACT: the contact's type represents a user (buddy), but not - * the account's owner for which @TPL_ENTITY_SELF is used + * the account's owner for which @TPL_ENTITY_SELF is used * @TPL_ENTITY_ROOM: a named room (#TP_HANDLE_TYPE_ROOM) * @TPL_ENTITY_SELF: the contact's type represents the owner of the account - * whose channel has been logged, as opposed to @TPL_ENTITY_CONTACT which - * represents any other user + * whose channel has been logged, as opposed to @TPL_ENTITY_CONTACT which + * represents any other user */ typedef enum { TPL_ENTITY_UNKNOWN, - /* contact is a user (buddy) */ TPL_ENTITY_CONTACT, - /* contact is a room, meaning that the related message has been sent to - * a room instead of to a 1-1 channel */ TPL_ENTITY_ROOM, - /* contact is both a USER and the account's owner (self-handle) */ TPL_ENTITY_SELF } TplEntityType; +typedef struct _TplEntity TplEntity; typedef struct _TplEntityPriv TplEntityPriv; -typedef struct + +struct _TplEntity { GObject parent; /*Private */ TplEntityPriv *priv; -} TplEntity; +}; GType tpl_entity_get_type (void); diff --git a/telepathy-logger/event.c b/telepathy-logger/event.c index de9052f..64298d7 100644 --- a/telepathy-logger/event.c +++ b/telepathy-logger/event.c @@ -32,7 +32,7 @@ * SECTION:event * @title: TplEvent * @short_description: Abstract representation of a log event - * @see_also: #TplEventText and other subclasses when they'll exist + * @see_also: #TplTextEvent and other subclasses when they'll exist * * The TPLogger log event represents a generic log event, which will be * specialized by subclasses of #TplEvent. diff --git a/telepathy-logger/log-manager.c b/telepathy-logger/log-manager.c index c2bbbdb..5974efa 100644 --- a/telepathy-logger/log-manager.c +++ b/telepathy-logger/log-manager.c @@ -444,6 +444,7 @@ _tpl_log_manager_register_log_store (TplLogManager *self, * @manager: TplLogManager * @account: TpAccount * @target: a non-NULL #TplEntity + * @type_mask: event type filter see #TplEventTypeMask * * Checks if logs exist for @target. * @@ -1160,7 +1161,7 @@ _get_filtered_events_async_thread (GSimpleAsyncResult *simple, * @account: a #TpAccount * @target: a non-NULL #TplEntity * @type_mask: event type filter see #TplEventTypeMask - * @num_event: number of maximum events to fetch + * @num_events: number of maximum events to fetch * @filter: an optional filter function * @filter_user_data: user data to pass to @filter * @callback: a callback to call when the request is satisfied @@ -1411,7 +1412,7 @@ tpl_log_manager_search_async (TplLogManager *manager, * tpl_log_manager_search_finish: * @self: a #TplLogManager * @result: a #GAsyncResult - * @chats: a pointer to a #GList used to return the list of #TplLogSearchHit + * @hits: a pointer to a #GList used to return the list of #TplLogSearchHit * @error: a #GError to fill * * Returns: #TRUE if the operation was successful, otherwise #FALSE diff --git a/telepathy-logger/log-manager.h b/telepathy-logger/log-manager.h index a690f66..17ca458 100644 --- a/telepathy-logger/log-manager.h +++ b/telepathy-logger/log-manager.h @@ -41,24 +41,36 @@ G_BEGIN_DECLS GQuark tpl_log_manager_errors_quark (void); +/** + * TplLogManagerError: + * @TPL_LOG_MANAGER_ERROR_ADD_EVENT: Error return when adding logs fails + */ typedef enum { TPL_LOG_MANAGER_ERROR_ADD_EVENT } TplLogManagerError; +typedef struct _TplLogManager TplLogManager; -typedef struct +struct _TplLogManager { GObject parent; gpointer priv; -} TplLogManager; +}; typedef struct { GObjectClass parent_class; } TplLogManagerClass; +/** + * TplEventTypeMask: + * @TPL_EVENT_MASK_TEXT: Mask to #TplTextEvent + * @TPL_EVENT_MASK_ANY: Special value to select all type of #TplEvent + * + * Mask used to filter type of #TplEvent returned. + */ typedef enum { TPL_EVENT_MASK_TEXT = 1 << 0, @@ -66,6 +78,14 @@ typedef enum } TplEventTypeMask; +/** + * TplLogSearchHit: + * @account: the #TpAccount + * @target: the #TplEntity + * @date: the #GDate + * + * Represent the context where the search has results. + */ typedef struct { TpAccount *account; diff --git a/telepathy-logger/log-store.c b/telepathy-logger/log-store.c index 7f36138..d07b21f 100644 --- a/telepathy-logger/log-store.c +++ b/telepathy-logger/log-store.c @@ -32,7 +32,7 @@ * @title: TplLogStore * @short_description: LogStore interface can register into #TplLogManager as * #TplLogStore:writable or #TplLogStore:readable log stores. - * @see_also: #event-text:TplTextEvent and other subclasses when they'll exist + * @see_also: #text-event:#TplTextEvent and other subclasses when they'll exist * * The #TplLogStore defines all the public methods that a TPL Log Store has to * implement in order to be used into a #TplLogManager. diff --git a/telepathy-logger/text-event.c b/telepathy-logger/text-event.c index 61fa6fe..8adffe3 100644 --- a/telepathy-logger/text-event.c +++ b/telepathy-logger/text-event.c @@ -34,7 +34,7 @@ #include <telepathy-logger/util-internal.h> /** - * SECTION:event-text + * SECTION:text-event * @title: TplTextEvent * @short_description: Representation of a text log event * |