diff options
| author | Dan Nicolaescu | 2010-07-04 00:50:25 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-04 00:50:25 -0700 |
| commit | 971de7fb158335fbda39525feb2d7776a26bc030 (patch) | |
| tree | 605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/dbusbind.c | |
| parent | b8463cbfbe2c5183cf40772df2746e58b787ddeb (diff) | |
| download | emacs-971de7fb158335fbda39525feb2d7776a26bc030.tar.gz emacs-971de7fb158335fbda39525feb2d7776a26bc030.zip | |
Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C.
* src/atimer.c:
* src/bidi.c:
* src/bytecode.c:
* src/callint.c:
* src/callproc.c:
* src/casefiddle.c:
* src/casetab.c:
* src/category.c:
* src/ccl.c:
* src/character.c:
* src/charset.c:
* src/chartab.c:
* src/cmds.c:
* src/coding.c:
* src/composite.c:
* src/data.c:
* src/dbusbind.c:
* src/dired.c:
* src/dispnew.c:
* src/doc.c:
* src/doprnt.c:
* src/ecrt0.c:
* src/editfns.c:
* src/fileio.c:
* src/filelock.c:
* src/filemode.c:
* src/fns.c:
* src/font.c:
* src/fontset.c:
* src/frame.c:
* src/fringe.c:
* src/ftfont.c:
* src/ftxfont.c:
* src/gtkutil.c:
* src/indent.c:
* src/insdel.c:
* src/intervals.c:
* src/keymap.c:
* src/lread.c:
* src/macros.c:
* src/marker.c:
* src/md5.c:
* src/menu.c:
* src/minibuf.c:
* src/prefix-args.c:
* src/print.c:
* src/ralloc.c:
* src/regex.c:
* src/region-cache.c:
* src/scroll.c:
* src/search.c:
* src/sound.c:
* src/strftime.c:
* src/syntax.c:
* src/sysdep.c:
* src/termcap.c:
* src/terminal.c:
* src/terminfo.c:
* src/textprop.c:
* src/tparam.c:
* src/undo.c:
* src/unexelf.c:
* src/window.c:
* src/xfaces.c:
* src/xfns.c:
* src/xfont.c:
* src/xftfont.c:
* src/xgselect.c:
* src/xmenu.c:
* src/xrdb.c:
* src/xselect.c:
* src/xsettings.c:
* src/xsmfns.c:
* src/xterm.c: Likewise.
Diffstat (limited to 'src/dbusbind.c')
| -rw-r--r-- | src/dbusbind.c | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c index e813d0b5ad8..7edda947c0d 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -163,8 +163,7 @@ int xd_in_read_queued_messages = 0; | |||
| 163 | /* Determine the DBusType of a given Lisp symbol. OBJECT must be one | 163 | /* Determine the DBusType of a given Lisp symbol. OBJECT must be one |
| 164 | of the predefined D-Bus type symbols. */ | 164 | of the predefined D-Bus type symbols. */ |
| 165 | static int | 165 | static int |
| 166 | xd_symbol_to_dbus_type (object) | 166 | xd_symbol_to_dbus_type (Lisp_Object object) |
| 167 | Lisp_Object object; | ||
| 168 | { | 167 | { |
| 169 | return | 168 | return |
| 170 | ((EQ (object, QCdbus_type_byte)) ? DBUS_TYPE_BYTE | 169 | ((EQ (object, QCdbus_type_byte)) ? DBUS_TYPE_BYTE |
| @@ -221,10 +220,7 @@ xd_symbol_to_dbus_type (object) | |||
| 221 | signature is embedded, or DBUS_TYPE_INVALID. It is needed for the | 220 | signature is embedded, or DBUS_TYPE_INVALID. It is needed for the |
| 222 | check that DBUS_TYPE_DICT_ENTRY occurs only as array element. */ | 221 | check that DBUS_TYPE_DICT_ENTRY occurs only as array element. */ |
| 223 | static void | 222 | static void |
| 224 | xd_signature (signature, dtype, parent_type, object) | 223 | xd_signature (char *signature, unsigned int dtype, unsigned int parent_type, Lisp_Object object) |
| 225 | char *signature; | ||
| 226 | unsigned int dtype, parent_type; | ||
| 227 | Lisp_Object object; | ||
| 228 | { | 224 | { |
| 229 | unsigned int subtype; | 225 | unsigned int subtype; |
| 230 | Lisp_Object elt; | 226 | Lisp_Object elt; |
| @@ -393,10 +389,7 @@ xd_signature (signature, dtype, parent_type, object) | |||
| 393 | `dbus-send-signal', into corresponding C values appended as | 389 | `dbus-send-signal', into corresponding C values appended as |
| 394 | arguments to a D-Bus message. */ | 390 | arguments to a D-Bus message. */ |
| 395 | static void | 391 | static void |
| 396 | xd_append_arg (dtype, object, iter) | 392 | xd_append_arg (unsigned int dtype, Lisp_Object object, DBusMessageIter *iter) |
| 397 | unsigned int dtype; | ||
| 398 | Lisp_Object object; | ||
| 399 | DBusMessageIter *iter; | ||
| 400 | { | 393 | { |
| 401 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; | 394 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; |
| 402 | DBusMessageIter subiter; | 395 | DBusMessageIter subiter; |
| @@ -604,9 +597,7 @@ xd_append_arg (dtype, object, iter) | |||
| 604 | D-Bus message must be a valid DBusType. Compound D-Bus types | 597 | D-Bus message must be a valid DBusType. Compound D-Bus types |
| 605 | result always in a Lisp list. */ | 598 | result always in a Lisp list. */ |
| 606 | static Lisp_Object | 599 | static Lisp_Object |
| 607 | xd_retrieve_arg (dtype, iter) | 600 | xd_retrieve_arg (unsigned int dtype, DBusMessageIter *iter) |
| 608 | unsigned int dtype; | ||
| 609 | DBusMessageIter *iter; | ||
| 610 | { | 601 | { |
| 611 | 602 | ||
| 612 | switch (dtype) | 603 | switch (dtype) |
| @@ -725,8 +716,7 @@ xd_retrieve_arg (dtype, iter) | |||
| 725 | /* Initialize D-Bus connection. BUS is a Lisp symbol, either :system | 716 | /* Initialize D-Bus connection. BUS is a Lisp symbol, either :system |
| 726 | or :session. It tells which D-Bus to be initialized. */ | 717 | or :session. It tells which D-Bus to be initialized. */ |
| 727 | static DBusConnection * | 718 | static DBusConnection * |
| 728 | xd_initialize (bus) | 719 | xd_initialize (Lisp_Object bus) |
| 729 | Lisp_Object bus; | ||
| 730 | { | 720 | { |
| 731 | DBusConnection *connection; | 721 | DBusConnection *connection; |
| 732 | DBusError derror; | 722 | DBusError derror; |
| @@ -766,9 +756,7 @@ xd_initialize (bus) | |||
| 766 | /* Add connection file descriptor to input_wait_mask, in order to | 756 | /* Add connection file descriptor to input_wait_mask, in order to |
| 767 | let select() detect, whether a new message has been arrived. */ | 757 | let select() detect, whether a new message has been arrived. */ |
| 768 | dbus_bool_t | 758 | dbus_bool_t |
| 769 | xd_add_watch (watch, data) | 759 | xd_add_watch (DBusWatch *watch, void *data) |
| 770 | DBusWatch *watch; | ||
| 771 | void *data; | ||
| 772 | { | 760 | { |
| 773 | /* We check only for incoming data. */ | 761 | /* We check only for incoming data. */ |
| 774 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) | 762 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) |
| @@ -797,9 +785,7 @@ xd_add_watch (watch, data) | |||
| 797 | /* Remove connection file descriptor from input_wait_mask. DATA is | 785 | /* Remove connection file descriptor from input_wait_mask. DATA is |
| 798 | the used bus, either QCdbus_system_bus or QCdbus_session_bus. */ | 786 | the used bus, either QCdbus_system_bus or QCdbus_session_bus. */ |
| 799 | void | 787 | void |
| 800 | xd_remove_watch (watch, data) | 788 | xd_remove_watch (DBusWatch *watch, void *data) |
| 801 | DBusWatch *watch; | ||
| 802 | void *data; | ||
| 803 | { | 789 | { |
| 804 | /* We check only for incoming data. */ | 790 | /* We check only for incoming data. */ |
| 805 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) | 791 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) |
| @@ -1569,8 +1555,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) | |||
| 1569 | /* Check, whether there is pending input in the message queue of the | 1555 | /* Check, whether there is pending input in the message queue of the |
| 1570 | D-Bus BUS. BUS is a Lisp symbol, either :system or :session. */ | 1556 | D-Bus BUS. BUS is a Lisp symbol, either :system or :session. */ |
| 1571 | int | 1557 | int |
| 1572 | xd_get_dispatch_status (bus) | 1558 | xd_get_dispatch_status (Lisp_Object bus) |
| 1573 | Lisp_Object bus; | ||
| 1574 | { | 1559 | { |
| 1575 | DBusConnection *connection; | 1560 | DBusConnection *connection; |
| 1576 | 1561 | ||
| @@ -1589,7 +1574,7 @@ xd_get_dispatch_status (bus) | |||
| 1589 | 1574 | ||
| 1590 | /* Check for queued incoming messages from the system and session buses. */ | 1575 | /* Check for queued incoming messages from the system and session buses. */ |
| 1591 | int | 1576 | int |
| 1592 | xd_pending_messages () | 1577 | xd_pending_messages (void) |
| 1593 | { | 1578 | { |
| 1594 | 1579 | ||
| 1595 | /* Vdbus_registered_objects_table will be initialized as hash table | 1580 | /* Vdbus_registered_objects_table will be initialized as hash table |
| @@ -1606,8 +1591,7 @@ xd_pending_messages () | |||
| 1606 | /* Read queued incoming message of the D-Bus BUS. BUS is a Lisp | 1591 | /* Read queued incoming message of the D-Bus BUS. BUS is a Lisp |
| 1607 | symbol, either :system or :session. */ | 1592 | symbol, either :system or :session. */ |
| 1608 | static Lisp_Object | 1593 | static Lisp_Object |
| 1609 | xd_read_message (bus) | 1594 | xd_read_message (Lisp_Object bus) |
| 1610 | Lisp_Object bus; | ||
| 1611 | { | 1595 | { |
| 1612 | Lisp_Object args, key, value; | 1596 | Lisp_Object args, key, value; |
| 1613 | struct gcpro gcpro1; | 1597 | struct gcpro gcpro1; |
| @@ -1764,7 +1748,7 @@ xd_read_message (bus) | |||
| 1764 | 1748 | ||
| 1765 | /* Read queued incoming messages from the system and session buses. */ | 1749 | /* Read queued incoming messages from the system and session buses. */ |
| 1766 | void | 1750 | void |
| 1767 | xd_read_queued_messages () | 1751 | xd_read_queued_messages (void) |
| 1768 | { | 1752 | { |
| 1769 | 1753 | ||
| 1770 | /* Vdbus_registered_objects_table will be initialized as hash table | 1754 | /* Vdbus_registered_objects_table will be initialized as hash table |
| @@ -1990,7 +1974,7 @@ used for composing the returning D-Bus message. */) | |||
| 1990 | 1974 | ||
| 1991 | 1975 | ||
| 1992 | void | 1976 | void |
| 1993 | syms_of_dbusbind () | 1977 | syms_of_dbusbind (void) |
| 1994 | { | 1978 | { |
| 1995 | 1979 | ||
| 1996 | Qdbus_init_bus = intern_c_string ("dbus-init-bus"); | 1980 | Qdbus_init_bus = intern_c_string ("dbus-init-bus"); |