Mercurial > pidgin.yaz
comparison src/dbus-server.c @ 11277:421a8523ad04
[gaim-migrate @ 13467]
added support for lists and hash tables to libgaim-client
committer: Tailor Script <tailor@pidgin.im>
author | Piotr Zielinski <zielaj> |
---|---|
date | Tue, 16 Aug 2005 15:22:35 +0000 |
parents | 744c0708d11f |
children | 57fccea36e36 |
comparison
equal
deleted
inserted
replaced
11276:17ebda61c6ce | 11277:421a8523ad04 |
---|---|
142 /** @name Modified versions of some DBus functions */ | 142 /** @name Modified versions of some DBus functions */ |
143 /**************************************************************************/ | 143 /**************************************************************************/ |
144 | 144 |
145 dbus_bool_t | 145 dbus_bool_t |
146 gaim_dbus_message_get_args (DBusMessage *message, | 146 gaim_dbus_message_get_args (DBusMessage *message, |
147 DBusError *error, | 147 DBusError *error, |
148 int first_arg_type, | 148 int first_arg_type, |
149 ...) | 149 ...) |
150 { | 150 { |
151 dbus_bool_t retval; | 151 dbus_bool_t retval; |
152 va_list var_args; | 152 va_list var_args; |
153 | 153 |
154 va_start (var_args, first_arg_type); | 154 va_start (var_args, first_arg_type); |
428 } | 428 } |
429 | 429 |
430 return FALSE; | 430 return FALSE; |
431 } | 431 } |
432 | 432 |
433 | |
434 /**************************************************************************/ | |
435 /** @name Signals */ | |
436 /**************************************************************************/ | |
437 | 433 |
438 static const char *gettext(const char **ptr) { | 434 static const char *gettext(const char **ptr) { |
439 const char *text = *ptr; | 435 const char *text = *ptr; |
440 *ptr += strlen(text) + 1; | 436 *ptr += strlen(text) + 1; |
441 return text; | 437 return text; |
673 #undef my_arg | 669 #undef my_arg |
674 | 670 |
675 void gaim_dbus_signal_emit_gaim(char *name, int num_values, | 671 void gaim_dbus_signal_emit_gaim(char *name, int num_values, |
676 GaimValue **values, va_list vargs) | 672 GaimValue **values, va_list vargs) |
677 { | 673 { |
678 /* pass name */ | |
679 DBusMessage *signal; | 674 DBusMessage *signal; |
680 DBusMessageIter iter; | 675 DBusMessageIter iter; |
681 char *newname; | 676 char *newname; |
682 | 677 |
683 g_return_if_fail(gaim_dbus_connection); | 678 g_return_if_fail(gaim_dbus_connection); |
684 | 679 |
680 /* The test below is a hack that prevents our "dbus-method-called" | |
681 signal from being propagated to dbus. What we really need is a | |
682 flag for each signal that states whether this signal is to be | |
683 dbus-propagated or not. */ | |
684 if (!strcmp(name, "dbus-method-called")) | |
685 return; | |
686 | |
685 newname = gaim_dbus_convert_signal_name(name); | 687 newname = gaim_dbus_convert_signal_name(name); |
686 signal = dbus_message_new_signal(DBUS_PATH_GAIM, DBUS_INTERFACE_GAIM, newname); | 688 signal = dbus_message_new_signal(DBUS_PATH_GAIM, DBUS_INTERFACE_GAIM, newname); |
687 dbus_message_iter_init_append(signal, &iter); | 689 dbus_message_iter_init_append(signal, &iter); |
688 | 690 |
689 gaim_dbus_message_append_gaim_values(&iter, num_values, values, vargs); | 691 gaim_dbus_message_append_gaim_values(&iter, num_values, values, vargs); |
699 | 701 |
700 | 702 |
701 | 703 |
702 gboolean gaim_dbus_init(void) | 704 gboolean gaim_dbus_init(void) |
703 { | 705 { |
704 gaim_debug_register_category("dbus"); | |
705 | |
706 gaim_dbus_init_ids(); | 706 gaim_dbus_init_ids(); |
707 return gaim_dbus_dispatch_init() ; | 707 return gaim_dbus_dispatch_init() ; |
708 } | 708 } |
709 | 709 |
710 | 710 |