[Bug 29531] high-level API for text channels
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Dec 16 12:59:34 CET 2010
https://bugs.freedesktop.org/show_bug.cgi?id=29531
--- Comment #26 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-12-16 03:59:34 PST ---
Re-review part 1: diffs to existing files, and the example text handler.
> +<INCLUDE>telepathy-glib/text-channel.h</INCLUDE>
Might be better to recommend telepathy-glib/telepathy-glib.h?
> text = tp_message_to_text (message, NULL);
> if (text == NULL)
> return;
This always returns non-NULL (assuming nobody has g_return_val_if_fail'd), so
it seems bad for an example to have this check.
Perhaps this'd make a better example:
comment = ""
text = tp_message_to_text (text, &flags);
if (flags & TP_CHANNEL_TEXT_MESSAGE_FLAG_NON_TEXT_CONTENT)
{
comment = " (and some non-text content we don't understand)";
}
if (pending)
g_print ("pending: '%s'%s", text, comment);
else
g_print ("received: '%s'%s", text, comment);
> {
> TpMessage *msg = l->data;
>
>
> echo_message (channel, msg, TRUE);
> }
Unnecessarily spacious :-)
> static void
> display_pending_messages (TpTextChannel *channel)
Perhaps add a comment something like
/* The default channel factory used by the TpSimpleHandler has
* already prepared TP_TEXT_CHANNEL_FEATURE_PENDING_MESSAGES,
* if possible. */
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list