[Bug 49505] New: somewhat high-level API to add client channel filters

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri May 4 20:24:37 CEST 2012


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

             Bug #: 49505
           Summary: somewhat high-level API to add client channel filters
    Classification: Unclassified
           Product: Telepathy
           Version: git master
          Platform: Other
        OS/Version: All
            Status: ASSIGNED
          Keywords: patch
          Severity: enhancement
          Priority: medium
         Component: tp-glib
        AssignedTo: simon.mcvittie at collabora.co.uk
        ReportedBy: simon.mcvittie at collabora.co.uk
         QAContact: telepathy-bugs at lists.freedesktop.org
            Blocks: 30422


Created attachment 61042
  --> https://bugs.freedesktop.org/attachment.cgi?id=61042
proposed patch

Continuing our campaign against GHashTables masquerading as high-level API,
here is something that's not so good:

-   * |[
-   * tp_base_client_take_handler_filter (handler, tp_asv_new (
-   *               TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER,
-   *               TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
TP_HANDLE_TYPE_CONTACT,
-   *               TP_PROP_CHANNEL_REQUESTED, G_TYPE_BOOLEAN, FALSE,
-   *              
TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA_SERVICE_NAME, G_TYPE_STRING,
"service.name",
-   *               NULL));

and my proposal to replace it:

+ * filter = tp_channel_filter_new_for_file_transfer ("service.name");
+ * tp_channel_filter_require_locally_requested (filter, FALSE);
+ * tp_base_client_take_handler_filter_object (client, filter);

TpChannelFilter is a GObject which encapsulates an a{sv} of properties,
resembling Jonny's TpFutureAccount on Bug #47100, and my new convenience API on
TpAccountChannelRequest on Bug #48780.

-- 
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