[gnome-bluetooth] lib: Add introspection XML to the BlueZ API's



commit 154705bd7594a443f052987c7f6036b0a13c620b
Author: Gustavo Padovan <gustavo padovan collabora co uk>
Date:   Wed May 15 17:30:47 2013 -0300

    lib: Add introspection XML to the BlueZ API's
    
    https://bugzilla.gnome.org/show_bug.cgi?id=685717

 lib/Makefile.am          |   11 ++++-
 lib/bluetooth-client.xml |  120 +++++++++++++++++++--------------------------
 lib/bluetooth-fdo.xml    |   33 +++++++++++++
 3 files changed, 94 insertions(+), 70 deletions(-)
---
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 907d163..4fb813d 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -17,6 +17,7 @@ libgnome_bluetooth_c_sources =                \
        bluetooth-chooser-button.c      \
        bluetooth-chooser-combo.c       \
        bluetooth-client-glue.c         \
+       bluetooth-fdo-glue.c            \
        bluetooth-plugin-manager.c      \
        rfkill-glib.c
 
@@ -26,6 +27,7 @@ libgnome_bluetooth_private_headers =  \
        gnome-bluetooth-enum-types.h    \
        bluetooth-chooser-private.h     \
        bluetooth-client-glue.h         \
+       bluetooth-fdo-glue.h            \
        rfkill-glib.h                   \
        rfkill.h
 
@@ -97,6 +99,8 @@ endif # HAVE_INTROSPECTION
 
 BUILT_SOURCES = bluetooth-client-glue.h \
                bluetooth-client-glue.c \
+               bluetooth-fdo-glue.h \
+               bluetooth-fdo-glue.c \
                gnome-bluetooth-enum-types.h \
                gnome-bluetooth-enum-types.c
 
@@ -116,7 +120,7 @@ test_class_LDADD = libgnome-bluetooth.la $(LIBGNOMEBT_LIBS)
 
 test_killswitch_LDADD = libgnome-bluetooth.la $(LIBGNOMEBT_LIBS)
 
-EXTRA_DIST += bluetooth-client.xml gnome-bluetooth.symbols
+EXTRA_DIST += bluetooth-client.xml bluetooth-fdo.xml gnome-bluetooth.symbols
 
 MAINTAINERCLEANFILES = Makefile.in
 
@@ -125,6 +129,11 @@ bluetooth-client-glue.c: bluetooth-client-glue.h
 bluetooth-client-glue.c bluetooth-client-glue.h: bluetooth-client.xml
        $(AM_V_GEN) $(GDBUS_CODEGEN) --c-namespace= --generate-c-code=bluetooth-client-glue 
--interface-prefix=org.bluez $<
 
+bluetooth-fdo-glue.c: bluetooth-fdo-glue.h
+
+bluetooth-fdo-glue.c bluetooth-fdo-glue.h: bluetooth-fdo.xml
+       $(AM_V_GEN) $(GDBUS_CODEGEN) --c-namespace= --generate-c-code=bluetooth-fdo-glue 
--interface-prefix=org.freedesktop.DBus $<
+
 gnome_bluetooth_headers_to_scan_for_enums = bluetooth-enums.h
 # Generate the enums source code, with glib-mkenums:
 # This is based on the same Makefile.am stuff in pango:
diff --git a/lib/bluetooth-client.xml b/lib/bluetooth-client.xml
index 32d183e..04bfa5a 100644
--- a/lib/bluetooth-client.xml
+++ b/lib/bluetooth-client.xml
@@ -1,77 +1,59 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<node name="/">
-  <interface name="org.bluez.Manager">
-    <method name="DefaultAdapter">
-      <arg type="o" direction="out"/>
-    </method>
-
-    <method name="GetProperties">
-      <arg type="a{sv}" direction="out"/>
-    </method>
-
-    <signal name="AdapterAdded">
-      <arg type="o"/>
-    </signal>
-    <signal name="AdapterRemoved">
-      <arg type="o"/>
-    </signal>
-    <signal name="DefaultAdapterChanged">
-      <arg type="o"/>
-    </signal>
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd";>
+
+<node>
+  <interface name="org.bluez.Adapter1">
+    <method name="StartDiscovery"></method>
+    <method name="StopDiscovery"></method>
+    <method name="RemoveDevice"><arg name="device" type="o" direction="in"/></method>
+    <property name="Address" type="s" access="read"></property>
+    <property name="Name" type="s" access="read"></property>
+    <property name="Alias" type="s" access="readwrite"></property>
+    <property name="Class" type="u" access="read"></property>
+    <property name="Powered" type="b" access="readwrite"></property>
+    <property name="Discoverable" type="b" access="readwrite"></property>
+    <property name="DiscoverableTimeout" type="u" access="readwrite"></property>
+    <property name="Pairable" type="b" access="readwrite"></property>
+    <property name="PairableTimeout" type="u" access="readwrite"></property>
+    <property name="Discovering" type="b" access="read"></property>
+    <property name="UUIDs" type="as" access="read"></property>
+    <property name="Modalias" type="s" access="read"></property>
   </interface>
 
