[Bug 71508] New: [1.0] simplify TpPresenceMixin

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Nov 11 11:37:40 PST 2013


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

          Priority: medium
            Bug ID: 71508
          Assignee: simon.mcvittie at collabora.co.uk
           Summary: [1.0] simplify TpPresenceMixin
        QA Contact: telepathy-bugs at lists.freedesktop.org
          Severity: enhancement
    Classification: Unclassified
                OS: All
          Reporter: simon.mcvittie at collabora.co.uk
          Hardware: Other
            Status: ASSIGNED
           Version: git master
         Component: tp-glib
           Product: Telepathy

Now that we have SimplePresence:

TpPresenceStatusOptionalArgumentSpec should go away altogether.

TpPresenceStatusSpec should replace

    gboolean self;
    const TpPresenceStatusOptionalArgumentSpec *optional_arguments;

with

    typedef enum {
        /*< flags >*/
        TP_PRESENCE_STATUS_SPEC_FLAGS_NONE = 0,
        TP_PRESENCE_STATUS_SPEC_FLAGS_CAN_SET_ON_SELF = (1 << 1),
        TP_PRESENCE_STATUS_SPEC_FLAGS_HAS_MESSAGE = (1 << 2)
    } TpPresenceStatusSpecFlags;

    TpPresenceStatusSpecFlags flags;

(or possibly a pair of gbooleans but I think it's clearer as a flags word).

The vfuncs in TpPresenceMixinClass should move to a GInterface that the
Connection implements (TpPresenceMixable?), to allow for introspection in
future. The data should hang off the object using qdata so explicit finalize
isn't needed; eventually we'd only need void tp_presence_mixin_init
(TpPresenceMixable *self), although for the moment we'll still need
tp_presence_mixin_iface_init() and tp_presence_mixin_init_dbus_properties().

tp_presence_status_new should be replaced by:

TpPresenceStatus *tp_presence_status_new (guint which,
    const gchar *message) G_GNUC_WARN_UNUSED_RESULT;

or maybe even

TpPresenceStatus *tp_presence_status_new (TpPresenceMixable *self,
    const TpPresenceStatusSpec *spec,
    const gchar *message) G_GNUC_WARN_UNUSED_RESULT;

TpPresenceMixinStatusAvailableFunc should take a const TpPresenceStatusSpec *
too.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the telepathy-bugs mailing list