| 63 static GHashTable *map_node_id; |
63 static GHashTable *map_node_id; |
| 64 static GHashTable *map_id_node; |
64 static GHashTable *map_id_node; |
| 65 static GHashTable *map_id_type; |
65 static GHashTable *map_id_type; |
| 66 |
66 |
| 67 static gchar *init_error; |
67 static gchar *init_error; |
| |
68 static int dbus_request_name_reply = DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER; |
| |
69 |
| |
70 gboolean purple_dbus_is_owner(void) |
| |
71 { |
| |
72 return(DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER == dbus_request_name_reply); |
| |
73 } |
| 68 |
74 |
| 69 /** |
75 /** |
| 70 * This function initializes the pointer-id traslation system. It |
76 * This function initializes the pointer-id traslation system. It |
| 71 * creates the three above hashtables and defines parents of some types. |
77 * creates the three above hashtables and defines parents of some types. |
| 72 */ |
78 */ |
| 590 init_error = g_strdup_printf(N_("Failed to get name: %s"), error.name); |
596 init_error = g_strdup_printf(N_("Failed to get name: %s"), error.name); |
| 591 dbus_error_free(&error); |
597 dbus_error_free(&error); |
| 592 return; |
598 return; |
| 593 } |
599 } |
| 594 |
600 |
| |
601 dbus_request_name_reply = |
| 595 result = dbus_bus_request_name(purple_dbus_connection, |
602 result = dbus_bus_request_name(purple_dbus_connection, |
| 596 DBUS_SERVICE_PURPLE, 0, &error); |
603 DBUS_SERVICE_PURPLE, 0, &error); |
| 597 |
604 |
| 598 if (dbus_error_is_set(&error)) |
605 if (dbus_error_is_set(&error)) |
| 599 { |
606 { |