[Bug 27271] API review: TplLogEntry, TplLogEntryText

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 19 21:08:28 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=27271

--- Comment #3 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-04-19 12:08:27 PDT ---
A few more comments:

Will code outside the library need to subclass TplLogEntry? If not, we could
move TplLogEntryClass to a log-entry-internal.h, reducing our API surface area.

> #define TPL_LOG_ENTRY_MSG_ID_IS_VALID(msg) (msg >= 0)
> #define TPL_LOG_ENTRY_MSG_ID_UNKNOWN -2
> #define TPL_LOG_ENTRY_MSG_ID_ACKNOWLEDGED -1

I don't like this overloading of message IDs. I think the log entry should have
a separate flag for whether the message has been acknowledged, and perhaps also
a flag for whether the message ID is meaningful.

> gint tpl_log_entry_get_pending_msg_id (TplLogEntry *self);

Will API users ever care about this? It'd be good if this could be internal to
the logger and the library.

> gboolean tpl_log_entry_is_pending (TplLogEntry *self);

This only seems to make sense for Text messages? Perhaps it should only exist
in the subclass?

> const gchar *tpl_log_entry_get_channel_path (TplLogEntry *self);

What's this for? Does anything use it? Channel paths aren't unique or
meaningful over time, so it seems unwise.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list