2010-08-21 Jan Moringen Added tests for type parsers in dbus-introspection.el * dbus-introspection.el (header): added version 0.2 to history section (test dbus-introspection-test-parse-simple-type-smoke): new test; smoke test for `dbus-proxy-parse-simple-type' (test dbus-introspection-test-parse-composite-type-smoke): new test; smoke test for `dbus-proxy-parse-composite-type' (test dbus-introspection-test-parse-type-list-smoke): new test; smoke test for `dbus-proxy-parse-type-list' Support parsing of lists of types in dbus-introspection.el * dbus-introspection.el (dbus-proxy-parse-composite-type): do not encapsulate the single subtype of an array in a list; call `dbus-proxy-parse-type-list' when multiple subtypes are allowed (dbus-proxy-parse-type-list): new function; parse a string containing a list of type designators Improved dbus-proxy-parse-composite-type in dbus-introspection.el * dbus-introspection.el (dbus-proxy-parse-composite-type): made this work properly in most cases; removed handling of variant type which is not really a composite type; added documentation string Better error handling for simple types in dbus-introspection.el * dbus-introspection.el (malformed-signature): new condition symbol; this condition is signaled when parsing of a type signature fails (dbus-proxy-parse-simple-type): signal `malformed-signature' instead of using `error'; added documentation string; cleanup Added test dbus-proxy-test-gdm in dbus-proxy.el * dbus-proxy.el (test dbus-proxy-test-gdm): new test; added because the Gdm object has methods that return object paths Changed DBus -> D-Bus in all comments in dbus-proxy.el * dbus-proxy.el: changed DBus -> D-Bus in all comments 2010-08-15 Jan Moringen Added unit test for interaction with rhythmbox in dbus-proxy.el * dbus-proxy.el (test dbus-proxy-test-rhythmbox): new test; test some interaction with the rhythmbox application Removed resolved TODO tags in dbus-proxy.el * dbus-proxy.el (dbus-proxy-make-interface-class): removed TODO tag about defining the condition symbols Added unit test for connecting signals in dbus-proxy.el * dbus-proxy.el (test dbus-proxy-test-connect): new test; test connecting DBus signals to handlers Test constructing proxy for system bus object in dbus-proxy.el * dbus-proxy.el (test dbus-proxy-test-make-remote-proxy): also test constructing a proxy for an object that resides on the system bus Added conditions no-such-{property, signal} in dbus-proxy.el * dbus-proxy.el (condition no-such-property): new condition; signaled when a specified property cannot be found (condition no-such-signal): new condition; signaled when a specified signal cannot be found Added TODO which contains a list of unresolved issues * TODO: new file; list of unresolved issues 2010-08-13 Jan Moringen Extended unit test in dbus-proxy.el * dbus-proxy.el (test dbus-proxy-test-mission-control): improved comment (test dbus-proxy-test-devicekit): improved tests for slot access; test connecting signals Signal connect and disconnect methods in dbus-proxy.el * dbus-proxy.el (header): bumped version to 0.3 section; extended description in commentary section to cover handling of properties and signals; added version 0.3 to history section (dbus-proxy-remote-object::connect): new method; connect a handler to a DBus signal (dbus-proxy-remote-object::disconnect): new method; disconnect a handler from a DBus signal (dbus-proxy-make-method): cosmetic changes in logging (dbus-proxy-make-interface-class): generate `dbus-proxy-find-signal' method for the interface class; cosmetic changes in logging (dbus-proxy-make-object-class): cosmetic changes in logging Find slot properties using stored interface info in dbus-proxy.el * dbus-proxy.el (dbus-proxy-remote-object::slot-missing): moved into this class from `dbus-proxy-interface-object'; use `dbus-proxy-find-property' to find interface name and property name (dbus-proxy-interface-object::slot-missing): moved to `dbus-proxy-remote-object' class (dbus-proxy-make-interface-class): generate `dbus-proxy-find-property' method for the interface class 2010-08-12 Jan Moringen Store properties and signals in interface slots in dbus-proxy.el * dbus-proxy.el (dbus-proxy-interface-object::properties): new slot; list of properties in the interface (dbus-proxy-interface-object::signals): new slot; list of signals in the interface (dbus-proxy-transform-property-name-function): new variable; the value is a function that transforms DBus property names into suitable slot names (dbus-proxy-transform-signal-name-function): new variable; the value is a function that transforms DBus signal names into suitable signal names (dbus-proxy-make-property-name): new function; transform a DBus property name into a slot name (dbus-proxy-make-signal-name): new function; transform a DBus signal name into a lispy signal name (dbus-proxy-make-interface-class): compute and install values for properties and signals slots Reanimated signal {,dis}connect methods in dbus-proxy.el * dbus-proxy.el (dbus-proxy-remote-object::connect): renamed `dbus-proxy-connect' -> `connect'; reanimated as stub (dbus-proxy-remote-object::disconnect): renamed `dbus-proxy-disconnect' -> `disconnect'; reanimated as stub Increased sophistication of method name transform in dbus-proxy.el * dbus-proxy.el (dbus-proxy-transform-method-name-function): changed value to `dbus-proxy-transform-method-name' (dbus-proxy-transform-method-name): new function; transform method names using `dbus-proxy-transform-camel-case' and additional rules (dbus-proxy-transform-camel-case): improved documentation string (test dbus-proxy-test-transform-camel-case-smoke): added more cases Added property introspection functions in dbus-introspection.el * dbus-introspection.el (dbus-property-p): new function; predicate for property introspection elements (dbus-property-name): new function; name accessor for property introspection elements (dbus-property-type): new function; type accessor for property introspection elements (dbus-property-access): new function; access accessor for property introspection elements (dbus-interface-properties): new function; return property elements of an introspection interface 2010-08-11 Jan Moringen Added some comments in dbus-introspection.el * dbus-introspection.el: added some comments Added new introspection accessors in dbus-introspection.el * dbus-introspection.el (dbus-signal-name): new method; return name of a signal introspection element (dbus-interface-methods): new method; return method elements of an interface element (dbus-interface-signals): new method; return signal elements of an introspection element Added docstring to -simple-type-codes in dbus-introspection.el * dbus-introspection.el (dbus-proxy-simple-type-codes): added documentation string Added variant type to -simple-type-codes in dbus-introspection.el * dbus-introspection.el (dbus-proxy-simple-type-codes): added code for variant type 2010-08-10 Jan Moringen Generate type specifiers in DBus method calls in dbus-proxy.el * dbus-proxy.el (dbus-proxy-make-method): call `dbus-proxy-make-call-args' to construct call arguments (dbus-proxy-make-call-args): new function; construct typed call arguments based on DBus argument specification if possible (dbus-proxy-test-make-call-arg-smoke): new unit test; smoke test for `dbus-proxy-make-call-args' Added function dbus-arg-type in dbus-introspection.el * dbus-introspection.el (dbus-proxy-simple-type-codes): added type ?d (dbus-arg-type): new function; return type of DBus argument 2010-08-09 Jan Moringen Add documentation strings to generated classes in dbus-proxy.el * dbus-proxy.el (dbus-proxy-make-object-class): generate a simple documentation string for the generated class 2010-08-08 Jan Moringen Added messages to code generating functions in dbus-proxy.el * dbus-proxy.el (dbus-proxy-make-method): added a message (dbus-proxy-make-interface-class): likewise (dbus-proxy-make-object-class): likewise Make redefinition actual work in dbus-proxy.el * dbus-proxy.el (dbus-proxy-make-remote-proxy): added optional argument redefine-classes (dbus-proxy-make-method-name): use `dbus-proxy-symbol-unsuitable-for-method' instead of just `fboundp' (dbus-proxy-make-object-class): added optional argument redefine-interface-classes (dbus-proxy-ensure-object-class): pass redefine argument to `dbus-proxy-make-object-class' (dbus-proxy-symbol-unsuitable-for-method): new function; check whether a method can be installed on a symbol 2010-08-07 Jan Moringen Added and improved docstrings in dbus-proxy.el (dbus-proxy-interface-object::slot-missing): added documentation string (dbus-proxy-interface-object::object-print): likewise (dbus-proxy-transform-method-name-function): likewise (test dbus-proxy-test-transform-camel-case-smoke): refer to correct function in documentation string Added a method name transformation facility in dbus-proxy.el * dbus-proxy.el (header): added version field; extended and adapted algorithm description in commentary section; bumped version to 0.2 in version section (dbus-proxy-transform-method-name-function): new variable; function used to transform DBus method names into corresponding lisp function names (dbus-proxy-make-method-name): new function; transforms a DBus method name into a lisp method name by applying `dbus-proxy-transform-method-name-function' and uniquifying the result (dbus-proxy-make-method): call `dbus-proxy-make-method-name' to obtain the name of the new method (dbus-proxy-transform-camel-case): new function; default name transformation function (test dbus-proxy-test-transform-camel-case-smoke): new unit test; test basic behavior of `dbus-proxy-transform-camel-case' (test dbus-proxy-test-dbus): expect transformed method names (test dbus-proxy-test-mission-control): likewise (test dbus-proxy-test-epiphany): likewise (test dbus-proxy-test-devicekit): likewise Added and improved unit tests in dbus-proxy.el * dbus-proxy.el (test dbus-proxy-test-make-remote-proxy): commented out expected error since we cannot implement this right now (test dbus-proxy-test-dbus): renamed `dbus-proxy-test-bus-proxy' -> `dbus-proxy-test-dbus' (test dbus-proxy-test-mission-control): new unit test; call some methods on the mission control object Added new unit tests in dbus-proxy.el * dbus-proxy.el (test dbus-proxy-test-bus-proxy): removed; split into dbus-proxy-test-bus-proxy, dbus-proxy-test-epiphany and dbus-proxy-test-devicekit (dbus-proxy-test-make-remote-proxy): new unit test; tests for `dbus-proxy-make-remote-proxy' (test dbus-proxy-test-bus-proxy): new unit test; call some methods on the DBus object (test dbus-proxy-test-epiphany): new unit test; call some methods on the epiphany browser object (test dbus-proxy-test-devicekit): new unit test; call some methods on the devicekit object Added a comment in dbus-proxy.el * dbus-proxy.el (dbus-proxy-get-object-class): added a comment Improved implementations of code generators in dbus-proxy.el * dbus-proxy.el (dbus-proxy-make-method): improved implementation; added documentation string (dbus-proxy-make-interface-class): improved implementation (dbus-proxy-make-object-class): improved implementation Use -ensure-object-class in -make-remote-proxy in dbus-proxy.el * dbus-proxy.el (dbus-proxy-make-remote-proxy): use `dbus-proxy-ensure-object-class' instead of -get and -make Reorganized getting, creating, ensuring of things in dbus-proxy.el * dbus-proxy.el (dbus-proxy-get-interface-class): moved (dbus-proxy-ensure-interface-class): new function; find interface class, creating it if necessary (dbus-proxy-get-object-class): moved (dbus-proxy-get-interface-class): new function; find object class, creating it if necessary Reordering in dbus-proxy.el * dbus-proxy.el (dbus-proxy-make-interface-class-symbol): moved to interface section (dbus-proxy-make-object-class-symbol): moved to object section Smarter conditional definition of unit tests in dbus-proxy.el * dbus-proxy.el (dbus-proxy-make-interface-class): added some comments (unit tests): require ert without error to conditionally define unit tests Added object-print method for interface objects in dbus-proxy.el * dbus-proxy.el (dbus-proxy-interface-object::object-print): new method; return string representation of the interface object (call): removed; obsolete (connect): renamed `connect' -> `dbus-proxy-connect'; commented out for now Fixed proxy creation in unit tests in dbus-proxy.el * dbus-proxy.el (unit tests): fixed calls to `dbus-proxy-make-remote-proxy' Renamed object class and added interface class in dbus-proxy.el * dbus-proxy.el (dbus-proxy-remote-object): renamed `dbus-proxy' -> `dbus-proxy-remote-object' (dbus-proxy-interface-object): new class; represents DBus interfaces (dbus-proxy-interface-object::slot-missing): now specialized on `dbus-proxy-interface-object'; cleanup; added comments (dbus-proxy-make-interface-class): interface class are subclasses of `dbus-proxy-interface object' Added docstrings to class dbus-proxy in dbus-proxy.el * dbus-proxy.el (dbus-proxy::service): added documentation string (dbus-proxy::object): likewise (dbus-proxy): improved documentation string Removed obsolete eval-backup in dbus-proxy.el * dbus-proxy.el (dbus-proxy-make-remote-proxy): comment changes (eval-backup): removed Renamed dbus-proxy-make-remote-proxy in dbus-proxy.el * dbus-proxy.el (header): updated copyright; updated commentary and history sections (dbus-proxy-make-remote-proxy): renamed `dbus-proxy-make-proxy' -> `dbus-proxy-make-remote-proxy' Minor cosmetic improvements in dbus-introspection.el * dbus-introspection.el (header): added one-line description; updated copyright; added keywords; added contents to commentary and history sections