diff options
Diffstat (limited to 'src/dbusbind.c')
| -rw-r--r-- | src/dbusbind.c | 28 |
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 | ||
| 1939 | There are two different uses of the hash table: for accessing | 1945 | There are two different uses of the hash table: for accessing |
| 1940 | registered interfaces properties, targeted by signals or method calls, | 1946 | registered interfaces properties, targeted by signals, method calls or |
| 1941 | and for calling handlers in case of non-blocking method call returns. | 1947 | monitors, and for calling handlers in case of non-blocking method call |
| 1948 | returns. | ||
| 1942 | 1949 | ||
| 1943 | In the first case, the key in the hash table is the list (TYPE BUS | 1950 | In the first case, the key in the hash table is the list (TYPE BUS |
| 1944 | INTERFACE 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 |
| 1947 | string denoting the bus address. INTERFACE is a string which denotes | 1954 | string 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. | |||
| 1951 | The value in the hash table is a list of quadruple lists ((UNAME | 1958 | The value in the hash table is a list of quadruple lists ((UNAME |
| 1952 | SERVICE PATH OBJECT [RULE]) ...). SERVICE is the service name as | 1959 | SERVICE PATH OBJECT [RULE]) ...). SERVICE is the service name as |
| 1953 | registered, UNAME is the corresponding unique name. In case of | 1960 | registered, UNAME is the corresponding unique name. In case of |
| 1954 | registered methods and properties, UNAME is nil. PATH is the object | 1961 | registered methods, properties and monitors, UNAME is nil. PATH is |
| 1955 | path of the sending object. All of them can be nil, which means a | 1962 | the object path of the sending object. All of them can be nil, which |
| 1956 | wildcard then. | 1963 | means a wildcard then. |
| 1957 | 1964 | ||
| 1958 | OBJECT is either the handler to be called when a D-Bus message, which | 1965 | OBJECT is either the handler to be called when a D-Bus message, which |
| 1959 | matches the key criteria, arrives (TYPE `:method', `:signal' and | 1966 | matches 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 | ||
| 1963 | For entries of type `:signal', there is also a fifth element RULE, | 1970 | For entries of type `:signal' or `:monitor', there is also a fifth |
| 1964 | which keeps the match string the signal is registered with. | 1971 | element RULE, which keeps the match string the signal or monitor is |
| 1972 | registered with. | ||
| 1965 | 1973 | ||
| 1966 | In the second case, the key in the hash table is the list (:serial BUS | 1974 | In the second case, the key in the hash table is the list (:serial BUS |
| 1967 | SERIAL). BUS is either a Lisp symbol, `:system' or `:session', or a | 1975 | SERIAL). BUS is either a Lisp symbol, `:system' or `:session', or a |