39 #include <telepathy-glib/dbus.h> 40 #include <telepathy-glib/defs.h> 41 #include <telepathy-glib/svc-client.h> 47 #define REMMINA_TP_BUS_NAME TP_CLIENT_BUS_NAME_BASE "Remmina" 48 #define REMMINA_TP_OBJECT_PATH TP_CLIENT_OBJECT_PATH_BASE "Remmina" 53 G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CLIENT, NULL);
68 const char *connection_path,
const GPtrArray *channels,
const GPtrArray *requests_satisfied,
69 guint64 user_action_time, GHashTable *handler_info, DBusGMethodInvocation *context)
75 for (i = 0; i < channels->len; i++) {
76 array = g_ptr_array_index(channels, i);
78 (
const gchar*)g_value_get_boxed(&g_array_index(array, GValue, 0)),
79 (GHashTable*)g_value_get_boxed(&g_array_index(array, GValue, 1)), context);
86 TpSvcClientHandlerClass *klass = (TpSvcClientHandlerClass*)g_iface;
88 #define IMPLEMENT(x) tp_svc_client_handler_implement_ ## x(klass, remmina_tp_handler_ ## x) 89 IMPLEMENT(handle_channels);
99 bus = tp_dbus_daemon_dup(&error);
101 g_print(
"tp_dbus_daemon_dup: %s", error->message);
104 if (!tp_dbus_daemon_request_name(bus, REMMINA_TP_BUS_NAME, FALSE, &error)) {
106 g_print(
"tp_dbus_daemon_request_name: %s", error->message);
109 dbus_g_connection_register_g_object(
110 tp_proxy_get_dbus_connection(TP_PROXY(bus)),
111 REMMINA_TP_OBJECT_PATH, G_OBJECT(handler));
113 g_print(
"%s: bus_name " REMMINA_TP_BUS_NAME
114 " object_path " REMMINA_TP_OBJECT_PATH
"\n", __func__);
121 TRACE_CALL(__func__);
124 handler = REMMINA_TP_HANDLER(g_object_new(REMMINA_TYPE_TP_HANDLER, NULL));
static void remmina_tp_handler_handle_channels(TpSvcClientHandler *handler, const char *account_path, const char *connection_path, const GPtrArray *channels, const GPtrArray *requests_satisfied, guint64 user_action_time, GHashTable *handler_info, DBusGMethodInvocation *context)
static void remmina_tp_handler_class_init(RemminaTpHandlerClass *klass)
G_DEFINE_TYPE_WITH_CODE(RemminaTpHandler, remmina_tp_handler, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CLIENT, NULL);G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CLIENT_HANDLER, remmina_tp_handler_iface_init);)
RemminaTpHandler * remmina_tp_handler_new(void)
static RemminaTpHandler * remmina_tp_handler
RemminaPluginService * remmina_plugin_telepathy_service
static gboolean remmina_tp_handler_register(RemminaTpHandler *handler)
void remmina_tp_channel_handler_new(const gchar *account_path, const gchar *connection_path, const gchar *channel_path, GHashTable *channel_properties, DBusGMethodInvocation *context)
static void remmina_tp_handler_iface_init(gpointer g_iface, gpointer iface_data)
static void remmina_tp_handler_init(RemminaTpHandler *handler)