aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbusbind.c
diff options
context:
space:
mode:
authorDan Nicolaescu2010-07-04 00:50:25 -0700
committerDan Nicolaescu2010-07-04 00:50:25 -0700
commit971de7fb158335fbda39525feb2d7776a26bc030 (patch)
tree605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/dbusbind.c
parentb8463cbfbe2c5183cf40772df2746e58b787ddeb (diff)
downloademacs-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.c40
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. */
165static int 165static int
166xd_symbol_to_dbus_type (object) 166xd_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. */
223static void 222static void
224xd_signature (signature, dtype, parent_type, object) 223xd_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. */
395static void 391static void
396xd_append_arg (dtype, object, iter) 392xd_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. */
606static Lisp_Object 599static Lisp_Object
607xd_retrieve_arg (dtype, iter) 600xd_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. */
727static DBusConnection * 718static DBusConnection *
728xd_initialize (bus) 719xd_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. */
768dbus_bool_t 758dbus_bool_t
769xd_add_watch (watch, data) 759xd_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. */
799void 787void
800xd_remove_watch (watch, data) 788xd_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. */
1571int 1557int
1572xd_get_dispatch_status (bus) 1558xd_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. */
1591int 1576int
1592xd_pending_messages () 1577xd_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. */
1608static Lisp_Object 1593static Lisp_Object
1609xd_read_message (bus) 1594xd_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. */
1766void 1750void
1767xd_read_queued_messages () 1751xd_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
1992void 1976void
1993syms_of_dbusbind () 1977syms_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");