[Bug 29531] high-level API for text channels
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Dec 16 14:35:08 CET 2010
https://bugs.freedesktop.org/show_bug.cgi?id=29531
--- Comment #30 from Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> 2010-12-16 05:35:07 PST ---
(In reply to comment #26)
> 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?
If you prefer; changed.
> > 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);
good idea; changed.
> > {
> > TpMessage *msg = l->data;
> >
> >
> > echo_message (channel, msg, TRUE);
> > }
>
> Unnecessarily spacious :-)
removed.
> > 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. */
added.
--
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