-  <interface name="org.bluez.Adapter">
-    <method name="GetProperties">
-      <arg type="a{sv}" direction="out"/>
-    </method>
-
-    <method name="SetProperty">
-      <arg type="s" direction="in"/>
-      <arg type="v" direction="in"/>
-    </method>
-
-    <method name="StartDiscovery">
-    </method>
-
-    <method name="StopDiscovery">
-    </method>
-
-    <method name="RemoveDevice">
-      <arg type="o" name="device" direction="in"/>
-    </method>
-
-    <signal name="PropertyChanged">
-      <arg type="s"/>
-      <arg type="v"/>
-    </signal>
-    <signal name="DeviceCreated">
-      <arg type="o"/>
-    </signal>
-    <signal name="DeviceRemoved">
-      <arg type="o"/>
-    </signal>
-    <signal name="DeviceFound">
-      <arg type="s"/>
-      <arg type="a{sv}"/>
-    </signal>
+  <interface name="org.bluez.Device1">
+    <method name="Disconnect"></method>
+    <method name="Connect"></method>
+    <method name="ConnectProfile"><arg name="UUID" type="s" direction="in"/> </method>
+    <method name="DisconnectProfile"><arg name="UUID" type="s" direction="in"/> </method>
+    <method name="Pair"></method>
+    <method name="CancelPairing"></method>
+    <property name="Address" type="s" access="read"></property>
+    <property name="Name" type="s" access="read"></property>
+    <property name="Alias" type="s" access="readwrite"></property>
+    <property name="Class" type="u" access="read"></property>
+    <property name="Appearance" type="q" access="read"></property>
+    <property name="Icon" type="s" access="read"></property>
+    <property name="Paired" type="b" access="read"></property>
+    <property name="Trusted" type="b" access="readwrite"></property>
+    <property name="Blocked" type="b" access="readwrite"></property>
+    <property name="LegacyPairing" type="b" access="read"></property>
+    <property name="RSSI" type="n" access="read"></property>
+    <property name="Connected" type="b" access="read"></property>
+    <property name="UUIDs" type="as" access="read"></property>
+    <property name="Modalias" type="s" access="read"></property>
+    <property name="Adapter" type="o" access="read"></property>
   </interface>
 
-  <interface name="org.bluez.Device">
-    <method name="GetProperties">
-      <arg type="a{sv}" direction="out"/>
+  <interface name="org.bluez.AgentManager1">
+    <method name="RegisterAgent">
+      <arg name="agent" type="o" direction="in"/>
+      <arg name="capability" type="s" direction="in"/>
     </method>
-
-    <method name="SetProperty">
-      <arg type="s" direction="in"/>
-      <arg type="v" direction="in"/>
+    <method name="UnregisterAgent">
+      <arg name="agent" type="o" direction="in"/>
+    </method>
+    <method name="RequestDefaultAgent">
+      <arg name="agent" type="o" direction="in"/>
     </method>
-
-    <method name="Disconnect"/>
-
-    <signal name="PropertyChanged">
-      <arg type="s"/>
-      <arg type="v"/>
-    </signal>
   </interface>
 </node>
diff --git a/lib/bluetooth-fdo.xml b/lib/bluetooth-fdo.xml
new file mode 100644
index 0000000..398d613
--- /dev/null
+++ b/lib/bluetooth-fdo.xml
@@ -0,0 +1,33 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd";>
+
+<node>
+  <interface name="org.freedesktop.DBus.ObjectManager">
+    <method name="GetManagedObjects"><arg name="objects" type="a{oa{sa{sv}}}" direction="out"/>
+    </method>
+    <signal name="InterfacesAdded"><arg name="object" type="o"/>
+      <arg name="interfaces" type="a{sa{sv}}"/>
+    </signal>
+    <signal name="InterfacesRemoved"><arg name="object" type="o"/>
+      <arg name="interfaces" type="as"/>
+    </signal>
+  </interface>
+
+  <interface name="org.freedesktop.DBus.Properties"><method name="Get"><arg name="interface" type="s" 
direction="in"/>
+      <arg name="name" type="s" direction="in"/>
+      <arg name="value" type="v" direction="out"/>
+    </method>
+    <method name="Set"><arg name="interface" type="s" direction="in"/>
+      <arg name="name" type="s" direction="in"/>
+      <arg name="value" type="v" direction="in"/>
+    </method>
+    <method name="GetAll"><arg name="interface" type="s" direction="in"/>
+      <arg name="properties" type="a{sv}" direction="out"/>
+    </method>
+    <signal name="PropertiesChanged"><arg name="interface" type="s"/>
+      <arg name="changed_properties" type="a{sv}"/>
+      <arg name="invalidated_properties" type="as"/>
+    </signal>
+  </interface>
+</node>
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]