Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/skype4pidgin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEion Robb <eion@robbmob.com>2008-03-02 06:22:49 +0300
committerEion Robb <eion@robbmob.com>2008-03-02 06:22:49 +0300
commitfb6764e72388bcd9ea314d7a48f24e89e885b2e7 (patch)
treef7db2bef7e7650030d45a1be9f55c9d467e546da /skype_messaging_dbus.c
parent5df7db5c6afe5d0e7c7393665a427aea202259d0 (diff)
purple_debug_* functions replaced with skype_debug_* functions, so that debug calls are thread-safe.
Diffstat (limited to 'skype_messaging_dbus.c')
-rw-r--r--skype_messaging_dbus.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/skype_messaging_dbus.c b/skype_messaging_dbus.c
index 8bbf151..92e1788 100644
--- a/skype_messaging_dbus.c
+++ b/skype_messaging_dbus.c
@@ -8,20 +8,20 @@ static DBusGConnection *connection = NULL;
static DBusGProxy *proxy = NULL;
static DBusGProxy *proxy_receive = NULL;
-static void
+static void
notify_handler(DBusGProxy *object, const char *message, gpointer user_data)
{
- purple_debug_info("skype_dbus", "notify_handler called: %s\n", message);
+ skype_debug_info("skype_dbus", "notify_handler called: %s\n", message);
}
-static gboolean
+static gboolean
skype_connect()
{
GError *error = NULL;
connection = dbus_g_bus_get (SKYPE_DBUS_BUS, &error);
if (connection == NULL && error != NULL)
{
- purple_debug_info("skype_dbus", "Error: %s\n", error->message);
+ skype_debug_info("skype_dbus", "Error: %s\n", error->message);
g_error_free(error);
return FALSE;
}
@@ -34,50 +34,50 @@ skype_connect()
"com.Skype.API",
"/com/Skype/Client",
"com.Skype.API");
-
+
dbus_g_proxy_add_signal(proxy_receive, "Notify", G_TYPE_STRING, G_TYPE_INVALID);
dbus_g_proxy_connect_signal(proxy_receive, "Notify", G_CALLBACK(notify_handler), NULL, NULL);
return TRUE;
}
-static void
+static void
skype_disconnect()
-{
+{
/*if (connection != NULL)
- g_free(connection);
+ g_free(connection);
if (proxy != NULL)
- g_free(proxy);
- if (proxy_receive != NULL)
+ g_free(proxy);
+ if (proxy_receive != NULL)
g_free(proxy_receive);*/
}
-static void
+static void
send_message(char* message)
{
GError *error = NULL;
- gchar *str = NULL;
- int message_num;
- gchar error_return[30];
-
- purple_debug_info("skype_dbus", "con %d, proxy %d, rec %d\n", connection, proxy, proxy_receive);
+ gchar *str = NULL;
+ int message_num;
+ gchar error_return[30];
+
+ skype_debug_info("skype_dbus", "con %d, proxy %d, rec %d\n", connection, proxy, proxy_receive);
if (!dbus_g_proxy_call (proxy, "Invoke", &error, G_TYPE_STRING, message, G_TYPE_INVALID,
G_TYPE_STRING, &str, G_TYPE_INVALID))
{
- if (error && error->message)
+ if (error && error->message)
{
- purple_debug_info("skype_dbus", "Error: %s\n", error->message);
- if (message[0] == '#')
- {
+ skype_debug_info("skype_dbus", "Error: %s\n", error->message);
+ if (message[0] == '#')
+ {
//We're expecting a response
sscanf(message, "#%d ", &message_num);
sprintf(error_return, "#%d ERROR", message_num);
- g_thread_create((GThreadFunc)skype_message_received, (void *)g_strdup(error_return), FALSE, NULL);
- }
- }
- else
- purple_debug_info("skype_dbus", "no response\n");
- }
+ g_thread_create((GThreadFunc)skype_message_received, (void *)g_strdup(error_return), FALSE, NULL);
+ }
+ }
+ else
+ skype_debug_info("skype_dbus", "no response\n");
+ }
if (str != NULL)
g_thread_create((GThreadFunc)skype_message_received, (void *)str, FALSE, NULL);
}