diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2008-06-03 12:54:26 +0000 |
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2008-06-03 12:54:26 +0000 |
| commit | 9162dfde2d6a7625849aa873fc5ef9220779e7a9 (patch) | |
| tree | c55f26324f76f01837f82b560615f139cffef34f /daemon | |
| parent | e0a54a416a5abc3bab139e5db6391c1926855ff6 (diff) | |
Move D-Bus config file and example clients back into hcid directory
Diffstat (limited to 'daemon')
| -rw-r--r-- | daemon/Makefile.am | 8 | ||||
| -rw-r--r-- | daemon/bluetooth.conf | 33 | ||||
| -rwxr-xr-x | daemon/test-database | 119 | ||||
| -rwxr-xr-x | daemon/test-manager | 27 |
4 files changed, 0 insertions, 187 deletions
diff --git a/daemon/Makefile.am b/daemon/Makefile.am index a3354221..02742923 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -1,10 +1,2 @@ -if CONFIGFILES -dbusdir = $(sysconfdir)/dbus-1/system.d - -dbus_DATA = bluetooth.conf -endif - -EXTRA_DIST = bluetooth.conf test-manager test-database - MAINTAINERCLEANFILES = Makefile.in diff --git a/daemon/bluetooth.conf b/daemon/bluetooth.conf deleted file mode 100644 index aa642a2a..00000000 --- a/daemon/bluetooth.conf +++ /dev/null @@ -1,33 +0,0 @@ -<!-- This configuration file specifies the required security policies - for Bluetooth core service to work. --> - -<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" - "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> -<busconfig> - - <!-- ../system.conf have denied everything, so we just punch some holes --> - - <policy user="root"> - <allow own="org.bluez"/> - </policy> - - <policy at_console="true"> - <allow send_destination="org.bluez.Manager"/> - <allow receive_sender="org.bluez.Manager"/> - - <allow send_path="/org/bluez"/> - - <allow send_destination="org.bluez.Adapter"/> - <allow receive_sender="org.bluez.Adapter"/> - - <allow send_destination="org.bluez.Service"/> - <allow receive_sender="org.bluez.Service"/> - - <allow send_destination="org.bluez.Database"/> - <allow receive_sender="org.bluez.Database"/> - - <allow send_destination="org.bluez.Security"/> - <allow receive_sender="org.bluez.Security"/> - </policy> - -</busconfig> diff --git a/daemon/test-database b/daemon/test-database deleted file mode 100755 index 44a872a9..00000000 --- a/daemon/test-database +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/python - -import time -import dbus - -bus = dbus.SystemBus() - -xml = ' \ -<?xml version="1.0" encoding="UTF-8" ?> \ -<record> \ - <attribute id="0x0001"> \ - <sequence> \ - <uuid value="0x1101"/> \ - </sequence> \ - </attribute> \ - \ - <attribute id="0x0002"> \ - <uint32 value="0"/> \ - </attribute> \ - \ - <attribute id="0x0003"> \ - <uuid value="00001101-0000-1000-8000-00805f9b34fb"/> \ - </attribute> \ - \ - <attribute id="0x0004"> \ - <sequence> \ - <sequence> \ - <uuid value="0x0100"/> \ - </sequence> \ - <sequence> \ - <uuid value="0x0003"/> \ - <uint8 value="23"/> \ - </sequence> \ - </sequence> \ - </attribute> \ - \ - <attribute id="0x0005"> \ - <sequence> \ - <uuid value="0x1002"/> \ - </sequence> \ - </attribute> \ - \ - <attribute id="0x0006"> \ - <sequence> \ - <uint16 value="0x656e"/> \ - <uint16 value="0x006a"/> \ - <uint16 value="0x0100"/> \ - </sequence> \ - </attribute> \ - \ - <attribute id="0x0007"> \ - <uint32 value="0"/> \ - </attribute> \ - \ - <attribute id="0x0008"> \ - <uint8 value="0xff"/> \ - </attribute> \ - \ - <attribute id="0x0009"> \ - <sequence> \ - <sequence> \ - <uuid value="0x1101"/> \ - <uint16 value="0x0100"/> \ - </sequence> \ - </sequence> \ - </attribute> \ - \ - <attribute id="0x000a"> \ - <url value="http://www.bluez.org/"/> \ - </attribute> \ - \ - <attribute id="0x000b"> \ - <url value="http://www.bluez.org/"/> \ - </attribute> \ - \ - <attribute id="0x000c"> \ - <url value="http://www.bluez.org/"/> \ - </attribute> \ - \ - <attribute id="0x0100"> \ - <text value="Serial Port"/> \ - </attribute> \ - \ - <attribute id="0x0101"> \ - <text value="Serial Port Service"/> \ - </attribute> \ - \ - <attribute id="0x0102"> \ - <text value="BlueZ"/> \ - </attribute> \ - \ - <attribute id="0x0200"> \ - <sequence> \ - <uint16 value="0x0100"/> \ - </sequence> \ - </attribute> \ - \ - <attribute id="0x0201"> \ - <uint32 value="0"/> \ - </attribute> \ -</record> \ -' - -database = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), - 'org.bluez.Database') - -handle = database.AddServiceRecordFromXML(xml) - -print "Service record with handle 0x%04x added" % (handle) - -print "Press CTRL-C to remove service record" - -try: - time.sleep(1000) - print "Terminating session" -except: - pass - -database.RemoveServiceRecord(dbus.UInt32(handle)) diff --git a/daemon/test-manager b/daemon/test-manager deleted file mode 100755 index 759b6a48..00000000 --- a/daemon/test-manager +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/python - -import gobject - -import dbus -import dbus.mainloop.glib - -def adapter_added(path): - print "Adapter with path %s added" % (path) - -def adapter_removed(path): - print "Adapter with path %s removed" % (path) - -if __name__ == "__main__": - dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) - - bus = dbus.SystemBus() - - manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), - 'org.bluez.Manager') - - manager.connect_to_signal("AdapterAdded", adapter_added) - - manager.connect_to_signal("AdapterRemoved", adapter_removed) - - mainloop = gobject.MainLoop() - mainloop.run() |
