1 /* 2 * proxy-subclass.h - Base class for Telepathy client proxies 3 * (API for subclasses only) 4 * 5 * Copyright (C) 2007-2008 Collabora Ltd. <http://www.collabora.co.uk/> 6 * Copyright (C) 2007-2008 Nokia Corporation 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Lesser General Public 10 * License as published by the Free Software Foundation; either 11 * version 2.1 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public 19 * License along with this library; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 21 */ 22 23 #ifndef __TP_PROXY_SUBCLASS_H__ 24 #define __TP_PROXY_SUBCLASS_H__ 25 26 #define _TP_IN_META_HEADER 27 28 #include <telepathy-glib/proxy.h> 29 30 G_BEGIN_DECLS 31 32 typedef void (*TpProxyInvokeFunc) (TpProxy *self, 33 GError *error, GValueArray *args, GCallback callback, gpointer user_data, 34 GObject *weak_object); 35 36 TpProxyPendingCall *tp_proxy_pending_call_v0_new (TpProxy *self, 37 GQuark iface, const gchar *member, DBusGProxy *iface_proxy, 38 TpProxyInvokeFunc invoke_callback, 39 GCallback callback, gpointer user_data, GDestroyNotify destroy, 40 GObject *weak_object, gboolean cancel_must_raise); 41 42 void tp_proxy_pending_call_v0_take_pending_call (TpProxyPendingCall *pc, 43 DBusGProxyCall *pending_call); 44 45 void tp_proxy_pending_call_v0_take_results (TpProxyPendingCall *pc, 46 GError *error, GValueArray *args); 47 48 void tp_proxy_pending_call_v0_completed (gpointer p); 49 50 TpProxySignalConnection *tp_proxy_signal_connection_v0_new (TpProxy *self, 51 GQuark iface, const gchar *member, 52 const GType *expected_types, 53 GCallback collect_args, TpProxyInvokeFunc invoke_callback, 54 GCallback callback, gpointer user_data, GDestroyNotify destroy, 55 GObject *weak_object, GError **error); 56 57 void tp_proxy_signal_connection_v0_take_results 58 (TpProxySignalConnection *sc, GValueArray *args); 59 60 typedef void (*TpProxyInterfaceAddedCb) (TpProxy *self, 61 guint quark, DBusGProxy *proxy, gpointer unused); 62 63 void tp_proxy_or_subclass_hook_on_interface_add (GType proxy_or_subclass, 64 TpProxyInterfaceAddedCb callback); 65 66 #ifndef TP_DISABLE_DEPRECATED 67 _TP_DEPRECATED_IN_0_20_FOR(tp_proxy_get_interface_by_id) 68 DBusGProxy *tp_proxy_borrow_interface_by_id (TpProxy *self, GQuark iface, 69 GError **error); 70 #endif 71 72 _TP_AVAILABLE_IN_0_20 73 DBusGProxy *tp_proxy_get_interface_by_id (TpProxy *self, GQuark iface, 74 GError **error); 75 76 DBusGProxy *tp_proxy_add_interface_by_id (TpProxy *self, GQuark iface); 77 void tp_proxy_add_interfaces (TpProxy *self, const gchar * const *interfaces); 78 79 void tp_proxy_invalidate (TpProxy *self, const GError *error); 80 81 void tp_proxy_subclass_add_error_mapping (GType proxy_subclass, 82 const gchar *static_prefix, GQuark domain, GType code_enum_type); 83 84 gboolean tp_proxy_dbus_g_proxy_claim_for_signal_adding (DBusGProxy *proxy); 85 86 void tp_proxy_init_known_interfaces (void); 87 88 G_END_DECLS 89 90 #undef _TP_IN_META_HEADER 91 92 #endif /* #ifndef __TP_PROXY_SUBCLASS_H__*/ 93