aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbusbind.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbusbind.c')
-rw-r--r--src/dbusbind.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c
index cca5f13907d..7904606d39e 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -446,12 +446,18 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object)
446 { 446 {
447 Lisp_Object elt1 = XD_NEXT_VALUE (elt); 447 Lisp_Object elt1 = XD_NEXT_VALUE (elt);
448 if (CONSP (elt1) && STRINGP (XCAR (elt1)) && NILP (XCDR (elt1))) 448 if (CONSP (elt1) && STRINGP (XCAR (elt1)) && NILP (XCDR (elt1)))
449 subsig = SSDATA (XCAR (elt1)); 449 {
450 subsig = SSDATA (XCAR (elt1));
451 elt = Qnil;
452 }
450 } 453 }
451 454
452 while (!NILP (elt)) 455 while (!NILP (elt))
453 { 456 {
454 if (subtype != XD_OBJECT_TO_DBUS_TYPE (CAR_SAFE (elt))) 457 char x[DBUS_MAXIMUM_SIGNATURE_LENGTH];
458 subtype = XD_OBJECT_TO_DBUS_TYPE (CAR_SAFE (elt));
459 xd_signature (x, subtype, dtype, CAR_SAFE (XD_NEXT_VALUE (elt)));
460 if (strcmp (subsig, x) != 0)
455 wrong_type_argument (intern ("D-Bus"), CAR_SAFE (elt)); 461 wrong_type_argument (intern ("D-Bus"), CAR_SAFE (elt));
456 elt = CDR_SAFE (XD_NEXT_VALUE (elt)); 462 elt = CDR_SAFE (XD_NEXT_VALUE (elt));
457 } 463 }
@@ -1937,11 +1943,12 @@ syms_of_dbusbind (void)
1937 doc: /* Hash table of registered functions for D-Bus. 1943 doc: /* Hash table of registered functions for D-Bus.
1938 1944
1939There are two different uses of the hash table: for accessing 1945There are two different uses of the hash table: for accessing
1940registered interfaces properties, targeted by signals or method calls, 1946registered interfaces properties, targeted by signals, method calls or
1941and for calling handlers in case of non-blocking method call returns. 1947monitors, and for calling handlers in case of non-blocking method call
1948returns.
1942 1949
1943In the first case, the key in the hash table is the list (TYPE BUS 1950In the first case, the key in the hash table is the list (TYPE BUS
1944INTERFACE MEMBER). TYPE is one of the Lisp symbols `:method', 1951[INTERFACE MEMBER]). TYPE is one of the Lisp symbols `:method',
1945`:signal', `:property' or `:monitor'. BUS is either a Lisp symbol, 1952`:signal', `:property' or `:monitor'. BUS is either a Lisp symbol,
1946`:system', `:session', `:system-private' or `:session-private', or a 1953`:system', `:session', `:system-private' or `:session-private', or a
1947string denoting the bus address. INTERFACE is a string which denotes 1954string denoting the bus address. INTERFACE is a string which denotes
@@ -1951,17 +1958,18 @@ signal or a property INTERFACE is offering. All arguments can be nil.
1951The value in the hash table is a list of quadruple lists ((UNAME 1958The value in the hash table is a list of quadruple lists ((UNAME
1952SERVICE PATH OBJECT [RULE]) ...). SERVICE is the service name as 1959SERVICE PATH OBJECT [RULE]) ...). SERVICE is the service name as
1953registered, UNAME is the corresponding unique name. In case of 1960registered, UNAME is the corresponding unique name. In case of
1954registered methods and properties, UNAME is nil. PATH is the object 1961registered methods, properties and monitors, UNAME is nil. PATH is
1955path of the sending object. All of them can be nil, which means a 1962the object path of the sending object. All of them can be nil, which
1956wildcard then. 1963means a wildcard then.
1957 1964
1958OBJECT is either the handler to be called when a D-Bus message, which 1965OBJECT is either the handler to be called when a D-Bus message, which
1959matches the key criteria, arrives (TYPE `:method', `:signal' and 1966matches the key criteria, arrives (TYPE `:method', `:signal' and
1960`:monitor'), or a list (ACCESS EMITS-SIGNAL VALUE) for TYPE 1967`:monitor'), or a list (ACCESS EMITS-SIGNAL VALUE) for TYPE
1961`:property'. 1968`:property'.
1962 1969
1963For entries of type `:signal', there is also a fifth element RULE, 1970For entries of type `:signal' or `:monitor', there is also a fifth
1964which keeps the match string the signal is registered with. 1971element RULE, which keeps the match string the signal or monitor is
1972registered with.
1965 1973
1966In the second case, the key in the hash table is the list (:serial BUS 1974In the second case, the key in the hash table is the list (:serial BUS
1967SERIAL). BUS is either a Lisp symbol, `:system' or `:session', or a 1975SERIAL). BUS is either a Lisp symbol, `:system' or `:session', or a