From 438042361110a3a8960a42aadff3fa3a2e9209b0 Mon Sep 17 00:00:00 2001 From: Feresey Date: Wed, 21 Jun 2023 23:23:27 +0300 Subject: [PATCH 1/2] Generate code for bluez verison 5.66 --- Makefile | 6 +- bluez-5.66.json | 1 + bluez/profile/adapter/gen_Adapter1.go | 327 +++++++++------- .../admin_policy/gen_AdminPolicySet1.go | 32 +- .../admin_policy/gen_AdminPolicyStatus1.go | 5 +- .../gen_AdvertisementMonitor1.go | 37 +- .../gen_AdvertisementMonitorManager1.go | 57 +-- .../advertising/gen_LEAdvertisement1.go | 16 +- .../advertising/gen_LEAdvertisingManager1.go | 53 +-- bluez/profile/agent/gen_Agent1.go | 164 ++++---- bluez/profile/agent/gen_AgentManager1.go | 78 ++-- bluez/profile/battery/gen_Battery1.go | 5 +- bluez/profile/battery/gen_BatteryProvider1.go | 5 +- .../battery/gen_BatteryProviderManager1.go | 19 +- bluez/profile/device/gen_Device1.go | 197 ++++++---- bluez/profile/gatt/gen_GattCharacteristic1.go | 214 ++++++----- bluez/profile/gatt/gen_GattDescriptor1.go | 61 +-- bluez/profile/gatt/gen_GattManager1.go | 103 ++--- bluez/profile/gatt/gen_GattProfile1.go | 16 +- bluez/profile/gatt/gen_GattService1.go | 5 +- bluez/profile/gen_version.go | 2 +- bluez/profile/health/gen_HealthChannel1.go | 25 +- bluez/profile/health/gen_HealthDevice1.go | 50 +-- bluez/profile/health/gen_HealthManager1.go | 55 +-- bluez/profile/input/gen_Input1.go | 5 +- bluez/profile/media/gen_Media1.go | 131 ++++--- bluez/profile/media/gen_MediaControl1.go | 36 +- bluez/profile/media/gen_MediaEndpoint1.go | 210 ++++++++-- bluez/profile/media/gen_MediaFolder1.go | 44 ++- bluez/profile/media/gen_MediaItem1.go | 19 +- bluez/profile/media/gen_MediaPlayer1.go | 99 ++--- bluez/profile/media/gen_MediaTransport1.go | 94 ++++- bluez/profile/mesh/gen_Application1.go | 45 +-- bluez/profile/mesh/gen_Attention1.go | 35 +- bluez/profile/mesh/gen_Element1.go | 108 +++--- bluez/profile/mesh/gen_Management1.go | 358 +++++++++--------- bluez/profile/mesh/gen_Network1.go | 310 +++++++-------- bluez/profile/mesh/gen_Node1.go | 254 +++++++------ bluez/profile/mesh/gen_ProvisionAgent1.go | 144 +++---- bluez/profile/mesh/gen_Provisioner1.go | 105 ++--- bluez/profile/network/gen_Network1.go | 39 +- bluez/profile/network/gen_NetworkServer1.go | 31 +- bluez/profile/obex/gen_FileTransfer.go | 119 +++--- bluez/profile/obex/gen_Message1.go | 28 +- bluez/profile/obex/gen_MessageAccess1.go | 145 +++---- bluez/profile/obex/gen_PhonebookAccess1.go | 175 +++++---- bluez/profile/obex/gen_Synchronization1.go | 72 ++-- bluez/profile/obex_agent/gen_Agent1.go | 42 +- bluez/profile/obex_agent/gen_AgentManager1.go | 23 +- bluez/profile/profile/gen_Profile1.go | 58 +-- bluez/profile/profile/gen_ProfileManager1.go | 149 ++++---- bluez/profile/sap/gen_SimAccess1.go | 10 +- bluez/profile/thermometer/gen_Thermometer1.go | 5 +- .../thermometer/gen_ThermometerManager1.go | 41 +- .../thermometer/gen_ThermometerWatcher1.go | 78 ++-- gen/generator/generator.go | 3 +- gen/generator/generator_test.go | 3 - gen/generator/generator_tpl.go | 15 +- gen/generator/generator_tpl_api.go | 3 +- gen/generator/generator_tpl_constr.go | 10 - gen/generator/generator_tpl_test.go | 2 - gen/generator/generator_types.go | 7 +- gen/generator/generator_util.go | 33 +- gen/generator/generator_version.go | 3 +- gen/generator/tpl/api.go.tpl | 3 +- go.mod | 27 +- go.sum | 66 +++- src/bluez | 2 +- 68 files changed, 2587 insertions(+), 2135 deletions(-) create mode 100755 bluez-5.66.json diff --git a/Makefile b/Makefile index 6c95136d..c5d2cf98 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: gen -BLUEZ_VERSION ?= 5.60 +BLUEZ_VERSION ?= 5.66 FILTER ?= DOCKER_PARAMS := --privileged -it --rm \ @@ -12,6 +12,7 @@ DOCKER_PARAMS := --privileged -it --rm \ -v /var/lib/bluetooth:/var/lib/bluetooth \ opny/bluez-${BLUEZ_VERSION} +.NOPARALLEL: all: bluez/checkout gen/clean gen/run bluez/init: @@ -92,3 +93,6 @@ bluez-5.64/gen: bluez-5.65/gen: BLUEZ_VERSION=5.65 make gen/clean gen + +bluez-5.66/gen: + BLUEZ_VERSION=5.66 make gen/clean gen diff --git a/bluez-5.66.json b/bluez-5.66.json new file mode 100755 index 00000000..08d66f5c --- /dev/null +++ b/bluez-5.66.json @@ -0,0 +1 @@ +{"Version":"5.66","Api":[{"FileName":"adapter-api.txt","Name":"BlueZ D-Bus Adapter API description","Description":"\n","Api":[{"Title":"Adapter hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.Adapter1","ObjectPath":"[variable prefix]/{hci0,hci1,...}","Methods":[{"Name":"StartDiscovery","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotReady","org.bluez.Error.NotReady"],"Docs":"\t\t\tThis method starts the device discovery session. This\n\t\t\tincludes an inquiry procedure and remote device name\n\t\t\tresolving. Use StopDiscovery to release the sessions\n\t\t\tacquired.\n\t\t\tThis process will start creating Device objects as\n\t\t\tnew devices are discovered.\n\t\t\tDuring discovery RSSI delta-threshold is imposed.\n\t\t\tEach client can request a single device discovery session\n\t\t\tper adapter.\n\t\t\tPossible errors: org.bluez.Error.NotReady\n\t\t\t\t\t org.bluez.Error.Failed\n\t\t\t\t\t org.bluez.Error.InProgress\n"},{"Name":"StopDiscovery","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotReady","org.bluez.Error.NotReady"],"Docs":"\t\t\tThis method will cancel any previous StartDiscovery\n\t\t\ttransaction.\n\t\t\tNote that a discovery procedure is shared between all\n\t\t\tdiscovery sessions thus calling StopDiscovery will only\n\t\t\trelease a single session and discovery will stop when\n\t\t\tall sessions from all clients have finished.\n\t\t\tPossible errors: org.bluez.Error.NotReady\n\t\t\t\t\t org.bluez.Error.Failed\n\t\t\t\t\t org.bluez.Error.NotAuthorized\n"},{"Name":"RemoveDevice","ReturnType":"void","Args":[{"Type":"object","Name":"device"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tThis removes the remote device object at the given\n\t\t\tpath. It will remove also the pairing information.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"SetDiscoveryFilter","ReturnType":"void","Args":[{"Type":"dict","Name":"filter"}],"Errors":["org.bluez.Error.Failed","org.bluez.Error.Failed"],"Docs":"\t\t\tThis method sets the device discovery filter for the\n\t\t\tcaller. When this method is called with no filter\n\t\t\tparameter, filter is removed.\n\t\t\tParameters that may be set in the filter dictionary\n\t\t\tinclude the following:\n\t\t\tarray{string} UUIDs\n\t\t\t\tFilter by service UUIDs, empty means match\n\t\t\t\t_any_ UUID.\n\t\t\t\tWhen a remote device is found that advertises\n\t\t\t\tany UUID from UUIDs, it will be reported if:\n\t\t\t\t- Pathloss and RSSI are both empty.\n\t\t\t\t- only Pathloss param is set, device advertise\n\t\t\t\t TX pwer, and computed pathloss is less than\n\t\t\t\t Pathloss param.\n\t\t\t\t- only RSSI param is set, and received RSSI is\n\t\t\t\t higher than RSSI param.\n\t\t\tint16 RSSI\n\t\t\t\tRSSI threshold value.\n\t\t\t\tPropertiesChanged signals will be emitted\n\t\t\t\tfor already existing Device objects, with\n\t\t\t\tupdated RSSI value. If one or more discovery\n\t\t\t\tfilters have been set, the RSSI delta-threshold,\n\t\t\t\tthat is imposed by StartDiscovery by default,\n\t\t\t\twill not be applied.\n\t\t\tuint16 Pathloss\n\t\t\t\tPathloss threshold value.\n\t\t\t\tPropertiesChanged signals will be emitted\n\t\t\t\tfor already existing Device objects, with\n\t\t\t\tupdated Pathloss value.\n\t\t\tstring Transport (Default \"auto\")\n\t\t\t\tTransport parameter determines the type of\n\t\t\t\tscan.\n\t\t\t\tPossible values:\n\t\t\t\t\t\"auto\"\t- interleaved scan\n\t\t\t\t\t\"bredr\"\t- BR/EDR inquiry\n\t\t\t\t\t\"le\"\t- LE scan only\n\t\t\t\tIf \"le\" or \"bredr\" Transport is requested,\n\t\t\t\tand the controller doesn't support it,\n\t\t\t\torg.bluez.Error.Failed error will be returned.\n\t\t\t\tIf \"auto\" transport is requested, scan will use\n\t\t\t\tLE, BREDR, or both, depending on what's\n\t\t\t\tcurrently enabled on the controller.\n\t\t\tbool DuplicateData (Default: true)\n\t\t\t\tDisables duplicate detection of advertisement\n\t\t\t\tdata.\n\t\t\t\tWhen enabled PropertiesChanged signals will be\n\t\t\t\tgenerated for either ManufacturerData and\n\t\t\t\tServiceData everytime they are discovered.\n\t\t\tbool Discoverable (Default: false)\n\t\t\t\tMake adapter discoverable while discovering,\n\t\t\t\tif the adapter is already discoverable setting\n\t\t\t\tthis filter won't do anything.\n\t\t\tstring Pattern (Default: none)\n\t\t\t\tDiscover devices where the pattern matches\n\t\t\t\teither the prefix of the address or\n\t\t\t\tdevice name which is convenient way to limited\n\t\t\t\tthe number of device objects created during a\n\t\t\t\tdiscovery.\n\t\t\t\tWhen set disregards device discoverable flags.\n\t\t\t\tNote: The pattern matching is ignored if there\n\t\t\t\tare other client that don't set any pattern as\n\t\t\t\tit work as a logical OR, also setting empty\n\t\t\t\tstring \"\" pattern will match any device found.\n\t\t\tWhen discovery filter is set, Device objects will be\n\t\t\tcreated as new devices with matching criteria are\n\t\t\tdiscovered regardless of they are connectable or\n\t\t\tdiscoverable which enables listening to\n\t\t\tnon-connectable and non-discoverable devices.\n\t\t\tWhen multiple clients call SetDiscoveryFilter, their\n\t\t\tfilters are internally merged, and notifications about\n\t\t\tnew devices are sent to all clients. Therefore, each\n\t\t\tclient must check that device updates actually match\n\t\t\tits filter.\n\t\t\tWhen SetDiscoveryFilter is called multiple times by the\n\t\t\tsame client, last filter passed will be active for\n\t\t\tgiven client.\n\t\t\tSetDiscoveryFilter can be called before StartDiscovery.\n\t\t\tIt is useful when client will create first discovery\n\t\t\tsession, to ensure that proper scan will be started\n\t\t\tright after call to StartDiscovery.\n\t\t\tPossible errors: org.bluez.Error.NotReady\n\t\t\t\t\t org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"GetDiscoveryFilters","ReturnType":"array{string}","Args":[],"Errors":null,"Docs":"\t\t\tReturn available filters that can be given to\n\t\t\tSetDiscoveryFilter.\n\t\t\tPossible errors: None\n"},{"Name":"ConnectDevice","ReturnType":"object","Args":[{"Type":"dict","Name":"properties"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tThis method connects to device without need of\n\t\t\tperforming General Discovery. Connection mechanism is\n\t\t\tsimilar to Connect method from Device1 interface with\n\t\t\texception that this method returns success when physical\n\t\t\tconnection is established. After this method returns,\n\t\t\tservices discovery will continue and any supported\n\t\t\tprofile will be connected. There is no need for calling\n\t\t\tConnect on Device1 after this call. If connection was\n\t\t\tsuccessful this method returns object path to created\n\t\t\tdevice object.\n\t\t\tParameters that may be set in the filter dictionary\n\t\t\tinclude the following:\n\t\t\tstring Address\n\t\t\t\tThe Bluetooth device address of the remote\n\t\t\t\tdevice. This parameter is mandatory.\n\t\t\tstring AddressType\n\t\t\t\tThe Bluetooth device Address Type. This is\n\t\t\t\taddress type that should be used for initial\n\t\t\t\tconnection. If this parameter is not present\n\t\t\t\tBR/EDR device is created.\n\t\t\t\tPossible values:\n\t\t\t\t\t\"public\" - Public address\n\t\t\t\t\t\"random\" - Random address\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.AlreadyExists\n\t\t\t\t\t org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.NotReady\n\t\t\t\t\t org.bluez.Error.Failed\n"}],"Signals":[],"Properties":[{"Name":"Address","Type":"string","Docs":"The Bluetooth device address.","Flags":[]},{"Name":"AddressType","Type":"string","Docs":"The Bluetooth Address Type. For dual-mode and BR/EDR\n\t\t\tonly adapter this defaults to \"public\". Single mode LE\n\t\t\tadapters may have either value. With privacy enabled\n\t\t\tthis contains type of Identity Address and not type of\n\t\t\taddress used for connection.\n\n\t\t\tPossible values:\n\t\t\t\t\"public\" - Public address\n\t\t\t\t\"random\" - Random address","Flags":[]},{"Name":"Name","Type":"string","Docs":"The Bluetooth system name (pretty hostname).\n\n\t\t\tThis property is either a static system default\n\t\t\tor controlled by an external daemon providing\n\t\t\taccess to the pretty hostname configuration.","Flags":[]},{"Name":"Alias","Type":"string","Docs":"The Bluetooth friendly name. This value can be\n\t\t\tchanged.\n\n\t\t\tIn case no alias is set, it will return the system\n\t\t\tprovided name. Setting an empty string as alias will\n\t\t\tconvert it back to the system provided name.\n\n\t\t\tWhen resetting the alias with an empty string, the\n\t\t\tproperty will default back to system name.\n\n\t\t\tOn a well configured system, this property never\n\t\t\tneeds to be changed since it defaults to the system\n\t\t\tname and provides the pretty hostname. Only if the\n\t\t\tlocal name needs to be different from the pretty\n\t\t\thostname, this property should be used as last\n\t\t\tresort.","Flags":[]},{"Name":"Class","Type":"uint32","Docs":"The Bluetooth class of device.\n\n\t\t\tThis property represents the value that is either\n\t\t\tautomatically configured by DMI/ACPI information\n\t\t\tor provided as static configuration.","Flags":[]},{"Name":"Powered","Type":"boolean","Docs":"Switch an adapter on or off. This will also set the\n\t\t\tappropriate connectable state of the controller.\n\n\t\t\tThe value of this property is not persistent. After\n\t\t\trestart or unplugging of the adapter it will reset\n\t\t\tback to false.","Flags":[]},{"Name":"PowerState","Type":"string","Docs":"The power state of an adapter.\n\n\t\t\tThe power state will show whether the adapter is\n\t\t\tturning off, or turning on, as well as being on\n\t\t\tor off.\n\n\t\t\tPossible values:\n\t\t\t\t\"on\" - powered on\n\t\t\t\t\"off\" - powered off\n\t\t\t\t\"off-enabling\" - transitioning from \"off\" to \"on\"\n\t\t\t\t\"on-disabling\" - transitioning from \"on\" to \"off\"\n\t\t\t\t\"off-blocked\" - blocked by rfkill","Flags":[]},{"Name":"Discoverable","Type":"boolean","Docs":"Switch an adapter to discoverable or non-discoverable\n\t\t\tto either make it visible or hide it. This is a global\n\t\t\tsetting and should only be used by the settings\n\t\t\tapplication.\n\n\t\t\tIf the DiscoverableTimeout is set to a non-zero\n\t\t\tvalue then the system will set this value back to\n\t\t\tfalse after the timer expired.\n\n\t\t\tIn case the adapter is switched off, setting this\n\t\t\tvalue will fail.\n\n\t\t\tWhen changing the Powered property the new state of\n\t\t\tthis property will be updated via a PropertiesChanged\n\t\t\tsignal.\n\n\t\t\tFor any new adapter this settings defaults to false.","Flags":[]},{"Name":"Pairable","Type":"boolean","Docs":"Switch an adapter to pairable or non-pairable. This is\n\t\t\ta global setting and should only be used by the\n\t\t\tsettings application.\n\n\t\t\tNote that this property only affects incoming pairing\n\t\t\trequests.\n\n\t\t\tFor any new adapter this settings defaults to true.","Flags":[]},{"Name":"PairableTimeout","Type":"uint32","Docs":"The pairable timeout in seconds. A value of zero\n\t\t\tmeans that the timeout is disabled and it will stay in\n\t\t\tpairable mode forever.\n\n\t\t\tThe default value for pairable timeout should be\n\t\t\tdisabled (value 0).","Flags":[]},{"Name":"DiscoverableTimeout","Type":"uint32","Docs":"The discoverable timeout in seconds. A value of zero\n\t\t\tmeans that the timeout is disabled and it will stay in\n\t\t\tdiscoverable/limited mode forever.\n\n\t\t\tThe default value for the discoverable timeout should\n\t\t\tbe 180 seconds (3 minutes).","Flags":[]},{"Name":"Discovering","Type":"boolean","Docs":"Indicates that a device discovery procedure is active.","Flags":[]},{"Name":"UUIDs","Type":"array{string}","Docs":"List of 128-bit UUIDs that represents the available\n\t\t\tlocal services.","Flags":[]},{"Name":"Modalias","Type":"string","Docs":"Local Device ID information in modalias format\n\t\t\tused by the kernel and udev.","Flags":[5]},{"Name":"Roles","Type":"array{string}","Docs":"List of supported roles. Possible values:\n\t\t\t\t\"central\": Supports the central role.\n\t\t\t\t\"peripheral\": Supports the peripheral role.\n\t\t\t\t\"central-peripheral\": Supports both roles\n\t\t\t\t\t\t concurrently.","Flags":[]},{"Name":"ExperimentalFeatures","Type":"array{string}","Docs":"List of 128-bit UUIDs that represents the experimental\n\t\t\tfeatures currently enabled.","Flags":[5]}]}]},{"FileName":"admin-policy-api.txt","Name":"BlueZ D-Bus Admin Policy API description","Description":"This API provides methods to control the behavior of bluez as an administrator.\n\nInterface AdminPolicySet1 provides methods to set policies. Once the policy is\nset successfully, it will affect all clients and stay persistently even after\nrestarting Bluetooth Daemon. The only way to clear it is to overwrite the\npolicy with the same method.\n\nInterface AdminPolicyStatus1 provides readonly properties to indicate the\ncurrent values of admin policy.\n\n\n","Api":[{"Title":"Admin Policy Set hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.AdminPolicySet1","ObjectPath":"[variable prefix]/{hci0,hci1,...}","Methods":[{"Name":"SetServiceAllowList","ReturnType":"void","Args":[{"Type":"array{string}","Name":"UUIDs"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tThis method sets the service allowlist by specifying\n\t\t\tservice UUIDs.\n\t\t\tWhen SetServiceAllowList is called, bluez will block\n\t\t\tincoming and outgoing connections to the service not in\n\t\t\tUUIDs for all of the clients.\n\t\t\tAny subsequent calls to this method will supersede any\n\t\t\tpreviously set allowlist values. Calling this method\n\t\t\twith an empty array will allow any service UUIDs to be\n\t\t\tused.\n\t\t\tThe default value is an empty array.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.Failed\n"}],"Signals":[],"Properties":[]},{"Title":"Admin Policy Status hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.AdminPolicyStatus1","ObjectPath":"[variable prefix]/{hci0,hci1,...}","Methods":[],"Signals":[],"Properties":[{"Name":"ServiceAllowList","Type":"array{string}","Docs":"Current value of service allow list.","Flags":[]}]},{"Title":"Admin Policy Status hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.AdminPolicyStatus1","ObjectPath":"[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX","Methods":[],"Signals":[],"Properties":[{"Name":"IsAffectedByPolicy","Type":"bool","Docs":"Indicate if there is any auto-connect profile in this\n\t\t\tdevice is not allowed by admin policy.","Flags":[]}]}]},{"FileName":"advertisement-monitor-api.txt","Name":"BlueZ D-Bus Advertisement Monitor API Description","Description":"This API allows an client to specify a job of monitoring advertisements by\nregistering the root of hierarchy and then exposing advertisement monitors\nunder the root with filtering conditions, thresholds of RSSI and timers\nof RSSI thresholds.\n\nOnce a monitoring job is activated by BlueZ, the client can expect to get\nnotified on the targeted advertisements no matter if there is an ongoing\ndiscovery session (a discovery session is started/stopped with methods in\norg.bluez.Adapter1 interface).\n\n","Api":[{"Title":"Advertisement Monitor hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.AdvertisementMonitor1","ObjectPath":"freely definable","Methods":[{"Name":"Release","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tThis gets called as a signal for a client to perform\n\t\t\tclean-up when (1)a monitor cannot be activated after it\n\t\t\twas exposed or (2)a monitor has been deactivated.\n"},{"Name":"Activate","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tAfter a monitor was exposed, this gets called as a\n\t\t\tsignal for client to get acknowledged when a monitor\n\t\t\thas been activated, so the client can expect to receive\n\t\t\tcalls on DeviceFound() or DeviceLost().\n"},{"Name":"DeviceFound","ReturnType":"void","Args":[{"Type":"object","Name":"device"}],"Errors":null,"Docs":"\t\t\tThis gets called to notify the client of finding the\n\t\t\ttargeted device. Once receiving the call, the client\n\t\t\tshould start to monitor the corresponding device to\n\t\t\tretrieve the changes on RSSI and advertisement content.\n"},{"Name":"DeviceLost","ReturnType":"void","Args":[{"Type":"object","Name":"device"}],"Errors":null,"Docs":"\t\t\tThis gets called to notify the client of losing the\n\t\t\ttargeted device. Once receiving this call, the client\n\t\t\tshould stop monitoring the corresponding device.\n"}],"Signals":[],"Properties":[{"Name":"Type","Type":"string","Docs":"The type of the monitor. See SupportedMonitorTypes in\n\t\t\torg.bluez.AdvertisementMonitorManager1 for the available\n\t\t\toptions.","Flags":[1]},{"Name":"RSSILowThreshold","Type":"Int16","Docs":"Used in conjunction with RSSILowTimeout to determine\n\t\t\twhether a device becomes out-of-range. Valid range is\n\t\t\t-127 to 20 (dBm), while 127 indicates unset.","Flags":[1,5]},{"Name":"RSSIHighThreshold","Type":"Int16","Docs":"Used in conjunction with RSSIHighTimeout to determine\n\t\t\twhether a device becomes in-range. Valid range is\n\t\t\t-127 to 20 (dBm), while 127 indicates unset.","Flags":[1,5]},{"Name":"RSSILowTimeout","Type":"Uint16","Docs":"The time it takes to consider a device as out-of-range.\n\t\t\tIf this many seconds elapses without receiving any\n\t\t\tsignal at least as strong as RSSILowThreshold, a\n\t\t\tcurrently in-range device will be considered as\n\t\t\tout-of-range (lost). Valid range is 1 to 300 (seconds),\n\t\t\twhile 0 indicates unset.","Flags":[1,5]},{"Name":"RSSIHighTimeout","Type":"Uint16","Docs":"The time it takes to consider a device as in-range.\n\t\t\tIf this many seconds elapses while we continuously\n\t\t\treceive signals at least as strong as RSSIHighThreshold,\n\t\t\ta currently out-of-range device will be considered as\n\t\t\tin-range (found). Valid range is 1 to 300 (seconds),\n\t\t\twhile 0 indicates unset.","Flags":[1,5]},{"Name":"RSSISamplingPeriod","Type":"Uint16","Docs":"Grouping rules on how to propagate the received\n\t\t\tadvertisement packets to the client. Valid range is 0 to\n\t\t\t255 while 256 indicates unset.\n\n\t\t\tThe meaning of this property is as follows:\n\t\t\t0:\n\t\t\t\tAll advertisement packets from in-range devices\n\t\t\t\twould be propagated.\n\t\t\t255:\n\t\t\t\tOnly the first advertisement packet of in-range\n\t\t\t\tdevices would be propagated. If the device\n\t\t\t\tbecomes lost, then the first packet when it is\n\t\t\t\tfound again will also be propagated.\n\t\t\t1 to 254:\n\t\t\t\tAdvertisement packets would be grouped into\n\t\t\t\t100ms * N time period. Packets in the same group\n\t\t\t\twill only be reported once, with the RSSI value\n\t\t\t\tbeing averaged out.\n\n\t\t\tCurrently this is unimplemented in user space, so the\n\t\t\tvalue is only used to be forwarded to the kernel.","Flags":[1,5]},{"Name":"Patterns","Type":"array{(uint8, uint8, array{byte})}","Docs":"If the Type property is set to \"or_patterns\", then this\n\t\t\tproperty must exist and have at least one entry in the\n\t\t\tarray.\n\n\t\t\tThe structure of a pattern contains the following:\n\t\t\tuint8 start_position\n\t\t\t\tThe index in an AD data field where the search\n\t\t\t\tshould start. The beginning of an AD data field\n\t\t\t\tis index 0.\n\t\t\tuint8 AD_data_type\n\t\t\t\tSee https://www.bluetooth.com/specifications/\n\t\t\t\tassigned-numbers/generic-access-profile/ for\n\t\t\t\tthe possible allowed value.","Flags":[1,5]}]},{"Title":"Advertisement Monitor Manager hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.AdvertisementMonitorManager1","ObjectPath":"/org/bluez/{hci0,hci1,...}","Methods":[{"Name":"RegisterMonitor","ReturnType":"void","Args":[{"Type":"object","Name":"application"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tThis registers the root path of a hierarchy of\n\t\t\tadvertisement monitors.\n\t\t\tThe application object path together with the D-Bus\n\t\t\tsystem bus connection ID define the identification of\n\t\t\tthe application registering advertisement monitors.\n\t\t\tOnce a root path is registered by a client via this\n\t\t\tmethod, the client can freely expose/unexpose\n\t\t\tadvertisement monitors without re-registering the root\n\t\t\tpath again. After use, the client should call\n\t\t\tUnregisterMonitor() method to invalidate the\n\t\t\tadvertisement monitors.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.AlreadyExists\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"UnregisterMonitor","ReturnType":"void","Args":[{"Type":"object","Name":"application"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tThis unregisters a hierarchy of advertisement monitors\n\t\t\tthat has been previously registered. The object path\n\t\t\tparameter must match the same value that has been used\n\t\t\ton registration. Upon unregistration, the advertisement\n\t\t\tmonitor(s) should expect to receive Release() method as\n\t\t\tthe signal that the advertisement monitor(s) has been\n\t\t\tdeactivated.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.DoesNotExist\n"}],"Signals":[],"Properties":[{"Name":"SupportedMonitorTypes","Type":"array{string}","Docs":"This lists the supported types of advertisement\n\t\t\tmonitors. An application should check this before\n\t\t\tinstantiate and expose an object of\n\t\t\torg.bluez.AdvertisementMonitor1.\n\n\t\t\tPossible values for monitor types:\n\n\t\t\t\"or_patterns\"\n\t\t\t\tPatterns with logic OR applied. With this type,\n\t\t\t\tproperty \"Patterns\" must exist and has at least\n\t\t\t\tone pattern.","Flags":[1]},{"Name":"SupportedFeatures","Type":"array{string}","Docs":"This lists the features of advertisement monitoring\n\t\t\tsupported by BlueZ.\n\n\t\t\tPossible values for features:\n\n\t\t\t\"controller-patterns\"\n\t\t\t\tIf the controller is capable of performing\n\t\t\t\tadvertisement monitoring by patterns, BlueZ\n\t\t\t\twould offload the patterns to the controller to\n\t\t\t\treduce power consumption.","Flags":[1]}]}]},{"FileName":"advertising-api.txt","Name":"BlueZ D-Bus LE Advertising API Description","Description":"Advertising packets are structured data which is broadcast on the LE Advertising\nchannels and available for all devices in range. Because of the limited space\navailable in LE Advertising packets (31 bytes), each packet's contents must be\ncarefully controlled.\n\nBlueZ acts as a store for the Advertisement Data which is meant to be sent.\nIt constructs the correct Advertisement Data from the structured\ndata and configured the kernel to send the correct advertisement.\n\nAdvertisement Data objects are registered freely and then referenced by BlueZ\nwhen constructing the data sent to the kernel.\n\n","Api":[{"Title":"LE Advertisement Data hierarchy","Description":"\nSpecifies the Advertisement Data to be broadcast and some advertising\nparameters. Properties which are not present will not be included in the\ndata. Required advertisement data types will always be included.\nAll UUIDs are 128-bit versions in the API, and 16 or 32-bit\nversions of the same UUID will be used in the advertising data as appropriate.\n","Service":"org.bluez","Interface":"org.bluez.LEAdvertisement1","ObjectPath":"freely definable","Methods":[{"Name":"Release","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tThis method gets called when the service daemon\n\t\t\tremoves the Advertisement. A client can use it to do\n\t\t\tcleanup tasks. There is no need to call\n\t\t\tUnregisterAdvertisement because when this method gets\n\t\t\tcalled it has already been unregistered.\n"}],"Signals":[],"Properties":[{"Name":"Type","Type":"string","Docs":"Determines the type of advertising packet requested.\n\n\t\t\tPossible values: \"broadcast\" or \"peripheral\"","Flags":[]},{"Name":"ServiceUUIDs","Type":"array{string}","Docs":"List of UUIDs to include in the \"Service UUID\" field of\n\t\t\tthe Advertising Data.","Flags":[]},{"Name":"ManufacturerData","Type":"dict","Docs":"Manufactuer Data fields to include in\n\t\t\tthe Advertising Data. Keys are the Manufacturer ID\n\t\t\tto associate with the data.","Flags":[]},{"Name":"SolicitUUIDs","Type":"array{string}","Docs":"Array of UUIDs to include in \"Service Solicitation\"\n\t\t\tAdvertisement Data.","Flags":[]},{"Name":"ServiceData","Type":"dict","Docs":"Service Data elements to include. The keys are the\n\t\t\tUUID to associate with the data.","Flags":[]},{"Name":"Data","Type":"dict","Docs":"Advertising Type to include in the Advertising\n\t\t\tData. Key is the advertising type and value is the\n\t\t\tdata as byte array.\n\n\t\t\tNote: Types already handled by other properties shall\n\t\t\tnot be used.\n\n\t\t\tPossible values:\n\t\t\t\t\u003ctype\u003e \u003cbyte array\u003e\n\t\t\t\t...\n\n\t\t\tExample:\n\t\t\t\t\u003cTransport Discovery\u003e \u003cOrganization Flags...\u003e\n\t\t\t\t0x26 0x01 0x01...","Flags":[4]},{"Name":"Discoverable","Type":"bool","Docs":"Advertise as general discoverable. When present this\n\t\t\twill override adapter Discoverable property.\n\n\t\t\tNote: This property shall not be set when Type is set\n\t\t\tto broadcast.","Flags":[4]},{"Name":"DiscoverableTimeout","Type":"uint16","Docs":"The discoverable timeout in seconds. A value of zero\n\t\t\tmeans that the timeout is disabled and it will stay in\n\t\t\tdiscoverable/limited mode forever.\n\n\t\t\tNote: This property shall not be set when Type is set\n\t\t\tto broadcast.","Flags":[4]},{"Name":"Includes","Type":"array{string}","Docs":"List of features to be included in the advertising\n\t\t\tpacket.\n\n\t\t\tPossible values: as found on\n\t\t\t\t\tLEAdvertisingManager.SupportedIncludes","Flags":[]},{"Name":"LocalName","Type":"string","Docs":"Local name to be used in the advertising report. If the\n\t\t\tstring is too big to fit into the packet it will be\n\t\t\ttruncated.\n\n\t\t\tIf this property is available 'local-name' cannot be\n\t\t\tpresent in the Includes.","Flags":[]},{"Name":"Appearance","Type":"uint16","Docs":"Appearance to be used in the advertising report.\n\n\t\t\tPossible values: as found on GAP Service.","Flags":[]},{"Name":"Duration","Type":"uint16_t","Docs":"Rotation duration of the advertisement in seconds. If\n\t\t\tthere are other applications advertising no duration is\n\t\t\tset the default is 2 seconds.","Flags":[]},{"Name":"Timeout","Type":"uint16_t","Docs":"Timeout of the advertisement in seconds. This defines\n\t\t\tthe lifetime of the advertisement.","Flags":[]},{"Name":"SecondaryChannel","Type":"string","Docs":"Secondary channel to be used. Primary channel is\n\t\t\talways set to \"1M\" except when \"Coded\" is set.\n\n\t\t\tPossible value: \"1M\" (default)\n\t\t\t\t\t\"2M\"\n\t\t\t\t\t\"Coded\"","Flags":[4]},{"Name":"MinInterval","Type":"uint32","Docs":"Minimum advertising interval to be used by the\n\t\t\tadvertising set, in milliseconds. Acceptable values\n\t\t\tare in the range [20ms, 10,485s]. If the provided\n\t\t\tMinInterval is larger than the provided MaxInterval,\n\t\t\tthe registration will return failure.","Flags":[4]},{"Name":"MaxInterval","Type":"uint32","Docs":"Maximum advertising interval to be used by the\n\t\t\tadvertising set, in milliseconds. Acceptable values\n\t\t\tare in the range [20ms, 10,485s]. If the provided\n\t\t\tMinInterval is larger than the provided MaxInterval,\n\t\t\tthe registration will return failure.","Flags":[4]},{"Name":"TxPower","Type":"int16","Docs":"Requested transmission power of this advertising set.\n\t\t\tThe provided value is used only if the \"CanSetTxPower\"\n\t\t\tfeature is enabled on the Advertising Manager. The\n\t\t\tprovided value must be in range [-127 to +20], where\n\t\t\tunits are in dBm.","Flags":[4]}]},{"Title":"LE Advertising Manager hierarchy","Description":"\nThe Advertising Manager allows external applications to register Advertisement\nData which should be broadcast to devices. Advertisement Data elements must\nfollow the API for LE Advertisement Data described above.\n","Service":"org.bluez","Interface":"org.bluez.LEAdvertisingManager1","ObjectPath":"/org/bluez/{hci0,hci1,...}","Methods":[{"Name":"RegisterAdvertisement","ReturnType":"","Args":[{"Type":"object","Name":"advertisement"},{"Type":"dict","Name":"options"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tRegisters an advertisement object to be sent over the LE\n\t\t\tAdvertising channel. The service must be exported\n\t\t\tunder interface LEAdvertisement1.\n\t\t\tInvalidArguments error indicates that the object has\n\t\t\tinvalid or conflicting properties.\n\t\t\tInvalidLength error indicates that the data\n\t\t\tprovided generates a data packet which is too long.\n\t\t\tThe properties of this object are parsed when it is\n\t\t\tregistered, and any changes are ignored.\n\t\t\tIf the same object is registered twice it will result in\n\t\t\tan AlreadyExists error.\n\t\t\tIf the maximum number of advertisement instances is\n\t\t\treached it will result in NotPermitted error.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.AlreadyExists\n\t\t\t\t\t org.bluez.Error.InvalidLength\n\t\t\t\t\t org.bluez.Error.NotPermitted\n"},{"Name":"UnregisterAdvertisement","ReturnType":"","Args":[{"Type":"object","Name":"advertisement"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tThis unregisters an advertisement that has been\n\t\t\tpreviously registered. The object path parameter must\n\t\t\tmatch the same value that has been used on registration.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.DoesNotExist\n"}],"Signals":[],"Properties":[{"Name":"ActiveInstances","Type":"byte","Docs":"Number of active advertising instances.","Flags":[]},{"Name":"SupportedInstances","Type":"byte","Docs":"Number of available advertising instances.","Flags":[]},{"Name":"SupportedIncludes","Type":"array{string}","Docs":"List of supported system includes.\n\n\t\t\tPossible values: \"tx-power\"\n\t\t\t\t\t \"appearance\"\n\t\t\t\t\t \"local-name\"","Flags":[]},{"Name":"SupportedSecondaryChannels","Type":"array{string}","Docs":"List of supported Secondary channels. Secondary\n\t\t\tchannels can be used to advertise with the\n\t\t\tcorresponding PHY.\n\n\t\t\tPossible values: \"1M\"\n\t\t\t\t\t \"2M\"\n\t\t\t\t\t \"Coded\"","Flags":[4]},{"Name":"SupportedCapabilities","Type":"dict","Docs":"Enumerates Advertising-related controller capabilities\n\t\t\tuseful to the client.\n\n\t\t\tPossible Values:","Flags":[4]},{"Name":"MaxAdvLen","Type":"byte","Docs":"Max advertising data length","Flags":[]},{"Name":"MaxScnRspLen","Type":"byte","Docs":"Max advertising scan response length","Flags":[]},{"Name":"MinTxPower","Type":"int16","Docs":"Min advertising tx power (dBm)","Flags":[]},{"Name":"MaxTxPower","Type":"int16","Docs":"Max advertising tx power (dBm)","Flags":[]},{"Name":"SupportedFeatures","Type":"array{string}","Docs":"List of supported platform features. If no features\n\t\t\tare available on the platform, the SupportedFeatures\n\t\t\tarray will be empty.\n\n\t\t\tPossible values: \"CanSetTxPower\"\n\n\t\t\t\t\t\tIndicates whether platform can\n\t\t\t\t\t\tspecify tx power on each\n\t\t\t\t\t\tadvertising instance.\n\n\t\t\t\t\t \"HardwareOffload\"\n\n\t\t\t\t\t\tIndicates whether multiple\n\t\t\t\t\t\tadvertising will be offloaded\n\t\t\t\t\t\tto the controller.","Flags":[5,4]}]}]},{"FileName":"agent-api.txt","Name":"BlueZ D-Bus Agent API description","Description":"\n","Api":[{"Title":"Agent Manager hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.AgentManager1","ObjectPath":"/org/bluez","Methods":[{"Name":"RegisterAgent","ReturnType":"void","Args":[{"Type":"object","Name":"agent"},{"Type":"string","Name":"capability"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tThis registers an agent handler.\n\t\t\tThe object path defines the path of the agent\n\t\t\tthat will be called when user input is needed.\n\t\t\tEvery application can register its own agent and\n\t\t\tfor all actions triggered by that application its\n\t\t\tagent is used.\n\t\t\tIt is not required by an application to register\n\t\t\tan agent. If an application does chooses to not\n\t\t\tregister an agent, the default agent is used. This\n\t\t\tis on most cases a good idea. Only application\n\t\t\tlike a pairing wizard should register their own\n\t\t\tagent.\n\t\t\tAn application can only register one agent. Multiple\n\t\t\tagents per application is not supported.\n\t\t\tThe capability parameter can have the values\n\t\t\t\"DisplayOnly\", \"DisplayYesNo\", \"KeyboardOnly\",\n\t\t\t\"NoInputNoOutput\" and \"KeyboardDisplay\" which\n\t\t\treflects the input and output capabilities of the\n\t\t\tagent.\n\t\t\tIf an empty string is used it will fallback to\n\t\t\t\"KeyboardDisplay\".\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.AlreadyExists\n"},{"Name":"UnregisterAgent","ReturnType":"void","Args":[{"Type":"object","Name":"agent"}],"Errors":["org.bluez.Error.DoesNotExist","org.bluez.Error.DoesNotExist"],"Docs":"\t\t\tThis unregisters the agent that has been previously\n\t\t\tregistered. The object path parameter must match the\n\t\t\tsame value that has been used on registration.\n\t\t\tPossible errors: org.bluez.Error.DoesNotExist\n"},{"Name":"RequestDefaultAgent","ReturnType":"void","Args":[{"Type":"object","Name":"agent"}],"Errors":["org.bluez.Error.DoesNotExist","org.bluez.Error.DoesNotExist"],"Docs":"\t\t\tThis requests is to make the application agent\n\t\t\tthe default agent. The application is required\n\t\t\tto register an agent.\n\t\t\tSpecial permission might be required to become\n\t\t\tthe default agent.\n\t\t\tPossible errors: org.bluez.Error.DoesNotExist\n"}],"Signals":[],"Properties":[]},{"Title":"Agent hierarchy","Description":"","Service":"unique name","Interface":"org.bluez.Agent1","ObjectPath":"freely definable","Methods":[{"Name":"Release","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tThis method gets called when the service daemon\n\t\t\tunregisters the agent. An agent can use it to do\n\t\t\tcleanup tasks. There is no need to unregister the\n\t\t\tagent, because when this method gets called it has\n\t\t\talready been unregistered.\n"},{"Name":"RequestPinCode","ReturnType":"string","Args":[{"Type":"object","Name":"device"}],"Errors":["org.bluez.Error.Rejected","org.bluez.Error.Rejected"],"Docs":"\t\t\tThis method gets called when the service daemon\n\t\t\tneeds to get the passkey for an authentication.\n\t\t\tThe return value should be a string of 1-16 characters\n\t\t\tlength. The string can be alphanumeric.\n\t\t\tPossible errors: org.bluez.Error.Rejected\n\t\t\t org.bluez.Error.Canceled\n"},{"Name":"DisplayPinCode","ReturnType":"void","Args":[{"Type":"object","Name":"device"},{"Type":"string","Name":"pincode"}],"Errors":["org.bluez.Error.Rejected","org.bluez.Error.Rejected"],"Docs":"\t\t\tThis method gets called when the service daemon\n\t\t\tneeds to display a pincode for an authentication.\n\t\t\tAn empty reply should be returned. When the pincode\n\t\t\tneeds no longer to be displayed, the Cancel method\n\t\t\tof the agent will be called.\n\t\t\tThis is used during the pairing process of keyboards\n\t\t\tthat don't support Bluetooth 2.1 Secure Simple Pairing,\n\t\t\tin contrast to DisplayPasskey which is used for those\n\t\t\tthat do.\n\t\t\tThis method will only ever be called once since\n\t\t\tolder keyboards do not support typing notification.\n\t\t\tNote that the PIN will always be a 6-digit number,\n\t\t\tzero-padded to 6 digits. This is for harmony with\n\t\t\tthe later specification.\n\t\t\tPossible errors: org.bluez.Error.Rejected\n\t\t\t org.bluez.Error.Canceled\n"},{"Name":"RequestPasskey","ReturnType":"uint32","Args":[{"Type":"object","Name":"device"}],"Errors":["org.bluez.Error.Rejected","org.bluez.Error.Rejected"],"Docs":"\t\t\tThis method gets called when the service daemon\n\t\t\tneeds to get the passkey for an authentication.\n\t\t\tThe return value should be a numeric value\n\t\t\tbetween 0-999999.\n\t\t\tPossible errors: org.bluez.Error.Rejected\n\t\t\t org.bluez.Error.Canceled\n"},{"Name":"DisplayPasskey","ReturnType":"void","Args":[{"Type":"object","Name":"device"},{"Type":"uint32","Name":"passkey"},{"Type":"uint16","Name":"entered"}],"Errors":null,"Docs":"\t\t\tThis method gets called when the service daemon\n\t\t\tneeds to display a passkey for an authentication.\n\t\t\tThe entered parameter indicates the number of already\n\t\t\ttyped keys on the remote side.\n\t\t\tAn empty reply should be returned. When the passkey\n\t\t\tneeds no longer to be displayed, the Cancel method\n\t\t\tof the agent will be called.\n\t\t\tDuring the pairing process this method might be\n\t\t\tcalled multiple times to update the entered value.\n\t\t\tNote that the passkey will always be a 6-digit number,\n\t\t\tso the display should be zero-padded at the start if\n\t\t\tthe value contains less than 6 digits.\n"},{"Name":"RequestConfirmation","ReturnType":"void","Args":[{"Type":"object","Name":"device"},{"Type":"uint32","Name":"passkey"}],"Errors":["org.bluez.Error.Rejected","org.bluez.Error.Rejected"],"Docs":"\t\t\tThis method gets called when the service daemon\n\t\t\tneeds to confirm a passkey for an authentication.\n\t\t\tTo confirm the value it should return an empty reply\n\t\t\tor an error in case the passkey is invalid.\n\t\t\tNote that the passkey will always be a 6-digit number,\n\t\t\tso the display should be zero-padded at the start if\n\t\t\tthe value contains less than 6 digits.\n\t\t\tPossible errors: org.bluez.Error.Rejected\n\t\t\t org.bluez.Error.Canceled\n"},{"Name":"RequestAuthorization","ReturnType":"void","Args":[{"Type":"object","Name":"device"}],"Errors":["org.bluez.Error.Rejected","org.bluez.Error.Rejected"],"Docs":"\t\t\tThis method gets called to request the user to\n\t\t\tauthorize an incoming pairing attempt which\n\t\t\twould in other circumstances trigger the just-works\n\t\t\tmodel, or when the user plugged in a device that\n\t\t\timplements cable pairing. In the latter case, the\n\t\t\tdevice would not be connected to the adapter via\n\t\t\tBluetooth yet.\n\t\t\tPossible errors: org.bluez.Error.Rejected\n\t\t\t org.bluez.Error.Canceled\n"},{"Name":"AuthorizeService","ReturnType":"void","Args":[{"Type":"object","Name":"device"},{"Type":"string","Name":"uuid"}],"Errors":["org.bluez.Error.Rejected","org.bluez.Error.Rejected"],"Docs":"\t\t\tThis method gets called when the service daemon\n\t\t\tneeds to authorize a connection/service request.\n\t\t\tPossible errors: org.bluez.Error.Rejected\n\t\t\t org.bluez.Error.Canceled\n"},{"Name":"Cancel","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tThis method gets called to indicate that the agent\n\t\t\trequest failed before a reply was returned.\n"}],"Signals":[],"Properties":[]}]},{"FileName":"battery-api.txt","Name":"BlueZ D-Bus Battery API description","Description":"\n","Api":[{"Title":"Battery hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.Battery1","ObjectPath":"[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX","Methods":[],"Signals":[],"Properties":[{"Name":"Percentage","Type":"byte","Docs":"The percentage of battery left as an unsigned 8-bit integer.","Flags":[]},{"Name":"Source","Type":"string","Docs":"Describes where the battery information comes from\n\t\t\tThis property is informational only and may be useful\n\t\t\tfor debugging purposes.\n\t\t\tProviders from BatteryProvider1 may make use of this\n\t\t\tproperty to indicate where the battery report comes from\n\t\t\t(e.g. \"HFP 1.7\", \"HID\", or the profile UUID).","Flags":[5]}]},{"Title":"Battery Provider Manager hierarchy","Description":"A battery provider starts by registering itself as a battery provider with the\nRegisterBatteryProvider method passing an object path as the provider ID. Then,\nit can start exposing org.bluez.BatteryProvider1 objects having the path\nstarting with the given provider ID. It can also remove objects at any time.\nThe objects and their properties exposed by battery providers will be reflected\non org.bluez.Battery1 interface.\n\nBlueZ will stop monitoring these exposed and removed objects after\nUnregisterBatteryProvider is called for that provider ID.\n","Service":"org.bluez","Interface":"org.bluez.BatteryProviderManager1","ObjectPath":"/org/bluez/{hci0,hci1,...}","Methods":[{"Name":"RegisterBatteryProvider","ReturnType":"void","Args":[{"Type":"object","Name":"provider"}],"Errors":null,"Docs":"\t\t\tThis registers a battery provider. A registered\n\t\t\tbattery provider can then expose objects with\n\t\t\torg.bluez.BatteryProvider1 interface described below.\n"},{"Name":"UnregisterBatteryProvider","ReturnType":"void","Args":[{"Type":"object","Name":"provider"}],"Errors":null,"Docs":"\t\t\tThis unregisters a battery provider. After\n\t\t\tunregistration, the BatteryProvider1 objects provided\n\t\t\tby this client are ignored by BlueZ.\n"}],"Signals":[],"Properties":[]},{"Title":"Battery Provider hierarchy","Description":"","Service":"\u003cclient D-Bus address\u003e","Interface":"org.bluez.BatteryProvider1","ObjectPath":"{provider_root}/{unique battery object path}","Methods":[],"Signals":[],"Properties":[{"Name":"Device","Type":"object","Docs":"The object path of the device that has this battery.","Flags":[]}]}]},{"FileName":"device-api.txt","Name":"BlueZ D-Bus Device API description","Description":"\n","Api":[{"Title":"Device hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.Device1","ObjectPath":"[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX","Methods":[{"Name":"Connect","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotReady","org.bluez.Error.NotReady"],"Docs":"\t\t\tThis is a generic method to connect any profiles\n\t\t\tthe remote device supports that can be connected\n\t\t\tto and have been flagged as auto-connectable on\n\t\t\tour side. If only subset of profiles is already\n\t\t\tconnected it will try to connect currently disconnected\n\t\t\tones.\n\t\t\tIf at least one profile was connected successfully this\n\t\t\tmethod will indicate success.\n\t\t\tFor dual-mode devices only one bearer is connected at\n\t\t\ttime, the conditions are in the following order:\n\t\t\t\t1. Connect the disconnected bearer if already\n\t\t\t\tconnected.\n\t\t\t\t2. Connect first the bonded bearer. If no\n\t\t\t\tbearers are bonded or both are skip and check\n\t\t\t\tlatest seen bearer.\n\t\t\t\t3. Connect last seen bearer, in case the\n\t\t\t\ttimestamps are the same BR/EDR takes\n\t\t\t\tprecedence.\n\t\t\tPossible errors: org.bluez.Error.NotReady\n\t\t\t\t\t org.bluez.Error.Failed\n\t\t\t\t\t org.bluez.Error.InProgress\n\t\t\t\t\t org.bluez.Error.AlreadyConnected\n"},{"Name":"Disconnect","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotConnected","org.bluez.Error.NotConnected"],"Docs":"\t\t\tThis method gracefully disconnects all connected\n\t\t\tprofiles and then terminates low-level ACL connection.\n\t\t\tACL connection will be terminated even if some profiles\n\t\t\twere not disconnected properly e.g. due to misbehaving\n\t\t\tdevice.\n\t\t\tThis method can be also used to cancel a preceding\n\t\t\tConnect call before a reply to it has been received.\n\t\t\tFor non-trusted devices connected over LE bearer calling\n\t\t\tthis method will disable incoming connections until\n\t\t\tConnect method is called again.\n\t\t\tPossible errors: org.bluez.Error.NotConnected\n"},{"Name":"ConnectProfile","ReturnType":"void","Args":[{"Type":"string","Name":"uuid"}],"Errors":["org.bluez.Error.Failed","org.bluez.Error.Failed"],"Docs":"\t\t\tThis method connects a specific profile of this\n\t\t\tdevice. The UUID provided is the remote service\n\t\t\tUUID for the profile.\n\t\t\tPossible errors: org.bluez.Error.Failed\n\t\t\t\t\t org.bluez.Error.InProgress\n\t\t\t\t\t org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.NotAvailable\n\t\t\t\t\t org.bluez.Error.NotReady\n"},{"Name":"DisconnectProfile","ReturnType":"void","Args":[{"Type":"string","Name":"uuid"}],"Errors":["org.bluez.Error.Failed","org.bluez.Error.Failed"],"Docs":"\t\t\tThis method disconnects a specific profile of\n\t\t\tthis device. The profile needs to be registered\n\t\t\tclient profile.\n\t\t\tThere is no connection tracking for a profile, so\n\t\t\tas long as the profile is registered this will always\n\t\t\tsucceed.\n\t\t\tPossible errors: org.bluez.Error.Failed\n\t\t\t\t\t org.bluez.Error.InProgress\n\t\t\t\t\t org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.NotSupported\n"},{"Name":"Pair","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tThis method will connect to the remote device,\n\t\t\tinitiate pairing and then retrieve all SDP records\n\t\t\t(or GATT primary services).\n\t\t\tIf the application has registered its own agent,\n\t\t\tthen that specific agent will be used. Otherwise\n\t\t\tit will use the default agent.\n\t\t\tOnly for applications like a pairing wizard it\n\t\t\twould make sense to have its own agent. In almost\n\t\t\tall other cases the default agent will handle\n\t\t\tthis just fine.\n\t\t\tIn case there is no application agent and also\n\t\t\tno default agent present, this method will fail.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.Failed\n\t\t\t\t\t org.bluez.Error.AlreadyExists\n\t\t\t\t\t org.bluez.Error.AuthenticationCanceled\n\t\t\t\t\t org.bluez.Error.AuthenticationFailed\n\t\t\t\t\t org.bluez.Error.AuthenticationRejected\n\t\t\t\t\t org.bluez.Error.AuthenticationTimeout\n\t\t\t\t\t org.bluez.Error.ConnectionAttemptFailed\n"},{"Name":"CancelPairing","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.DoesNotExist","org.bluez.Error.DoesNotExist"],"Docs":"\t\t\tThis method can be used to cancel a pairing\n\t\t\toperation initiated by the Pair method.\n\t\t\tPossible errors: org.bluez.Error.DoesNotExist\n\t\t\t\t\t org.bluez.Error.Failed\n"}],"Signals":[],"Properties":[{"Name":"Address","Type":"string","Docs":"The Bluetooth device address of the remote device.","Flags":[]},{"Name":"AddressType","Type":"string","Docs":"The Bluetooth device Address Type. For dual-mode and\n\t\t\tBR/EDR only devices this defaults to \"public\". Single\n\t\t\tmode LE devices may have either value. If remote device\n\t\t\tuses privacy than before pairing this represents address\n\t\t\ttype used for connection and Identity Address after\n\t\t\tpairing.\n\n\t\t\tPossible values:\n\t\t\t\t\"public\" - Public address\n\t\t\t\t\"random\" - Random address","Flags":[]},{"Name":"Name","Type":"string","Docs":"The Bluetooth remote name. This value can not be\n\t\t\tchanged. Use the Alias property instead.\n\n\t\t\tThis value is only present for completeness. It is\n\t\t\tbetter to always use the Alias property when\n\t\t\tdisplaying the devices name.\n\n\t\t\tIf the Alias property is unset, it will reflect\n\t\t\tthis value which makes it more convenient.","Flags":[5]},{"Name":"Icon","Type":"string","Docs":"Proposed icon name according to the freedesktop.org\n\t\t\ticon naming specification.","Flags":[5]},{"Name":"Class","Type":"uint32","Docs":"The Bluetooth class of device of the remote device.","Flags":[5]},{"Name":"Appearance","Type":"uint16","Docs":"External appearance of device, as found on GAP service.","Flags":[5]},{"Name":"UUIDs","Type":"array{string}","Docs":"List of 128-bit UUIDs that represents the available\n\t\t\tremote services.","Flags":[5]},{"Name":"Paired","Type":"boolean","Docs":"Indicates if the remote device is paired. Paired means\n\t\t\tthe pairing process where devices exchange the\n\t\t\tinformation to establish an encrypted connection has\n\t\t\tbeen completed.","Flags":[]},{"Name":"Bonded","Type":"boolean","Docs":"Indicates if the remote device is bonded. Bonded means\n\t\t\tthe information exchanged on pairing process has been\n\t\t\tstored and will be persisted.","Flags":[]},{"Name":"Connected","Type":"boolean","Docs":"Indicates if the remote device is currently connected.\n\t\t\tA PropertiesChanged signal indicate changes to this\n\t\t\tstatus.","Flags":[]},{"Name":"Trusted","Type":"boolean","Docs":"Indicates if the remote is seen as trusted. This\n\t\t\tsetting can be changed by the application.","Flags":[]},{"Name":"Blocked","Type":"boolean","Docs":"If set to true any incoming connections from the\n\t\t\tdevice will be immediately rejected. Any device\n\t\t\tdrivers will also be removed and no new ones will\n\t\t\tbe probed as long as the device is blocked.","Flags":[]},{"Name":"WakeAllowed","Type":"boolean","Docs":"If set to true this device will be allowed to wake the\n\t\t\thost from system suspend.","Flags":[]},{"Name":"Alias","Type":"string","Docs":"The name alias for the remote device. The alias can\n\t\t\tbe used to have a different friendly name for the\n\t\t\tremote device.\n\n\t\t\tIn case no alias is set, it will return the remote\n\t\t\tdevice name. Setting an empty string as alias will\n\t\t\tconvert it back to the remote device name.\n\n\t\t\tWhen resetting the alias with an empty string, the\n\t\t\tproperty will default back to the remote name.","Flags":[]},{"Name":"Adapter","Type":"object","Docs":"The object path of the adapter the device belongs to.","Flags":[]},{"Name":"LegacyPairing","Type":"boolean","Docs":"Set to true if the device only supports the pre-2.1\n\t\t\tpairing mechanism. This property is useful during\n\t\t\tdevice discovery to anticipate whether legacy or\n\t\t\tsimple pairing will occur if pairing is initiated.\n\n\t\t\tNote that this property can exhibit false-positives\n\t\t\tin the case of Bluetooth 2.1 (or newer) devices that\n\t\t\thave disabled Extended Inquiry Response support.","Flags":[]},{"Name":"Modalias","Type":"string","Docs":"Remote Device ID information in modalias format\n\t\t\tused by the kernel and udev.","Flags":[5]},{"Name":"RSSI","Type":"int16","Docs":"Received Signal Strength Indicator of the remote\n\t\t\tdevice (inquiry or advertising).","Flags":[5]},{"Name":"TxPower","Type":"int16","Docs":"Advertised transmitted power level (inquiry or\n\t\t\tadvertising).","Flags":[5]},{"Name":"ManufacturerData","Type":"dict","Docs":"Manufacturer specific advertisement data. Keys are\n\t\t\t16 bits Manufacturer ID followed by its byte array\n\t\t\tvalue.","Flags":[5]},{"Name":"ServiceData","Type":"dict","Docs":"Service advertisement data. Keys are the UUIDs in\n\t\t\tstring format followed by its byte array value.","Flags":[5]},{"Name":"ServicesResolved","Type":"bool","Docs":"Indicate whether or not service discovery has been\n\t\t\tresolved.","Flags":[]},{"Name":"AdvertisingFlags","Type":"array{byte}","Docs":"The Advertising Data Flags of the remote device.","Flags":[]},{"Name":"AdvertisingData","Type":"dict","Docs":"The Advertising Data of the remote device. Keys are\n\t\t\tare 8 bits AD Type followed by data as byte array.\n\n\t\t\tNote: Only types considered safe to be handled by\n\t\t\tapplication are exposed.\n\n\t\t\tPossible values:\n\t\t\t\t\u003ctype\u003e \u003cbyte array\u003e\n\t\t\t\t...\n\n\t\t\tExample:\n\t\t\t\t\u003cTransport Discovery\u003e \u003cOrganization Flags...\u003e\n\t\t\t\t0x26 0x01 0x01...","Flags":[]}]}]},{"FileName":"gatt-api.txt","Name":"BlueZ D-Bus GATT API description","Description":"GATT local and remote services share the same high-level D-Bus API. Local\nrefers to GATT based service exported by a BlueZ plugin or an external\napplication. Remote refers to GATT services exported by the peer.\n\nBlueZ acts as a proxy, translating ATT operations to D-Bus method calls and\nProperties (or the opposite). Support for D-Bus Object Manager is mandatory for\nexternal services to allow seamless GATT declarations (Service, Characteristic\nand Descriptors) discovery. Each GATT service tree is required to export a D-Bus\nObject Manager at its root that is solely responsible for the objects that\nbelong to that service.\n\nReleasing a registered GATT service is not defined yet. Any API extension\nshould avoid breaking the defined API, and if possible keep an unified GATT\nremote and local services representation.\n\n","Api":[{"Title":"Service hierarchy","Description":"\nGATT remote and local service representation. Object path for local services\nis freely definable.\n\nExternal applications implementing local services must register the services\nusing GattManager1 registration method and must implement the methods and\nproperties defined in GattService1 interface.\n","Service":"org.bluez","Interface":"org.bluez.GattService1","ObjectPath":"[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/serviceXX","Methods":[],"Signals":[],"Properties":[{"Name":"UUID","Type":"string","Docs":"128-bit service UUID.","Flags":[1]},{"Name":"Primary","Type":"boolean","Docs":"Indicates whether or not this GATT service is a\n\t\t\tprimary service. If false, the service is secondary.","Flags":[1]},{"Name":"Device","Type":"object","Docs":"Object path of the Bluetooth device the service\n\t\t\tbelongs to. Only present on services from remote\n\t\t\tdevices.","Flags":[1,5]},{"Name":"Includes","Type":"array{object}","Docs":"Array of object paths representing the included\n\t\t\tservices of this service.","Flags":[1,5]},{"Name":"Handle","Type":"uint16","Docs":"Service handle. When available in the server it\n\t\t\twould attempt to use to allocate into the database\n\t\t\twhich may fail, to auto allocate the value 0x0000\n\t\t\tshall be used which will cause the allocated handle to\n\t\t\tbe set once registered.","Flags":[6,5]}]},{"Title":"Characteristic hierarchy","Description":"\nFor local GATT defined services, the object paths need to follow the service\npath hierarchy and are freely definable.\n","Service":"org.bluez","Interface":"org.bluez.GattCharacteristic1","ObjectPath":"[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/serviceXX/charYYYY","Methods":[{"Name":"ReadValue","ReturnType":"array{byte}","Args":[{"Type":"dict","Name":"options"}],"Errors":["org.bluez.Error.Failed","org.bluez.Error.Failed"],"Docs":"\t\t\tIssues a request to read the value of the\n\t\t\tcharacteristic and returns the value if the\n\t\t\toperation was successful.\n\t\t\tPossible options: \"offset\": uint16 offset\n\t\t\t\t\t \"mtu\": Exchanged MTU (Server only)\n\t\t\t\t\t \"device\": Object Device (Server only)\n\t\t\tPossible Errors: org.bluez.Error.Failed(string ecode)\n\t\t\t\t\t org.bluez.Error.InProgress\n\t\t\t\t\t org.bluez.Error.NotPermitted\n\t\t\t\t\t org.bluez.Error.NotAuthorized\n\t\t\t\t\t org.bluez.Error.InvalidOffset\n\t\t\t\t\t org.bluez.Error.NotSupported\n\t\t\tPossible Error Code: string 0x80 - 0x9f\n"},{"Name":"WriteValue","ReturnType":"void","Args":[{"Type":"array{byte}","Name":"value"},{"Type":"dict","Name":"options"}],"Errors":["org.bluez.Error.Failed","org.bluez.Error.Failed"],"Docs":"\t\t\tIssues a request to write the value of the\n\t\t\tcharacteristic.\n\t\t\tPossible options: \"offset\": Start offset\n\t\t\t\t\t \"type\": string\n\t\t\t\t\t\tPossible values:\n\t\t\t\t\t\t\"command\": Write without\n\t\t\t\t\t\tresponse\n\t\t\t\t\t\t\"request\": Write with response\n\t\t\t\t\t\t\"reliable\": Reliable Write\n\t\t\t\t\t \"mtu\": Exchanged MTU (Server only)\n\t\t\t\t\t \"device\": Device path (Server only)\n\t\t\t\t\t \"link\": Link type (Server only)\n\t\t\t\t\t \"prepare-authorize\": True if prepare\n\t\t\t\t\t\t\t authorization\n\t\t\t\t\t\t\t request\n\t\t\tPossible Errors: org.bluez.Error.Failed(string ecode)\n\t\t\t\t\t org.bluez.Error.InProgress\n\t\t\t\t\t org.bluez.Error.NotPermitted\n\t\t\t\t\t org.bluez.Error.InvalidValueLength\n\t\t\t\t\t org.bluez.Error.NotAuthorized\n\t\t\t\t\t org.bluez.Error.NotSupported\n\t\t\tPossible Error Code: string 0x80 - 0x9f\n"},{"Name":"AcquireWrite","ReturnType":"fd, uint16","Args":[{"Type":"dict","Name":"options"}],"Errors":["org.bluez.Error.Failed","org.bluez.Error.Failed"],"Docs":"\t\t\tAcquire file descriptor and MTU for writing. Only\n\t\t\tsockets are supported. Usage of WriteValue will be\n\t\t\tlocked causing it to return NotPermitted error.\n\t\t\tFor server the MTU returned shall be equal or smaller\n\t\t\tthan the negotiated MTU.\n\t\t\tFor client it only works with characteristic that has\n\t\t\tWriteAcquired property which relies on\n\t\t\twrite-without-response Flag.\n\t\t\tTo release the lock the client shall close the file\n\t\t\tdescriptor, a HUP is generated in case the device\n\t\t\tis disconnected.\n\t\t\tNote: the MTU can only be negotiated once and is\n\t\t\tsymmetric therefore this method may be delayed in\n\t\t\torder to have the exchange MTU completed, because of\n\t\t\tthat the file descriptor is closed during\n\t\t\treconnections as the MTU has to be renegotiated.\n\t\t\tPossible options: \"device\": Object Device (Server only)\n\t\t\t\t\t \"mtu\": Exchanged MTU (Server only)\n\t\t\t\t\t \"link\": Link type (Server only)\n\t\t\tPossible Errors: org.bluez.Error.Failed\n\t\t\t\t\t org.bluez.Error.NotSupported\n"},{"Name":"AcquireNotify","ReturnType":"fd, uint16","Args":[{"Type":"dict","Name":"options"}],"Errors":["org.bluez.Error.Failed","org.bluez.Error.Failed"],"Docs":"\t\t\tAcquire file descriptor and MTU for notify. Only\n\t\t\tsockets are support. Usage of StartNotify will be locked\n\t\t\tcausing it to return NotPermitted error.\n\t\t\tFor server the MTU returned shall be equal or smaller\n\t\t\tthan the negotiated MTU.\n\t\t\tOnly works with characteristic that has NotifyAcquired\n\t\t\twhich relies on notify Flag and no other client have\n\t\t\tcalled StartNotify.\n\t\t\tNotification are enabled during this procedure so\n\t\t\tStartNotify shall not be called, any notification\n\t\t\twill be dispatched via file descriptor therefore the\n\t\t\tValue property is not affected during the time where\n\t\t\tnotify has been acquired.\n\t\t\tTo release the lock the client shall close the file\n\t\t\tdescriptor, a HUP is generated in case the device\n\t\t\tis disconnected.\n\t\t\tNote: the MTU can only be negotiated once and is\n\t\t\tsymmetric therefore this method may be delayed in\n\t\t\torder to have the exchange MTU completed, because of\n\t\t\tthat the file descriptor is closed during\n\t\t\treconnections as the MTU has to be renegotiated.\n\t\t\tPossible options: \"device\": Object Device (Server only)\n\t\t\t\t\t \"mtu\": Exchanged MTU (Server only)\n\t\t\t\t\t \"link\": Link type (Server only)\n\t\t\tPossible Errors: org.bluez.Error.Failed\n\t\t\t\t\t org.bluez.Error.NotSupported\n"},{"Name":"StartNotify","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.Failed","org.bluez.Error.Failed"],"Docs":"\t\t\tStarts a notification session from this characteristic\n\t\t\tif it supports value notifications or indications.\n\t\t\tPossible Errors: org.bluez.Error.Failed\n\t\t\t\t\t org.bluez.Error.NotPermitted\n\t\t\t\t\t org.bluez.Error.InProgress\n\t\t\t\t\t org.bluez.Error.NotConnected\n\t\t\t\t\t org.bluez.Error.NotSupported\n"},{"Name":"StopNotify","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.Failed","org.bluez.Error.Failed"],"Docs":"\t\t\tThis method will cancel any previous StartNotify\n\t\t\ttransaction. Note that notifications from a\n\t\t\tcharacteristic are shared between sessions thus\n\t\t\tcalling StopNotify will release a single session.\n\t\t\tPossible Errors: org.bluez.Error.Failed\n"},{"Name":"Confirm","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.Failed","org.bluez.Error.Failed"],"Docs":"\t\t\tThis method doesn't expect a reply so it is just a\n\t\t\tconfirmation that value was received.\n\t\t\tPossible Errors: org.bluez.Error.Failed\n"}],"Signals":[],"Properties":[{"Name":"UUID","Type":"string","Docs":"128-bit characteristic UUID.","Flags":[1]},{"Name":"Service","Type":"object","Docs":"Object path of the GATT service the characteristic\n\t\t\tbelongs to.","Flags":[1]},{"Name":"Value","Type":"array{byte}","Docs":"The cached value of the characteristic. This property\n\t\t\tgets updated only after a successful read request and\n\t\t\twhen a notification or indication is received, upon\n\t\t\twhich a PropertiesChanged signal will be emitted.","Flags":[1,5]},{"Name":"WriteAcquired","Type":"boolean","Docs":"True, if this characteristic has been acquired by any\n\t\t\tclient using AcquireWrite.\n\n\t\t\tFor client properties is ommited in case\n\t\t\t'write-without-response' flag is not set.\n\n\t\t\tFor server the presence of this property indicates\n\t\t\tthat AcquireWrite is supported.","Flags":[1,5]},{"Name":"NotifyAcquired","Type":"boolean","Docs":"True, if this characteristic has been acquired by any\n\t\t\tclient using AcquireNotify.\n\n\t\t\tFor client this properties is ommited in case 'notify'\n\t\t\tflag is not set.\n\n\t\t\tFor server the presence of this property indicates\n\t\t\tthat AcquireNotify is supported.","Flags":[1,5]},{"Name":"Notifying","Type":"boolean","Docs":"True, if notifications or indications on this\n\t\t\tcharacteristic are currently enabled.","Flags":[1,5]},{"Name":"Flags","Type":"array{string}","Docs":"Defines how the characteristic value can be used. See\n\t\t\tCore spec \"Table 3.5: Characteristic Properties bit\n\t\t\tfield\", and \"Table 3.8: Characteristic Extended\n\t\t\tProperties bit field\".\n\n\t\t\tThe \"x-notify\" and \"x-indicate\" flags restrict access\n\t\t\tto notifications and indications by imposing write\n\t\t\trestrictions on a characteristic's client\n\t\t\tcharacteristic configuration descriptor.\n\n\t\t\tAllowed values:\n\n\t\t\t\t\"broadcast\"\n\t\t\t\t\"read\"\n\t\t\t\t\"write-without-response\"\n\t\t\t\t\"write\"\n\t\t\t\t\"notify\"\n\t\t\t\t\"indicate\"\n\t\t\t\t\"authenticated-signed-writes\"\n\t\t\t\t\"extended-properties\"\n\t\t\t\t\"reliable-write\"\n\t\t\t\t\"writable-auxiliaries\"\n\t\t\t\t\"encrypt-read\"\n\t\t\t\t\"encrypt-write\"\n\t\t\t\t\"encrypt-notify\" (Server only)\n\t\t\t\t\"encrypt-indicate\" (Server only)\n\t\t\t\t\"encrypt-authenticated-read\"\n\t\t\t\t\"encrypt-authenticated-write\"\n\t\t\t\t\"encrypt-authenticated-notify\" (Server only)\n\t\t\t\t\"encrypt-authenticated-indicate\" (Server only)\n\t\t\t\t\"secure-read\" (Server only)\n\t\t\t\t\"secure-write\" (Server only)\n\t\t\t\t\"secure-notify\" (Server only)\n\t\t\t\t\"secure-indicate\" (Server only)\n\t\t\t\t\"authorize\"","Flags":[1]},{"Name":"Handle","Type":"uint16","Docs":"Characteristic handle. When available in the server it\n\t\t\twould attempt to use to allocate into the database\n\t\t\twhich may fail, to auto allocate the value 0x0000\n\t\t\tshall be used which will cause the allocated handle to\n\t\t\tbe set once registered.","Flags":[6,5]},{"Name":"MTU","Type":"uint16","Docs":"Characteristic MTU, this is valid both for ReadValue\n\t\t\tand WriteValue but either method can use long\n\t\t\tprocedures when supported.","Flags":[1]}]},{"Title":"Characteristic Descriptors hierarchy","Description":"\nLocal or remote GATT characteristic descriptors hierarchy.\n","Service":"org.bluez","Interface":"org.bluez.GattDescriptor1","ObjectPath":"[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/serviceXX/charYYYY/descriptorZZZ","Methods":[{"Name":"ReadValue","ReturnType":"array{byte}","Args":[{"Type":"dict","Name":"flags"}],"Errors":["org.bluez.Error.Failed","org.bluez.Error.Failed"],"Docs":"\t\t\tIssues a request to read the value of the\n\t\t\tcharacteristic and returns the value if the\n\t\t\toperation was successful.\n\t\t\tPossible options: \"offset\": Start offset\n\t\t\t\t\t \"device\": Device path (Server only)\n\t\t\t\t\t \"link\": Link type (Server only)\n\t\t\tPossible Errors: org.bluez.Error.Failed\n\t\t\t\t\t org.bluez.Error.InProgress\n\t\t\t\t\t org.bluez.Error.NotPermitted\n\t\t\t\t\t org.bluez.Error.NotAuthorized\n\t\t\t\t\t org.bluez.Error.NotSupported\n"},{"Name":"WriteValue","ReturnType":"void","Args":[{"Type":"array{byte}","Name":"value"},{"Type":"dict","Name":"flags"}],"Errors":["org.bluez.Error.Failed","org.bluez.Error.Failed"],"Docs":"\t\t\tIssues a request to write the value of the\n\t\t\tcharacteristic.\n\t\t\tPossible options: \"offset\": Start offset\n\t\t\t\t\t \"device\": Device path (Server only)\n\t\t\t\t\t \"link\": Link type (Server only)\n\t\t\t\t\t \"prepare-authorize\": boolean Is prepare\n\t\t\t\t\t\t\t authorization\n\t\t\t\t\t\t\t request\n\t\t\tPossible Errors: org.bluez.Error.Failed\n\t\t\t\t\t org.bluez.Error.InProgress\n\t\t\t\t\t org.bluez.Error.NotPermitted\n\t\t\t\t\t org.bluez.Error.InvalidValueLength\n\t\t\t\t\t org.bluez.Error.NotAuthorized\n\t\t\t\t\t org.bluez.Error.NotSupported\n"}],"Signals":[],"Properties":[{"Name":"UUID","Type":"string","Docs":"128-bit descriptor UUID.","Flags":[1]},{"Name":"Characteristic","Type":"object","Docs":"Object path of the GATT characteristic the descriptor\n\t\t\tbelongs to.","Flags":[1]},{"Name":"Value","Type":"array{byte}","Docs":"The cached value of the descriptor. This property\n\t\t\tgets updated only after a successful read request, upon\n\t\t\twhich a PropertiesChanged signal will be emitted.","Flags":[1,5]},{"Name":"Flags","Type":"array{string}","Docs":"Defines how the descriptor value can be used.\n\n\t\t\tPossible values:\n\n\t\t\t\t\"read\"\n\t\t\t\t\"write\"\n\t\t\t\t\"encrypt-read\"\n\t\t\t\t\"encrypt-write\"\n\t\t\t\t\"encrypt-authenticated-read\"\n\t\t\t\t\"encrypt-authenticated-write\"\n\t\t\t\t\"secure-read\" (Server Only)\n\t\t\t\t\"secure-write\" (Server Only)\n\t\t\t\t\"authorize\"","Flags":[1]},{"Name":"Handle","Type":"uint16","Docs":"Characteristic handle. When available in the server it\n\t\t\twould attempt to use to allocate into the database\n\t\t\twhich may fail, to auto allocate the value 0x0000\n\t\t\tshall be used which will cause the allocated handle to\n\t\t\tbe set once registered.","Flags":[6,5]}]},{"Title":"GATT Profile hierarchy","Description":"\nLocal profile (GATT client) instance. By registering this type of object\nan application effectively indicates support for a specific GATT profile\nand requests automatic connections to be established to devices\nsupporting it.\n","Service":"\u003capplication dependent\u003e","Interface":"org.bluez.GattProfile1","ObjectPath":"\u003capplication dependent\u003e","Methods":[{"Name":"Release","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tThis method gets called when the service daemon\n\t\t\tunregisters the profile. The profile can use it to\n\t\t\tdo cleanup tasks. There is no need to unregister the\n\t\t\tprofile, because when this method gets called it has\n\t\t\talready been unregistered.\n"}],"Signals":[],"Properties":[{"Name":"UUIDs","Type":"array{string}","Docs":"128-bit GATT service UUIDs to auto connect.","Flags":[1]}]},{"Title":"GATT Manager hierarchy","Description":"\nGATT Manager allows external applications to register GATT services and\nprofiles.\n\nRegistering a profile allows applications to subscribe to *remote* services.\nThese must implement the GattProfile1 interface defined above.\n\nRegistering a service allows applications to publish a *local* GATT service,\nwhich then becomes available to remote devices. A GATT service is represented by\na D-Bus object hierarchy where the root node corresponds to a service and the\nchild nodes represent characteristics and descriptors that belong to that\nservice. Each node must implement one of GattService1, GattCharacteristic1,\nor GattDescriptor1 interfaces described above, based on the attribute it\nrepresents. Each node must also implement the standard D-Bus Properties\ninterface to expose their properties. These objects collectively represent a\nGATT service definition.\n\nTo make service registration simple, BlueZ requires that all objects that belong\nto a GATT service be grouped under a D-Bus Object Manager that solely manages\nthe objects of that service. Hence, the standard DBus.ObjectManager interface\nmust be available on the root service path. An example application hierarchy\ncontaining two separate GATT services may look like this:\n\n-\u003e /com/example\n | - org.freedesktop.DBus.ObjectManager\n |\n -\u003e /com/example/service0\n | | - org.freedesktop.DBus.Properties\n | | - org.bluez.GattService1\n | |\n | -\u003e /com/example/service0/char0\n | | - org.freedesktop.DBus.Properties\n | | - org.bluez.GattCharacteristic1\n | |\n | -\u003e /com/example/service0/char1\n | | - org.freedesktop.DBus.Properties\n | | - org.bluez.GattCharacteristic1\n | |\n | -\u003e /com/example/service0/char1/desc0\n | - org.freedesktop.DBus.Properties\n | - org.bluez.GattDescriptor1\n |\n -\u003e /com/example/service1\n | - org.freedesktop.DBus.Properties\n | - org.bluez.GattService1\n |\n -\u003e /com/example/service1/char0\n - org.freedesktop.DBus.Properties\n - org.bluez.GattCharacteristic1\n\nWhen a service is registered, BlueZ will automatically obtain information about\nall objects using the service's Object Manager. Once a service has been\nregistered, the objects of a service should not be removed. If BlueZ receives an\nInterfacesRemoved signal from a service's Object Manager, it will immediately\nunregister the service. Similarly, if the application disconnects from the bus,\nall of its registered services will be automatically unregistered.\nInterfacesAdded signals will be ignored.\n\nExamples:\n\t- Client\n\t\ttest/example-gatt-client\n\t\tclient/bluetoothctl\n\t- Server\n\t\ttest/example-gatt-server\n\t\ttools/gatt-service\n\n","Service":"org.bluez","Interface":"org.bluez.GattManager1","ObjectPath":"[variable prefix]/{hci0,hci1,...}","Methods":[{"Name":"RegisterApplication","ReturnType":"void","Args":[{"Type":"object","Name":"application"},{"Type":"dict","Name":"options"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tRegisters a local GATT services hierarchy as described\n\t\t\tabove (GATT Server) and/or GATT profiles (GATT Client).\n\t\t\tThe application object path together with the D-Bus\n\t\t\tsystem bus connection ID define the identification of\n\t\t\tthe application registering a GATT based\n\t\t\tservice or profile.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.AlreadyExists\n"},{"Name":"UnregisterApplication","ReturnType":"void","Args":[{"Type":"object","Name":"application"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tThis unregisters the services that has been\n\t\t\tpreviously registered. The object path parameter\n\t\t\tmust match the same value that has been used\n\t\t\ton registration.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.DoesNotExist\n"}],"Signals":[],"Properties":[]}]},{"FileName":"health-api.txt","Name":"BlueZ D-Bus Health API description","Description":"\n","Api":[{"Title":"HealthManager hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.HealthManager1","ObjectPath":"/org/bluez/","Methods":[{"Name":"CreateApplication","ReturnType":"object","Args":[{"Type":"dict","Name":"config"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tReturns the path of the new registered application.\n\t\t\tApplication will be closed by the call or implicitly\n\t\t\twhen the programs leaves the bus.\n\t\t\tconfig:\n\t\t\t\tuint16 DataType:\n\t\t\t\t\tMandatory\n\t\t\t\tstring Role:\n\t\t\t\t\tMandatory. Possible values: \"source\",\n\t\t\t\t\t\t\t\t\t\"sink\"\n\t\t\t\tstring Description:\n\t\t\t\t\tOptional\n\t\t\t\tChannelType:\n\t\t\t\t\tOptional, just for sources. Possible\n\t\t\t\t\tvalues: \"reliable\", \"streaming\"\n\t\t\tPossible Errors: org.bluez.Error.InvalidArguments\n"},{"Name":"DestroyApplication","ReturnType":"void","Args":[{"Type":"object","Name":"application"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tCloses the HDP application identified by the object\n\t\t\tpath. Also application will be closed if the process\n\t\t\tthat started it leaves the bus. Only the creator of the\n\t\t\tapplication will be able to destroy it.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.NotFound\n\t\t\t\t\t org.bluez.Error.NotAllowed\n"}],"Signals":[],"Properties":[]},{"Title":"HealthDevice hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.HealthDevice1","ObjectPath":"[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX","Methods":[{"Name":"Echo","ReturnType":"boolean","Args":[],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tSends an echo petition to the remote service. Returns\n\t\t\tTrue if response matches with the buffer sent. If some\n\t\t\terror is detected False value is returned.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.OutOfRange\n"},{"Name":"CreateChannel","ReturnType":"object","Args":[{"Type":"object","Name":"application"},{"Type":"string","Name":"configuration"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tCreates a new data channel. The configuration should\n\t\t\tindicate the channel quality of service using one of\n\t\t\tthis values \"reliable\", \"streaming\", \"any\".\n\t\t\tReturns the object path that identifies the data\n\t\t\tchannel that is already connected.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.HealthError\n"},{"Name":"DestroyChannel","ReturnType":"void","Args":[{"Type":"object","Name":"channel"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tDestroys the data channel object. Only the creator of\n\t\t\tthe channel or the creator of the HealthApplication\n\t\t\tthat received the data channel will be able to destroy\n\t\t\tit.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.NotFound\n\t\t\t\t org.bluez.Error.NotAllowed\n"}],"Signals":[{"Name":"ChannelConnected","ReturnType":"void","Args":[{"Type":"object","Name":"channel"}],"Errors":null,"Docs":"\n\t\t\tThis signal is launched when a new data channel is\n\t\t\tcreated or when a known data channel is reconnected.\n\n"},{"Name":"ChannelDeleted","ReturnType":"void","Args":[{"Type":"object","Name":"channel"}],"Errors":null,"Docs":"\n\t\t\tThis signal is launched when a data channel is deleted.\n\n\t\t\tAfter this signal the data channel path will not be\n\t\t\tvalid and its path can be reused for future data\n\t\t\tchannels."}],"Properties":[{"Name":"MainChannel","Type":"object","Docs":"The first reliable channel opened. It is needed by\n\t\t\tupper applications in order to send specific protocol\n\t\t\tdata units. The first reliable can change after a\n\t\t\treconnection.","Flags":[]}]},{"Title":"HealthChannel hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.HealthChannel1","ObjectPath":"[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/chanZZZ","Methods":[{"Name":"Acquire","ReturnType":"fd","Args":[],"Errors":["org.bluez.Error.NotConnected","org.bluez.Error.NotConnected"],"Docs":"\t\t\tReturns the file descriptor for this data channel. If\n\t\t\tthe data channel is not connected it will also\n\t\t\treconnect.\n\t\t\tPossible Errors: org.bluez.Error.NotConnected\n\t\t\t\t\t org.bluez.Error.NotAllowed\n"},{"Name":"Release","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotAcquired","org.bluez.Error.NotAcquired"],"Docs":"\t\t\tReleases the fd. Application should also need to\n\t\t\tclose() it.\n\t\t\tPossible Errors: org.bluez.Error.NotAcquired\n\t\t\t\t\t org.bluez.Error.NotAllowed\n"}],"Signals":[],"Properties":[{"Name":"Type","Type":"string","Docs":"The quality of service of the data channel. (\"reliable\"\n\t\t\tor \"streaming\")","Flags":[]},{"Name":"Device","Type":"object","Docs":"Identifies the Remote Device that is connected with.\n\t\t\tMaps with a HealthDevice object.","Flags":[]},{"Name":"Application","Type":"object","Docs":"Identifies the HealthApplication to which this channel\n\t\t\tis related to (which indirectly defines its role and\n\t\t\tdata type).","Flags":[]}]}]},{"FileName":"input-api.txt","Name":"BlueZ D-Bus Input API description","Description":"","Api":[{"Title":"Input hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.Input1","ObjectPath":"[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX","Methods":[],"Signals":[],"Properties":[{"Name":"ReconnectMode","Type":"string","Docs":"Determines the Connectability mode of the HID device as\n\t\t\tdefined by the HID Profile specification, Section 5.4.2.\n\n\t\t\tThis mode is based in the two properties\n\t\t\tHIDReconnectInitiate (see Section 5.3.4.6) and\n\t\t\tHIDNormallyConnectable (see Section 5.3.4.14) which\n\t\t\tdefine the following four possible values:\n\n\t\t\t\"none\"\t\tDevice and host are not required to\n\t\t\t\t\tautomatically restore the connection.\n\n\t\t\t\"host\"\t\tBluetooth HID host restores connection.\n\n\t\t\t\"device\"\tBluetooth HID device restores\n\t\t\t\t\tconnection.\n\n\t\t\t\"any\"\t\tBluetooth HID device shall attempt to\n\t\t\t\t\trestore the lost connection, but\n\t\t\t\t\tBluetooth HID Host may also restore the\n\t\t\t\t\tconnection.","Flags":[]}]}]},{"FileName":"media-api.txt","Name":"BlueZ D-Bus Media API description","Description":"\n","Api":[{"Title":"Media hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.Media1","ObjectPath":"[variable prefix]/{hci0,hci1,...}","Methods":[{"Name":"RegisterEndpoint","ReturnType":"void","Args":[{"Type":"object","Name":"endpoint"},{"Type":"dict","Name":"properties"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tRegister a local end point to sender, the sender can\n\t\t\tregister as many end points as it likes.\n\t\t\tNote: If the sender disconnects the end points are\n\t\t\tautomatically unregistered.\n\t\t\tpossible properties:\n\t\t\t\tstring UUID:\n\t\t\t\t\tUUID of the profile which the endpoint\n\t\t\t\t\tis for.\n\t\t\t\t\tUUID must be in the list of\n\t\t\t\t\tSupportedUUIDS.\n\t\t\t\tbyte Codec:\n\t\t\t\t\tAssigned number of codec that the\n\t\t\t\t\tendpoint implements. The values should\n\t\t\t\t\tmatch the profile specification which\n\t\t\t\t\tis indicated by the UUID.\n\t\t\t\tarray{byte} Capabilities:\n\t\t\t\t\tCapabilities blob, it is used as it is\n\t\t\t\t\tso the size and byte order must match.\n\t\t\tPossible Errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.NotSupported - emitted\n\t\t\t\t\t when interface for the end-point is\n\t\t\t\t\t disabled.\n"},{"Name":"UnregisterEndpoint","ReturnType":"void","Args":[{"Type":"object","Name":"endpoint"}],"Errors":null,"Docs":"\t\t\tUnregister sender end point.\n"},{"Name":"RegisterPlayer","ReturnType":"void","Args":[{"Type":"object","Name":"player"},{"Type":"dict","Name":"properties"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tRegister a media player object to sender, the sender\n\t\t\tcan register as many objects as it likes.\n\t\t\tObject must implement at least\n\t\t\torg.mpris.MediaPlayer2.Player as defined in MPRIS 2.2\n\t\t\tspec:\n\t\t\thttp://specifications.freedesktop.org/mpris-spec/latest/\n\t\t\tNote: If the sender disconnects its objects are\n\t\t\tautomatically unregistered.\n\t\t\tPossible Errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.NotSupported\n"},{"Name":"UnregisterPlayer","ReturnType":"void","Args":[{"Type":"object","Name":"player"}],"Errors":null,"Docs":"\t\t\tUnregister sender media player.\n"},{"Name":"RegisterApplication","ReturnType":"void","Args":[{"Type":"object","Name":"root"},{"Type":"dict","Name":"options"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tRegister endpoints an player objects within root\n\t\t\tobject which must implement ObjectManager.\n\t\t\tThe application object path together with the D-Bus\n\t\t\tsystem bus connection ID define the identification of\n\t\t\tthe application.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.AlreadyExists\n"},{"Name":"UnregisterApplication","ReturnType":"void","Args":[{"Type":"object","Name":"application"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tThis unregisters the services that has been\n\t\t\tpreviously registered. The object path parameter\n\t\t\tmust match the same value that has been used\n\t\t\ton registration.\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.DoesNotExist\n"}],"Signals":[],"Properties":[{"Name":"SupportedUUIDs","Type":"array{string}","Docs":"List of 128-bit UUIDs that represents the supported\n\t\t\tEndpoint registration.","Flags":[]}]},{"Title":"Media Control hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.MediaControl1","ObjectPath":"[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX","Methods":[{"Name":"Play","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tResume playback.\n"},{"Name":"Pause","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tPause playback.\n"},{"Name":"Stop","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tStop playback.\n"},{"Name":"Next","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tNext item.\n"},{"Name":"Previous","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tPrevious item.\n"},{"Name":"VolumeUp","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tAdjust remote volume one step up\n"},{"Name":"VolumeDown","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tAdjust remote volume one step down\n"},{"Name":"FastForward","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tFast forward playback, this action is only stopped\n\t\t\twhen another method in this interface is called.\n"},{"Name":"Rewind","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tRewind playback, this action is only stopped\n\t\t\twhen another method in this interface is called.\n"}],"Signals":[],"Properties":[{"Name":"Connected","Type":"boolean","Docs":"","Flags":[]},{"Name":"Player","Type":"object","Docs":"Addressed Player object path.","Flags":[5]}]},{"Title":"MediaPlayer1 hierarchy","Description":"","Service":"org.bluez (Controller role)","Interface":"org.bluez.MediaPlayer1","ObjectPath":"[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX","Methods":[{"Name":"Play","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotSupported","org.bluez.Error.NotSupported"],"Docs":"\t\t\tResume playback.\n\t\t\tPossible Errors: org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"Pause","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotSupported","org.bluez.Error.NotSupported"],"Docs":"\t\t\tPause playback.\n\t\t\tPossible Errors: org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"Stop","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotSupported","org.bluez.Error.NotSupported"],"Docs":"\t\t\tStop playback.\n\t\t\tPossible Errors: org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"Next","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotSupported","org.bluez.Error.NotSupported"],"Docs":"\t\t\tNext item.\n\t\t\tPossible Errors: org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"Previous","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotSupported","org.bluez.Error.NotSupported"],"Docs":"\t\t\tPrevious item.\n\t\t\tPossible Errors: org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"FastForward","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotSupported","org.bluez.Error.NotSupported"],"Docs":"\t\t\tFast forward playback, this action is only stopped\n\t\t\twhen another method in this interface is called.\n\t\t\tPossible Errors: org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"Rewind","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotSupported","org.bluez.Error.NotSupported"],"Docs":"\t\t\tRewind playback, this action is only stopped\n\t\t\twhen another method in this interface is called.\n\t\t\tPossible Errors: org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"Press","ReturnType":"void","Args":[{"Type":"byte","Name":"avc_key"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tPress a specific key to send as passthrough command.\n\t\t\tThe key will be released automatically. Use Hold()\n\t\t\tinstead if the intention is to hold down the key.\n\t\t\tPossible Errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"Hold","ReturnType":"void","Args":[{"Type":"byte","Name":"avc_key"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tPress and hold a specific key to send as passthrough\n\t\t\tcommand. It is your responsibility to make sure that\n\t\t\tRelease() is called after calling this method. The held\n\t\t\tkey will also be released when any other method in this\n\t\t\tinterface is called.\n\t\t\tPossible Errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"Release","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotSupported","org.bluez.Error.NotSupported"],"Docs":"\t\t\tRelease the previously held key invoked using Hold().\n\t\t\tPossible Errors: org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"}],"Signals":[],"Properties":[{"Name":"Equalizer","Type":"string","Docs":"Possible values: \"off\" or \"on\"","Flags":[]},{"Name":"Repeat","Type":"string","Docs":"Possible values: \"off\", \"singletrack\", \"alltracks\" or\n\t\t\t\t\t\"group\"","Flags":[]},{"Name":"Shuffle","Type":"string","Docs":"Possible values: \"off\", \"alltracks\" or \"group\"","Flags":[]},{"Name":"Scan","Type":"string","Docs":"Possible values: \"off\", \"alltracks\" or \"group\"","Flags":[]},{"Name":"Status","Type":"string","Docs":"Possible status: \"playing\", \"stopped\", \"paused\",\n\t\t\t\t\t\"forward-seek\", \"reverse-seek\"\n\t\t\t\t\tor \"error\"","Flags":[]},{"Name":"Position","Type":"uint32","Docs":"Playback position in milliseconds. Changing the\n\t\t\tposition may generate additional events that will be\n\t\t\tsent to the remote device. When position is 0 it means\n\t\t\tthe track is starting and when it's greater than or\n\t\t\tequal to track's duration the track has ended. Note\n\t\t\tthat even if duration is not available in metadata it's\n\t\t\tpossible to signal its end by setting position to the\n\t\t\tmaximum uint32 value.","Flags":[]},{"Name":"Track","Type":"dict","Docs":"Track metadata.\n\n\t\t\tPossible values:","Flags":[]},{"Name":"Title:","Type":"string","Docs":"Track title name","Flags":[]},{"Name":"Artist:","Type":"string","Docs":"Track artist name","Flags":[]},{"Name":"Album:","Type":"string","Docs":"Track album name","Flags":[]},{"Name":"Genre:","Type":"string","Docs":"Track genre name","Flags":[]},{"Name":"NumberOfTracks:","Type":"uint32","Docs":"Number of tracks in total","Flags":[]},{"Name":"TrackNumber:","Type":"uint32","Docs":"Track number","Flags":[]},{"Name":"Duration:","Type":"uint32","Docs":"Track duration in milliseconds","Flags":[]},{"Name":"Device","Type":"object","Docs":"Device object path.","Flags":[]},{"Name":"Name","Type":"string","Docs":"Player name","Flags":[]},{"Name":"Type","Type":"string","Docs":"Player type\n\n\t\t\tPossible values:\n\n\t\t\t\t\"Audio\"\n\t\t\t\t\"Video\"\n\t\t\t\t\"Audio Broadcasting\"\n\t\t\t\t\"Video Broadcasting\"","Flags":[]},{"Name":"Subtype","Type":"string","Docs":"Player subtype\n\n\t\t\tPossible values:\n\n\t\t\t\t\"Audio Book\"\n\t\t\t\t\"Podcast\"","Flags":[]},{"Name":"Browsable","Type":"boolean","Docs":"If present indicates the player can be browsed using\n\t\t\tMediaFolder interface.\n\n\t\t\tPossible values:\n\n\t\t\t\tTrue: Supported and active\n\t\t\t\tFalse: Supported but inactive\n\n\t\t\tNote: If supported but inactive clients can enable it\n\t\t\tby using MediaFolder interface but it might interfere\n\t\t\tin the playback of other players.","Flags":[]},{"Name":"Searchable","Type":"boolean","Docs":"If present indicates the player can be searched using\n\t\t\tMediaFolder interface.\n\n\t\t\tPossible values:\n\n\t\t\t\tTrue: Supported and active\n\t\t\t\tFalse: Supported but inactive\n\n\t\t\tNote: If supported but inactive clients can enable it\n\t\t\tby using MediaFolder interface but it might interfere\n\t\t\tin the playback of other players.","Flags":[]},{"Name":"Playlist","Type":"object","Docs":"Playlist object path.","Flags":[]}]},{"Title":"MediaFolder1 hierarchy","Description":"","Service":"unique name (Target role)\n\t\torg.bluez (Controller role)","Interface":"org.bluez.MediaFolder1","ObjectPath":"freely definable (Target role)\n\t\t[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX\n\t\t(Controller role)","Methods":[{"Name":"Search","ReturnType":"object","Args":[{"Type":"string","Name":"value"},{"Type":"dict","Name":"filter"}],"Errors":["org.bluez.Error.NotSupported","org.bluez.Error.NotSupported"],"Docs":"\t\t\tReturn a folder object containing the search result.\n\t\t\tTo list the items found use the folder object returned\n\t\t\tand pass to ChangeFolder.\n\t\t\tPossible Errors: org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"ListItems","ReturnType":"array{objects, properties}","Args":[{"Type":"dict","Name":"filter"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tReturn a list of items found\n\t\t\tPossible Errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"ChangeFolder","ReturnType":"void","Args":[{"Type":"object","Name":"folder"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tChange current folder.\n\t\t\tNote: By changing folder the items of previous folder\n\t\t\tmight be destroyed and have to be listed again, the\n\t\t\texception is NowPlaying folder which should be always\n\t\t\tpresent while the player is active.\n\t\t\tPossible Errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\t org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"}],"Signals":[],"Properties":[{"Name":"NumberOfItems","Type":"uint32","Docs":"Number of items in the folder","Flags":[]},{"Name":"Name","Type":"string","Docs":"Folder name:\n\n\t\t\tPossible values:\n\t\t\t\t\"/Filesystem/...\": Filesystem scope\n\t\t\t\t\"/NowPlaying/...\": NowPlaying scope\n\n\t\t\tNote: /NowPlaying folder might not be listed if player\n\t\t\tis stopped, folders created by Search are virtual so\n\t\t\tonce another Search is perform or the folder is\n\t\t\tchanged using ChangeFolder it will no longer be listed.\n\nFilters","Flags":[]},{"Name":"Start:","Type":"uint32","Docs":"Offset of the first item.\n\n\t\t\tDefault value: 0","Flags":[]},{"Name":"End:","Type":"uint32","Docs":"Offset of the last item.\n\n\t\t\tDefault value: NumbeOfItems","Flags":[]},{"Name":"Attributes","Type":"array{string}","Docs":"Item properties that should be included in the list.\n\n\t\t\tPossible Values:\n\n\t\t\t\t\"title\", \"artist\", \"album\", \"genre\",\n\t\t\t\t\"number-of-tracks\", \"number\", \"duration\"\n\n\t\t\tDefault Value: All","Flags":[]}]},{"Title":"MediaItem1 hierarchy","Description":"","Service":"unique name (Target role)\n\t\torg.bluez (Controller role)","Interface":"org.bluez.MediaItem1","ObjectPath":"freely definable (Target role)\n\t\t[variable\n\t\tprefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX/itemX\n\t\t(Controller role)","Methods":[{"Name":"Play","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotSupported","org.bluez.Error.NotSupported"],"Docs":"\t\t\tPlay item\n\t\t\tPossible Errors: org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"AddtoNowPlaying","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.NotSupported","org.bluez.Error.NotSupported"],"Docs":"\t\t\tAdd item to now playing list\n\t\t\tPossible Errors: org.bluez.Error.NotSupported\n\t\t\t\t\t org.bluez.Error.Failed\n"}],"Signals":[],"Properties":[{"Name":"Player","Type":"object","Docs":"Player object path the item belongs to","Flags":[]},{"Name":"Name","Type":"string","Docs":"Item displayable name","Flags":[]},{"Name":"Type","Type":"string","Docs":"Item type\n\n\t\t\tPossible values: \"video\", \"audio\", \"folder\"","Flags":[]},{"Name":"FolderType","Type":"string","Docs":"Folder type.\n\n\t\t\tPossible values: \"mixed\", \"titles\", \"albums\", \"artists\"\n\n\t\t\tAvailable if property Type is \"Folder\"","Flags":[5]},{"Name":"Playable","Type":"boolean","Docs":"Indicates if the item can be played\n\n\t\t\tAvailable if property Type is \"folder\"","Flags":[5]},{"Name":"Metadata","Type":"dict","Docs":"Item metadata.\n\n\t\t\tPossible values:","Flags":[]},{"Name":"Title","Type":"string","Docs":"Item title name\n\n\t\t\t\t\tAvailable if property Type is \"audio\"\n\t\t\t\t\tor \"video\"","Flags":[]},{"Name":"Artist","Type":"string","Docs":"Item artist name\n\n\t\t\t\t\tAvailable if property Type is \"audio\"\n\t\t\t\t\tor \"video\"","Flags":[]},{"Name":"Album","Type":"string","Docs":"Item album name\n\n\t\t\t\t\tAvailable if property Type is \"audio\"\n\t\t\t\t\tor \"video\"","Flags":[]},{"Name":"Genre","Type":"string","Docs":"Item genre name\n\n\t\t\t\t\tAvailable if property Type is \"audio\"\n\t\t\t\t\tor \"video\"","Flags":[]},{"Name":"NumberOfTracks","Type":"uint32","Docs":"Item album number of tracks in total\n\n\t\t\t\t\tAvailable if property Type is \"audio\"\n\t\t\t\t\tor \"video\"","Flags":[]},{"Name":"Number","Type":"uint32","Docs":"Item album number\n\n\t\t\t\t\tAvailable if property Type is \"audio\"\n\t\t\t\t\tor \"video\"","Flags":[]},{"Name":"Duration","Type":"uint32","Docs":"Item duration in milliseconds\n\n\t\t\t\t\tAvailable if property Type is \"audio\"\n\t\t\t\t\tor \"video\"","Flags":[]}]},{"Title":"MediaEndpoint1 hierarchy","Description":"","Service":"unique name (Server role)\n\t\torg.bluez (Client role)","Interface":"org.bluez.MediaEndpoint1","ObjectPath":"freely definable (Server role)\n\t\t[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/sepX\n\t\t(Client role)","Methods":[{"Name":"SetConfiguration","ReturnType":"void","Args":[{"Type":"object","Name":"transport"},{"Type":"dict","Name":"properties"}],"Errors":null,"Docs":"\t\t\tSet configuration for the transport.\n\t\t\tFor client role transport must be set with a server\n\t\t\tendpoint oject which will be configured and the\n\t\t\tproperties must contain the following properties:\n\t\t\t\tarray{byte} Capabilities [Mandatory]\n\t\t\t\tarray{byte} Metadata [ISO only]\n\t\t\t\tbyte CIG [ISO only]\n\t\t\t\tbyte CIS [ISO only]\n\t\t\t\tuint32 Interval [ISO only]\n\t\t\t\tbool Framing [ISO only]\n\t\t\t\tstring PHY [ISO only]\n\t\t\t\tuint16 SDU [ISO only]\n\t\t\t\tbyte Retransmissions [ISO only]\n\t\t\t\tuint16 Latency [ISO only]\n\t\t\t\tuint32 Delay [ISO only]\n\t\t\t\tuint8 TargetLatency [ISO Latency]\n"},{"Name":"SelectConfiguration","ReturnType":"array{byte}","Args":[{"Type":"array{byte}","Name":"capabilities"}],"Errors":null,"Docs":"\t\t\tSelect preferable configuration from the supported\n\t\t\tcapabilities.\n\t\t\tReturns a configuration which can be used to setup\n\t\t\ta transport.\n\t\t\tNote: There is no need to cache the selected\n\t\t\tconfiguration since on success the configuration is\n\t\t\tsend back as parameter of SetConfiguration.\n"},{"Name":"SelectProperties","ReturnType":"dict","Args":[{"Type":"dict","Name":"properties"}],"Errors":null,"Docs":"\t\t\tSelect preferable properties from the supported\n\t\t\tproperties:\n\t\t\t\tobject Endpoint [ISO only]\n\t\t\t\tRefer to SetConfiguration for the list of\n\t\t\t\t\tother possible properties.\n\t\t\tReturns propeties which can be used to setup\n\t\t\ta transport.\n\t\t\tNote: There is no need to cache the selected\n\t\t\tproperties since on success the configuration is\n\t\t\tsend back as parameter of SetConfiguration.\n"},{"Name":"ClearConfiguration","ReturnType":"void","Args":[{"Type":"object","Name":"transport"}],"Errors":null,"Docs":"\t\t\tClear transport configuration.\n"},{"Name":"Release","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tThis method gets called when the service daemon\n\t\t\tunregisters the endpoint. An endpoint can use it to do\n\t\t\tcleanup tasks. There is no need to unregister the\n\t\t\tendpoint, because when this method gets called it has\n\t\t\talready been unregistered.\n"}],"Signals":[],"Properties":[{"Name":"UUID","Type":"string","Docs":"UUID of the profile which the endpoint is for.","Flags":[5]},{"Name":"Codec","Type":"byte","Docs":"Assigned number of codec that the endpoint implements.\n\t\t\tThe values should match the profile specification which\n\t\t\tis indicated by the UUID.","Flags":[5]},{"Name":"Capabilities","Type":"array{byte}","Docs":"Capabilities blob, it is used as it is so the size and\n\t\t\tbyte order must match.","Flags":[5]},{"Name":"Device","Type":"object","Docs":"Device object which the endpoint is belongs to.","Flags":[5]},{"Name":"DelayReporting","Type":"bool","Docs":"Indicates if endpoint supports Delay Reporting.","Flags":[5]},{"Name":"Framing","Type":"byte","Docs":"Indicates endpoint support framing.","Flags":[]},{"Name":"PHY","Type":"byte","Docs":"Indicates endpoint supported PHY.","Flags":[]},{"Name":"MaximumLatency","Type":"uint16_t","Docs":"Indicates endpoint maximum latency.\n\n\t\tuint32_t MinimumDelay [ISO only]\n\n\t\t\tIndicates endpoint minimum presentation delay.\n\n\t\tuint32_t MaximumDelay [ISO only]\n\n\t\t\tIndicates endpoint maximum presentation delay.\n\n\t\tuint32_t PreferredMinimumDelay [ISO only]\n\n\t\t\tIndicates endpoint preferred minimum presentation delay.\n\n\t\tuint32_t PreferredMinimumDelay [ISO only]\n\n\t\t\tIndicates endpoint preferred minimum presentation delay.","Flags":[]},{"Name":"Location","Type":"uint32","Docs":"Indicates endpoint supported locations.","Flags":[]},{"Name":"SupportedContext","Type":"uint16","Docs":"Indicates endpoint supported audio context.","Flags":[]},{"Name":"Context","Type":"uint16","Docs":"Indicates endpoint available audio context.","Flags":[]}]},{"Title":"MediaTransport1 hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.MediaTransport1","ObjectPath":"[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/fdX","Methods":[{"Name":"Acquire","ReturnType":"fd, uint16, uint16","Args":[],"Errors":["org.bluez.Error.NotAuthorized","org.bluez.Error.NotAuthorized"],"Docs":"\t\t\tAcquire transport file descriptor and the MTU for read\n\t\t\tand write respectively.\n\t\t\tPossible Errors: org.bluez.Error.NotAuthorized\n\t\t\t\t\t org.bluez.Error.Failed\n"},{"Name":"TryAcquire","ReturnType":"fd, uint16, uint16","Args":[],"Errors":["org.bluez.Error.NotAvailable","org.bluez.Error.NotAvailable"],"Docs":"\t\t\tAcquire transport file descriptor only if the transport\n\t\t\tis in \"pending\" state at the time the message is\n\t\t\treceived by BlueZ. Otherwise no request will be sent\n\t\t\tto the remote device and the function will just fail\n\t\t\twith org.bluez.Error.NotAvailable.\n\t\t\tPossible Errors: org.bluez.Error.NotAuthorized\n\t\t\t\t\t org.bluez.Error.Failed\n\t\t\t\t\t org.bluez.Error.NotAvailable\n"},{"Name":"Release","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tReleases file descriptor.\n"}],"Signals":[],"Properties":[{"Name":"Device","Type":"object","Docs":"Device object which the transport is connected to.","Flags":[]},{"Name":"UUID","Type":"string","Docs":"UUID of the profile which the transport is for.","Flags":[]},{"Name":"Codec","Type":"byte","Docs":"Assigned number of codec that the transport support.\n\t\t\tThe values should match the profile specification which\n\t\t\tis indicated by the UUID.","Flags":[]},{"Name":"Configuration","Type":"array{byte}","Docs":"Configuration blob, it is used as it is so the size and\n\t\t\tbyte order must match.","Flags":[]},{"Name":"State","Type":"string","Docs":"Indicates the state of the transport. Possible\n\t\t\tvalues are:\n\t\t\t\t\"idle\": not streaming\n\t\t\t\t\"pending\": streaming but not acquired\n\t\t\t\t\"active\": streaming and acquired","Flags":[]},{"Name":"Delay","Type":"uint16","Docs":"Optional. Transport delay in 1/10 of millisecond, this\n\t\t\tproperty is only writeable when the transport was\n\t\t\tacquired by the sender.","Flags":[]},{"Name":"Volume","Type":"uint16","Docs":"Optional. Indicates volume level of the transport,\n\t\t\tthis property is only writeable when the transport was\n\t\t\tacquired by the sender.\n\n\t\t\tPossible Values: 0-127","Flags":[]},{"Name":"Endpoint","Type":"object","Docs":"Endpoint object which the transport is associated\n\t\t\twith.","Flags":[5]},{"Name":"Location","Type":"uint32","Docs":"Indicates transport Audio Location.","Flags":[]},{"Name":"Metadata","Type":"array{byte}","Docs":"Indicates transport Metadata.","Flags":[]},{"Name":"Links","Type":"array{object}","Docs":"Linked transport objects which the transport is\n\t\t\tassociated with.","Flags":[5]}]}]},{"FileName":"mesh-api.txt","Name":"BlueZ D-Bus Mesh API description","Description":"","Api":[{"Title":"Mesh Network Hierarchy","Description":"","Service":"org.bluez.mesh","Interface":"org.bluez.mesh.Network1","ObjectPath":"/org/bluez/mesh","Methods":[{"Name":"Join","ReturnType":"void","Args":[{"Type":"object","Name":"app_root"},{"Type":"array{byte}[16]","Name":"uuid"}],"Errors":null,"Docs":"\t\tThis is the first method that an application has to call to\n\t\tbecome a provisioned node on a mesh network. The call will\n\t\tinitiate broadcasting of Unprovisioned Device Beacon.\n\t\tThe app_root parameter is a D-Bus object root path of\n\t\tthe application that implements org.bluez.mesh.Application1\n\t\tinterface. The application represents a node where child mesh\n\t\telements have their own objects that implement\n\t\torg.bluez.mesh.Element1 interface. The application hierarchy\n\t\talso contains a provision agent object that implements\n\t\torg.bluez.mesh.ProvisionAgent1 interface. The standard\n\t\tDBus.ObjectManager interface must be available on the\n\t\tapp_root path.\n\t\tThe uuid parameter is a 16-byte array that contains Device UUID.\n\t\tThis UUID must be unique (at least from the daemon perspective),\n\t\ttherefore attempting to call this function using already\n\t\tregistered UUID results in an error. The composition of the UUID\n\t\toctets must be in compliance with RFC 4122.\n\t\tWhen provisioning finishes, the daemon will call either\n\t\tJoinComplete or JoinFailed method on object implementing\n\t\torg.bluez.mesh.Application1 interface.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.AlreadyExists,\n"},{"Name":"Cancel","ReturnType":"void","Args":null,"Errors":null,"Docs":""},{"Name":"Attach","ReturnType":"object node, array{byte, array{(uint16, dict)}} configuration","Args":[{"Type":"object","Name":"app_root"},{"Type":"uint64","Name":"token"}],"Errors":null,"Docs":"\t\tThis is the first method that an application must call to get\n\t\taccess to mesh node functionalities.\n\t\tThe app_root parameter is a D-Bus object root path of\n\t\tthe application that implements org.bluez.mesh.Application1\n\t\tinterface. The application represents a node where child mesh\n\t\telements have their own objects that implement\n\t\torg.bluez.mesh.Element1 interface. The standard\n\t\tDBus.ObjectManager interface must be available on the\n\t\tapp_root path.\n\t\tThe token parameter is a 64-bit number that has been assigned to\n\t\tthe application when it first got provisioned/joined mesh\n\t\tnetwork, i.e. upon receiving JoinComplete() method. The daemon\n\t\tuses the token to verify whether the application is authorized\n\t\tto assume the mesh node identity.\n\t\tIn case of success, the method call returns mesh node object\n\t\t(see Mesh Node Hierarchy section) and current configuration\n\t\tsettings. The return value of configuration parameter is an\n\t\tarray, where each entry is a structure that contains element\n\t\tconfiguration. The element configuration structure is organized\n\t\tas follows:\n\t\tbyte\n\t\t\tElement index, identifies the element to which this\n\t\t\tconfiguration entry pertains.\n\t\tarray{struct}\n\t\t\tModels array where each entry is a structure with the\n\t\t\tfollowing members:\n\t\t\tuint16\n\t\t\t\tEither a SIG Model Identifier or, if Vendor key\n\t\t\t\tis present in model configuration dictionary, a\n\t\t\t\t16-bit vendor-assigned Model Identifier\n\t\t\tdict\n\t\t\t\tA dictionary that contains model configuration\n\t\t\t\twith the following keys defined:\n\t\t\t\tarray{uint16} Bindings\n\t\t\t\t\tIndices of application keys bound to the\n\t\t\t\t\tmodel\n\t\t\t\tuint32 PublicationPeriod\n\t\t\t\t\tModel publication period in milliseconds\n\t\t\t\tuint16 Vendor\n\t\t\t\t\tA 16-bit Company ID as defined by the\n\t\t\t\t\tBluetooth SIG\n\t\t\t\tarray{variant} Subscriptions\n\t\t\t\t\tAddresses the model is subscribed to.\n\t\t\t\t\tEach address is provided either as\n\t\t\t\t\tuint16 for group addresses, or\n\t\t\t\t\tas array{byte} for virtual labels.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.NotFound,\n\t\t\torg.bluez.mesh.Error.AlreadyExists,\n\t\t\torg.bluez.mesh.Error.Busy,\n\t\t\torg.bluez.mesh.Error.Failed\n"},{"Name":"Leave","ReturnType":"void","Args":[{"Type":"uint64","Name":"token"}],"Errors":null,"Docs":"\t\tThis removes the configuration information about the mesh node\n\t\tidentified by the 64-bit token parameter. The token parameter\n\t\thas been obtained as a result of successful Join() method call.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.NotFound\n\t\t\torg.bluez.mesh.Error.Busy\n"},{"Name":"CreateNetwork","ReturnType":"void","Args":[{"Type":"object","Name":"app_root"},{"Type":"array{byte}[16]","Name":"uuid"}],"Errors":null,"Docs":"\t\tThis is the first method that an application calls to become\n\t\ta Provisioner node, and a Configuration Client on a newly\n\t\tcreated Mesh Network.\n\t\tThe app_root parameter is a D-Bus object root path of the\n\t\tapplication that implements org.bluez.mesh.Application1\n\t\tinterface, and a org.bluez.mesh.Provisioner1 interface. The\n\t\tapplication represents a node where child mesh elements have\n\t\ttheir own objects that implement org.bluez.mesh.Element1\n\t\tinterface. The application hierarchy also contains a provision\n\t\tagent object that implements org.bluez.mesh.ProvisionAgent1\n\t\tinterface. The standard DBus.ObjectManager interface must be\n\t\tavailable on the app_root path.\n\t\tThe uuid parameter is a 16-byte array that contains Device UUID.\n\t\tThis UUID must be unique (at least from the daemon perspective),\n\t\ttherefore attempting to call this function using already\n\t\tregistered UUID results in an error. The composition of the UUID\n\t\toctets must be in compliance with RFC 4122.\n\t\tThe other information the bluetooth-meshd daemon will preserve\n\t\tabout the initial node, is to give it the initial primary\n\t\tunicast address (0x0001), and create and assign a net_key as the\n\t\tprimary network net_index (0x000).\n\t\tUpon successful processing of Create() method, the daemon\n\t\twill call JoinComplete method on object implementing\n\t\torg.bluez.mesh.Application1.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.AlreadyExists,\n"},{"Name":"Import","ReturnType":"void","Args":[{"Type":"object","Name":"app_root"},{"Type":"array{byte}[16]","Name":"uuid"},{"Type":"array{byte}[16]","Name":"dev_key"},{"Type":"array{byte}[16]","Name":"net_key"},{"Type":"uint16","Name":"net_index"},{"Type":"dict","Name":"flags"},{"Type":"uint32","Name":"iv_index"},{"Type":"uint16","Name":"unicast"}],"Errors":null,"Docs":"\t\tThis method creates a local mesh node based on node\n\t\tconfiguration that has been generated outside bluetooth-meshd.\n\t\tThe app_root parameter is a D-Bus object root path of the\n\t\tapplication that implements org.bluez.mesh.Application1\n\t\tinterface.\n\t\tThe uuid parameter is a 16-byte array that contains Device UUID.\n\t\tThis UUID must be unique (at least from the daemon perspective),\n\t\ttherefore attempting to call this function using already\n\t\tregistered UUID results in an error. The composition of the UUID\n\t\toctets must be in compliance with RFC 4122.\n\t\tThe dev_key parameter is the 16-byte value of the dev key of\n\t\tthe imported mesh node.\n\t\tRemaining parameters correspond to provisioning data:\n\t\tThe net_key and net_index parameters describe the network (or a\n\t\tsubnet, if net_index is not 0) the imported mesh node belongs\n\t\tto.\n\t\tThe flags parameter is a dictionary containing provisioning\n\t\tflags. Supported values are:\n\t\t\tboolean IvUpdate\n\t\t\t\tWhen true, indicates that the network is in the\n\t\t\t\tmiddle of IV Index Update procedure.\n\t\t\tboolean KeyRefresh\n\t\t\t\tWhen true, indicates that the specified net key\n\t\t\t\tis in the middle of a key refresh procedure.\n\t\tThe iv_index parameter is the current IV Index value used by\n\t\tthe network. This value is known by the provisioner.\n\t\tThe unicast parameter is the primary unicast address of the\n\t\timported node.\n\t\tUpon successful processing of Import() method, the daemon will\n\t\tcall JoinComplete method on object implementing\n\t\torg.bluez.mesh.Application1 interface.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.InvalidArguments,\n\t\t\torg.bluez.mesh.Error.AlreadyExists,\n\t\t\torg.bluez.mesh.Error.NotSupported,\n\t\t\torg.bluez.mesh.Error.Failed\n"}],"Signals":[],"Properties":[]},{"Title":"Mesh Node Hierarchy","Description":"","Service":"org.bluez.mesh","Interface":"org.bluez.mesh.Node1","ObjectPath":"/org/bluez/mesh/node\u003cuuid\u003e\n\t\twhere \u003cuuid\u003e is the Device UUID passed to Join(),\n\t\tCreateNetwork() or Import()","Methods":[{"Name":"Send","ReturnType":"void","Args":[{"Type":"object","Name":"element_path"},{"Type":"uint16","Name":"destination"},{"Type":"uint16","Name":"key_index"},{"Type":"dict","Name":"options"},{"Type":"array{byte}","Name":"data"}],"Errors":null,"Docs":"\t\tThis method is used to send a message originated by a local\n\t\tmodel.\n\t\tThe element_path parameter is the object path of an element from\n\t\ta collection of the application elements (see Mesh Application\n\t\tHierarchy section).\n\t\tThe destination parameter contains the destination address. This\n\t\tdestination must be a uint16 to a unicast address, or a well\n\t\tknown group address.\n\t\tThe key_index parameter determines which application key to use\n\t\tfor encrypting the message. The key_index must be valid for that\n\t\telement, i.e., the application key must be bound to a model on\n\t\tthis element. Otherwise, org.bluez.mesh.Error.NotAuthorized will\n\t\tbe returned.\n\t\tThe options parameter is a dictionary with the following keys\n\t\tdefined:\n\t\t\tbool ForceSegmented\n\t\t\t\tSpecifies whether to force sending of a short\n\t\t\t\tmessage as one-segment payload. If not present,\n\t\t\t\tthe default setting is \"false\".\n\t\tThe data parameter is an outgoing message to be encypted by the\n\t\tbluetooth-meshd daemon and sent on.\n\t\tPossible errors:\n\t\t\torg.bluez.mesh.Error.NotAuthorized\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.NotFound\n"},{"Name":"DevKeySend","ReturnType":"void","Args":[{"Type":"object","Name":"element_path"},{"Type":"uint16","Name":"destination"},{"Type":"boolean","Name":"remote"},{"Type":"uint16","Name":"net_index"},{"Type":"dict","Name":"options"},{"Type":"array{byte}","Name":"data"}],"Errors":null,"Docs":"\t\tThis method is used to send a message originated by a local\n\t\tmodel encoded with the device key of the remote node.\n\t\tThe element_path parameter is the object path of an element from\n\t\ta collection of the application elements (see Mesh Application\n\t\tHierarchy section).\n\t\tThe destination parameter contains the destination address. This\n\t\tdestination must be a uint16 to a unicast address, or a well\n\t\tknown group address.\n\t\tThe remote parameter, if true, looks up the device key by the\n\t\tdestination address in the key database to encrypt the message.\n\t\tIf remote is true, but requested key does not exist, a NotFound\n\t\terror will be returned. If set to false, the local node's\n\t\tdevice key is used.\n\t\tThe net_index parameter is the subnet index of the network on\n\t\twhich the message is to be sent.\n\t\tThe options parameter is a dictionary with the following keys\n\t\tdefined:\n\t\t\tbool ForceSegmented\n\t\t\t\tSpecifies whether to force sending of a short\n\t\t\t\tmessage as one-segment payload. If not present,\n\t\t\t\tthe default setting is \"false\".\n\t\tThe data parameter is an outgoing message to be encypted by the\n\t\tmeshd daemon and sent on.\n\t\tPossible errors:\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.NotFound\n"},{"Name":"AddNetKey","ReturnType":"void","Args":[{"Type":"object","Name":"element_path"},{"Type":"uint16","Name":"destination"},{"Type":"uint16","Name":"subnet_index"},{"Type":"uint16","Name":"net_index"},{"Type":"boolean","Name":"update"}],"Errors":null,"Docs":"\t\tThis method is used to send add or update network key originated\n\t\tby the local configuration client to a remote configuration\n\t\tserver.\n\t\tThe element_path parameter is the object path of an element from\n\t\ta collection of the application elements (see Mesh Application\n\t\tHierarchy section).\n\t\tThe destination parameter contains the destination address. This\n\t\tdestination must be a uint16 to a nodes primary unicast address.\n\t\tThe subnet_index parameter refers to the subnet index of the\n\t\tnetwork that is being added or updated. This key must exist in\n\t\tthe local key database.\n\t\tThe net_index parameter is the subnet index of the network on\n\t\twhich the message is to be sent.\n\t\tThe update parameter indicates if this is an addition or an\n\t\tupdate. If true, the subnet key must be in the phase 1 state of\n\t\tthe key update procedure.\n\t\tPossible errors:\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.NotFound\n"},{"Name":"AddAppKey","ReturnType":"void","Args":[{"Type":"object","Name":"element_path"},{"Type":"uint16","Name":"destination"},{"Type":"uint16","Name":"app_index"},{"Type":"uint16","Name":"net_index"},{"Type":"boolean","Name":"update"}],"Errors":null,"Docs":"\t\tThis method is used to send add or update network key originated\n\t\tby the local configuration client to a remote configuration\n\t\tserver.\n\t\tThe element_path parameter is the object path of an element from\n\t\ta collection of the application elements (see Mesh Application\n\t\tHierarchy section).\n\t\tThe destination parameter contains the destination address. This\n\t\tdestination must be a uint16 to a nodes primary unicast address.\n\t\tThe app_index parameter refers to the application key which is\n\t\tbeing added or updated. This key must exist in the local key\n\t\tdatabase.\n\t\tThe net_index parameter is the subnet index of the network on\n\t\twhich the message is to be sent.\n\t\tThe update parameter indicates if this is an addition or an\n\t\tupdate. If true, the subnet key must be in the phase 1 state of\n\t\tthe key update procedure.\n\t\tPossible errors:\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.NotFound\n"},{"Name":"Publish","ReturnType":"void","Args":[{"Type":"object","Name":"element_path"},{"Type":"uint16","Name":"model"},{"Type":"dict","Name":"options"},{"Type":"array{byte}","Name":"data"}],"Errors":null,"Docs":"\t\tThis method is used to send a publication originated by a local\n\t\tmodel. If the model does not exist, or it has no publication\n\t\trecord, the method returns org.bluez.mesh.Error.DoesNotExist\n\t\terror.\n\t\tThe element_path parameter is the object path of an element from\n\t\ta collection of the application elements (see Mesh Application\n\t\tHierarchy section).\n\t\tThe model parameter contains a model ID, as defined by the\n\t\tBluetooth SIG. If the options dictionary contains a \"Vendor\"\n\t\tkey, then this ID is defined by the specified vendor.\n\t\tThe options parameter is a dictionary with the following keys\n\t\tdefined:\n\t\t\tbool ForceSegmented\n\t\t\t\tSpecifies whether to force sending of a short\n\t\t\t\tmessage as one-segment payload. If not present,\n\t\t\t\tthe default setting is \"false\".\n\t\t\tuint16 Vendor\n\t\t\t\tA 16-bit Company ID as defined by the\n\t\t\t\tBluetooth SIG. This key should only exist when\n\t\t\t\tpublishing on a Vendor defined model.\n\t\tThe data parameter is an outgoing message to be encypted by the\n\t\tmeshd daemon and sent on.\n\t\tSince only one Publish record may exist per element-model, the\n\t\tdestination and key_index are obtained from the Publication\n\t\trecord cached by the daemon.\n\t\tPossible errors:\n\t\t\torg.bluez.mesh.Error.DoesNotExist\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n"}],"Signals":[],"Properties":[{"Name":"Features","Type":"dict","Docs":"The dictionary that contains information about feature support.\n\t\tThe following keys are defined:","Flags":[1]},{"Name":"Friend","Type":"boolean","Docs":"Indicates the ability to establish a friendship with a\n\t\t\tLow Power node","Flags":[]},{"Name":"LowPower","Type":"boolean","Docs":"Indicates support for operating in Low Power node mode","Flags":[]},{"Name":"Proxy","Type":"boolean","Docs":"Indicates support for GATT proxy","Flags":[]},{"Name":"Relay","Type":"boolean","Docs":"Indicates support for relaying messages\n\n\tIf a key is absent from the dictionary, the feature is not supported.\n\tOtherwise, true means that the feature is enabled and false means that\n\tthe feature is disabled.","Flags":[]},{"Name":"Beacon","Type":"boolean","Docs":"This property indicates whether the periodic beaconing is\n\t\tenabled (true) or disabled (false).","Flags":[1]},{"Name":"IvUpdate","Type":"boolean","Docs":"When true, indicates that the network is in the middle of IV\n\t\tIndex Update procedure. This information is only useful for\n\t\tprovisioning.","Flags":[1]},{"Name":"IvIndex","Type":"uint32","Docs":"This property may be read at any time to determine the IV_Index\n\t\tthat the current network is on. This information is only useful\n\t\tfor provisioning.","Flags":[1]},{"Name":"SecondsSinceLastHeard","Type":"uint32","Docs":"This property may be read at any time to determine the number of\n\t\tseconds since mesh network layer traffic was last detected on\n\t\tthis node's network.","Flags":[1]},{"Name":"Addresses","Type":"array{uint16}","Docs":"This property contains unicast addresses of node's elements.","Flags":[1]},{"Name":"SequenceNumber","Type":"uint32","Docs":"This property may be read at any time to determine the\n\t\tsequence number.","Flags":[1]}]},{"Title":"Mesh Provisioning Hierarchy","Description":"","Service":"org.bluez.mesh","Interface":"org.bluez.mesh.Management1","ObjectPath":"/org/bluez/mesh/node\u003cuuid\u003e\n\t\twhere \u003cuuid\u003e is the Device UUID passed to Join(),\n\t\tCreateNetwork() or Import()","Methods":[{"Name":"UnprovisionedScan","ReturnType":"void","Args":[{"Type":"dict","Name":"options"}],"Errors":null,"Docs":"\t\tThis method is used by the application that supports\n\t\torg.bluez.mesh.Provisioner1 interface to start listening\n\t\t(scanning) for unprovisioned devices in the area.\n\t\tThe options parameter is a dictionary with the following keys\n\t\tdefined:\n\t\tuint16 Seconds\n\t\t\tSpecifies number of seconds for scanning to be active.\n\t\t\tIf set to 0 or if this key is not present, then the\n\t\t\tscanning will continue until UnprovisionedScanCancel()\n\t\t\tor AddNode() methods are called.\n\t\tEach time a unique unprovisioned beacon is heard, the\n\t\tScanResult() method on the app will be called with the result.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.NotAuthorized\n\t\t\torg.bluez.mesh.Error.Busy\n"},{"Name":"UnprovisionedScanCancel","ReturnType":"void","Args":null,"Errors":null,"Docs":""},{"Name":"AddNode","ReturnType":"void","Args":[{"Type":"array{byte}[16]","Name":"uuid"},{"Type":"dict","Name":"options"}],"Errors":null,"Docs":"\t\tThis method is used by the application that supports\n\t\torg.bluez.mesh.Provisioner1 interface to add the\n\t\tunprovisioned device specified by uuid, to the Network.\n\t\tThe uuid parameter is a 16-byte array that contains Device UUID\n\t\tof the unprovisioned device to be added to the network.\n\t\tThe options parameter is a dictionary that may contain\n\t\tadditional configuration info (currently an empty placeholder\n\t\tfor forward compatibility).\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.NotAuthorized\n"},{"Name":"CreateSubnet","ReturnType":"void","Args":[{"Type":"uint16","Name":"net_index"}],"Errors":null,"Docs":"\t\tThis method is used by the application to generate and add a new\n\t\tnetwork subnet key.\n\t\tThe net_index parameter is a 12-bit value (0x001-0xFFF)\n\t\tspecifying which net key to add.\n\t\tThis call affects the local bluetooth-meshd key database only.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.Failed\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.AlreadyExists\n"},{"Name":"ImportSubnet","ReturnType":"void","Args":[{"Type":"uint16","Name":"net_index"},{"Type":"array{byte}[16]","Name":"net_key"}],"Errors":null,"Docs":"\t\tThis method is used by the application to add a network subnet\n\t\tkey, that was originally generated by a remote Config Client.\n\t\tThe net_index parameter is a 12-bit value (0x000-0xFFF)\n\t\tspecifying which net key to add.\n\t\tThe net_key parameter is the 16-byte value of the net key being\n\t\timported.\n\t\tThis call affects the local bluetooth-meshd key database only.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.Failed\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.AlreadyExists\n"},{"Name":"UpdateSubnet","ReturnType":"void","Args":[{"Type":"uint16","Name":"net_index"}],"Errors":null,"Docs":"\t\tThis method is used by the application to generate a new network\n\t\tsubnet key, and set it's key refresh state to Phase 1.\n\t\tThe net_index parameter is a 12-bit value (0x000-0xFFF)\n\t\tspecifying which net key to update. Note that the subnet must\n\t\texist prior to updating.\n\t\tThis call affects the local bluetooth-meshd key database only.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.Failed\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.DoesNotExist\n\t\t\torg.bluez.mesh.Error.Busy\n"},{"Name":"DeleteSubnet","ReturnType":"void","Args":[{"Type":"uint16","Name":"net_index"}],"Errors":null,"Docs":"\t\tThis method is used by the application that to delete a subnet.\n\t\tThe net_index parameter is a 12-bit value (0x001-0xFFF)\n\t\tspecifying which net key to delete. The primary net key (0x000)\n\t\tmay not be deleted.\n\t\tThis call affects the local bluetooth-meshd key database only.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n"},{"Name":"SetKeyPhase","ReturnType":"void","Args":[{"Type":"uint16","Name":"net_index"},{"Type":"uint8","Name":"phase"}],"Errors":null,"Docs":"\t\tThis method is used to set the flooding key update phase of the\n\t\tgiven subnet. When finalizing the procedure, it is important\n\t\tto CompleteAppKeyUpdate() on all app keys that have been\n\t\tupdated during the procedure prior to setting phase 3.\n\t\tThe net_index parameter is a 12-bit value (0x000-0xFFF)\n\t\tspecifying which subnet phase to set.\n\t\tThe phase parameter is used to cycle the local key database\n\t\tthrough the phases as defined by the Mesh Profile Specification.\n\t\tAllowed values:\n\t\t\t0 - Cancel Key Refresh (May only be called from Phase 1,\n\t\t\t\tand should never be called once the new key has\n\t\t\t\tstarted propagating)\n\t\t\t1 - Invalid Argument (see NetKeyUpdate method)\n\t\t\t2 - Go to Phase 2 (May only be called from Phase 1)\n\t\t\t3 - Complete Key Refresh procedure (May only be called\n\t\t\t\tfrom Phase 2)\n\t\tThis call affects the local bluetooth-meshd key database only.\n\t\tIt is the responsibility of the application to maintain the key\n\t\trefresh phases per the Mesh Profile Specification.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.Failed\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.DoesNotExist\n"},{"Name":"CreateAppKey","ReturnType":"void","Args":[{"Type":"uint16","Name":"net_index"},{"Type":"uint16","Name":"app_index"}],"Errors":null,"Docs":"\t\tThis method is used by the application to generate and add a new\n\t\tapplication key.\n\t\tThe net_index parameter is a 12-bit value (0x000-0xFFF)\n\t\tspecifying which net key to bind the application key to.\n\t\tThe app_index parameter is a 12-bit value (0x000-0xFFF)\n\t\tspecifying which app key to add.\n\t\tThis call affects the local bluetooth-meshd key database only.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.Failed\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.AlreadyExists\n\t\t\torg.bluez.mesh.Error.DoesNotExist\n"},{"Name":"ImportAppKey","ReturnType":"void","Args":[{"Type":"uint16","Name":"net_index"},{"Type":"uint16","Name":"app_index"},{"Type":"array{byte}[16]","Name":"app_key"}],"Errors":null,"Docs":"\t\tThis method is used by the application to add an application\n\t\tkey, that was originally generated by a remote Config Client.\n\t\tThe net_index parameter is a 12-bit value (0x000-0xFFF)\n\t\tspecifying which net key to bind the application key to.\n\t\tThe app_index parameter is a 12-bit value (0x000-0xFFF)\n\t\tspecifying which app key to import.\n\t\tThe app_key parameter is the 16-byte value of the key being\n\t\timported.\n\t\tThis call affects the local bluetooth-meshd key database only.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.Failed\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.AlreadyExists\n\t\t\torg.bluez.mesh.Error.DoesNotExist\n"},{"Name":"UpdateAppKey","ReturnType":"void","Args":[{"Type":"uint16","Name":"app_index"}],"Errors":null,"Docs":"\t\tThis method is used by the application to generate a new\n\t\tapplication key.\n\t\tThe app_index parameter is a 12-bit value (0x000-0xFFF)\n\t\tspecifying which app key to update. Note that the subnet that\n\t\tthe key is bound to must exist and be in Phase 1.\n\t\tThis call affects the local bluetooth-meshd key database only.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.Failed\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n\t\t\torg.bluez.mesh.Error.DoesNotExist\n\t\t\torg.bluez.mesh.Error.InProgress\n"},{"Name":"DeleteAppKey","ReturnType":"void","Args":[{"Type":"uint16","Name":"app_index"}],"Errors":null,"Docs":"\t\tThis method is used by the application to delete an application\n\t\tkey.\n\t\tThe app_index parameter is a 12-bit value (0x000-0xFFF)\n\t\tspecifying which app key to delete.\n\t\tThis call affects the local bluetooth-meshd key database only.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n"},{"Name":"ImportRemoteNode","ReturnType":"void","Args":[{"Type":"uint16","Name":"primary"},{"Type":"uint8","Name":"count"},{"Type":"array{byte}[16]","Name":"device_key"}],"Errors":null,"Docs":"\t\tThis method is used by the application to import a remote node\n\t\tthat has been provisioned by an external process.\n\t\tThe primary parameter specifies the unicast address of the\n\t\tthe node being imported.\n\t\tThe count parameter specifies the number of elements that are\n\t\tassigned to this remote node.\n\t\tThe device_key parameter is the access layer key that will be\n\t\twill used to decrypt privledged messages from this remote node.\n\t\tThis call affects the local bluetooth-meshd key database only.\n\t\tIt is an error to call this with address range overlapping\n\t\twith local element addresses.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.Failed\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n"},{"Name":"DeleteRemoteNode","ReturnType":"void","Args":[{"Type":"uint16","Name":"primary"},{"Type":"uint8","Name":"count"}],"Errors":null,"Docs":"\t\tThis method is used by the application to delete a remote node\n\t\tfrom the local device key database.\n\t\tThe primary parameter specifies the unicast address of the\n\t\tthe node being deleted.\n\t\tThe count parameter specifies the number of elements that were\n\t\tassigned to the remote node.\n\t\tThis call affects the local bluetooth-meshd key database only.\n\t\tIt is an error to call this with address range overlapping\n\t\twith local element addresses.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.InvalidArguments\n"},{"Name":"ExportKeys","ReturnType":"dict","Args":null,"Errors":null,"Docs":""}],"Signals":[],"Properties":[]},{"Title":"Mesh Application Hierarchy","Description":"","Service":"unique name","Interface":"org.bluez.mesh.Application1","ObjectPath":"\u003capp_root\u003e","Methods":[{"Name":"JoinComplete","ReturnType":"void","Args":[{"Type":"uint64","Name":"token"}],"Errors":null,"Docs":"\t\tThis method is called when the node provisioning initiated\n\t\tby a Join() method call successfully completed.\n\t\tThe token parameter serves as a unique identifier of the\n\t\tparticular node. The token must be preserved by the application\n\t\tin order to authenticate itself to the mesh daemon and attach to\n\t\tthe network as a mesh node by calling Attach() method or\n\t\tpermanently remove the identity of the mesh node by calling\n\t\tLeave() method.\n\t\tIf this method returns an error, the daemon will assume that the\n\t\tapplication failed to preserve the token, and will remove the\n\t\tfreshly created node.\n"},{"Name":"JoinFailed","ReturnType":"void","Args":[{"Type":"string","Name":"reason"}],"Errors":null,"Docs":"\t\tThis method is called when the node provisioning initiated by\n\t\tJoin() has failed.\n\t\tThe reason parameter identifies the reason for provisioning\n\t\tfailure. The defined values are: \"timeout\", \"bad-pdu\",\n\t\t\"confirmation-failed\", \"out-of-resources\", \"decryption-error\",\n\t\t\"unexpected-error\", \"cannot-assign-addresses\".\n"}],"Signals":[],"Properties":[{"Name":"CompanyID","Type":"uint16","Docs":"A 16-bit Bluetooth-assigned Company Identifier of the vendor as\n\t\tdefined by Bluetooth SIG","Flags":[1]},{"Name":"ProductID","Type":"uint16","Docs":"A 16-bit vendor-assigned product identifier","Flags":[1]},{"Name":"VersionID","Type":"uint16","Docs":"A 16-bit vendor-assigned product version identifier","Flags":[1]},{"Name":"CRPL","Type":"uint16","Docs":"A 16-bit minimum number of replay protection list entries","Flags":[1,5]}]},{"Title":"Mesh Element Hierarchy","Description":"","Service":"unique name","Interface":"org.bluez.mesh.Element1","ObjectPath":"\u003capp_defined_element_path\u003e","Methods":[{"Name":"MessageReceived","ReturnType":"void","Args":[{"Type":"uint16","Name":"source"},{"Type":"uint16","Name":"key_index"},{"Type":"variant","Name":"destination"},{"Type":"array{byte}","Name":"data"}],"Errors":null,"Docs":"\t\tThis method is called by bluetooth-meshd daemon when a message\n\t\tarrives addressed to the application.\n\t\tThe source parameter is unicast address of the remote\n\t\tnode-element that sent the message.\n\t\tThe key_index parameter indicates which application key has been\n\t\tused to decode the incoming message. The same key_index should\n\t\tbe used by the application when sending a response to this\n\t\tmessage (in case a response is expected).\n\t\tThe destination parameter contains the destination address of\n\t\treceived message. Underlying variant types are:\n\t\tuint16\n\t\t\tDestination is an unicast address, or a well known\n\t\t\tgroup address\n\t\tarray{byte}\n\t\t\tDestination is a virtual address label\n\t\tThe data parameter is the incoming message.\n"},{"Name":"DevKeyMessageReceived","ReturnType":"void","Args":[{"Type":"uint16","Name":"source"},{"Type":"boolean","Name":"remote"},{"Type":"uint16","Name":"net_index"},{"Type":"array{byte}","Name":"data"}],"Errors":null,"Docs":"\t\tThis method is called by meshd daemon when a message arrives\n\t\taddressed to the application, which was sent with the remote\n\t\tnode's device key.\n\t\tThe source parameter is unicast address of the remote\n\t\tnode-element that sent the message.\n\t\tThe remote parameter if true indicates that the device key\n\t\tused to decrypt the message was from the sender. False\n\t\tindicates that the local nodes device key was used, and the\n\t\tmessage has permissions to modify local states.\n\t\tThe net_index parameter indicates what subnet the message was\n\t\treceived on, and if a response is required, the same subnet\n\t\tmust be used to send the response.\n\t\tThe data parameter is the incoming message.\n"},{"Name":"UpdateModelConfiguration","ReturnType":"void","Args":[{"Type":"uint16","Name":"model_id"},{"Type":"dict","Name":"config"}],"Errors":null,"Docs":"\t\tThis method is called by bluetooth-meshd daemon when a model's\n\t\tconfiguration is updated.\n\t\tThe model_id parameter contains BT SIG Model Identifier or, if\n\t\tVendor key is present in config dictionary, a 16-bit\n\t\tvendor-assigned Model Identifier.\n\t\tThe config parameter is a dictionary with the following keys\n\t\tdefined:\n\t\tarray{uint16} Bindings\n\t\t\tIndices of application keys bound to the model\n\t\tuint32 PublicationPeriod\n\t\t\tModel publication period in milliseconds\n\t\tuint16 Vendor\n\t\t\tA 16-bit Bluetooth-assigned Company Identifier of the\n\t\t\tvendor as defined by Bluetooth SIG\n\t\tarray{variant} Subscriptions\n\t\t\tAddresses the model is subscribed to.\n\t\t\tEach address is provided either as uint16 for group\n\t\t\taddresses, or as array{byte} for virtual labels.\n"}],"Signals":[],"Properties":[{"Name":"Models","Type":"array{(uint16 id, dict caps)}","Docs":"An array of SIG Models:\n\n\t\t\tid - SIG Model Identifier\n\n\t\t\toptions - a dictionary that may contain additional model\n\t\t\tinfo. The following keys are defined:","Flags":[1]},{"Name":"Publish","Type":"boolean","Docs":"supports publication mechanism. If not\n\t\t\t\t\tpresent, publication is enabled.","Flags":[]},{"Name":"Subscribe","Type":"boolean","Docs":"supports subscription mechanism. If not\n\t\t\t\t\tpresent, subscriptons are enabled.\n\n\t\tThe array may be empty.","Flags":[]},{"Name":"VendorModels","Type":"array{(uint16 vendor, uint16 id, dict options)}","Docs":"An array of Vendor Models:\n\n\t\t\tvendor - a 16-bit Bluetooth-assigned Company ID as\n\t\t\tdefined by Bluetooth SIG.\n\n\t\t\tid - a 16-bit vendor-assigned Model Identifier\n\n\t\t\toptions - a dictionary that may contain additional model\n\t\t\tinfo. The following keys are defined:","Flags":[1]},{"Name":"Publish","Type":"boolean","Docs":"supports publication mechanism","Flags":[]},{"Name":"Subscribe","Type":"boolean","Docs":"supports subscription mechanism\n\n\t\tThe array may be empty.","Flags":[]},{"Name":"Location","Type":"uint16","Docs":"Location descriptor as defined in the GATT Bluetooth Namespace\n\t\tDescriptors section of the Bluetooth SIG Assigned Numbers","Flags":[1,5]}]},{"Title":"Mesh Attention Hierarchy","Description":"","Service":"unique name","Interface":"org.bluez.mesh.Attention1","ObjectPath":"freely definable","Methods":[{"Name":"SetTimer","ReturnType":"void","Args":[{"Type":"uint8","Name":"element_index"},{"Type":"uint16","Name":"time"}],"Errors":null,"Docs":"\t\tThe element_index parameter is the element's index within the\n\t\tnode where the health server model is hosted.\n\t\tThe time parameter indicates how many seconds the attention\n\t\tstate shall be on.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.NotSupported\n"},{"Name":"GetTimer","ReturnType":"uint16","Args":[{"Type":"uint16","Name":"element"}],"Errors":null,"Docs":"\t\tThe element parameter is the unicast address within the node\n\t\twhere the health server model is hosted.\n\t\tReturns the number of seconds for how long the attention action\n\t\tremains staying on.\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.NotSupported\n"}],"Signals":[],"Properties":[]},{"Title":"Mesh Provisioner Hierarchy","Description":"","Service":"unique name","Interface":"org.bluez.mesh.Provisioner1","ObjectPath":"freely definable","Methods":[{"Name":"ScanResult","ReturnType":"void","Args":[{"Type":"int16","Name":"rssi"},{"Type":"array{byte}","Name":"data"},{"Type":"dict","Name":"options"}],"Errors":null,"Docs":"\t\tThe method is called from the bluetooth-meshd daemon when a\n\t\tunique UUID has been seen during UnprovisionedScan() for\n\t\tunprovsioned devices.\n\t\tThe rssi parameter is a signed, normalized measurement of the\n\t\tsignal strength of the recieved unprovisioned beacon.\n\t\tThe data parameter is a variable length byte array, that may\n\t\thave 1, 2 or 3 distinct fields contained in it including the 16\n\t\tbyte remote device UUID (always), a 16 bit mask of OOB\n\t\tauthentication flags (optional), and a 32 bit URI hash (if URI\n\t\tbit set in OOB mask). Whether these fields exist or not is a\n\t\tdecision of the remote device.\n\t\tThe options parameter is a dictionary that may contain\n\t\tadditional scan result info (currently an empty placeholder for\n\t\tforward compatibility).\n\t\tIf a beacon with a UUID that has already been reported is\n\t\trecieved by the daemon, it will be silently discarded unless it\n\t\twas recieved at a higher rssi power level.\n"},{"Name":"RequestProvData","ReturnType":"uint16 net_index, uint16 unicast","Args":[{"Type":"uint8","Name":"count"}],"Errors":null,"Docs":"\t\tThis method is implemented by a Provisioner capable application\n\t\tand is called when the remote device has been fully\n\t\tauthenticated and confirmed.\n\t\tThe count parameter is the number of consecutive unicast\n\t\taddresses the remote device is requesting.\n\t\tReturn Parameters are from the Mesh Profile Spec:\n\t\tnet_index - Subnet index of the net_key\n\t\tunicast - Primary Unicast address of the new node\n\t\tPossibleErrors:\n\t\t\torg.bluez.mesh.Error.Abort\n"},{"Name":"AddNodeComplete","ReturnType":"void","Args":[{"Type":"array{byte}[16]","Name":"uuid"},{"Type":"uint16","Name":"unicast"},{"Type":"uint8","Name":"count"}],"Errors":null,"Docs":"\t\tThis method is called when the node provisioning initiated\n\t\tby an AddNode() method call successfully completed.\n\t\tThe unicast parameter is the primary address that has been\n\t\tassigned to the new node, and the address of it's config server.\n\t\tThe count parameter is the number of unicast addresses assigned\n\t\tto the new node.\n\t\tThe new node may now be sent messages using the credentials\n\t\tsupplied by the RequestProvData method.\n"},{"Name":"AddNodeFailed","ReturnType":"void","Args":[{"Type":"array{byte}[16]","Name":"uuid"},{"Type":"string","Name":"reason"}],"Errors":null,"Docs":"\t\tThis method is called when the node provisioning initiated by\n\t\tAddNode() has failed. Depending on how far Provisioning\n\t\tproceeded before failing, some cleanup of cached data may be\n\t\trequired.\n\t\tThe reason parameter identifies the reason for provisioning\n\t\tfailure. The defined values are: \"aborted\", \"timeout\",\n\t\t\"bad-pdu\", \"confirmation-failed\", \"out-of-resources\",\n\t\t\"decryption-error\", \"unexpected-error\",\n\t\t\"cannot-assign-addresses\".\n"}],"Signals":[],"Properties":[]},{"Title":"Provisioning Agent Hierarchy","Description":"","Service":"unique name","Interface":"org.bluez.mesh.ProvisionAgent1","ObjectPath":"freely definable","Methods":[{"Name":"PrivateKey","ReturnType":"array{byte}","Args":[],"Errors":null,"Docs":"\t\tThis method is called during provisioning if the Provisioner\n\t\thas requested Out-Of-Band ECC key exchange. The Private key is\n\t\treturned to the Daemon, and the Public Key is delivered to the\n\t\tremote Provisioner using a method that does not involve the\n\t\tBluetooth Mesh system. The Private Key returned must be 32\n\t\toctets in size, or the Provisioning procedure will fail and be\n\t\tcanceled.\n\t\tThis function will only be called if the Provisioner has\n\t\trequested pre-determined keys to be exchanged Out-of-Band, and\n\t\tthe local role is Unprovisioned device.\n"},{"Name":"PublicKey","ReturnType":"array{byte}","Args":[],"Errors":null,"Docs":"\t\tThis method is called during provisioning if the local device is\n\t\tthe Provisioner, and is requestng Out-Of-Band ECC key exchange.\n\t\tThe Public key is returned to the Daemon that is the matched\n\t\tpair of the Private key of the remote device. The Public Key\n\t\treturned must be 64 octets in size, or the Provisioning\n\t\tprocedure will fail and be canceled.\n\t\tThis function will only be called if the Provisioner has\n\t\trequested pre-determined keys to be exchanged Out-of-Band, and\n\t\tthe local role is Provisioner.\n"},{"Name":"DisplayString","ReturnType":"void","Args":[{"Type":"string","Name":"value"}],"Errors":null,"Docs":"\t\tThis method is called when the Daemon has something important\n\t\tfor the Agent to Display, but does not require any additional\n\t\tinput locally. For instance: \"Enter \"ABCDE\" on remote device\".\n"},{"Name":"DisplayNumeric","ReturnType":"void","Args":[{"Type":"string","Name":"type"},{"Type":"uint32","Name":"number"}],"Errors":null,"Docs":"\t\tThis method is called when the Daemon has something important\n\t\tfor the Agent to Display, but does not require any additional\n\t\tinput locally. For instance: \"Enter 14939264 on remote device\".\n\t\tThe type parameter indicates the display method. Allowed values\n\t\tare:\n\t\t\t\"blink\" - Locally blink LED\n\t\t\t\"beep\" - Locally make a noise\n\t\t\t\"vibrate\" - Locally vibrate\n\t\t\t\"out-numeric\" - Display value to enter remotely\n\t\t\t\"push\" - Request pushes on remote button\n\t\t\t\"twist\" - Request twists on remote knob\n\t\tThe number parameter is the specific value represented by the\n\t\tPrompt.\n"},{"Name":"PromptNumeric","ReturnType":"uint32","Args":[{"Type":"string","Name":"type"}],"Errors":null,"Docs":"\t\tThis method is called when the Daemon requests the user to\n\t\tenter a decimal value between 1-99999999.\n\t\tThe type parameter indicates the input method. Allowed values\n\t\tare:\n\t\t\t\"blink\" - Enter times remote LED blinked\n\t\t\t\"beep\" - Enter times remote device beeped\n\t\t\t\"vibrate\" - Enter times remote device vibrated\n\t\t\t\"in-numeric\" - Enter remotely displayed value\n\t\t\t\"push\" - Push local button remotely requested times\n\t\t\t\"twist\" - Twist local knob remotely requested times\n\t\tThis agent should prompt the user for specific input. For\n\t\tinstance: \"Enter value being displayed by remote device\".\n"},{"Name":"PromptStatic","ReturnType":"array{byte}[16]","Args":[{"Type":"string","Name":"type"}],"Errors":null,"Docs":"\t\tThis method is called when the Daemon requires a 16 octet byte\n\t\tarray, as an Out-of-Band authentication.\n\t\tThe type parameter indicates the input method. Allowed values\n\t\tare:\n\t\t\t\"static-oob\" - return 16 octet array\n\t\t\t\"in-alpha\" - return 16 octet alpha array\n\t\tThe Static data returned must be 16 octets in size, or the\n\t\tProvisioning procedure will fail and be canceled. If input type\n\t\tis \"in-alpha\", the printable characters should be\n\t\tleft-justified, with trailing 0x00 octets filling the remaining\n\t\tbytes.\n"},{"Name":"Cancel","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\tThis method gets called by the daemon to cancel any existing\n\t\tAgent Requests. When called, any pending user input should be\n\t\tcanceled, and any display requests removed.\n"}],"Signals":[],"Properties":[{"Name":"Capabilities","Type":"array{string}","Docs":"An array of strings with the following allowed values:\n\t\t\t\"blink\"\n\t\t\t\"beep\"\n\t\t\t\"vibrate\"\n\t\t\t\"out-numeric\"\n\t\t\t\"out-alpha\"\n\t\t\t\"push\"\n\t\t\t\"twist\"\n\t\t\t\"in-numeric\"\n\t\t\t\"in-alpha\"\n\t\t\t\"static-oob\"\n\t\t\t\"public-oob\"","Flags":[1]},{"Name":"OutOfBandInfo","Type":"array{string}","Docs":"Indicates availability of OOB data. An array of strings with the\n\t\tfollowing allowed values:\n\t\t\t\"other\"\n\t\t\t\"uri\"\n\t\t\t\"machine-code-2d\"\n\t\t\t\"bar-code\"\n\t\t\t\"nfc\"\n\t\t\t\"number\"\n\t\t\t\"string\"\n\t\t\t\"on-box\"\n\t\t\t\"in-box\"\n\t\t\t\"on-paper\",\n\t\t\t\"in-manual\"\n\t\t\t\"on-device\"","Flags":[1,5]},{"Name":"URI","Type":"string","Docs":"Uniform Resource Identifier points to out-of-band (OOB)\n\t\tinformation (e.g., a public key)","Flags":[1,5]}]}]},{"FileName":"network-api.txt","Name":"BlueZ D-Bus Network API description","Description":"\n","Api":[{"Title":"Network hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.Network1","ObjectPath":"[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX","Methods":[{"Name":"Connect","ReturnType":"string","Args":[{"Type":"string","Name":"uuid"}],"Errors":["org.bluez.Error.AlreadyConnected","org.bluez.Error.AlreadyConnected"],"Docs":"\t\t\tConnect to the network device and return the network\n\t\t\tinterface name. Examples of the interface name are\n\t\t\tbnep0, bnep1 etc.\n\t\t\tuuid can be either one of \"gn\", \"panu\" or \"nap\" (case\n\t\t\tinsensitive) or a traditional string representation of\n\t\t\tUUID or a hexadecimal number.\n\t\t\tThe connection will be closed and network device\n\t\t\treleased either upon calling Disconnect() or when\n\t\t\tthe client disappears from the message bus.\n\t\t\tPossible errors: org.bluez.Error.AlreadyConnected\n\t\t\t\t\t org.bluez.Error.ConnectionAttemptFailed\n"},{"Name":"Disconnect","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.Failed","org.bluez.Error.Failed"],"Docs":"\t\t\tDisconnect from the network device.\n\t\t\tTo abort a connection attempt in case of errors or\n\t\t\ttimeouts in the client it is fine to call this method.\n\t\t\tPossible errors: org.bluez.Error.Failed\n"}],"Signals":[],"Properties":[{"Name":"Connected","Type":"boolean","Docs":"Indicates if the device is connected.","Flags":[]},{"Name":"Interface","Type":"string","Docs":"Indicates the network interface name when available.","Flags":[]},{"Name":"UUID","Type":"string","Docs":"Indicates the connection role when available.","Flags":[]}]},{"Title":"Network server hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.NetworkServer1","ObjectPath":"/org/bluez/{hci0,hci1,...}","Methods":[{"Name":"Register","ReturnType":"void","Args":[{"Type":"string","Name":"uuid"},{"Type":"string","Name":"bridge"}],"Errors":null,"Docs":"\t\t\tRegister server for the provided UUID. Every new\n\t\t\tconnection to this server will be added the bridge\n\t\t\tinterface.\n\t\t\tValid UUIDs are \"gn\", \"panu\" or \"nap\".\n\t\t\tInitially no network server SDP is provided. Only\n\t\t\tafter this method a SDP record will be available\n\t\t\tand the BNEP server will be ready for incoming\n\t\t\tconnections.\n"},{"Name":"Unregister","ReturnType":"void","Args":[{"Type":"string","Name":"uuid"}],"Errors":null,"Docs":"\t\t\tUnregister the server for provided UUID.\n\t\t\tAll servers will be automatically unregistered when\n\t\t\tthe calling application terminates.\n"}],"Signals":[],"Properties":[]}]},{"FileName":"obex-agent-api.txt","Name":"OBEX D-Bus Agent API description","Description":"\n","Api":[{"Title":"Agent Manager hierarchy","Description":"","Service":"org.bluez.obex","Interface":"org.bluez.obex.AgentManager1","ObjectPath":"/org/bluez/obex","Methods":[{"Name":"RegisterAgent","ReturnType":"void","Args":[{"Type":"object","Name":"agent"}],"Errors":null,"Docs":"\t\t\tRegister an agent to request authorization of\n\t\t\tthe user to accept/reject objects. Object push\n\t\t\tservice needs to authorize each received object.\n\t\t\tPossible errors: org.bluez.obex.Error.AlreadyExists\n"},{"Name":"UnregisterAgent","ReturnType":"void","Args":[{"Type":"object","Name":"agent"}],"Errors":null,"Docs":"\t\t\tThis unregisters the agent that has been previously\n\t\t\tregistered. The object path parameter must match the\n\t\t\tsame value that has been used on registration.\n\t\t\tPossible errors: org.bluez.obex.Error.DoesNotExist\n"}],"Signals":[],"Properties":[]},{"Title":"Agent hierarchy","Description":"","Service":"unique name","Interface":"org.bluez.obex.Agent1","ObjectPath":"freely definable","Methods":[{"Name":"Release","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tThis method gets called when the service daemon\n\t\t\tunregisters the agent. An agent can use it to do\n\t\t\tcleanup tasks. There is no need to unregister the\n\t\t\tagent, because when this method gets called it has\n\t\t\talready been unregistered.\n"},{"Name":"AuthorizePush","ReturnType":"string","Args":[{"Type":"object","Name":"transfer"}],"Errors":null,"Docs":"\t\t\tThis method gets called when the service daemon\n\t\t\tneeds to accept/reject a Bluetooth object push request.\n\t\t\tReturns the full path (including the filename) where\n\t\t\tthe object shall be stored. The tranfer object will\n\t\t\tcontain a Filename property that contains the default\n\t\t\tlocation and name that can be returned.\n\t\t\tPossible errors: org.bluez.obex.Error.Rejected\n\t\t\t org.bluez.obex.Error.Canceled\n"},{"Name":"Cancel","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tThis method gets called to indicate that the agent\n\t\t\trequest failed before a reply was returned. It cancels\n\t\t\tthe previous request.\n"}],"Signals":[],"Properties":[]}]},{"FileName":"obex-api.txt","Name":"OBEX D-Bus API description","Description":"\n","Api":[{"Title":"Client hierarchy","Description":"","Service":"org.bluez.obex","Interface":"org.bluez.obex.Client1","ObjectPath":"/org/bluez/obex","Methods":[{"Name":"CreateSession","ReturnType":"object","Args":[{"Type":"string","Name":"destination"},{"Type":"dict","Name":"args"}],"Errors":null,"Docs":"\t\t\tCreate a new OBEX session for the given remote address.\n\t\t\tThe last parameter is a dictionary to hold optional or\n\t\t\ttype-specific parameters. Typical parameters that can\n\t\t\tbe set in this dictionary include the following:\n\t\t\t\tstring \"Target\" : type of session to be created\n\t\t\t\tstring \"Source\" : local address to be used\n\t\t\t\tbyte \"Channel\"\n\t\t\tThe currently supported targets are the following:\n\t\t\t\t\"ftp\"\n\t\t\t\t\"map\"\n\t\t\t\t\"opp\"\n\t\t\t\t\"pbap\"\n\t\t\t\t\"sync\"\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"RemoveSession","ReturnType":"void","Args":[{"Type":"object","Name":"session"}],"Errors":null,"Docs":"\t\t\tUnregister session and abort pending transfers.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.NotAuthorized\n"}],"Signals":[],"Properties":[]},{"Title":"Session hierarchy","Description":"","Service":"org.bluez.obex","Interface":"org.bluez.obex.Session1","ObjectPath":"/org/bluez/obex/server/session{0, 1, 2, ...} or\n\t\t/org/bluez/obex/client/session{0, 1, 2, ...}","Methods":[{"Name":"GetCapabilities","ReturnType":"string","Args":[],"Errors":null,"Docs":"\t\t\tGet remote device capabilities.\n\t\t\tPossible errors: org.bluez.obex.Error.NotSupported\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"}],"Signals":[],"Properties":[{"Name":"Source","Type":"string","Docs":"Bluetooth adapter address","Flags":[]},{"Name":"Destination","Type":"string","Docs":"Bluetooth device address","Flags":[]},{"Name":"Channel","Type":"byte","Docs":"Bluetooth channel","Flags":[]},{"Name":"Target","Type":"string","Docs":"Target UUID","Flags":[]},{"Name":"Root","Type":"string","Docs":"Root path","Flags":[]}]},{"Title":"Transfer hierarchy","Description":"","Service":"org.bluez.obex","Interface":"org.bluez.obex.Transfer1","ObjectPath":"[Session object path]/transfer{0, 1, 2, ...}","Methods":[{"Name":"Cancel","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tStops the current transference.\n\t\t\tPossible errors: org.bluez.obex.Error.NotAuthorized\n\t\t\t\t\t org.bluez.obex.Error.InProgress\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"Suspend","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tSuspend transference.\n\t\t\tPossible errors: org.bluez.obex.Error.NotAuthorized\n\t\t\t\t\t org.bluez.obex.Error.NotInProgress\n\t\t\tNote that it is not possible to suspend transfers\n\t\t\twhich are queued which is why NotInProgress is listed\n\t\t\tas possible error.\n"},{"Name":"Resume","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tResume transference.\n\t\t\tPossible errors: org.bluez.obex.Error.NotAuthorized\n\t\t\t\t\t org.bluez.obex.Error.NotInProgress\n\t\t\tNote that it is not possible to resume transfers\n\t\t\twhich are queued which is why NotInProgress is listed\n\t\t\tas possible error.\n"}],"Signals":[],"Properties":[{"Name":"Status","Type":"string","Docs":"Inform the current status of the transfer.\n\n\t\t\tPossible values: \"queued\", \"active\", \"suspended\",\n\t\t\t\t\t\"complete\" or \"error\"","Flags":[]},{"Name":"Session","Type":"object","Docs":"The object path of the session the transfer belongs\n\t\t\tto.","Flags":[]},{"Name":"Name","Type":"string","Docs":"Name of the transferred object. Either Name or Type\n\t\t\tor both will be present.","Flags":[]},{"Name":"Type","Type":"string","Docs":"Type of the transferred object. Either Name or Type\n\t\t\tor both will be present.\n\n\t\tuint64 Time [readonly, optional]\n\n\t\t\tTime of the transferred object if this is\n\t\t\tprovided by the remote party.\n\n\t\tuint64 Size [readonly, optional]\n\n\t\t\tSize of the transferred object. If the size is\n\t\t\tunknown, then this property will not be present.\n\n\t\tuint64 Transferred [readonly, optional]\n\n\t\t\tNumber of bytes transferred. For queued transfers, this\n\t\t\tvalue will not be present.","Flags":[]},{"Name":"Filename","Type":"string","Docs":"Complete name of the file being received or sent.\n\n\t\t\tFor incoming object push transaction, this will be\n\t\t\tthe proposed default location and name. It can be\n\t\t\toverwritten by the AuthorizePush agent callback\n\t\t\tand will be then updated accordingly.","Flags":[5]}]},{"Title":"Object Push hierarchy","Description":"","Service":"org.bluez.obex","Interface":"org.bluez.obex.ObjectPush1","ObjectPath":"[Session object path]","Methods":[{"Name":"SendFile","ReturnType":"object, dict","Args":[{"Type":"string","Name":"sourcefile"}],"Errors":null,"Docs":"\t\t\tSend one local file to the remote device.\n\t\t\tThe returned path represents the newly created transfer,\n\t\t\twhich should be used to find out if the content has been\n\t\t\tsuccessfully transferred or if the operation fails.\n\t\t\tThe properties of this transfer are also returned along\n\t\t\twith the object path, to avoid a call to GetProperties.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"PullBusinessCard","ReturnType":"object, dict","Args":[{"Type":"string","Name":"targetfile"}],"Errors":null,"Docs":"\t\t\tRequest the business card from a remote device and\n\t\t\tstore it in the local file.\n\t\t\tIf an empty target file is given, a name will be\n\t\t\tautomatically calculated for the temporary file.\n\t\t\tThe returned path represents the newly created transfer,\n\t\t\twhich should be used to find out if the content has been\n\t\t\tsuccessfully transferred or if the operation fails.\n\t\t\tThe properties of this transfer are also returned along\n\t\t\twith the object path, to avoid a call to GetProperties.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"ExchangeBusinessCards","ReturnType":"object, dict","Args":[{"Type":"string","Name":"clientfile"},{"Type":"string","Name":"targetfile"}],"Errors":null,"Docs":"\t\t\tPush the client's business card to the remote device\n\t\t\tand then retrieve the remote business card and store\n\t\t\tit in a local file.\n\t\t\tIf an empty target file is given, a name will be\n\t\t\tautomatically calculated for the temporary file.\n\t\t\tThe returned path represents the newly created transfer,\n\t\t\twhich should be used to find out if the content has been\n\t\t\tsuccessfully transferred or if the operation fails.\n\t\t\tThe properties of this transfer are also returned along\n\t\t\twith the object path, to avoid a call to GetProperties.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"}],"Signals":[],"Properties":[]},{"Title":"File Transfer hierarchy","Description":"","Service":"org.bluez.obex","Interface":"org.bluez.obex.FileTransfer","ObjectPath":"[Session object path]","Methods":[{"Name":"ChangeFolder","ReturnType":"void","Args":[{"Type":"string","Name":"folder"}],"Errors":null,"Docs":"\t\t\tChange the current folder of the remote device.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"CreateFolder","ReturnType":"void","Args":[{"Type":"string","Name":"folder"}],"Errors":null,"Docs":"\t\t\tCreate a new folder in the remote device.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"ListFolder","ReturnType":"array{dict}","Args":[],"Errors":null,"Docs":"\t\t\tReturns a dictionary containing information about\n\t\t\tthe current folder content.\n\t\t\tThe following keys are defined:\n\t\t\t\tstring Name : Object name in UTF-8 format\n\t\t\t\tstring Type : Either \"folder\" or \"file\"\n\t\t\t\tuint64 Size : Object size or number of items in\n\t\t\t\t\t\tfolder\n\t\t\t\tstring Permission : Group, owner and other\n\t\t\t\t\t\t\tpermission\n\t\t\t\tuint64 Modified : Last change\n\t\t\t\tuint64 Accessed : Last access\n\t\t\t\tuint64 Created : Creation date\n\t\t\tPossible errors: org.bluez.obex.Error.Failed\n"},{"Name":"GetFile","ReturnType":"object, dict","Args":[{"Type":"string","Name":"targetfile"},{"Type":"string","Name":"sourcefile"}],"Errors":null,"Docs":"\t\t\tCopy the source file (from remote device) to the\n\t\t\ttarget file (on local filesystem).\n\t\t\tIf an empty target file is given, a name will be\n\t\t\tautomatically calculated for the temporary file.\n\t\t\tThe returned path represents the newly created transfer,\n\t\t\twhich should be used to find out if the content has been\n\t\t\tsuccessfully transferred or if the operation fails.\n\t\t\tThe properties of this transfer are also returned along\n\t\t\twith the object path, to avoid a call to GetProperties.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"PutFile","ReturnType":"object, dict","Args":[{"Type":"string","Name":"sourcefile"},{"Type":"string","Name":"targetfile"}],"Errors":null,"Docs":"\t\t\tCopy the source file (from local filesystem) to the\n\t\t\ttarget file (on remote device).\n\t\t\tThe returned path represents the newly created transfer,\n\t\t\twhich should be used to find out if the content has been\n\t\t\tsuccessfully transferred or if the operation fails.\n\t\t\tThe properties of this transfer are also returned along\n\t\t\twith the object path, to avoid a call to GetProperties.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"CopyFile","ReturnType":"void","Args":[{"Type":"string","Name":"sourcefile"},{"Type":"string","Name":"targetfile"}],"Errors":null,"Docs":"\t\t\tCopy a file within the remote device from source file\n\t\t\tto target file.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"MoveFile","ReturnType":"void","Args":[{"Type":"string","Name":"sourcefile"},{"Type":"string","Name":"targetfile"}],"Errors":null,"Docs":"\t\t\tMove a file within the remote device from source file\n\t\t\tto the target file.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"Delete","ReturnType":"void","Args":[{"Type":"string","Name":"file"}],"Errors":null,"Docs":"\t\t\tDeletes the specified file/folder.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"}],"Signals":[],"Properties":[]},{"Title":"Phonebook Access hierarchy","Description":"","Service":"org.bluez.obex","Interface":"org.bluez.obex.PhonebookAccess1","ObjectPath":"[Session object path]","Methods":[{"Name":"Select","ReturnType":"void","Args":[{"Type":"string","Name":"location"},{"Type":"string","Name":"phonebook"}],"Errors":null,"Docs":"\t\t\tSelect the phonebook object for other operations. Should\n\t\t\tbe call before all the other operations.\n\t\t\tlocation : Where the phonebook is stored, possible\n\t\t\tinputs :\n\t\t\t\t\"int\" ( \"internal\" which is default )\n\t\t\t\t\"sim\" ( \"sim1\" )\n\t\t\t\t\"sim2\"\n\t\t\t\t...\n\t\t\tphonebook : Possible inputs :\n\t\t\t\t\"pb\" :\tphonebook for the saved contacts\n\t\t\t\t\"ich\":\tincoming call history\n\t\t\t\t\"och\":\toutgoing call history\n\t\t\t\t\"mch\":\tmissing call history\n\t\t\t\t\"cch\":\tcombination of ich och mch\n\t\t\t\t\"spd\":\tspeed dials entry ( only for \"internal\" )\n\t\t\t\t\"fav\":\tfavorites entry ( only for \"internal\" )\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"PullAll","ReturnType":"object, dict","Args":[{"Type":"string","Name":"targetfile"},{"Type":"dict","Name":"filters"}],"Errors":null,"Docs":"\t\t\tReturn the entire phonebook object from the PSE server\n\t\t\tin plain string with vcard format, and store it in\n\t\t\ta local file.\n\t\t\tIf an empty target file is given, a name will be\n\t\t\tautomatically calculated for the temporary file.\n\t\t\tThe returned path represents the newly created transfer,\n\t\t\twhich should be used to find out if the content has been\n\t\t\tsuccessfully transferred or if the operation fails.\n\t\t\tThe properties of this transfer are also returned along\n\t\t\twith the object path, to avoid a call to GetProperties.\n\t\t\tPossible filters: Format, Order, Offset, MaxCount and\n\t\t\tFields\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\torg.bluez.obex.Forbidden\n"},{"Name":"List","ReturnType":"array{string vcard, string name}","Args":[{"Type":"dict","Name":"filters"}],"Errors":null,"Docs":"\t\t\tReturn an array of vcard-listing data where every entry\n\t\t\tconsists of a pair of strings containing the vcard\n\t\t\thandle and the contact name. For example:\n\t\t\t\t\"1.vcf\" : \"John\"\n\t\t\tPossible filters: Order, Offset and MaxCount\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Forbidden\n"},{"Name":"Pull","ReturnType":"object, dict","Args":[{"Type":"string","Name":"vcard"},{"Type":"string","Name":"targetfile"},{"Type":"dict","Name":"filters"}],"Errors":null,"Docs":"\t\t\tGiven a vcard handle, retrieve the vcard in the current\n\t\t\tphonebook object and store it in a local file.\n\t\t\tIf an empty target file is given, a name will be\n\t\t\tautomatically calculated for the temporary file.\n\t\t\tThe returned path represents the newly created transfer,\n\t\t\twhich should be used to find out if the content has been\n\t\t\tsuccessfully transferred or if the operation fails.\n\t\t\tThe properties of this transfer are also returned along\n\t\t\twith the object path, to avoid a call to GetProperties.\n\t\t\tPossbile filters: Format and Fields\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Forbidden\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"Search","ReturnType":"array{string vcard, string name}","Args":[{"Type":"string","Name":"field"},{"Type":"string","Name":"value"},{"Type":"dict","Name":"filters"}],"Errors":null,"Docs":"\t\t\tSearch for entries matching the given condition and\n\t\t\treturn an array of vcard-listing data where every entry\n\t\t\tconsists of a pair of strings containing the vcard\n\t\t\thandle and the contact name.\n\t\t\tvcard : name paired string match the search condition.\n\t\t\tfield : the field in the vcard to search with\n\t\t\t\t{ \"name\" (default) | \"number\" | \"sound\" }\n\t\t\tvalue : the string value to search for\n\t\t\tPossible filters: Order, Offset and MaxCount\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Forbidden\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"GetSize","ReturnType":"uint16","Args":[],"Errors":null,"Docs":"\t\t\tReturn the number of entries in the selected phonebook\n\t\t\tobject that are actually used (i.e. indexes that\n\t\t\tcorrespond to non-NULL entries).\n\t\t\tPossible errors: org.bluez.obex.Error.Forbidden\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"UpdateVersion","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tAttempt to update PrimaryCounter and SecondaryCounter.\n\t\t\tPossible errors: org.bluez.obex.Error.NotSupported\n\t\t\t\t\t org.bluez.obex.Error.Forbidden\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"ListFilterFields","ReturnType":"array{string}","Args":[],"Errors":null,"Docs":"\t\t\tReturn All Available fields that can be used in Fields\n\t\t\tfilter.\n\t\t\tPossible errors: None\n"}],"Signals":[],"Properties":[{"Name":"Folder","Type":"string","Docs":"Current folder.","Flags":[]},{"Name":"DatabaseIdentifier","Type":"string","Docs":"128 bits persistent database identifier.\n\n\t\t\tPossible values: 32-character hexadecimal such\n\t\t\tas A1A2A3A4B1B2C1C2D1D2E1E2E3E4E5E6","Flags":[5]},{"Name":"PrimaryCounter","Type":"string","Docs":"128 bits primary version counter.\n\n\t\t\tPossible values: 32-character hexadecimal such\n\t\t\tas A1A2A3A4B1B2C1C2D1D2E1E2E3E4E5E6","Flags":[5]},{"Name":"SecondaryCounter","Type":"string","Docs":"128 bits secondary version counter.\n\n\t\t\tPossible values: 32-character hexadecimal such\n\t\t\tas A1A2A3A4B1B2C1C2D1D2E1E2E3E4E5E6","Flags":[5]},{"Name":"FixedImageSize","Type":"bool","Docs":"Indicate support for fixed image size.\n\n\t\t\tPossible values: True if image is JPEG 300x300 pixels\n\t\t\totherwise False.","Flags":[5]}]},{"Title":"Synchronization hierarchy","Description":"","Service":"org.bluez.obex","Interface":"org.bluez.obex.Synchronization1","ObjectPath":"[Session object path]","Methods":[{"Name":"SetLocation","ReturnType":"void","Args":[{"Type":"string","Name":"location"}],"Errors":null,"Docs":"\t\t\tSet the phonebook object store location for other\n\t\t\toperations. Should be called before all the other\n\t\t\toperations.\n\t\t\tlocation: Where the phonebook is stored, possible\n\t\t\tvalues:\n\t\t\t\t\"int\" ( \"internal\" which is default )\n\t\t\t\t\"sim1\"\n\t\t\t\t\"sim2\"\n\t\t\t\t......\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n"},{"Name":"GetPhonebook","ReturnType":"object, dict","Args":[{"Type":"string","Name":"targetfile"}],"Errors":null,"Docs":"\t\t\tRetrieve an entire Phonebook Object store from remote\n\t\t\tdevice, and stores it in a local file.\n\t\t\tIf an empty target file is given, a name will be\n\t\t\tautomatically calculated for the temporary file.\n\t\t\tThe returned path represents the newly created transfer,\n\t\t\twhich should be used to find out if the content has been\n\t\t\tsuccessfully transferred or if the operation fails.\n\t\t\tThe properties of this transfer are also returned along\n\t\t\twith the object path, to avoid a call to GetProperties.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"PutPhonebook","ReturnType":"object, dict","Args":[{"Type":"string","Name":"sourcefile"}],"Errors":null,"Docs":"\t\t\tSend an entire Phonebook Object store to remote device.\n\t\t\tThe returned path represents the newly created transfer,\n\t\t\twhich should be used to find out if the content has been\n\t\t\tsuccessfully transferred or if the operation fails.\n\t\t\tThe properties of this transfer are also returned along\n\t\t\twith the object path, to avoid a call to GetProperties.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"}],"Signals":[],"Properties":[]},{"Title":"Message Access hierarchy","Description":"","Service":"org.bluez.obex","Interface":"org.bluez.obex.MessageAccess1","ObjectPath":"[Session object path]","Methods":[{"Name":"SetFolder","ReturnType":"void","Args":[{"Type":"string","Name":"name"}],"Errors":null,"Docs":"\t\t\tSet working directory for current session, *name* may\n\t\t\tbe the directory name or '..[/dir]'.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"ListFolders","ReturnType":"array{dict}","Args":[{"Type":"dict","Name":"filter"}],"Errors":null,"Docs":"\t\t\tReturns a dictionary containing information about\n\t\t\tthe current folder content.\n\t\t\tThe following keys are defined:\n\t\t\t\tstring Name : Folder name\n\t\t\tPossible filters: Offset and MaxCount\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"ListFilterFields","ReturnType":"array{string}","Args":[],"Errors":null,"Docs":"\t\t\tReturn all available fields that can be used in Fields\n\t\t\tfilter.\n\t\t\tPossible errors: None\n"},{"Name":"ListMessages","ReturnType":"array{object, dict}","Args":[{"Type":"string","Name":"folder"},{"Type":"dict","Name":"filter"}],"Errors":null,"Docs":"\t\t\tReturns an array containing the messages found in the\n\t\t\tgiven subfolder of the current folder, or in the\n\t\t\tcurrent folder if folder is empty.\n\t\t\tPossible Filters: Offset, MaxCount, SubjectLength, Fields,\n\t\t\tType, PeriodStart, PeriodEnd, Status, Recipient, Sender,\n\t\t\tPriority\n\t\t\tEach message is represented by an object path followed\n\t\t\tby a dictionary of the properties.\n\t\t\tProperties:\n\t\t\t\tstring Subject:\n\t\t\t\t\tMessage subject\n\t\t\t\tstring Timestamp:\n\t\t\t\t\tMessage timestamp\n\t\t\t\tstring Sender:\n\t\t\t\t\tMessage sender name\n\t\t\t\tstring SenderAddress:\n\t\t\t\t\tMessage sender address\n\t\t\t\tstring ReplyTo:\n\t\t\t\t\tMessage Reply-To address\n\t\t\t\tstring Recipient:\n\t\t\t\t\tMessage recipient name\n\t\t\t\tstring RecipientAddress:\n\t\t\t\t\tMessage recipient address\n\t\t\t\tstring Type:\n\t\t\t\t\tMessage type\n\t\t\t\t\tPossible values: \"email\", \"sms-gsm\",\n\t\t\t\t\t\"sms-cdma\" and \"mms\"\n\t\t\t\tuint64 Size:\n\t\t\t\t\tMessage size in bytes\n\t\t\t\tboolean Text:\n\t\t\t\t\tMessage text flag\n\t\t\t\t\tSpecifies whether message has textual\n\t\t\t\t\tcontent or is binary only\n\t\t\t\tstring Status:\n\t\t\t\t\tMessage status\n\t\t\t\t\tPossible values for received messages:\n\t\t\t\t\t\"complete\", \"fractioned\", \"notification\"\n\t\t\t\t\tPossible values for sent messages:\n\t\t\t\t\t\"delivery-success\", \"sending-success\",\n\t\t\t\t\t\"delivery-failure\", \"sending-failure\"\n\t\t\t\tuint64 AttachmentSize:\n\t\t\t\t\tMessage overall attachment size in bytes\n\t\t\t\tboolean Priority:\n\t\t\t\t\tMessage priority flag\n\t\t\t\tboolean Read:\n\t\t\t\t\tMessage read flag\n\t\t\t\tboolean Sent:\n\t\t\t\t\tMessage sent flag\n\t\t\t\tboolean Protected:\n\t\t\t\t\tMessage protected flag\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"},{"Name":"UpdateInbox","ReturnType":"void","Args":null,"Errors":null,"Docs":""}],"Signals":[],"Properties":[]},{"Title":"Message hierarchy","Description":"","Service":"org.bluez.obex","Interface":"org.bluez.obex.Message1","ObjectPath":"[Session object path]/{message0,...}","Methods":[{"Name":"Get","ReturnType":"object, dict","Args":[{"Type":"string","Name":"targetfile"},{"Type":"boolean","Name":"attachment"}],"Errors":null,"Docs":"\t\t\tDownload message and store it in the target file.\n\t\t\tIf an empty target file is given, a temporary file\n\t\t\twill be automatically generated.\n\t\t\tThe returned path represents the newly created transfer,\n\t\t\twhich should be used to find out if the content has been\n\t\t\tsuccessfully transferred or if the operation fails.\n\t\t\tThe properties of this transfer are also returned along\n\t\t\twith the object path, to avoid a call to GetProperties.\n\t\t\tPossible errors: org.bluez.obex.Error.InvalidArguments\n\t\t\t\t\t org.bluez.obex.Error.Failed\n"}],"Signals":[],"Properties":[{"Name":"Folder","Type":"string","Docs":"Folder which the message belongs to","Flags":[]},{"Name":"Subject","Type":"string","Docs":"Message subject","Flags":[]},{"Name":"Timestamp","Type":"string","Docs":"Message timestamp","Flags":[]},{"Name":"Sender","Type":"string","Docs":"Message sender name","Flags":[]},{"Name":"SenderAddress","Type":"string","Docs":"Message sender address","Flags":[]},{"Name":"ReplyTo","Type":"string","Docs":"Message Reply-To address","Flags":[]},{"Name":"Recipient","Type":"string","Docs":"Message recipient name","Flags":[]},{"Name":"RecipientAddress","Type":"string","Docs":"Message recipient address","Flags":[]},{"Name":"Type","Type":"string","Docs":"Message type\n\n\t\t\tPossible values: \"email\", \"sms-gsm\",\n\t\t\t\"sms-cdma\" and \"mms\"\n\n\t\tuint64 Size [readonly]\n\n\t\t\tMessage size in bytes","Flags":[]},{"Name":"Status","Type":"string","Docs":"Message reception status\n\n\t\t\tPossible values: \"complete\",\n\t\t\t\"fractioned\" and \"notification\"","Flags":[]},{"Name":"Priority","Type":"boolean","Docs":"Message priority flag","Flags":[]},{"Name":"Read","Type":"boolean","Docs":"Message read flag","Flags":[3]},{"Name":"Deleted","Type":"boolean","Docs":"Message deleted flag","Flags":[]},{"Name":"Sent","Type":"boolean","Docs":"Message sent flag","Flags":[]},{"Name":"Protected","Type":"boolean","Docs":"Message protected flag","Flags":[]}]}]},{"FileName":"profile-api.txt","Name":"BlueZ D-Bus Profile API description","Description":"\n","Api":[{"Title":"Profile Manager hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.ProfileManager1","ObjectPath":"/org/bluez","Methods":[{"Name":"RegisterProfile","ReturnType":"void","Args":[{"Type":"object","Name":"profile"},{"Type":"string","Name":"uuid"},{"Type":"dict","Name":"options"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tThis registers a profile implementation.\n\t\t\tIf an application disconnects from the bus all\n\t\t\tits registered profiles will be removed.\n\t\t\tSome predefined services:\n\t\t\tHFP AG UUID: 0000111f-0000-1000-8000-00805f9b34fb\n\t\t\t\tDefault profile Version is 1.7, profile Features\n\t\t\t\tis 0b001001 and RFCOMM channel is 13.\n\t\t\t\tAuthentication is required.\n\t\t\tHFP HS UUID: 0000111e-0000-1000-8000-00805f9b34fb\n\t\t\t\tDefault profile Version is 1.7, profile Features\n\t\t\t\tis 0b000000 and RFCOMM channel is 7.\n\t\t\t\tAuthentication is required.\n\t\t\tHSP AG UUID: 00001112-0000-1000-8000-00805f9b34fb\n\t\t\t\tDefault profile Version is 1.2, RFCOMM channel\n\t\t\t\tis 12 and Authentication is required. Does not\n\t\t\t\tsupport any Features, option is ignored.\n\t\t\tHSP HS UUID: 00001108-0000-1000-8000-00805f9b34fb\n\t\t\t\tDefault profile Version is 1.2, profile Features\n\t\t\t\tis 0b0 and RFCOMM channel is 6. Authentication\n\t\t\t\tis required. Features is one bit value, specify\n\t\t\t\tcapability of Remote Audio Volume Control\n\t\t\t\t(by default turned off).\n\t\t\tAvailable options:\n\t\t\t\tstring Name\n\t\t\t\t\tHuman readable name for the profile\n\t\t\t\tstring Service\n\t\t\t\t\tThe primary service class UUID\n\t\t\t\t\t(if different from the actual\n\t\t\t\t\t profile UUID)\n\t\t\t\tstring Role\n\t\t\t\t\tFor asymmetric profiles that do not\n\t\t\t\t\thave UUIDs available to uniquely\n\t\t\t\t\tidentify each side this\n\t\t\t\t\tparameter allows specifying the\n\t\t\t\t\tprecise local role.\n\t\t\t\t\tPossible values: \"client\", \"server\"\n\t\t\t\tuint16 Channel\n\t\t\t\t\tRFCOMM channel number that is used\n\t\t\t\t\tfor client and server UUIDs.\n\t\t\t\t\tIf applicable it will be used in the\n\t\t\t\t\tSDP record as well.\n\t\t\t\tuint16 PSM\n\t\t\t\t\tPSM number that is used for client\n\t\t\t\t\tand server UUIDs.\n\t\t\t\t\tIf applicable it will be used in the\n\t\t\t\t\tSDP record as well.\n\t\t\t\tboolean RequireAuthentication\n\t\t\t\t\tPairing is required before connections\n\t\t\t\t\twill be established. No devices will\n\t\t\t\t\tbe connected if not paired.\n\t\t\t\tboolean RequireAuthorization\n\t\t\t\t\tRequest authorization before any\n\t\t\t\t\tconnection will be established.\n\t\t\t\tboolean AutoConnect\n\t\t\t\t\tIn case of a client UUID this will\n\t\t\t\t\tforce connection of the RFCOMM or\n\t\t\t\t\tL2CAP channels when a remote device\n\t\t\t\t\tis connected.\n\t\t\t\tstring ServiceRecord\n\t\t\t\t\tProvide a manual SDP record.\n\t\t\t\tuint16 Version\n\t\t\t\t\tProfile version (for SDP record)\n\t\t\t\tuint16 Features\n\t\t\t\t\tProfile features (for SDP record)\n\t\t\tPossible errors: org.bluez.Error.InvalidArguments\n\t\t\t org.bluez.Error.AlreadyExists\n"},{"Name":"UnregisterProfile","ReturnType":"void","Args":[{"Type":"object","Name":"profile"}],"Errors":["org.bluez.Error.DoesNotExist","org.bluez.Error.DoesNotExist"],"Docs":"\t\t\tThis unregisters the profile that has been previously\n\t\t\tregistered. The object path parameter must match the\n\t\t\tsame value that has been used on registration.\n\t\t\tPossible errors: org.bluez.Error.DoesNotExist\n"}],"Signals":[],"Properties":[]},{"Title":"Profile hierarchy","Description":"","Service":"unique name","Interface":"org.bluez.Profile1","ObjectPath":"freely definable","Methods":[{"Name":"Release","ReturnType":"void","Args":[],"Errors":null,"Docs":"\t\t\tThis method gets called when the service daemon\n\t\t\tunregisters the profile. A profile can use it to do\n\t\t\tcleanup tasks. There is no need to unregister the\n\t\t\tprofile, because when this method gets called it has\n\t\t\talready been unregistered.\n"},{"Name":"NewConnection","ReturnType":"void","Args":[{"Type":"object","Name":"device"},{"Type":"int32","Name":"fd"},{"Type":"dict","Name":"fd_properties"}],"Errors":["org.bluez.Error.Rejected","org.bluez.Error.Rejected"],"Docs":"\t\t\tThis method gets called when a new service level\n\t\t\tconnection has been made and authorized.\n\t\t\tCommon fd_properties:\n\t\t\tuint16 Version\t\tProfile version (optional)\n\t\t\tuint16 Features\t\tProfile features (optional)\n\t\t\tPossible errors: org.bluez.Error.Rejected\n\t\t\t org.bluez.Error.Canceled\n"},{"Name":"RequestDisconnection","ReturnType":"void","Args":[{"Type":"object","Name":"device"}],"Errors":["org.bluez.Error.Rejected","org.bluez.Error.Rejected"],"Docs":"\t\t\tThis method gets called when a profile gets\n\t\t\tdisconnected.\n\t\t\tThe file descriptor is no longer owned by the service\n\t\t\tdaemon and the profile implementation needs to take\n\t\t\tcare of cleaning up all connections.\n\t\t\tIf multiple file descriptors are indicated via\n\t\t\tNewConnection, it is expected that all of them\n\t\t\tare disconnected before returning from this\n\t\t\tmethod call.\n\t\t\tPossible errors: org.bluez.Error.Rejected\n\t\t\t org.bluez.Error.Canceled\n"}],"Signals":[],"Properties":[]}]},{"FileName":"sap-api.txt","Name":"BlueZ D-Bus Sim Access API description","Description":"\n","Api":[{"Title":"Sim Access Profile hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.SimAccess1","ObjectPath":"[variable prefix]/{hci0,hci1,...}","Methods":[{"Name":"Disconnect","ReturnType":"void","Args":[],"Errors":["org.bluez.Error.Failed","org.bluez.Error.Failed"],"Docs":"\t\t\tDisconnects SAP client from the server.\n\t\t\tPossible errors: org.bluez.Error.Failed\n"}],"Signals":[],"Properties":[{"Name":"Connected","Type":"boolean","Docs":"Indicates if SAP client is connected to the server.","Flags":[]}]}]},{"FileName":"thermometer-api.txt","Name":"BlueZ D-Bus Thermometer API description","Description":"\tSantiago Carot-Nemesio \u003csancane@gmail.com\u003e\n\n","Api":[{"Title":"Health Thermometer Manager hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.ThermometerManager1","ObjectPath":"[variable prefix]/{hci0,hci1,...}","Methods":[{"Name":"RegisterWatcher","ReturnType":"","Args":[{"Type":"object","Name":"agent"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tRegisters a watcher to monitor scanned measurements.\n\t\t\tThis agent will be notified about final temperature\n\t\t\tmeasurements.\n\t\t\tPossible Errors: org.bluez.Error.InvalidArguments\n"},{"Name":"UnregisterWatcher","ReturnType":"","Args":[{"Type":"object","Name":"agent"}],"Errors":null,"Docs":"\t\t\tUnregisters a watcher.\n"},{"Name":"EnableIntermediateMeasurement","ReturnType":"","Args":[{"Type":"object","Name":"agent"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tEnables intermediate measurement notifications\n\t\t\tfor this agent. Intermediate measurements will\n\t\t\tbe enabled only for thermometers which support it.\n\t\t\tPossible Errors: org.bluez.Error.InvalidArguments\n"},{"Name":"DisableIntermediateMeasurement","ReturnType":"","Args":[{"Type":"object","Name":"agent"}],"Errors":["org.bluez.Error.InvalidArguments","org.bluez.Error.InvalidArguments"],"Docs":"\t\t\tDisables intermediate measurement notifications\n\t\t\tfor this agent. It will disable notifications in\n\t\t\tthermometers when the last agent removes the\n\t\t\twatcher for intermediate measurements.\n\t\t\tPossible Errors: org.bluez.Error.InvalidArguments\n\t\t\t\t\torg.bluez.Error.NotFound\n"}],"Signals":[],"Properties":[]},{"Title":"Health Thermometer Profile hierarchy","Description":"","Service":"org.bluez","Interface":"org.bluez.Thermometer1","ObjectPath":"[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX","Methods":[],"Signals":[],"Properties":[{"Name":"Intermediate","Type":"boolean","Docs":"True if the thermometer supports intermediate\n\t\t\tmeasurement notifications.","Flags":[]},{"Name":"Interval","Type":"uint16","Docs":"(optional) The Measurement Interval defines the time (in\n\t\t\tseconds) between measurements. This interval is\n\t\t\tnot related to the intermediate measurements and\n\t\t\tmust be defined into a valid range. Setting it\n\t\t\tto zero means that no periodic measurements will\n\t\t\tbe taken.","Flags":[5]},{"Name":"Maximum","Type":"uint16","Docs":"(optional) Defines the maximum value allowed for the interval\n\t\t\tbetween periodic measurements.","Flags":[5]},{"Name":"Minimum","Type":"uint16","Docs":"(optional) Defines the minimum value allowed for the interval\n\t\t\tbetween periodic measurements.","Flags":[5]}]},{"Title":"Health Thermometer Watcher hierarchy","Description":"","Service":"unique name","Interface":"org.bluez.ThermometerWatcher1","ObjectPath":"freely definable","Methods":[{"Name":"MeasurementReceived","ReturnType":"void","Args":[{"Type":"dict","Name":"measurement"}],"Errors":null,"Docs":"\t\t\tThis callback gets called when a measurement has been\n\t\t\tscanned in the thermometer.\n\t\t\tMeasurement:\n\t\t\t\tint16 Exponent:\n\t\t\t\tint32 Mantissa:\n\t\t\t\t\tExponent and Mantissa values as\n\t\t\t\t\textracted from float value defined by\n\t\t\t\t\tIEEE-11073-20601.\n\t\t\t\t\tMeasurement value is calculated as\n\t\t\t\t\t(Mantissa) * (10^Exponent)\n\t\t\t\t\tFor special cases Exponent is\n\t\t\t\t\tset to 0 and Mantissa is set to\n\t\t\t\t\tone of following values:\n\t\t\t\t\t+(2^23 - 1)\tNaN (invalid or\n\t\t\t\t\t\t\tmissing data)\n\t\t\t\t\t-(2^23)\t\tNRes\n\t\t\t\t\t+(2^23 - 2)\t+Infinity\n\t\t\t\t\t-(2^23 - 2)\t-Infinity\n\t\t\t\tstring Unit:\n\t\t\t\t\tPossible values: \"celsius\" or\n\t\t\t\t\t\t\t\"fahrenheit\"\n\t\t\t\tuint64 Time (optional):\n\t\t\t\t\tTime of measurement, if\n\t\t\t\t\tsupported by device.\n\t\t\t\t\tExpressed in seconds since epoch.\n\t\t\t\tstring Type (optional):\n\t\t\t\t\tOnly present if measurement type\n\t\t\t\t\tis known.\n\t\t\t\t\tPossible values: \"armpit\", \"body\",\n\t\t\t\t\t\t\"ear\", \"finger\", \"intestines\",\n\t\t\t\t\t\t\"mouth\", \"rectum\", \"toe\",\n\t\t\t\t\t\t\"tympanum\"\n\t\t\t\tstring Measurement:\n\t\t\t\t\tPossible values: \"final\" or\n\t\t\t\t\t\t\t\"intermediate\"\n"}],"Signals":[],"Properties":[]}]}]} \ No newline at end of file diff --git a/bluez/profile/adapter/gen_Adapter1.go b/bluez/profile/adapter/gen_Adapter1.go index 277f7e7a..0128ac8a 100644 --- a/bluez/profile/adapter/gen_Adapter1.go +++ b/bluez/profile/adapter/gen_Adapter1.go @@ -60,7 +60,6 @@ func NewAdapter1FromAdapterID(adapterID string) (*Adapter1, error) { /* Adapter1 Adapter hierarchy - */ type Adapter1 struct { client *bluez.Client @@ -201,6 +200,22 @@ type Adapter1Properties struct { */ PairableTimeout uint32 + /* + PowerState The power state of an adapter. + + The power state will show whether the adapter is + turning off, or turning on, as well as being on + or off. + + Possible values: + "on" - powered on + "off" - powered off + "off-enabling" - transitioning from "off" to "on" + "on-disabling" - transitioning from "on" to "off" + "off-blocked" - blocked by rfkill + */ + PowerState string + /* Powered Switch an adapter on or off. This will also set the appropriate connectable state of the controller. @@ -227,12 +242,12 @@ type Adapter1Properties struct { UUIDs []string } -//Lock access to properties +// Lock access to properties func (p *Adapter1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Adapter1Properties) Unlock() { p.lock.Unlock() } @@ -405,6 +420,20 @@ func (a *Adapter1) GetPairableTimeout() (uint32, error) { return v.Value().(uint32), nil } +// SetPowerState set PowerState value +func (a *Adapter1) SetPowerState(v string) error { + return a.SetProperty("PowerState", v) +} + +// GetPowerState get PowerState value +func (a *Adapter1) GetPowerState() (string, error) { + v, err := a.GetProperty("PowerState") + if err != nil { + return "", err + } + return v.Value().(string), nil +} + // SetPowered set Powered value func (a *Adapter1) SetPowered(v bool) error { return a.SetProperty("Powered", v) @@ -585,146 +614,151 @@ func (a *Adapter1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -StartDiscovery This method starts the device discovery session. This - includes an inquiry procedure and remote device name - resolving. Use StopDiscovery to release the sessions - acquired. - This process will start creating Device objects as - new devices are discovered. - During discovery RSSI delta-threshold is imposed. - Each client can request a single device discovery session - per adapter. - Possible errors: org.bluez.Error.NotReady - org.bluez.Error.Failed - org.bluez.Error.InProgress - +StartDiscovery + + This method starts the device discovery session. This + includes an inquiry procedure and remote device name + resolving. Use StopDiscovery to release the sessions + acquired. + This process will start creating Device objects as + new devices are discovered. + During discovery RSSI delta-threshold is imposed. + Each client can request a single device discovery session + per adapter. + Possible errors: org.bluez.Error.NotReady + org.bluez.Error.Failed + org.bluez.Error.InProgress */ func (a *Adapter1) StartDiscovery() error { return a.client.Call("StartDiscovery", 0).Store() } /* -StopDiscovery This method will cancel any previous StartDiscovery - transaction. - Note that a discovery procedure is shared between all - discovery sessions thus calling StopDiscovery will only - release a single session and discovery will stop when - all sessions from all clients have finished. - Possible errors: org.bluez.Error.NotReady - org.bluez.Error.Failed - org.bluez.Error.NotAuthorized - +StopDiscovery + + This method will cancel any previous StartDiscovery + transaction. + Note that a discovery procedure is shared between all + discovery sessions thus calling StopDiscovery will only + release a single session and discovery will stop when + all sessions from all clients have finished. + Possible errors: org.bluez.Error.NotReady + org.bluez.Error.Failed + org.bluez.Error.NotAuthorized */ func (a *Adapter1) StopDiscovery() error { return a.client.Call("StopDiscovery", 0).Store() } /* -RemoveDevice This removes the remote device object at the given - path. It will remove also the pairing information. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.Failed +RemoveDevice + This removes the remote device object at the given + path. It will remove also the pairing information. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.Failed */ func (a *Adapter1) RemoveDevice(device dbus.ObjectPath) error { return a.client.Call("RemoveDevice", 0, device).Store() } /* -SetDiscoveryFilter This method sets the device discovery filter for the - caller. When this method is called with no filter - parameter, filter is removed. - Parameters that may be set in the filter dictionary - include the following: - array{string} UUIDs - Filter by service UUIDs, empty means match - _any_ UUID. - When a remote device is found that advertises - any UUID from UUIDs, it will be reported if: - - Pathloss and RSSI are both empty. - - only Pathloss param is set, device advertise - TX pwer, and computed pathloss is less than - Pathloss param. - - only RSSI param is set, and received RSSI is - higher than RSSI param. - int16 RSSI - RSSI threshold value. - PropertiesChanged signals will be emitted - for already existing Device objects, with - updated RSSI value. If one or more discovery - filters have been set, the RSSI delta-threshold, - that is imposed by StartDiscovery by default, - will not be applied. - uint16 Pathloss - Pathloss threshold value. - PropertiesChanged signals will be emitted - for already existing Device objects, with - updated Pathloss value. - string Transport (Default "auto") - Transport parameter determines the type of - scan. - Possible values: - "auto" - interleaved scan - "bredr" - BR/EDR inquiry - "le" - LE scan only - If "le" or "bredr" Transport is requested, - and the controller doesn't support it, - org.bluez.Error.Failed error will be returned. - If "auto" transport is requested, scan will use - LE, BREDR, or both, depending on what's - currently enabled on the controller. - bool DuplicateData (Default: true) - Disables duplicate detection of advertisement - data. - When enabled PropertiesChanged signals will be - generated for either ManufacturerData and - ServiceData everytime they are discovered. - bool Discoverable (Default: false) - Make adapter discoverable while discovering, - if the adapter is already discoverable setting - this filter won't do anything. - string Pattern (Default: none) - Discover devices where the pattern matches - either the prefix of the address or - device name which is convenient way to limited - the number of device objects created during a - discovery. - When set disregards device discoverable flags. - Note: The pattern matching is ignored if there - are other client that don't set any pattern as - it work as a logical OR, also setting empty - string "" pattern will match any device found. - When discovery filter is set, Device objects will be - created as new devices with matching criteria are - discovered regardless of they are connectable or - discoverable which enables listening to - non-connectable and non-discoverable devices. - When multiple clients call SetDiscoveryFilter, their - filters are internally merged, and notifications about - new devices are sent to all clients. Therefore, each - client must check that device updates actually match - its filter. - When SetDiscoveryFilter is called multiple times by the - same client, last filter passed will be active for - given client. - SetDiscoveryFilter can be called before StartDiscovery. - It is useful when client will create first discovery - session, to ensure that proper scan will be started - right after call to StartDiscovery. - Possible errors: org.bluez.Error.NotReady - org.bluez.Error.NotSupported - org.bluez.Error.Failed - +SetDiscoveryFilter + + This method sets the device discovery filter for the + caller. When this method is called with no filter + parameter, filter is removed. + Parameters that may be set in the filter dictionary + include the following: + array{string} UUIDs + Filter by service UUIDs, empty means match + _any_ UUID. + When a remote device is found that advertises + any UUID from UUIDs, it will be reported if: + - Pathloss and RSSI are both empty. + - only Pathloss param is set, device advertise + TX pwer, and computed pathloss is less than + Pathloss param. + - only RSSI param is set, and received RSSI is + higher than RSSI param. + int16 RSSI + RSSI threshold value. + PropertiesChanged signals will be emitted + for already existing Device objects, with + updated RSSI value. If one or more discovery + filters have been set, the RSSI delta-threshold, + that is imposed by StartDiscovery by default, + will not be applied. + uint16 Pathloss + Pathloss threshold value. + PropertiesChanged signals will be emitted + for already existing Device objects, with + updated Pathloss value. + string Transport (Default "auto") + Transport parameter determines the type of + scan. + Possible values: + "auto" - interleaved scan + "bredr" - BR/EDR inquiry + "le" - LE scan only + If "le" or "bredr" Transport is requested, + and the controller doesn't support it, + org.bluez.Error.Failed error will be returned. + If "auto" transport is requested, scan will use + LE, BREDR, or both, depending on what's + currently enabled on the controller. + bool DuplicateData (Default: true) + Disables duplicate detection of advertisement + data. + When enabled PropertiesChanged signals will be + generated for either ManufacturerData and + ServiceData everytime they are discovered. + bool Discoverable (Default: false) + Make adapter discoverable while discovering, + if the adapter is already discoverable setting + this filter won't do anything. + string Pattern (Default: none) + Discover devices where the pattern matches + either the prefix of the address or + device name which is convenient way to limited + the number of device objects created during a + discovery. + When set disregards device discoverable flags. + Note: The pattern matching is ignored if there + are other client that don't set any pattern as + it work as a logical OR, also setting empty + string "" pattern will match any device found. + When discovery filter is set, Device objects will be + created as new devices with matching criteria are + discovered regardless of they are connectable or + discoverable which enables listening to + non-connectable and non-discoverable devices. + When multiple clients call SetDiscoveryFilter, their + filters are internally merged, and notifications about + new devices are sent to all clients. Therefore, each + client must check that device updates actually match + its filter. + When SetDiscoveryFilter is called multiple times by the + same client, last filter passed will be active for + given client. + SetDiscoveryFilter can be called before StartDiscovery. + It is useful when client will create first discovery + session, to ensure that proper scan will be started + right after call to StartDiscovery. + Possible errors: org.bluez.Error.NotReady + org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *Adapter1) SetDiscoveryFilter(filter map[string]interface{}) error { return a.client.Call("SetDiscoveryFilter", 0, filter).Store() } /* -GetDiscoveryFilters Return available filters that can be given to - SetDiscoveryFilter. - Possible errors: None +GetDiscoveryFilters + Return available filters that can be given to + SetDiscoveryFilter. + Possible errors: None */ func (a *Adapter1) GetDiscoveryFilters() ([]string, error) { val0 := []string{} @@ -733,35 +767,36 @@ func (a *Adapter1) GetDiscoveryFilters() ([]string, error) { } /* -ConnectDevice This method connects to device without need of - performing General Discovery. Connection mechanism is - similar to Connect method from Device1 interface with - exception that this method returns success when physical - connection is established. After this method returns, - services discovery will continue and any supported - profile will be connected. There is no need for calling - Connect on Device1 after this call. If connection was - successful this method returns object path to created - device object. - Parameters that may be set in the filter dictionary - include the following: - string Address - The Bluetooth device address of the remote - device. This parameter is mandatory. - string AddressType - The Bluetooth device Address Type. This is - address type that should be used for initial - connection. If this parameter is not present - BR/EDR device is created. - Possible values: - "public" - Public address - "random" - Random address - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.AlreadyExists - org.bluez.Error.NotSupported - org.bluez.Error.NotReady - org.bluez.Error.Failed - +ConnectDevice + + This method connects to device without need of + performing General Discovery. Connection mechanism is + similar to Connect method from Device1 interface with + exception that this method returns success when physical + connection is established. After this method returns, + services discovery will continue and any supported + profile will be connected. There is no need for calling + Connect on Device1 after this call. If connection was + successful this method returns object path to created + device object. + Parameters that may be set in the filter dictionary + include the following: + string Address + The Bluetooth device address of the remote + device. This parameter is mandatory. + string AddressType + The Bluetooth device Address Type. This is + address type that should be used for initial + connection. If this parameter is not present + BR/EDR device is created. + Possible values: + "public" - Public address + "random" - Random address + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.AlreadyExists + org.bluez.Error.NotSupported + org.bluez.Error.NotReady + org.bluez.Error.Failed */ func (a *Adapter1) ConnectDevice(properties map[string]interface{}) (dbus.ObjectPath, error) { var val0 dbus.ObjectPath diff --git a/bluez/profile/admin_policy/gen_AdminPolicySet1.go b/bluez/profile/admin_policy/gen_AdminPolicySet1.go index f466e5f7..a21ef0f5 100644 --- a/bluez/profile/admin_policy/gen_AdminPolicySet1.go +++ b/bluez/profile/admin_policy/gen_AdminPolicySet1.go @@ -38,7 +38,6 @@ func NewAdminPolicySet1(objectPath dbus.ObjectPath) (*AdminPolicySet1, error) { /* AdminPolicySet1 Admin Policy Set hierarchy - */ type AdminPolicySet1 struct { client *bluez.Client @@ -54,12 +53,12 @@ type AdminPolicySet1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *AdminPolicySet1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *AdminPolicySet1Properties) Unlock() { p.lock.Unlock() } @@ -202,19 +201,20 @@ func (a *AdminPolicySet1) UnwatchProperties(ch chan *bluez.PropertyChanged) erro } /* -SetServiceAllowList This method sets the service allowlist by specifying - service UUIDs. - When SetServiceAllowList is called, bluez will block - incoming and outgoing connections to the service not in - UUIDs for all of the clients. - Any subsequent calls to this method will supersede any - previously set allowlist values. Calling this method - with an empty array will allow any service UUIDs to be - used. - The default value is an empty array. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.Failed - +SetServiceAllowList + + This method sets the service allowlist by specifying + service UUIDs. + When SetServiceAllowList is called, bluez will block + incoming and outgoing connections to the service not in + UUIDs for all of the clients. + Any subsequent calls to this method will supersede any + previously set allowlist values. Calling this method + with an empty array will allow any service UUIDs to be + used. + The default value is an empty array. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.Failed */ func (a *AdminPolicySet1) SetServiceAllowList(UUIDs []string) error { return a.client.Call("SetServiceAllowList", 0, UUIDs).Store() diff --git a/bluez/profile/admin_policy/gen_AdminPolicyStatus1.go b/bluez/profile/admin_policy/gen_AdminPolicyStatus1.go index 5f138a93..8fd81587 100644 --- a/bluez/profile/admin_policy/gen_AdminPolicyStatus1.go +++ b/bluez/profile/admin_policy/gen_AdminPolicyStatus1.go @@ -38,7 +38,6 @@ func NewAdminPolicyStatus1(objectPath dbus.ObjectPath) (*AdminPolicyStatus1, err /* AdminPolicyStatus1 Admin Policy Status hierarchy - */ type AdminPolicyStatus1 struct { client *bluez.Client @@ -59,12 +58,12 @@ type AdminPolicyStatus1Properties struct { ServiceAllowList []string } -//Lock access to properties +// Lock access to properties func (p *AdminPolicyStatus1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *AdminPolicyStatus1Properties) Unlock() { p.lock.Unlock() } diff --git a/bluez/profile/advertisement_monitor/gen_AdvertisementMonitor1.go b/bluez/profile/advertisement_monitor/gen_AdvertisementMonitor1.go index 96c6aa63..b103dd2d 100644 --- a/bluez/profile/advertisement_monitor/gen_AdvertisementMonitor1.go +++ b/bluez/profile/advertisement_monitor/gen_AdvertisementMonitor1.go @@ -38,7 +38,6 @@ func NewAdvertisementMonitor1(objectPath dbus.ObjectPath) (*AdvertisementMonitor /* AdvertisementMonitor1 Advertisement Monitor hierarchy - */ type AdvertisementMonitor1 struct { client *bluez.Client @@ -137,12 +136,12 @@ type AdvertisementMonitor1Properties struct { Type string } -//Lock access to properties +// Lock access to properties func (p *AdvertisementMonitor1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *AdvertisementMonitor1Properties) Unlock() { p.lock.Unlock() } @@ -348,42 +347,46 @@ func (a *AdvertisementMonitor1) UnwatchProperties(ch chan *bluez.PropertyChanged } /* -Release This gets called as a signal for a client to perform - clean-up when (1)a monitor cannot be activated after it - was exposed or (2)a monitor has been deactivated. +Release + This gets called as a signal for a client to perform + clean-up when (1)a monitor cannot be activated after it + was exposed or (2)a monitor has been deactivated. */ func (a *AdvertisementMonitor1) Release() error { return a.client.Call("Release", 0).Store() } /* -Activate After a monitor was exposed, this gets called as a - signal for client to get acknowledged when a monitor - has been activated, so the client can expect to receive - calls on DeviceFound() or DeviceLost(). +Activate + After a monitor was exposed, this gets called as a + signal for client to get acknowledged when a monitor + has been activated, so the client can expect to receive + calls on DeviceFound() or DeviceLost(). */ func (a *AdvertisementMonitor1) Activate() error { return a.client.Call("Activate", 0).Store() } /* -DeviceFound This gets called to notify the client of finding the - targeted device. Once receiving the call, the client - should start to monitor the corresponding device to - retrieve the changes on RSSI and advertisement content. +DeviceFound + This gets called to notify the client of finding the + targeted device. Once receiving the call, the client + should start to monitor the corresponding device to + retrieve the changes on RSSI and advertisement content. */ func (a *AdvertisementMonitor1) DeviceFound(device dbus.ObjectPath) error { return a.client.Call("DeviceFound", 0, device).Store() } /* -DeviceLost This gets called to notify the client of losing the - targeted device. Once receiving this call, the client - should stop monitoring the corresponding device. +DeviceLost + This gets called to notify the client of losing the + targeted device. Once receiving this call, the client + should stop monitoring the corresponding device. */ func (a *AdvertisementMonitor1) DeviceLost(device dbus.ObjectPath) error { return a.client.Call("DeviceLost", 0, device).Store() diff --git a/bluez/profile/advertisement_monitor/gen_AdvertisementMonitorManager1.go b/bluez/profile/advertisement_monitor/gen_AdvertisementMonitorManager1.go index 0a50c211..8ffe5038 100644 --- a/bluez/profile/advertisement_monitor/gen_AdvertisementMonitorManager1.go +++ b/bluez/profile/advertisement_monitor/gen_AdvertisementMonitorManager1.go @@ -38,7 +38,6 @@ func NewAdvertisementMonitorManager1(objectPath dbus.ObjectPath) (*Advertisement /* AdvertisementMonitorManager1 Advertisement Monitor Manager hierarchy - */ type AdvertisementMonitorManager1 struct { client *bluez.Client @@ -83,12 +82,12 @@ type AdvertisementMonitorManager1Properties struct { SupportedMonitorTypes []string } -//Lock access to properties +// Lock access to properties func (p *AdvertisementMonitorManager1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *AdvertisementMonitorManager1Properties) Unlock() { p.lock.Unlock() } @@ -249,37 +248,39 @@ func (a *AdvertisementMonitorManager1) UnwatchProperties(ch chan *bluez.Property } /* -RegisterMonitor This registers the root path of a hierarchy of - advertisement monitors. - The application object path together with the D-Bus - system bus connection ID define the identification of - the application registering advertisement monitors. - Once a root path is registered by a client via this - method, the client can freely expose/unexpose - advertisement monitors without re-registering the root - path again. After use, the client should call - UnregisterMonitor() method to invalidate the - advertisement monitors. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.AlreadyExists - org.bluez.Error.Failed - +RegisterMonitor + + This registers the root path of a hierarchy of + advertisement monitors. + The application object path together with the D-Bus + system bus connection ID define the identification of + the application registering advertisement monitors. + Once a root path is registered by a client via this + method, the client can freely expose/unexpose + advertisement monitors without re-registering the root + path again. After use, the client should call + UnregisterMonitor() method to invalidate the + advertisement monitors. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.AlreadyExists + org.bluez.Error.Failed */ func (a *AdvertisementMonitorManager1) RegisterMonitor(application dbus.ObjectPath) error { return a.client.Call("RegisterMonitor", 0, application).Store() } /* -UnregisterMonitor This unregisters a hierarchy of advertisement monitors - that has been previously registered. The object path - parameter must match the same value that has been used - on registration. Upon unregistration, the advertisement - monitor(s) should expect to receive Release() method as - the signal that the advertisement monitor(s) has been - deactivated. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.DoesNotExist - +UnregisterMonitor + + This unregisters a hierarchy of advertisement monitors + that has been previously registered. The object path + parameter must match the same value that has been used + on registration. Upon unregistration, the advertisement + monitor(s) should expect to receive Release() method as + the signal that the advertisement monitor(s) has been + deactivated. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.DoesNotExist */ func (a *AdvertisementMonitorManager1) UnregisterMonitor(application dbus.ObjectPath) error { return a.client.Call("UnregisterMonitor", 0, application).Store() diff --git a/bluez/profile/advertising/gen_LEAdvertisement1.go b/bluez/profile/advertising/gen_LEAdvertisement1.go index 02fc2381..ed6071c8 100644 --- a/bluez/profile/advertising/gen_LEAdvertisement1.go +++ b/bluez/profile/advertising/gen_LEAdvertisement1.go @@ -44,7 +44,6 @@ parameters. Properties which are not present will not be included in the data. Required advertisement data types will always be included. All UUIDs are 128-bit versions in the API, and 16 or 32-bit versions of the same UUID will be used in the advertising data as appropriate. - */ type LEAdvertisement1 struct { client *bluez.Client @@ -205,12 +204,12 @@ type LEAdvertisement1Properties struct { Type string } -//Lock access to properties +// Lock access to properties func (p *LEAdvertisement1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *LEAdvertisement1Properties) Unlock() { p.lock.Unlock() } @@ -591,12 +590,13 @@ func (a *LEAdvertisement1) UnwatchProperties(ch chan *bluez.PropertyChanged) err } /* -Release This method gets called when the service daemon - removes the Advertisement. A client can use it to do - cleanup tasks. There is no need to call - UnregisterAdvertisement because when this method gets - called it has already been unregistered. +Release + This method gets called when the service daemon + removes the Advertisement. A client can use it to do + cleanup tasks. There is no need to call + UnregisterAdvertisement because when this method gets + called it has already been unregistered. */ func (a *LEAdvertisement1) Release() error { return a.client.Call("Release", 0).Store() diff --git a/bluez/profile/advertising/gen_LEAdvertisingManager1.go b/bluez/profile/advertising/gen_LEAdvertisingManager1.go index 8babecd9..6e343bad 100644 --- a/bluez/profile/advertising/gen_LEAdvertisingManager1.go +++ b/bluez/profile/advertising/gen_LEAdvertisingManager1.go @@ -64,7 +64,6 @@ LEAdvertisingManager1 LE Advertising Manager hierarchy The Advertising Manager allows external applications to register Advertisement Data which should be broadcast to devices. Advertisement Data elements must follow the API for LE Advertisement Data described above. - */ type LEAdvertisingManager1 struct { client *bluez.Client @@ -157,12 +156,12 @@ type LEAdvertisingManager1Properties struct { SupportedSecondaryChannels []string } -//Lock access to properties +// Lock access to properties func (p *LEAdvertisingManager1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *LEAdvertisingManager1Properties) Unlock() { p.lock.Unlock() } @@ -445,36 +444,38 @@ func (a *LEAdvertisingManager1) UnwatchProperties(ch chan *bluez.PropertyChanged } /* -RegisterAdvertisement Registers an advertisement object to be sent over the LE - Advertising channel. The service must be exported - under interface LEAdvertisement1. - InvalidArguments error indicates that the object has - invalid or conflicting properties. - InvalidLength error indicates that the data - provided generates a data packet which is too long. - The properties of this object are parsed when it is - registered, and any changes are ignored. - If the same object is registered twice it will result in - an AlreadyExists error. - If the maximum number of advertisement instances is - reached it will result in NotPermitted error. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.AlreadyExists - org.bluez.Error.InvalidLength - org.bluez.Error.NotPermitted - +RegisterAdvertisement + + Registers an advertisement object to be sent over the LE + Advertising channel. The service must be exported + under interface LEAdvertisement1. + InvalidArguments error indicates that the object has + invalid or conflicting properties. + InvalidLength error indicates that the data + provided generates a data packet which is too long. + The properties of this object are parsed when it is + registered, and any changes are ignored. + If the same object is registered twice it will result in + an AlreadyExists error. + If the maximum number of advertisement instances is + reached it will result in NotPermitted error. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.AlreadyExists + org.bluez.Error.InvalidLength + org.bluez.Error.NotPermitted */ func (a *LEAdvertisingManager1) RegisterAdvertisement(advertisement dbus.ObjectPath, options map[string]interface{}) error { return a.client.Call("RegisterAdvertisement", 0, advertisement, options).Store() } /* -UnregisterAdvertisement This unregisters an advertisement that has been - previously registered. The object path parameter must - match the same value that has been used on registration. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.DoesNotExist +UnregisterAdvertisement + This unregisters an advertisement that has been + previously registered. The object path parameter must + match the same value that has been used on registration. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.DoesNotExist */ func (a *LEAdvertisingManager1) UnregisterAdvertisement(advertisement dbus.ObjectPath) error { return a.client.Call("UnregisterAdvertisement", 0, advertisement).Store() diff --git a/bluez/profile/agent/gen_Agent1.go b/bluez/profile/agent/gen_Agent1.go index c556536e..b5483656 100644 --- a/bluez/profile/agent/gen_Agent1.go +++ b/bluez/profile/agent/gen_Agent1.go @@ -31,7 +31,6 @@ func NewAgent1(servicePath string, objectPath dbus.ObjectPath) (*Agent1, error) /* Agent1 Agent hierarchy - */ type Agent1 struct { client *bluez.Client @@ -47,12 +46,12 @@ type Agent1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *Agent1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Agent1Properties) Unlock() { p.lock.Unlock() } @@ -109,25 +108,27 @@ func (a *Agent1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error) { } /* -Release This method gets called when the service daemon - unregisters the agent. An agent can use it to do - cleanup tasks. There is no need to unregister the - agent, because when this method gets called it has - already been unregistered. +Release + This method gets called when the service daemon + unregisters the agent. An agent can use it to do + cleanup tasks. There is no need to unregister the + agent, because when this method gets called it has + already been unregistered. */ func (a *Agent1) Release() error { return a.client.Call("Release", 0).Store() } /* -RequestPinCode This method gets called when the service daemon - needs to get the passkey for an authentication. - The return value should be a string of 1-16 characters - length. The string can be alphanumeric. - Possible errors: org.bluez.Error.Rejected - org.bluez.Error.Canceled - +RequestPinCode + + This method gets called when the service daemon + needs to get the passkey for an authentication. + The return value should be a string of 1-16 characters + length. The string can be alphanumeric. + Possible errors: org.bluez.Error.Rejected + org.bluez.Error.Canceled */ func (a *Agent1) RequestPinCode(device dbus.ObjectPath) (string, error) { var val0 string @@ -136,36 +137,38 @@ func (a *Agent1) RequestPinCode(device dbus.ObjectPath) (string, error) { } /* -DisplayPinCode This method gets called when the service daemon - needs to display a pincode for an authentication. - An empty reply should be returned. When the pincode - needs no longer to be displayed, the Cancel method - of the agent will be called. - This is used during the pairing process of keyboards - that don't support Bluetooth 2.1 Secure Simple Pairing, - in contrast to DisplayPasskey which is used for those - that do. - This method will only ever be called once since - older keyboards do not support typing notification. - Note that the PIN will always be a 6-digit number, - zero-padded to 6 digits. This is for harmony with - the later specification. - Possible errors: org.bluez.Error.Rejected - org.bluez.Error.Canceled - +DisplayPinCode + + This method gets called when the service daemon + needs to display a pincode for an authentication. + An empty reply should be returned. When the pincode + needs no longer to be displayed, the Cancel method + of the agent will be called. + This is used during the pairing process of keyboards + that don't support Bluetooth 2.1 Secure Simple Pairing, + in contrast to DisplayPasskey which is used for those + that do. + This method will only ever be called once since + older keyboards do not support typing notification. + Note that the PIN will always be a 6-digit number, + zero-padded to 6 digits. This is for harmony with + the later specification. + Possible errors: org.bluez.Error.Rejected + org.bluez.Error.Canceled */ func (a *Agent1) DisplayPinCode(device dbus.ObjectPath, pincode string) error { return a.client.Call("DisplayPinCode", 0, device, pincode).Store() } /* -RequestPasskey This method gets called when the service daemon - needs to get the passkey for an authentication. - The return value should be a numeric value - between 0-999999. - Possible errors: org.bluez.Error.Rejected - org.bluez.Error.Canceled - +RequestPasskey + + This method gets called when the service daemon + needs to get the passkey for an authentication. + The return value should be a numeric value + between 0-999999. + Possible errors: org.bluez.Error.Rejected + org.bluez.Error.Canceled */ func (a *Agent1) RequestPasskey(device dbus.ObjectPath) (uint32, error) { var val0 uint32 @@ -174,71 +177,76 @@ func (a *Agent1) RequestPasskey(device dbus.ObjectPath) (uint32, error) { } /* -DisplayPasskey This method gets called when the service daemon - needs to display a passkey for an authentication. - The entered parameter indicates the number of already - typed keys on the remote side. - An empty reply should be returned. When the passkey - needs no longer to be displayed, the Cancel method - of the agent will be called. - During the pairing process this method might be - called multiple times to update the entered value. - Note that the passkey will always be a 6-digit number, - so the display should be zero-padded at the start if - the value contains less than 6 digits. - +DisplayPasskey + + This method gets called when the service daemon + needs to display a passkey for an authentication. + The entered parameter indicates the number of already + typed keys on the remote side. + An empty reply should be returned. When the passkey + needs no longer to be displayed, the Cancel method + of the agent will be called. + During the pairing process this method might be + called multiple times to update the entered value. + Note that the passkey will always be a 6-digit number, + so the display should be zero-padded at the start if + the value contains less than 6 digits. */ func (a *Agent1) DisplayPasskey(device dbus.ObjectPath, passkey uint32, entered uint16) error { return a.client.Call("DisplayPasskey", 0, device, passkey, entered).Store() } /* -RequestConfirmation This method gets called when the service daemon - needs to confirm a passkey for an authentication. - To confirm the value it should return an empty reply - or an error in case the passkey is invalid. - Note that the passkey will always be a 6-digit number, - so the display should be zero-padded at the start if - the value contains less than 6 digits. - Possible errors: org.bluez.Error.Rejected - org.bluez.Error.Canceled - +RequestConfirmation + + This method gets called when the service daemon + needs to confirm a passkey for an authentication. + To confirm the value it should return an empty reply + or an error in case the passkey is invalid. + Note that the passkey will always be a 6-digit number, + so the display should be zero-padded at the start if + the value contains less than 6 digits. + Possible errors: org.bluez.Error.Rejected + org.bluez.Error.Canceled */ func (a *Agent1) RequestConfirmation(device dbus.ObjectPath, passkey uint32) error { return a.client.Call("RequestConfirmation", 0, device, passkey).Store() } /* -RequestAuthorization This method gets called to request the user to - authorize an incoming pairing attempt which - would in other circumstances trigger the just-works - model, or when the user plugged in a device that - implements cable pairing. In the latter case, the - device would not be connected to the adapter via - Bluetooth yet. - Possible errors: org.bluez.Error.Rejected - org.bluez.Error.Canceled - +RequestAuthorization + + This method gets called to request the user to + authorize an incoming pairing attempt which + would in other circumstances trigger the just-works + model, or when the user plugged in a device that + implements cable pairing. In the latter case, the + device would not be connected to the adapter via + Bluetooth yet. + Possible errors: org.bluez.Error.Rejected + org.bluez.Error.Canceled */ func (a *Agent1) RequestAuthorization(device dbus.ObjectPath) error { return a.client.Call("RequestAuthorization", 0, device).Store() } /* -AuthorizeService This method gets called when the service daemon - needs to authorize a connection/service request. - Possible errors: org.bluez.Error.Rejected - org.bluez.Error.Canceled +AuthorizeService + This method gets called when the service daemon + needs to authorize a connection/service request. + Possible errors: org.bluez.Error.Rejected + org.bluez.Error.Canceled */ func (a *Agent1) AuthorizeService(device dbus.ObjectPath, uuid string) error { return a.client.Call("AuthorizeService", 0, device, uuid).Store() } /* -Cancel This method gets called to indicate that the agent - request failed before a reply was returned. +Cancel + This method gets called to indicate that the agent + request failed before a reply was returned. */ func (a *Agent1) Cancel() error { return a.client.Call("Cancel", 0).Store() diff --git a/bluez/profile/agent/gen_AgentManager1.go b/bluez/profile/agent/gen_AgentManager1.go index 565eaaef..86c7a5ce 100644 --- a/bluez/profile/agent/gen_AgentManager1.go +++ b/bluez/profile/agent/gen_AgentManager1.go @@ -30,7 +30,6 @@ func NewAgentManager1() (*AgentManager1, error) { /* AgentManager1 Agent Manager hierarchy - */ type AgentManager1 struct { client *bluez.Client @@ -46,12 +45,12 @@ type AgentManager1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *AgentManager1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *AgentManager1Properties) Unlock() { p.lock.Unlock() } @@ -108,54 +107,57 @@ func (a *AgentManager1) GetObjectManagerSignal() (chan *dbus.Signal, func(), err } /* -RegisterAgent This registers an agent handler. - The object path defines the path of the agent - that will be called when user input is needed. - Every application can register its own agent and - for all actions triggered by that application its - agent is used. - It is not required by an application to register - an agent. If an application does chooses to not - register an agent, the default agent is used. This - is on most cases a good idea. Only application - like a pairing wizard should register their own - agent. - An application can only register one agent. Multiple - agents per application is not supported. - The capability parameter can have the values - "DisplayOnly", "DisplayYesNo", "KeyboardOnly", - "NoInputNoOutput" and "KeyboardDisplay" which - reflects the input and output capabilities of the - agent. - If an empty string is used it will fallback to - "KeyboardDisplay". - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.AlreadyExists - +RegisterAgent + + This registers an agent handler. + The object path defines the path of the agent + that will be called when user input is needed. + Every application can register its own agent and + for all actions triggered by that application its + agent is used. + It is not required by an application to register + an agent. If an application does chooses to not + register an agent, the default agent is used. This + is on most cases a good idea. Only application + like a pairing wizard should register their own + agent. + An application can only register one agent. Multiple + agents per application is not supported. + The capability parameter can have the values + "DisplayOnly", "DisplayYesNo", "KeyboardOnly", + "NoInputNoOutput" and "KeyboardDisplay" which + reflects the input and output capabilities of the + agent. + If an empty string is used it will fallback to + "KeyboardDisplay". + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.AlreadyExists */ func (a *AgentManager1) RegisterAgent(agent dbus.ObjectPath, capability string) error { return a.client.Call("RegisterAgent", 0, agent, capability).Store() } /* -UnregisterAgent This unregisters the agent that has been previously - registered. The object path parameter must match the - same value that has been used on registration. - Possible errors: org.bluez.Error.DoesNotExist +UnregisterAgent + This unregisters the agent that has been previously + registered. The object path parameter must match the + same value that has been used on registration. + Possible errors: org.bluez.Error.DoesNotExist */ func (a *AgentManager1) UnregisterAgent(agent dbus.ObjectPath) error { return a.client.Call("UnregisterAgent", 0, agent).Store() } /* -RequestDefaultAgent This requests is to make the application agent - the default agent. The application is required - to register an agent. - Special permission might be required to become - the default agent. - Possible errors: org.bluez.Error.DoesNotExist - +RequestDefaultAgent + + This requests is to make the application agent + the default agent. The application is required + to register an agent. + Special permission might be required to become + the default agent. + Possible errors: org.bluez.Error.DoesNotExist */ func (a *AgentManager1) RequestDefaultAgent(agent dbus.ObjectPath) error { return a.client.Call("RequestDefaultAgent", 0, agent).Store() diff --git a/bluez/profile/battery/gen_Battery1.go b/bluez/profile/battery/gen_Battery1.go index bce93580..388dd377 100644 --- a/bluez/profile/battery/gen_Battery1.go +++ b/bluez/profile/battery/gen_Battery1.go @@ -38,7 +38,6 @@ func NewBattery1(objectPath dbus.ObjectPath) (*Battery1, error) { /* Battery1 Battery hierarchy - */ type Battery1 struct { client *bluez.Client @@ -69,12 +68,12 @@ type Battery1Properties struct { Source string } -//Lock access to properties +// Lock access to properties func (p *Battery1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Battery1Properties) Unlock() { p.lock.Unlock() } diff --git a/bluez/profile/battery/gen_BatteryProvider1.go b/bluez/profile/battery/gen_BatteryProvider1.go index 7dbe9c7d..e18187e8 100644 --- a/bluez/profile/battery/gen_BatteryProvider1.go +++ b/bluez/profile/battery/gen_BatteryProvider1.go @@ -39,7 +39,6 @@ func NewBatteryProvider1(servicePath string, objectPath dbus.ObjectPath) (*Batte /* BatteryProvider1 Battery Provider hierarchy - */ type BatteryProvider1 struct { client *bluez.Client @@ -60,12 +59,12 @@ type BatteryProvider1Properties struct { Device dbus.ObjectPath } -//Lock access to properties +// Lock access to properties func (p *BatteryProvider1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *BatteryProvider1Properties) Unlock() { p.lock.Unlock() } diff --git a/bluez/profile/battery/gen_BatteryProviderManager1.go b/bluez/profile/battery/gen_BatteryProviderManager1.go index c4666cf1..5af25910 100644 --- a/bluez/profile/battery/gen_BatteryProviderManager1.go +++ b/bluez/profile/battery/gen_BatteryProviderManager1.go @@ -47,7 +47,6 @@ on org.bluez.Battery1 interface. BlueZ will stop monitoring these exposed and removed objects after UnregisterBatteryProvider is called for that provider ID. - */ type BatteryProviderManager1 struct { client *bluez.Client @@ -63,12 +62,12 @@ type BatteryProviderManager1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *BatteryProviderManager1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *BatteryProviderManager1Properties) Unlock() { p.lock.Unlock() } @@ -211,20 +210,22 @@ func (a *BatteryProviderManager1) UnwatchProperties(ch chan *bluez.PropertyChang } /* -RegisterBatteryProvider This registers a battery provider. A registered - battery provider can then expose objects with - org.bluez.BatteryProvider1 interface described below. +RegisterBatteryProvider + This registers a battery provider. A registered + battery provider can then expose objects with + org.bluez.BatteryProvider1 interface described below. */ func (a *BatteryProviderManager1) RegisterBatteryProvider(provider dbus.ObjectPath) error { return a.client.Call("RegisterBatteryProvider", 0, provider).Store() } /* -UnregisterBatteryProvider This unregisters a battery provider. After - unregistration, the BatteryProvider1 objects provided - by this client are ignored by BlueZ. +UnregisterBatteryProvider + This unregisters a battery provider. After + unregistration, the BatteryProvider1 objects provided + by this client are ignored by BlueZ. */ func (a *BatteryProviderManager1) UnregisterBatteryProvider(provider dbus.ObjectPath) error { return a.client.Call("UnregisterBatteryProvider", 0, provider).Store() diff --git a/bluez/profile/device/gen_Device1.go b/bluez/profile/device/gen_Device1.go index 5e06e143..afc01071 100644 --- a/bluez/profile/device/gen_Device1.go +++ b/bluez/profile/device/gen_Device1.go @@ -38,7 +38,6 @@ func NewDevice1(objectPath dbus.ObjectPath) (*Device1, error) { /* Device1 Device hierarchy - */ type Device1 struct { client *bluez.Client @@ -126,6 +125,13 @@ type Device1Properties struct { */ Blocked bool + /* + Bonded Indicates if the remote device is bonded. Bonded means + the information exchanged on pairing process has been + stored and will be persisted. + */ + Bonded bool + /* Class The Bluetooth class of device of the remote device. */ @@ -183,7 +189,10 @@ type Device1Properties struct { Name string /* - Paired Indicates if the remote device is paired. + Paired Indicates if the remote device is paired. Paired means + the pairing process where devices exchange the + information to establish an encrypted connection has + been completed. */ Paired bool @@ -230,12 +239,12 @@ type Device1Properties struct { WakeAllowed bool } -//Lock access to properties +// Lock access to properties func (p *Device1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Device1Properties) Unlock() { p.lock.Unlock() } @@ -352,6 +361,20 @@ func (a *Device1) GetBlocked() (bool, error) { return v.Value().(bool), nil } +// SetBonded set Bonded value +func (a *Device1) SetBonded(v bool) error { + return a.SetProperty("Bonded", v) +} + +// GetBonded get Bonded value +func (a *Device1) GetBonded() (bool, error) { + v, err := a.GetProperty("Bonded") + if err != nil { + return false, err + } + return v.Value().(bool), nil +} + // SetClass set Class value func (a *Device1) SetClass(v uint32) error { return a.SetProperty("Class", v) @@ -700,117 +723,123 @@ func (a *Device1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -Connect This is a generic method to connect any profiles - the remote device supports that can be connected - to and have been flagged as auto-connectable on - our side. If only subset of profiles is already - connected it will try to connect currently disconnected - ones. - If at least one profile was connected successfully this - method will indicate success. - For dual-mode devices only one bearer is connected at - time, the conditions are in the following order: - 1. Connect the disconnected bearer if already - connected. - 2. Connect first the bonded bearer. If no - bearers are bonded or both are skip and check - latest seen bearer. - 3. Connect last seen bearer, in case the - timestamps are the same BR/EDR takes - precedence. - Possible errors: org.bluez.Error.NotReady - org.bluez.Error.Failed - org.bluez.Error.InProgress - org.bluez.Error.AlreadyConnected - +Connect + + This is a generic method to connect any profiles + the remote device supports that can be connected + to and have been flagged as auto-connectable on + our side. If only subset of profiles is already + connected it will try to connect currently disconnected + ones. + If at least one profile was connected successfully this + method will indicate success. + For dual-mode devices only one bearer is connected at + time, the conditions are in the following order: + 1. Connect the disconnected bearer if already + connected. + 2. Connect first the bonded bearer. If no + bearers are bonded or both are skip and check + latest seen bearer. + 3. Connect last seen bearer, in case the + timestamps are the same BR/EDR takes + precedence. + Possible errors: org.bluez.Error.NotReady + org.bluez.Error.Failed + org.bluez.Error.InProgress + org.bluez.Error.AlreadyConnected */ func (a *Device1) Connect() error { return a.client.Call("Connect", 0).Store() } /* -Disconnect This method gracefully disconnects all connected - profiles and then terminates low-level ACL connection. - ACL connection will be terminated even if some profiles - were not disconnected properly e.g. due to misbehaving - device. - This method can be also used to cancel a preceding - Connect call before a reply to it has been received. - For non-trusted devices connected over LE bearer calling - this method will disable incoming connections until - Connect method is called again. - Possible errors: org.bluez.Error.NotConnected - +Disconnect + + This method gracefully disconnects all connected + profiles and then terminates low-level ACL connection. + ACL connection will be terminated even if some profiles + were not disconnected properly e.g. due to misbehaving + device. + This method can be also used to cancel a preceding + Connect call before a reply to it has been received. + For non-trusted devices connected over LE bearer calling + this method will disable incoming connections until + Connect method is called again. + Possible errors: org.bluez.Error.NotConnected */ func (a *Device1) Disconnect() error { return a.client.Call("Disconnect", 0).Store() } /* -ConnectProfile This method connects a specific profile of this - device. The UUID provided is the remote service - UUID for the profile. - Possible errors: org.bluez.Error.Failed - org.bluez.Error.InProgress - org.bluez.Error.InvalidArguments - org.bluez.Error.NotAvailable - org.bluez.Error.NotReady - +ConnectProfile + + This method connects a specific profile of this + device. The UUID provided is the remote service + UUID for the profile. + Possible errors: org.bluez.Error.Failed + org.bluez.Error.InProgress + org.bluez.Error.InvalidArguments + org.bluez.Error.NotAvailable + org.bluez.Error.NotReady */ func (a *Device1) ConnectProfile(uuid string) error { return a.client.Call("ConnectProfile", 0, uuid).Store() } /* -DisconnectProfile This method disconnects a specific profile of - this device. The profile needs to be registered - client profile. - There is no connection tracking for a profile, so - as long as the profile is registered this will always - succeed. - Possible errors: org.bluez.Error.Failed - org.bluez.Error.InProgress - org.bluez.Error.InvalidArguments - org.bluez.Error.NotSupported - +DisconnectProfile + + This method disconnects a specific profile of + this device. The profile needs to be registered + client profile. + There is no connection tracking for a profile, so + as long as the profile is registered this will always + succeed. + Possible errors: org.bluez.Error.Failed + org.bluez.Error.InProgress + org.bluez.Error.InvalidArguments + org.bluez.Error.NotSupported */ func (a *Device1) DisconnectProfile(uuid string) error { return a.client.Call("DisconnectProfile", 0, uuid).Store() } /* -Pair This method will connect to the remote device, - initiate pairing and then retrieve all SDP records - (or GATT primary services). - If the application has registered its own agent, - then that specific agent will be used. Otherwise - it will use the default agent. - Only for applications like a pairing wizard it - would make sense to have its own agent. In almost - all other cases the default agent will handle - this just fine. - In case there is no application agent and also - no default agent present, this method will fail. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.Failed - org.bluez.Error.AlreadyExists - org.bluez.Error.AuthenticationCanceled - org.bluez.Error.AuthenticationFailed - org.bluez.Error.AuthenticationRejected - org.bluez.Error.AuthenticationTimeout - org.bluez.Error.ConnectionAttemptFailed - +Pair + + This method will connect to the remote device, + initiate pairing and then retrieve all SDP records + (or GATT primary services). + If the application has registered its own agent, + then that specific agent will be used. Otherwise + it will use the default agent. + Only for applications like a pairing wizard it + would make sense to have its own agent. In almost + all other cases the default agent will handle + this just fine. + In case there is no application agent and also + no default agent present, this method will fail. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.Failed + org.bluez.Error.AlreadyExists + org.bluez.Error.AuthenticationCanceled + org.bluez.Error.AuthenticationFailed + org.bluez.Error.AuthenticationRejected + org.bluez.Error.AuthenticationTimeout + org.bluez.Error.ConnectionAttemptFailed */ func (a *Device1) Pair() error { return a.client.Call("Pair", 0).Store() } /* -CancelPairing This method can be used to cancel a pairing - operation initiated by the Pair method. - Possible errors: org.bluez.Error.DoesNotExist - org.bluez.Error.Failed +CancelPairing + This method can be used to cancel a pairing + operation initiated by the Pair method. + Possible errors: org.bluez.Error.DoesNotExist + org.bluez.Error.Failed */ func (a *Device1) CancelPairing() error { return a.client.Call("CancelPairing", 0).Store() diff --git a/bluez/profile/gatt/gen_GattCharacteristic1.go b/bluez/profile/gatt/gen_GattCharacteristic1.go index 6096d7b8..9497834e 100644 --- a/bluez/profile/gatt/gen_GattCharacteristic1.go +++ b/bluez/profile/gatt/gen_GattCharacteristic1.go @@ -41,7 +41,6 @@ GattCharacteristic1 Characteristic hierarchy For local GATT defined services, the object paths need to follow the service path hierarchy and are freely definable. - */ type GattCharacteristic1 struct { client *bluez.Client @@ -166,12 +165,12 @@ type GattCharacteristic1Properties struct { WriteAcquired bool `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *GattCharacteristic1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *GattCharacteristic1Properties) Unlock() { p.lock.Unlock() } @@ -414,19 +413,21 @@ func (a *GattCharacteristic1) UnwatchProperties(ch chan *bluez.PropertyChanged) } /* -ReadValue Issues a request to read the value of the - characteristic and returns the value if the - operation was successful. - Possible options: "offset": uint16 offset - "mtu": Exchanged MTU (Server only) - "device": Object Device (Server only) - Possible Errors: org.bluez.Error.Failed - org.bluez.Error.InProgress - org.bluez.Error.NotPermitted - org.bluez.Error.NotAuthorized - org.bluez.Error.InvalidOffset - org.bluez.Error.NotSupported - +ReadValue + + Issues a request to read the value of the + characteristic and returns the value if the + operation was successful. + Possible options: "offset": uint16 offset + "mtu": Exchanged MTU (Server only) + "device": Object Device (Server only) + Possible Errors: org.bluez.Error.Failed(string ecode) + org.bluez.Error.InProgress + org.bluez.Error.NotPermitted + org.bluez.Error.NotAuthorized + org.bluez.Error.InvalidOffset + org.bluez.Error.NotSupported + Possible Error Code: string 0x80 - 0x9f */ func (a *GattCharacteristic1) ReadValue(options map[string]interface{}) ([]byte, error) { val0 := []byte{} @@ -435,56 +436,59 @@ func (a *GattCharacteristic1) ReadValue(options map[string]interface{}) ([]byte, } /* -WriteValue Issues a request to write the value of the - characteristic. - Possible options: "offset": Start offset - "type": string - Possible values: - "command": Write without - response - "request": Write with response - "reliable": Reliable Write - "mtu": Exchanged MTU (Server only) - "device": Device path (Server only) - "link": Link type (Server only) - "prepare-authorize": True if prepare - authorization - request - Possible Errors: org.bluez.Error.Failed - org.bluez.Error.InProgress - org.bluez.Error.NotPermitted - org.bluez.Error.InvalidValueLength - org.bluez.Error.NotAuthorized - org.bluez.Error.NotSupported - +WriteValue + + Issues a request to write the value of the + characteristic. + Possible options: "offset": Start offset + "type": string + Possible values: + "command": Write without + response + "request": Write with response + "reliable": Reliable Write + "mtu": Exchanged MTU (Server only) + "device": Device path (Server only) + "link": Link type (Server only) + "prepare-authorize": True if prepare + authorization + request + Possible Errors: org.bluez.Error.Failed(string ecode) + org.bluez.Error.InProgress + org.bluez.Error.NotPermitted + org.bluez.Error.InvalidValueLength + org.bluez.Error.NotAuthorized + org.bluez.Error.NotSupported + Possible Error Code: string 0x80 - 0x9f */ func (a *GattCharacteristic1) WriteValue(value []byte, options map[string]interface{}) error { return a.client.Call("WriteValue", 0, value, options).Store() } /* -AcquireWrite Acquire file descriptor and MTU for writing. Only - sockets are supported. Usage of WriteValue will be - locked causing it to return NotPermitted error. - For server the MTU returned shall be equal or smaller - than the negotiated MTU. - For client it only works with characteristic that has - WriteAcquired property which relies on - write-without-response Flag. - To release the lock the client shall close the file - descriptor, a HUP is generated in case the device - is disconnected. - Note: the MTU can only be negotiated once and is - symmetric therefore this method may be delayed in - order to have the exchange MTU completed, because of - that the file descriptor is closed during - reconnections as the MTU has to be renegotiated. - Possible options: "device": Object Device (Server only) - "mtu": Exchanged MTU (Server only) - "link": Link type (Server only) - Possible Errors: org.bluez.Error.Failed - org.bluez.Error.NotSupported - +AcquireWrite + + Acquire file descriptor and MTU for writing. Only + sockets are supported. Usage of WriteValue will be + locked causing it to return NotPermitted error. + For server the MTU returned shall be equal or smaller + than the negotiated MTU. + For client it only works with characteristic that has + WriteAcquired property which relies on + write-without-response Flag. + To release the lock the client shall close the file + descriptor, a HUP is generated in case the device + is disconnected. + Note: the MTU can only be negotiated once and is + symmetric therefore this method may be delayed in + order to have the exchange MTU completed, because of + that the file descriptor is closed during + reconnections as the MTU has to be renegotiated. + Possible options: "device": Object Device (Server only) + "mtu": Exchanged MTU (Server only) + "link": Link type (Server only) + Possible Errors: org.bluez.Error.Failed + org.bluez.Error.NotSupported */ func (a *GattCharacteristic1) AcquireWrite(options map[string]interface{}) (dbus.UnixFD, uint16, error) { var val0 dbus.UnixFD @@ -494,33 +498,34 @@ func (a *GattCharacteristic1) AcquireWrite(options map[string]interface{}) (dbus } /* -AcquireNotify Acquire file descriptor and MTU for notify. Only - sockets are support. Usage of StartNotify will be locked - causing it to return NotPermitted error. - For server the MTU returned shall be equal or smaller - than the negotiated MTU. - Only works with characteristic that has NotifyAcquired - which relies on notify Flag and no other client have - called StartNotify. - Notification are enabled during this procedure so - StartNotify shall not be called, any notification - will be dispatched via file descriptor therefore the - Value property is not affected during the time where - notify has been acquired. - To release the lock the client shall close the file - descriptor, a HUP is generated in case the device - is disconnected. - Note: the MTU can only be negotiated once and is - symmetric therefore this method may be delayed in - order to have the exchange MTU completed, because of - that the file descriptor is closed during - reconnections as the MTU has to be renegotiated. - Possible options: "device": Object Device (Server only) - "mtu": Exchanged MTU (Server only) - "link": Link type (Server only) - Possible Errors: org.bluez.Error.Failed - org.bluez.Error.NotSupported - +AcquireNotify + + Acquire file descriptor and MTU for notify. Only + sockets are support. Usage of StartNotify will be locked + causing it to return NotPermitted error. + For server the MTU returned shall be equal or smaller + than the negotiated MTU. + Only works with characteristic that has NotifyAcquired + which relies on notify Flag and no other client have + called StartNotify. + Notification are enabled during this procedure so + StartNotify shall not be called, any notification + will be dispatched via file descriptor therefore the + Value property is not affected during the time where + notify has been acquired. + To release the lock the client shall close the file + descriptor, a HUP is generated in case the device + is disconnected. + Note: the MTU can only be negotiated once and is + symmetric therefore this method may be delayed in + order to have the exchange MTU completed, because of + that the file descriptor is closed during + reconnections as the MTU has to be renegotiated. + Possible options: "device": Object Device (Server only) + "mtu": Exchanged MTU (Server only) + "link": Link type (Server only) + Possible Errors: org.bluez.Error.Failed + org.bluez.Error.NotSupported */ func (a *GattCharacteristic1) AcquireNotify(options map[string]interface{}) (dbus.UnixFD, uint16, error) { var val0 dbus.UnixFD @@ -530,36 +535,39 @@ func (a *GattCharacteristic1) AcquireNotify(options map[string]interface{}) (dbu } /* -StartNotify Starts a notification session from this characteristic - if it supports value notifications or indications. - Possible Errors: org.bluez.Error.Failed - org.bluez.Error.NotPermitted - org.bluez.Error.InProgress - org.bluez.Error.NotConnected - org.bluez.Error.NotSupported - +StartNotify + + Starts a notification session from this characteristic + if it supports value notifications or indications. + Possible Errors: org.bluez.Error.Failed + org.bluez.Error.NotPermitted + org.bluez.Error.InProgress + org.bluez.Error.NotConnected + org.bluez.Error.NotSupported */ func (a *GattCharacteristic1) StartNotify() error { return a.client.Call("StartNotify", 0).Store() } /* -StopNotify This method will cancel any previous StartNotify - transaction. Note that notifications from a - characteristic are shared between sessions thus - calling StopNotify will release a single session. - Possible Errors: org.bluez.Error.Failed +StopNotify + This method will cancel any previous StartNotify + transaction. Note that notifications from a + characteristic are shared between sessions thus + calling StopNotify will release a single session. + Possible Errors: org.bluez.Error.Failed */ func (a *GattCharacteristic1) StopNotify() error { return a.client.Call("StopNotify", 0).Store() } /* -Confirm This method doesn't expect a reply so it is just a - confirmation that value was received. - Possible Errors: org.bluez.Error.Failed +Confirm + This method doesn't expect a reply so it is just a + confirmation that value was received. + Possible Errors: org.bluez.Error.Failed */ func (a *GattCharacteristic1) Confirm() error { return a.client.Call("Confirm", 0).Store() diff --git a/bluez/profile/gatt/gen_GattDescriptor1.go b/bluez/profile/gatt/gen_GattDescriptor1.go index b1540523..2c165ac7 100644 --- a/bluez/profile/gatt/gen_GattDescriptor1.go +++ b/bluez/profile/gatt/gen_GattDescriptor1.go @@ -40,7 +40,6 @@ func NewGattDescriptor1(objectPath dbus.ObjectPath) (*GattDescriptor1, error) { GattDescriptor1 Characteristic Descriptors hierarchy Local or remote GATT characteristic descriptors hierarchy. - */ type GattDescriptor1 struct { client *bluez.Client @@ -100,12 +99,12 @@ type GattDescriptor1Properties struct { Value []byte `dbus:"emit"` } -//Lock access to properties +// Lock access to properties func (p *GattDescriptor1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *GattDescriptor1Properties) Unlock() { p.lock.Unlock() } @@ -298,18 +297,19 @@ func (a *GattDescriptor1) UnwatchProperties(ch chan *bluez.PropertyChanged) erro } /* -ReadValue Issues a request to read the value of the - characteristic and returns the value if the - operation was successful. - Possible options: "offset": Start offset - "device": Device path (Server only) - "link": Link type (Server only) - Possible Errors: org.bluez.Error.Failed - org.bluez.Error.InProgress - org.bluez.Error.NotPermitted - org.bluez.Error.NotAuthorized - org.bluez.Error.NotSupported - +ReadValue + + Issues a request to read the value of the + characteristic and returns the value if the + operation was successful. + Possible options: "offset": Start offset + "device": Device path (Server only) + "link": Link type (Server only) + Possible Errors: org.bluez.Error.Failed + org.bluez.Error.InProgress + org.bluez.Error.NotPermitted + org.bluez.Error.NotAuthorized + org.bluez.Error.NotSupported */ func (a *GattDescriptor1) ReadValue(flags map[string]interface{}) ([]byte, error) { val0 := []byte{} @@ -318,21 +318,22 @@ func (a *GattDescriptor1) ReadValue(flags map[string]interface{}) ([]byte, error } /* -WriteValue Issues a request to write the value of the - characteristic. - Possible options: "offset": Start offset - "device": Device path (Server only) - "link": Link type (Server only) - "prepare-authorize": boolean Is prepare - authorization - request - Possible Errors: org.bluez.Error.Failed - org.bluez.Error.InProgress - org.bluez.Error.NotPermitted - org.bluez.Error.InvalidValueLength - org.bluez.Error.NotAuthorized - org.bluez.Error.NotSupported - +WriteValue + + Issues a request to write the value of the + characteristic. + Possible options: "offset": Start offset + "device": Device path (Server only) + "link": Link type (Server only) + "prepare-authorize": boolean Is prepare + authorization + request + Possible Errors: org.bluez.Error.Failed + org.bluez.Error.InProgress + org.bluez.Error.NotPermitted + org.bluez.Error.InvalidValueLength + org.bluez.Error.NotAuthorized + org.bluez.Error.NotSupported */ func (a *GattDescriptor1) WriteValue(value []byte, flags map[string]interface{}) error { return a.client.Call("WriteValue", 0, value, flags).Store() diff --git a/bluez/profile/gatt/gen_GattManager1.go b/bluez/profile/gatt/gen_GattManager1.go index df0cd557..fc7f3e20 100644 --- a/bluez/profile/gatt/gen_GattManager1.go +++ b/bluez/profile/gatt/gen_GattManager1.go @@ -84,31 +84,32 @@ must be available on the root service path. An example application hierarchy containing two separate GATT services may look like this: -> /com/example - | - org.freedesktop.DBus.ObjectManager - | - -> /com/example/service0 - | | - org.freedesktop.DBus.Properties - | | - org.bluez.GattService1 - | | - | -> /com/example/service0/char0 - | | - org.freedesktop.DBus.Properties - | | - org.bluez.GattCharacteristic1 - | | - | -> /com/example/service0/char1 - | | - org.freedesktop.DBus.Properties - | | - org.bluez.GattCharacteristic1 - | | - | -> /com/example/service0/char1/desc0 - | - org.freedesktop.DBus.Properties - | - org.bluez.GattDescriptor1 - | - -> /com/example/service1 - | - org.freedesktop.DBus.Properties - | - org.bluez.GattService1 - | - -> /com/example/service1/char0 - - org.freedesktop.DBus.Properties - - org.bluez.GattCharacteristic1 + + | - org.freedesktop.DBus.ObjectManager + | + -> /com/example/service0 + | | - org.freedesktop.DBus.Properties + | | - org.bluez.GattService1 + | | + | -> /com/example/service0/char0 + | | - org.freedesktop.DBus.Properties + | | - org.bluez.GattCharacteristic1 + | | + | -> /com/example/service0/char1 + | | - org.freedesktop.DBus.Properties + | | - org.bluez.GattCharacteristic1 + | | + | -> /com/example/service0/char1/desc0 + | - org.freedesktop.DBus.Properties + | - org.bluez.GattDescriptor1 + | + -> /com/example/service1 + | - org.freedesktop.DBus.Properties + | - org.bluez.GattService1 + | + -> /com/example/service1/char0 + - org.freedesktop.DBus.Properties + - org.bluez.GattCharacteristic1 When a service is registered, BlueZ will automatically obtain information about all objects using the service's Object Manager. Once a service has been @@ -119,14 +120,12 @@ all of its registered services will be automatically unregistered. InterfacesAdded signals will be ignored. Examples: - - Client - test/example-gatt-client - client/bluetoothctl - - Server - test/example-gatt-server - tools/gatt-service - - + - Client + test/example-gatt-client + client/bluetoothctl + - Server + test/example-gatt-server + tools/gatt-service */ type GattManager1 struct { client *bluez.Client @@ -142,12 +141,12 @@ type GattManager1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *GattManager1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *GattManager1Properties) Unlock() { p.lock.Unlock() } @@ -290,28 +289,30 @@ func (a *GattManager1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -RegisterApplication Registers a local GATT services hierarchy as described - above (GATT Server) and/or GATT profiles (GATT Client). - The application object path together with the D-Bus - system bus connection ID define the identification of - the application registering a GATT based - service or profile. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.AlreadyExists - +RegisterApplication + + Registers a local GATT services hierarchy as described + above (GATT Server) and/or GATT profiles (GATT Client). + The application object path together with the D-Bus + system bus connection ID define the identification of + the application registering a GATT based + service or profile. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.AlreadyExists */ func (a *GattManager1) RegisterApplication(application dbus.ObjectPath, options map[string]interface{}) error { return a.client.Call("RegisterApplication", 0, application, options).Store() } /* -UnregisterApplication This unregisters the services that has been - previously registered. The object path parameter - must match the same value that has been used - on registration. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.DoesNotExist - +UnregisterApplication + + This unregisters the services that has been + previously registered. The object path parameter + must match the same value that has been used + on registration. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.DoesNotExist */ func (a *GattManager1) UnregisterApplication(application dbus.ObjectPath) error { return a.client.Call("UnregisterApplication", 0, application).Store() diff --git a/bluez/profile/gatt/gen_GattProfile1.go b/bluez/profile/gatt/gen_GattProfile1.go index 9d6e5a6b..e9ebcc2d 100644 --- a/bluez/profile/gatt/gen_GattProfile1.go +++ b/bluez/profile/gatt/gen_GattProfile1.go @@ -44,7 +44,6 @@ Local profile (GATT client) instance. By registering this type of object an application effectively indicates support for a specific GATT profile and requests automatic connections to be established to devices supporting it. - */ type GattProfile1 struct { client *bluez.Client @@ -65,12 +64,12 @@ type GattProfile1Properties struct { UUIDs []string } -//Lock access to properties +// Lock access to properties func (p *GattProfile1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *GattProfile1Properties) Unlock() { p.lock.Unlock() } @@ -222,12 +221,13 @@ func (a *GattProfile1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -Release This method gets called when the service daemon - unregisters the profile. The profile can use it to - do cleanup tasks. There is no need to unregister the - profile, because when this method gets called it has - already been unregistered. +Release + This method gets called when the service daemon + unregisters the profile. The profile can use it to + do cleanup tasks. There is no need to unregister the + profile, because when this method gets called it has + already been unregistered. */ func (a *GattProfile1) Release() error { return a.client.Call("Release", 0).Store() diff --git a/bluez/profile/gatt/gen_GattService1.go b/bluez/profile/gatt/gen_GattService1.go index ed053e00..e5284a8b 100644 --- a/bluez/profile/gatt/gen_GattService1.go +++ b/bluez/profile/gatt/gen_GattService1.go @@ -45,7 +45,6 @@ is freely definable. External applications implementing local services must register the services using GattManager1 registration method and must implement the methods and properties defined in GattService1 interface. - */ type GattService1 struct { client *bluez.Client @@ -104,12 +103,12 @@ type GattService1Properties struct { UUID string } -//Lock access to properties +// Lock access to properties func (p *GattService1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *GattService1Properties) Unlock() { p.lock.Unlock() } diff --git a/bluez/profile/gen_version.go b/bluez/profile/gen_version.go index f38fa3b9..33b2f9ea 100644 --- a/bluez/profile/gen_version.go +++ b/bluez/profile/gen_version.go @@ -2,4 +2,4 @@ package profile -const Version = 5.64 +const Version = 5.66 diff --git a/bluez/profile/health/gen_HealthChannel1.go b/bluez/profile/health/gen_HealthChannel1.go index 9a6a4e0d..8f7af5f9 100644 --- a/bluez/profile/health/gen_HealthChannel1.go +++ b/bluez/profile/health/gen_HealthChannel1.go @@ -38,7 +38,6 @@ func NewHealthChannel1(objectPath dbus.ObjectPath) (*HealthChannel1, error) { /* HealthChannel1 HealthChannel hierarchy - */ type HealthChannel1 struct { client *bluez.Client @@ -73,12 +72,12 @@ type HealthChannel1Properties struct { Type string } -//Lock access to properties +// Lock access to properties func (p *HealthChannel1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *HealthChannel1Properties) Unlock() { p.lock.Unlock() } @@ -263,12 +262,13 @@ func (a *HealthChannel1) UnwatchProperties(ch chan *bluez.PropertyChanged) error } /* -Acquire Returns the file descriptor for this data channel. If - the data channel is not connected it will also - reconnect. - Possible Errors: org.bluez.Error.NotConnected - org.bluez.Error.NotAllowed +Acquire + Returns the file descriptor for this data channel. If + the data channel is not connected it will also + reconnect. + Possible Errors: org.bluez.Error.NotConnected + org.bluez.Error.NotAllowed */ func (a *HealthChannel1) Acquire() (dbus.UnixFD, error) { var val0 dbus.UnixFD @@ -277,11 +277,12 @@ func (a *HealthChannel1) Acquire() (dbus.UnixFD, error) { } /* -Release Releases the fd. Application should also need to - close() it. - Possible Errors: org.bluez.Error.NotAcquired - org.bluez.Error.NotAllowed +Release + Releases the fd. Application should also need to + close() it. + Possible Errors: org.bluez.Error.NotAcquired + org.bluez.Error.NotAllowed */ func (a *HealthChannel1) Release() error { return a.client.Call("Release", 0).Store() diff --git a/bluez/profile/health/gen_HealthDevice1.go b/bluez/profile/health/gen_HealthDevice1.go index c992d30c..9ec5b3b2 100644 --- a/bluez/profile/health/gen_HealthDevice1.go +++ b/bluez/profile/health/gen_HealthDevice1.go @@ -38,7 +38,6 @@ func NewHealthDevice1(objectPath dbus.ObjectPath) (*HealthDevice1, error) { /* HealthDevice1 HealthDevice hierarchy - */ type HealthDevice1 struct { client *bluez.Client @@ -62,12 +61,12 @@ type HealthDevice1Properties struct { MainChannel dbus.ObjectPath } -//Lock access to properties +// Lock access to properties func (p *HealthDevice1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *HealthDevice1Properties) Unlock() { p.lock.Unlock() } @@ -224,12 +223,13 @@ func (a *HealthDevice1) UnwatchProperties(ch chan *bluez.PropertyChanged) error } /* -Echo Sends an echo petition to the remote service. Returns - True if response matches with the buffer sent. If some - error is detected False value is returned. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.OutOfRange +Echo + Sends an echo petition to the remote service. Returns + True if response matches with the buffer sent. If some + error is detected False value is returned. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.OutOfRange */ func (a *HealthDevice1) Echo() (bool, error) { var val0 bool @@ -238,14 +238,15 @@ func (a *HealthDevice1) Echo() (bool, error) { } /* -CreateChannel Creates a new data channel. The configuration should - indicate the channel quality of service using one of - this values "reliable", "streaming", "any". - Returns the object path that identifies the data - channel that is already connected. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.HealthError - +CreateChannel + + Creates a new data channel. The configuration should + indicate the channel quality of service using one of + this values "reliable", "streaming", "any". + Returns the object path that identifies the data + channel that is already connected. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.HealthError */ func (a *HealthDevice1) CreateChannel(application dbus.ObjectPath, configuration string) (dbus.ObjectPath, error) { var val0 dbus.ObjectPath @@ -254,14 +255,15 @@ func (a *HealthDevice1) CreateChannel(application dbus.ObjectPath, configuration } /* -DestroyChannel Destroys the data channel object. Only the creator of - the channel or the creator of the HealthApplication - that received the data channel will be able to destroy - it. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.NotFound - org.bluez.Error.NotAllowed - +DestroyChannel + + Destroys the data channel object. Only the creator of + the channel or the creator of the HealthApplication + that received the data channel will be able to destroy + it. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound + org.bluez.Error.NotAllowed */ func (a *HealthDevice1) DestroyChannel(channel dbus.ObjectPath) error { return a.client.Call("DestroyChannel", 0, channel).Store() diff --git a/bluez/profile/health/gen_HealthManager1.go b/bluez/profile/health/gen_HealthManager1.go index c7659a7f..e2df0836 100644 --- a/bluez/profile/health/gen_HealthManager1.go +++ b/bluez/profile/health/gen_HealthManager1.go @@ -38,7 +38,6 @@ func NewHealthManager1() (*HealthManager1, error) { /* HealthManager1 HealthManager hierarchy - */ type HealthManager1 struct { client *bluez.Client @@ -54,12 +53,12 @@ type HealthManager1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *HealthManager1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *HealthManager1Properties) Unlock() { p.lock.Unlock() } @@ -202,22 +201,23 @@ func (a *HealthManager1) UnwatchProperties(ch chan *bluez.PropertyChanged) error } /* -CreateApplication Returns the path of the new registered application. - Application will be closed by the call or implicitly - when the programs leaves the bus. - config: - uint16 DataType: - Mandatory - string Role: - Mandatory. Possible values: "source", - "sink" - string Description: - Optional - ChannelType: - Optional, just for sources. Possible - values: "reliable", "streaming" - Possible Errors: org.bluez.Error.InvalidArguments - +CreateApplication + + Returns the path of the new registered application. + Application will be closed by the call or implicitly + when the programs leaves the bus. + config: + uint16 DataType: + Mandatory + string Role: + Mandatory. Possible values: "source", + "sink" + string Description: + Optional + ChannelType: + Optional, just for sources. Possible + values: "reliable", "streaming" + Possible Errors: org.bluez.Error.InvalidArguments */ func (a *HealthManager1) CreateApplication(config map[string]interface{}) (dbus.ObjectPath, error) { var val0 dbus.ObjectPath @@ -226,14 +226,15 @@ func (a *HealthManager1) CreateApplication(config map[string]interface{}) (dbus. } /* -DestroyApplication Closes the HDP application identified by the object - path. Also application will be closed if the process - that started it leaves the bus. Only the creator of the - application will be able to destroy it. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.NotFound - org.bluez.Error.NotAllowed - +DestroyApplication + + Closes the HDP application identified by the object + path. Also application will be closed if the process + that started it leaves the bus. Only the creator of the + application will be able to destroy it. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound + org.bluez.Error.NotAllowed */ func (a *HealthManager1) DestroyApplication(application dbus.ObjectPath) error { return a.client.Call("DestroyApplication", 0, application).Store() diff --git a/bluez/profile/input/gen_Input1.go b/bluez/profile/input/gen_Input1.go index e9da83f3..a48469ff 100644 --- a/bluez/profile/input/gen_Input1.go +++ b/bluez/profile/input/gen_Input1.go @@ -38,7 +38,6 @@ func NewInput1(objectPath dbus.ObjectPath) (*Input1, error) { /* Input1 Input hierarchy - */ type Input1 struct { client *bluez.Client @@ -78,12 +77,12 @@ type Input1Properties struct { ReconnectMode string } -//Lock access to properties +// Lock access to properties func (p *Input1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Input1Properties) Unlock() { p.lock.Unlock() } diff --git a/bluez/profile/media/gen_Media1.go b/bluez/profile/media/gen_Media1.go index e43ee4b0..9a1b28da 100644 --- a/bluez/profile/media/gen_Media1.go +++ b/bluez/profile/media/gen_Media1.go @@ -38,7 +38,6 @@ func NewMedia1(objectPath dbus.ObjectPath) (*Media1, error) { /* Media1 Media hierarchy - */ type Media1 struct { client *bluez.Client @@ -52,18 +51,38 @@ type Media1 struct { // Media1Properties contains the exposed properties of an interface type Media1Properties struct { lock sync.RWMutex `dbus:"ignore"` + + /* + SupportedUUIDs List of 128-bit UUIDs that represents the supported + Endpoint registration. + */ + SupportedUUIDs []string } -//Lock access to properties +// Lock access to properties func (p *Media1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Media1Properties) Unlock() { p.lock.Unlock() } +// SetSupportedUUIDs set SupportedUUIDs value +func (a *Media1) SetSupportedUUIDs(v []string) error { + return a.SetProperty("SupportedUUIDs", v) +} + +// GetSupportedUUIDs get SupportedUUIDs value +func (a *Media1) GetSupportedUUIDs() ([]string, error) { + v, err := a.GetProperty("SupportedUUIDs") + if err != nil { + return []string{}, err + } + return v.Value().([]string), nil +} + // Close the connection func (a *Media1) Close() { a.unregisterPropertiesSignal() @@ -202,87 +221,95 @@ func (a *Media1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -RegisterEndpoint Register a local end point to sender, the sender can - register as many end points as it likes. - Note: If the sender disconnects the end points are - automatically unregistered. - possible properties: - string UUID: - UUID of the profile which the endpoint - is for. - byte Codec: - Assigned number of codec that the - endpoint implements. The values should - match the profile specification which - is indicated by the UUID. - array{byte} Capabilities: - Capabilities blob, it is used as it is - so the size and byte order must match. - Possible Errors: org.bluez.Error.InvalidArguments - org.bluez.Error.NotSupported - emitted - when interface for the end-point is - disabled. - +RegisterEndpoint + + Register a local end point to sender, the sender can + register as many end points as it likes. + Note: If the sender disconnects the end points are + automatically unregistered. + possible properties: + string UUID: + UUID of the profile which the endpoint + is for. + UUID must be in the list of + SupportedUUIDS. + byte Codec: + Assigned number of codec that the + endpoint implements. The values should + match the profile specification which + is indicated by the UUID. + array{byte} Capabilities: + Capabilities blob, it is used as it is + so the size and byte order must match. + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotSupported - emitted + when interface for the end-point is + disabled. */ func (a *Media1) RegisterEndpoint(endpoint dbus.ObjectPath, properties map[string]interface{}) error { return a.client.Call("RegisterEndpoint", 0, endpoint, properties).Store() } /* -UnregisterEndpoint Unregister sender end point. +UnregisterEndpoint + Unregister sender end point. */ func (a *Media1) UnregisterEndpoint(endpoint dbus.ObjectPath) error { return a.client.Call("UnregisterEndpoint", 0, endpoint).Store() } /* -RegisterPlayer Register a media player object to sender, the sender - can register as many objects as it likes. - Object must implement at least - org.mpris.MediaPlayer2.Player as defined in MPRIS 2.2 - spec: - http://specifications.freedesktop.org/mpris-spec/latest/ - Note: If the sender disconnects its objects are - automatically unregistered. - Possible Errors: org.bluez.Error.InvalidArguments - org.bluez.Error.NotSupported - +RegisterPlayer + + Register a media player object to sender, the sender + can register as many objects as it likes. + Object must implement at least + org.mpris.MediaPlayer2.Player as defined in MPRIS 2.2 + spec: + http://specifications.freedesktop.org/mpris-spec/latest/ + Note: If the sender disconnects its objects are + automatically unregistered. + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotSupported */ func (a *Media1) RegisterPlayer(player dbus.ObjectPath, properties map[string]interface{}) error { return a.client.Call("RegisterPlayer", 0, player, properties).Store() } /* -UnregisterPlayer Unregister sender media player. +UnregisterPlayer + Unregister sender media player. */ func (a *Media1) UnregisterPlayer(player dbus.ObjectPath) error { return a.client.Call("UnregisterPlayer", 0, player).Store() } /* -RegisterApplication Register endpoints an player objects within root - object which must implement ObjectManager. - The application object path together with the D-Bus - system bus connection ID define the identification of - the application. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.AlreadyExists - +RegisterApplication + + Register endpoints an player objects within root + object which must implement ObjectManager. + The application object path together with the D-Bus + system bus connection ID define the identification of + the application. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.AlreadyExists */ func (a *Media1) RegisterApplication(root dbus.ObjectPath, options map[string]interface{}) error { return a.client.Call("RegisterApplication", 0, root, options).Store() } /* -UnregisterApplication This unregisters the services that has been - previously registered. The object path parameter - must match the same value that has been used - on registration. - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.DoesNotExist - +UnregisterApplication + + This unregisters the services that has been + previously registered. The object path parameter + must match the same value that has been used + on registration. + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.DoesNotExist */ func (a *Media1) UnregisterApplication(application dbus.ObjectPath) error { return a.client.Call("UnregisterApplication", 0, application).Store() diff --git a/bluez/profile/media/gen_MediaControl1.go b/bluez/profile/media/gen_MediaControl1.go index 32331cf7..cfe1516d 100644 --- a/bluez/profile/media/gen_MediaControl1.go +++ b/bluez/profile/media/gen_MediaControl1.go @@ -60,7 +60,6 @@ func NewMediaControl1FromAdapterID(adapterID string) (*MediaControl1, error) { /* MediaControl1 Media Control hierarchy - */ type MediaControl1 struct { client *bluez.Client @@ -86,12 +85,12 @@ type MediaControl1Properties struct { Player dbus.ObjectPath } -//Lock access to properties +// Lock access to properties func (p *MediaControl1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *MediaControl1Properties) Unlock() { p.lock.Unlock() } @@ -262,74 +261,83 @@ func (a *MediaControl1) UnwatchProperties(ch chan *bluez.PropertyChanged) error } /* -Play Resume playback. +Play + Resume playback. */ func (a *MediaControl1) Play() error { return a.client.Call("Play", 0).Store() } /* -Pause Pause playback. +Pause + Pause playback. */ func (a *MediaControl1) Pause() error { return a.client.Call("Pause", 0).Store() } /* -Stop Stop playback. +Stop + Stop playback. */ func (a *MediaControl1) Stop() error { return a.client.Call("Stop", 0).Store() } /* -Next Next item. +Next + Next item. */ func (a *MediaControl1) Next() error { return a.client.Call("Next", 0).Store() } /* -Previous Previous item. +Previous + Previous item. */ func (a *MediaControl1) Previous() error { return a.client.Call("Previous", 0).Store() } /* -VolumeUp Adjust remote volume one step up +VolumeUp + Adjust remote volume one step up */ func (a *MediaControl1) VolumeUp() error { return a.client.Call("VolumeUp", 0).Store() } /* -VolumeDown Adjust remote volume one step down +VolumeDown + Adjust remote volume one step down */ func (a *MediaControl1) VolumeDown() error { return a.client.Call("VolumeDown", 0).Store() } /* -FastForward Fast forward playback, this action is only stopped - when another method in this interface is called. +FastForward + Fast forward playback, this action is only stopped + when another method in this interface is called. */ func (a *MediaControl1) FastForward() error { return a.client.Call("FastForward", 0).Store() } /* -Rewind Rewind playback, this action is only stopped - when another method in this interface is called. +Rewind + Rewind playback, this action is only stopped + when another method in this interface is called. */ func (a *MediaControl1) Rewind() error { return a.client.Call("Rewind", 0).Store() diff --git a/bluez/profile/media/gen_MediaEndpoint1.go b/bluez/profile/media/gen_MediaEndpoint1.go index be1e8f12..f33a53a1 100644 --- a/bluez/profile/media/gen_MediaEndpoint1.go +++ b/bluez/profile/media/gen_MediaEndpoint1.go @@ -61,7 +61,6 @@ func NewMediaEndpoint1Client(objectPath dbus.ObjectPath) (*MediaEndpoint1, error /* MediaEndpoint1 MediaEndpoint1 hierarchy - */ type MediaEndpoint1 struct { client *bluez.Client @@ -89,6 +88,11 @@ type MediaEndpoint1Properties struct { */ Codec byte + /* + Context Indicates endpoint available audio context. + */ + Context uint16 + /* DelayReporting Indicates if endpoint supports Delay Reporting. */ @@ -99,18 +103,59 @@ type MediaEndpoint1Properties struct { */ Device dbus.ObjectPath + /* + Framing Indicates endpoint support framing. + */ + Framing byte + + /* + Location Indicates endpoint supported locations. + */ + Location uint32 + + /* + MaximumLatency Indicates endpoint maximum latency. + + uint32_t MinimumDelay [ISO only] + + Indicates endpoint minimum presentation delay. + + uint32_t MaximumDelay [ISO only] + + Indicates endpoint maximum presentation delay. + + uint32_t PreferredMinimumDelay [ISO only] + + Indicates endpoint preferred minimum presentation delay. + + uint32_t PreferredMinimumDelay [ISO only] + + Indicates endpoint preferred minimum presentation delay. + */ + MaximumLatency uint16 + + /* + PHY Indicates endpoint supported PHY. + */ + PHY byte + + /* + SupportedContext Indicates endpoint supported audio context. + */ + SupportedContext uint16 + /* UUID UUID of the profile which the endpoint is for. */ UUID string } -//Lock access to properties +// Lock access to properties func (p *MediaEndpoint1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *MediaEndpoint1Properties) Unlock() { p.lock.Unlock() } @@ -143,6 +188,20 @@ func (a *MediaEndpoint1) GetCodec() (byte, error) { return v.Value().(byte), nil } +// SetContext set Context value +func (a *MediaEndpoint1) SetContext(v uint16) error { + return a.SetProperty("Context", v) +} + +// GetContext get Context value +func (a *MediaEndpoint1) GetContext() (uint16, error) { + v, err := a.GetProperty("Context") + if err != nil { + return uint16(0), err + } + return v.Value().(uint16), nil +} + // SetDelayReporting set DelayReporting value func (a *MediaEndpoint1) SetDelayReporting(v bool) error { return a.SetProperty("DelayReporting", v) @@ -171,6 +230,76 @@ func (a *MediaEndpoint1) GetDevice() (dbus.ObjectPath, error) { return v.Value().(dbus.ObjectPath), nil } +// SetFraming set Framing value +func (a *MediaEndpoint1) SetFraming(v byte) error { + return a.SetProperty("Framing", v) +} + +// GetFraming get Framing value +func (a *MediaEndpoint1) GetFraming() (byte, error) { + v, err := a.GetProperty("Framing") + if err != nil { + return byte(0), err + } + return v.Value().(byte), nil +} + +// SetLocation set Location value +func (a *MediaEndpoint1) SetLocation(v uint32) error { + return a.SetProperty("Location", v) +} + +// GetLocation get Location value +func (a *MediaEndpoint1) GetLocation() (uint32, error) { + v, err := a.GetProperty("Location") + if err != nil { + return uint32(0), err + } + return v.Value().(uint32), nil +} + +// SetMaximumLatency set MaximumLatency value +func (a *MediaEndpoint1) SetMaximumLatency(v uint16) error { + return a.SetProperty("MaximumLatency", v) +} + +// GetMaximumLatency get MaximumLatency value +func (a *MediaEndpoint1) GetMaximumLatency() (uint16, error) { + v, err := a.GetProperty("MaximumLatency") + if err != nil { + return uint16(0), err + } + return v.Value().(uint16), nil +} + +// SetPHY set PHY value +func (a *MediaEndpoint1) SetPHY(v byte) error { + return a.SetProperty("PHY", v) +} + +// GetPHY get PHY value +func (a *MediaEndpoint1) GetPHY() (byte, error) { + v, err := a.GetProperty("PHY") + if err != nil { + return byte(0), err + } + return v.Value().(byte), nil +} + +// SetSupportedContext set SupportedContext value +func (a *MediaEndpoint1) SetSupportedContext(v uint16) error { + return a.SetProperty("SupportedContext", v) +} + +// GetSupportedContext get SupportedContext value +func (a *MediaEndpoint1) GetSupportedContext() (uint16, error) { + v, err := a.GetProperty("SupportedContext") + if err != nil { + return uint16(0), err + } + return v.Value().(uint16), nil +} + // SetUUID set UUID value func (a *MediaEndpoint1) SetUUID(v string) error { return a.SetProperty("UUID", v) @@ -323,26 +452,39 @@ func (a *MediaEndpoint1) UnwatchProperties(ch chan *bluez.PropertyChanged) error } /* -SetConfiguration Set configuration for the transport. - For client role transport must be set with a server - endpoint oject which will be configured and the - properties must contain the following properties: - array{byte} Capabilities - +SetConfiguration + + Set configuration for the transport. + For client role transport must be set with a server + endpoint oject which will be configured and the + properties must contain the following properties: + array{byte} Capabilities [Mandatory] + array{byte} Metadata [ISO only] + byte CIG [ISO only] + byte CIS [ISO only] + uint32 Interval [ISO only] + bool Framing [ISO only] + string PHY [ISO only] + uint16 SDU [ISO only] + byte Retransmissions [ISO only] + uint16 Latency [ISO only] + uint32 Delay [ISO only] + uint8 TargetLatency [ISO Latency] */ func (a *MediaEndpoint1) SetConfiguration(transport dbus.ObjectPath, properties map[string]interface{}) error { return a.client.Call("SetConfiguration", 0, transport, properties).Store() } /* -SelectConfiguration Select preferable configuration from the supported - capabilities. - Returns a configuration which can be used to setup - a transport. - Note: There is no need to cache the selected - configuration since on success the configuration is - send back as parameter of SetConfiguration. - +SelectConfiguration + + Select preferable configuration from the supported + capabilities. + Returns a configuration which can be used to setup + a transport. + Note: There is no need to cache the selected + configuration since on success the configuration is + send back as parameter of SetConfiguration. */ func (a *MediaEndpoint1) SelectConfiguration(capabilities []byte) ([]byte, error) { val0 := []byte{} @@ -351,20 +493,42 @@ func (a *MediaEndpoint1) SelectConfiguration(capabilities []byte) ([]byte, error } /* -ClearConfiguration Clear transport configuration. +SelectProperties + + Select preferable properties from the supported + properties: + object Endpoint [ISO only] + Refer to SetConfiguration for the list of + other possible properties. + Returns propeties which can be used to setup + a transport. + Note: There is no need to cache the selected + properties since on success the configuration is + send back as parameter of SetConfiguration. +*/ +func (a *MediaEndpoint1) SelectProperties(properties map[string]interface{}) (map[string]interface{}, error) { + var val0 map[string]interface{} + err := a.client.Call("SelectProperties", 0, properties).Store(&val0) + return val0, err +} + +/* +ClearConfiguration + Clear transport configuration. */ func (a *MediaEndpoint1) ClearConfiguration(transport dbus.ObjectPath) error { return a.client.Call("ClearConfiguration", 0, transport).Store() } /* -Release This method gets called when the service daemon - unregisters the endpoint. An endpoint can use it to do - cleanup tasks. There is no need to unregister the - endpoint, because when this method gets called it has - already been unregistered. +Release + This method gets called when the service daemon + unregisters the endpoint. An endpoint can use it to do + cleanup tasks. There is no need to unregister the + endpoint, because when this method gets called it has + already been unregistered. */ func (a *MediaEndpoint1) Release() error { return a.client.Call("Release", 0).Store() diff --git a/bluez/profile/media/gen_MediaFolder1.go b/bluez/profile/media/gen_MediaFolder1.go index c5e43127..69f952f8 100644 --- a/bluez/profile/media/gen_MediaFolder1.go +++ b/bluez/profile/media/gen_MediaFolder1.go @@ -62,7 +62,6 @@ func NewMediaFolder1Controller(objectPath dbus.ObjectPath) (*MediaFolder1, error /* MediaFolder1 MediaFolder1 hierarchy - */ type MediaFolder1 struct { client *bluez.Client @@ -125,12 +124,12 @@ type MediaFolder1Properties struct { Start uint32 } -//Lock access to properties +// Lock access to properties func (p *MediaFolder1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *MediaFolder1Properties) Unlock() { p.lock.Unlock() } @@ -343,12 +342,13 @@ func (a *MediaFolder1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -Search Return a folder object containing the search result. - To list the items found use the folder object returned - and pass to ChangeFolder. - Possible Errors: org.bluez.Error.NotSupported - org.bluez.Error.Failed +Search + Return a folder object containing the search result. + To list the items found use the folder object returned + and pass to ChangeFolder. + Possible Errors: org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaFolder1) Search(value string, filter map[string]interface{}) (dbus.ObjectPath, error) { var val0 dbus.ObjectPath @@ -357,11 +357,12 @@ func (a *MediaFolder1) Search(value string, filter map[string]interface{}) (dbus } /* -ListItems Return a list of items found - Possible Errors: org.bluez.Error.InvalidArguments - org.bluez.Error.NotSupported - org.bluez.Error.Failed +ListItems + Return a list of items found + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaFolder1) ListItems(filter map[string]interface{}) ([]Item, error) { val0 := []Item{} @@ -370,15 +371,16 @@ func (a *MediaFolder1) ListItems(filter map[string]interface{}) ([]Item, error) } /* -ChangeFolder Change current folder. - Note: By changing folder the items of previous folder - might be destroyed and have to be listed again, the - exception is NowPlaying folder which should be always - present while the player is active. - Possible Errors: org.bluez.Error.InvalidArguments - org.bluez.Error.NotSupported - org.bluez.Error.Failed - +ChangeFolder + + Change current folder. + Note: By changing folder the items of previous folder + might be destroyed and have to be listed again, the + exception is NowPlaying folder which should be always + present while the player is active. + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaFolder1) ChangeFolder(folder dbus.ObjectPath) error { return a.client.Call("ChangeFolder", 0, folder).Store() diff --git a/bluez/profile/media/gen_MediaItem1.go b/bluez/profile/media/gen_MediaItem1.go index 28665267..474dd17a 100644 --- a/bluez/profile/media/gen_MediaItem1.go +++ b/bluez/profile/media/gen_MediaItem1.go @@ -62,7 +62,6 @@ func NewMediaItem1Controller(objectPath dbus.ObjectPath) (*MediaItem1, error) { /* MediaItem1 MediaItem1 hierarchy - */ type MediaItem1 struct { client *bluez.Client @@ -174,12 +173,12 @@ type MediaItem1Properties struct { Type string } -//Lock access to properties +// Lock access to properties func (p *MediaItem1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *MediaItem1Properties) Unlock() { p.lock.Unlock() } @@ -504,20 +503,22 @@ func (a *MediaItem1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -Play Play item - Possible Errors: org.bluez.Error.NotSupported - org.bluez.Error.Failed +Play + Play item + Possible Errors: org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaItem1) Play() error { return a.client.Call("Play", 0).Store() } /* -AddtoNowPlaying Add item to now playing list - Possible Errors: org.bluez.Error.NotSupported - org.bluez.Error.Failed +AddtoNowPlaying + Add item to now playing list + Possible Errors: org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaItem1) AddtoNowPlaying() error { return a.client.Call("AddtoNowPlaying", 0).Store() diff --git a/bluez/profile/media/gen_MediaPlayer1.go b/bluez/profile/media/gen_MediaPlayer1.go index 9a45e39c..aa0c77d7 100644 --- a/bluez/profile/media/gen_MediaPlayer1.go +++ b/bluez/profile/media/gen_MediaPlayer1.go @@ -38,7 +38,6 @@ func NewMediaPlayer1(objectPath dbus.ObjectPath) (*MediaPlayer1, error) { /* MediaPlayer1 MediaPlayer1 hierarchy - */ type MediaPlayer1 struct { client *bluez.Client @@ -203,12 +202,12 @@ type MediaPlayer1Properties struct { Type string } -//Lock access to properties +// Lock access to properties func (p *MediaPlayer1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *MediaPlayer1Properties) Unlock() { p.lock.Unlock() } @@ -645,110 +644,120 @@ func (a *MediaPlayer1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -Play Resume playback. - Possible Errors: org.bluez.Error.NotSupported - org.bluez.Error.Failed +Play + Resume playback. + Possible Errors: org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaPlayer1) Play() error { return a.client.Call("Play", 0).Store() } /* -Pause Pause playback. - Possible Errors: org.bluez.Error.NotSupported - org.bluez.Error.Failed +Pause + Pause playback. + Possible Errors: org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaPlayer1) Pause() error { return a.client.Call("Pause", 0).Store() } /* -Stop Stop playback. - Possible Errors: org.bluez.Error.NotSupported - org.bluez.Error.Failed +Stop + Stop playback. + Possible Errors: org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaPlayer1) Stop() error { return a.client.Call("Stop", 0).Store() } /* -Next Next item. - Possible Errors: org.bluez.Error.NotSupported - org.bluez.Error.Failed +Next + Next item. + Possible Errors: org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaPlayer1) Next() error { return a.client.Call("Next", 0).Store() } /* -Previous Previous item. - Possible Errors: org.bluez.Error.NotSupported - org.bluez.Error.Failed +Previous + Previous item. + Possible Errors: org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaPlayer1) Previous() error { return a.client.Call("Previous", 0).Store() } /* -FastForward Fast forward playback, this action is only stopped - when another method in this interface is called. - Possible Errors: org.bluez.Error.NotSupported - org.bluez.Error.Failed +FastForward + Fast forward playback, this action is only stopped + when another method in this interface is called. + Possible Errors: org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaPlayer1) FastForward() error { return a.client.Call("FastForward", 0).Store() } /* -Rewind Rewind playback, this action is only stopped - when another method in this interface is called. - Possible Errors: org.bluez.Error.NotSupported - org.bluez.Error.Failed +Rewind + Rewind playback, this action is only stopped + when another method in this interface is called. + Possible Errors: org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaPlayer1) Rewind() error { return a.client.Call("Rewind", 0).Store() } /* -Press Press a specific key to send as passthrough command. - The key will be released automatically. Use Hold() - instead if the intention is to hold down the key. - Possible Errors: org.bluez.Error.InvalidArguments - org.bluez.Error.NotSupported - org.bluez.Error.Failed - +Press + + Press a specific key to send as passthrough command. + The key will be released automatically. Use Hold() + instead if the intention is to hold down the key. + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaPlayer1) Press(avc_key byte) error { return a.client.Call("Press", 0, avc_key).Store() } /* -Hold Press and hold a specific key to send as passthrough - command. It is your responsibility to make sure that - Release() is called after calling this method. The held - key will also be released when any other method in this - interface is called. - Possible Errors: org.bluez.Error.InvalidArguments - org.bluez.Error.NotSupported - org.bluez.Error.Failed - +Hold + + Press and hold a specific key to send as passthrough + command. It is your responsibility to make sure that + Release() is called after calling this method. The held + key will also be released when any other method in this + interface is called. + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaPlayer1) Hold(avc_key byte) error { return a.client.Call("Hold", 0, avc_key).Store() } /* -Release Release the previously held key invoked using Hold(). - Possible Errors: org.bluez.Error.NotSupported - org.bluez.Error.Failed +Release + Release the previously held key invoked using Hold(). + Possible Errors: org.bluez.Error.NotSupported + org.bluez.Error.Failed */ func (a *MediaPlayer1) Release() error { return a.client.Call("Release", 0).Store() diff --git a/bluez/profile/media/gen_MediaTransport1.go b/bluez/profile/media/gen_MediaTransport1.go index 081f2bdb..461925f7 100644 --- a/bluez/profile/media/gen_MediaTransport1.go +++ b/bluez/profile/media/gen_MediaTransport1.go @@ -38,7 +38,6 @@ func NewMediaTransport1(objectPath dbus.ObjectPath) (*MediaTransport1, error) { /* MediaTransport1 MediaTransport1 hierarchy - */ type MediaTransport1 struct { client *bluez.Client @@ -84,6 +83,22 @@ type MediaTransport1Properties struct { */ Endpoint dbus.ObjectPath + /* + Links Linked transport objects which the transport is + associated with. + */ + Links []dbus.ObjectPath + + /* + Location Indicates transport Audio Location. + */ + Location uint32 + + /* + Metadata Indicates transport Metadata. + */ + Metadata []byte + /* State Indicates the state of the transport. Possible values are: @@ -108,12 +123,12 @@ type MediaTransport1Properties struct { Volume uint16 } -//Lock access to properties +// Lock access to properties func (p *MediaTransport1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *MediaTransport1Properties) Unlock() { p.lock.Unlock() } @@ -188,6 +203,48 @@ func (a *MediaTransport1) GetEndpoint() (dbus.ObjectPath, error) { return v.Value().(dbus.ObjectPath), nil } +// SetLinks set Links value +func (a *MediaTransport1) SetLinks(v []dbus.ObjectPath) error { + return a.SetProperty("Links", v) +} + +// GetLinks get Links value +func (a *MediaTransport1) GetLinks() ([]dbus.ObjectPath, error) { + v, err := a.GetProperty("Links") + if err != nil { + return []dbus.ObjectPath{}, err + } + return v.Value().([]dbus.ObjectPath), nil +} + +// SetLocation set Location value +func (a *MediaTransport1) SetLocation(v uint32) error { + return a.SetProperty("Location", v) +} + +// GetLocation get Location value +func (a *MediaTransport1) GetLocation() (uint32, error) { + v, err := a.GetProperty("Location") + if err != nil { + return uint32(0), err + } + return v.Value().(uint32), nil +} + +// SetMetadata set Metadata value +func (a *MediaTransport1) SetMetadata(v []byte) error { + return a.SetProperty("Metadata", v) +} + +// GetMetadata get Metadata value +func (a *MediaTransport1) GetMetadata() ([]byte, error) { + v, err := a.GetProperty("Metadata") + if err != nil { + return []byte{}, err + } + return v.Value().([]byte), nil +} + // SetState set State value func (a *MediaTransport1) SetState(v string) error { return a.SetProperty("State", v) @@ -368,11 +425,12 @@ func (a *MediaTransport1) UnwatchProperties(ch chan *bluez.PropertyChanged) erro } /* -Acquire Acquire transport file descriptor and the MTU for read - and write respectively. - Possible Errors: org.bluez.Error.NotAuthorized - org.bluez.Error.Failed +Acquire + Acquire transport file descriptor and the MTU for read + and write respectively. + Possible Errors: org.bluez.Error.NotAuthorized + org.bluez.Error.Failed */ func (a *MediaTransport1) Acquire() (dbus.UnixFD, uint16, uint16, error) { var val0 dbus.UnixFD @@ -383,15 +441,16 @@ func (a *MediaTransport1) Acquire() (dbus.UnixFD, uint16, uint16, error) { } /* -TryAcquire Acquire transport file descriptor only if the transport - is in "pending" state at the time the message is - received by BlueZ. Otherwise no request will be sent - to the remote device and the function will just fail - with org.bluez.Error.NotAvailable. - Possible Errors: org.bluez.Error.NotAuthorized - org.bluez.Error.Failed - org.bluez.Error.NotAvailable - +TryAcquire + + Acquire transport file descriptor only if the transport + is in "pending" state at the time the message is + received by BlueZ. Otherwise no request will be sent + to the remote device and the function will just fail + with org.bluez.Error.NotAvailable. + Possible Errors: org.bluez.Error.NotAuthorized + org.bluez.Error.Failed + org.bluez.Error.NotAvailable */ func (a *MediaTransport1) TryAcquire() (dbus.UnixFD, uint16, uint16, error) { var val0 dbus.UnixFD @@ -402,8 +461,9 @@ func (a *MediaTransport1) TryAcquire() (dbus.UnixFD, uint16, uint16, error) { } /* -Release Releases file descriptor. +Release + Releases file descriptor. */ func (a *MediaTransport1) Release() error { return a.client.Call("Release", 0).Store() diff --git a/bluez/profile/mesh/gen_Application1.go b/bluez/profile/mesh/gen_Application1.go index 18087f2e..919c2df3 100644 --- a/bluez/profile/mesh/gen_Application1.go +++ b/bluez/profile/mesh/gen_Application1.go @@ -39,7 +39,6 @@ func NewApplication1(servicePath string, objectPath dbus.ObjectPath) (*Applicati /* Application1 Mesh Application Hierarchy - */ type Application1 struct { client *bluez.Client @@ -76,12 +75,12 @@ type Application1Properties struct { VersionID uint16 } -//Lock access to properties +// Lock access to properties func (p *Application1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Application1Properties) Unlock() { p.lock.Unlock() } @@ -260,31 +259,33 @@ func (a *Application1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -JoinComplete This method is called when the node provisioning initiated - by a Join() method call successfully completed. - The token parameter serves as a unique identifier of the - particular node. The token must be preserved by the application - in order to authenticate itself to the mesh daemon and attach to - the network as a mesh node by calling Attach() method or - permanently remove the identity of the mesh node by calling - Leave() method. - If this method returns an error, the daemon will assume that the - application failed to preserve the token, and will remove the - freshly created node. - +JoinComplete + + This method is called when the node provisioning initiated + by a Join() method call successfully completed. + The token parameter serves as a unique identifier of the + particular node. The token must be preserved by the application + in order to authenticate itself to the mesh daemon and attach to + the network as a mesh node by calling Attach() method or + permanently remove the identity of the mesh node by calling + Leave() method. + If this method returns an error, the daemon will assume that the + application failed to preserve the token, and will remove the + freshly created node. */ func (a *Application1) JoinComplete(token uint64) error { return a.client.Call("JoinComplete", 0, token).Store() } /* -JoinFailed This method is called when the node provisioning initiated by - Join() has failed. - The reason parameter identifies the reason for provisioning - failure. The defined values are: "timeout", "bad-pdu", - "confirmation-failed", "out-of-resources", "decryption-error", - "unexpected-error", "cannot-assign-addresses". - +JoinFailed + + This method is called when the node provisioning initiated by + Join() has failed. + The reason parameter identifies the reason for provisioning + failure. The defined values are: "timeout", "bad-pdu", + "confirmation-failed", "out-of-resources", "decryption-error", + "unexpected-error", "cannot-assign-addresses". */ func (a *Application1) JoinFailed(reason string) error { return a.client.Call("JoinFailed", 0, reason).Store() diff --git a/bluez/profile/mesh/gen_Attention1.go b/bluez/profile/mesh/gen_Attention1.go index a510c339..88fdc9f0 100644 --- a/bluez/profile/mesh/gen_Attention1.go +++ b/bluez/profile/mesh/gen_Attention1.go @@ -39,7 +39,6 @@ func NewAttention1(servicePath string, objectPath dbus.ObjectPath) (*Attention1, /* Attention1 Mesh Attention Hierarchy - */ type Attention1 struct { client *bluez.Client @@ -55,12 +54,12 @@ type Attention1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *Attention1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Attention1Properties) Unlock() { p.lock.Unlock() } @@ -203,26 +202,28 @@ func (a *Attention1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -SetTimer The element_index parameter is the element's index within the - node where the health server model is hosted. - The time parameter indicates how many seconds the attention - state shall be on. - PossibleErrors: - org.bluez.mesh.Error.NotSupported - +SetTimer + + The element_index parameter is the element's index within the + node where the health server model is hosted. + The time parameter indicates how many seconds the attention + state shall be on. + PossibleErrors: + org.bluez.mesh.Error.NotSupported */ func (a *Attention1) SetTimer(element_index uint8, time uint16) error { return a.client.Call("SetTimer", 0, element_index, time).Store() } /* -GetTimer The element parameter is the unicast address within the node - where the health server model is hosted. - Returns the number of seconds for how long the attention action - remains staying on. - PossibleErrors: - org.bluez.mesh.Error.NotSupported - +GetTimer + + The element parameter is the unicast address within the node + where the health server model is hosted. + Returns the number of seconds for how long the attention action + remains staying on. + PossibleErrors: + org.bluez.mesh.Error.NotSupported */ func (a *Attention1) GetTimer(element uint16) (uint16, error) { var val0 uint16 diff --git a/bluez/profile/mesh/gen_Element1.go b/bluez/profile/mesh/gen_Element1.go index 9f771f72..dae4bedc 100644 --- a/bluez/profile/mesh/gen_Element1.go +++ b/bluez/profile/mesh/gen_Element1.go @@ -39,7 +39,6 @@ func NewElement1(servicePath string, objectPath dbus.ObjectPath) (*Element1, err /* Element1 Mesh Element Hierarchy - */ type Element1 struct { client *bluez.Client @@ -96,12 +95,12 @@ type Element1Properties struct { VendorModels []VendorOptionsItem } -//Lock access to properties +// Lock access to properties func (p *Element1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Element1Properties) Unlock() { p.lock.Unlock() } @@ -299,68 +298,71 @@ func (a *Element1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -MessageReceived This method is called by bluetooth-meshd daemon when a message - arrives addressed to the application. - The source parameter is unicast address of the remote - node-element that sent the message. - The key_index parameter indicates which application key has been - used to decode the incoming message. The same key_index should - be used by the application when sending a response to this - message (in case a response is expected). - The destination parameter contains the destination address of - received message. Underlying variant types are: - uint16 - Destination is an unicast address, or a well known - group address - array{byte} - Destination is a virtual address label - The data parameter is the incoming message. - +MessageReceived + + This method is called by bluetooth-meshd daemon when a message + arrives addressed to the application. + The source parameter is unicast address of the remote + node-element that sent the message. + The key_index parameter indicates which application key has been + used to decode the incoming message. The same key_index should + be used by the application when sending a response to this + message (in case a response is expected). + The destination parameter contains the destination address of + received message. Underlying variant types are: + uint16 + Destination is an unicast address, or a well known + group address + array{byte} + Destination is a virtual address label + The data parameter is the incoming message. */ func (a *Element1) MessageReceived(source uint16, key_index uint16, destination dbus.Variant, data []byte) error { return a.client.Call("MessageReceived", 0, source, key_index, destination, data).Store() } /* -DevKeyMessageReceived This method is called by meshd daemon when a message arrives - addressed to the application, which was sent with the remote - node's device key. - The source parameter is unicast address of the remote - node-element that sent the message. - The remote parameter if true indicates that the device key - used to decrypt the message was from the sender. False - indicates that the local nodes device key was used, and the - message has permissions to modify local states. - The net_index parameter indicates what subnet the message was - received on, and if a response is required, the same subnet - must be used to send the response. - The data parameter is the incoming message. - +DevKeyMessageReceived + + This method is called by meshd daemon when a message arrives + addressed to the application, which was sent with the remote + node's device key. + The source parameter is unicast address of the remote + node-element that sent the message. + The remote parameter if true indicates that the device key + used to decrypt the message was from the sender. False + indicates that the local nodes device key was used, and the + message has permissions to modify local states. + The net_index parameter indicates what subnet the message was + received on, and if a response is required, the same subnet + must be used to send the response. + The data parameter is the incoming message. */ func (a *Element1) DevKeyMessageReceived(source uint16, remote bool, net_index uint16, data []byte) error { return a.client.Call("DevKeyMessageReceived", 0, source, remote, net_index, data).Store() } /* -UpdateModelConfiguration This method is called by bluetooth-meshd daemon when a model's - configuration is updated. - The model_id parameter contains BT SIG Model Identifier or, if - Vendor key is present in config dictionary, a 16-bit - vendor-assigned Model Identifier. - The config parameter is a dictionary with the following keys - defined: - array{uint16} Bindings - Indices of application keys bound to the model - uint32 PublicationPeriod - Model publication period in milliseconds - uint16 Vendor - A 16-bit Bluetooth-assigned Company Identifier of the - vendor as defined by Bluetooth SIG - array{variant} Subscriptions - Addresses the model is subscribed to. - Each address is provided either as uint16 for group - addresses, or as array{byte} for virtual labels. - +UpdateModelConfiguration + + This method is called by bluetooth-meshd daemon when a model's + configuration is updated. + The model_id parameter contains BT SIG Model Identifier or, if + Vendor key is present in config dictionary, a 16-bit + vendor-assigned Model Identifier. + The config parameter is a dictionary with the following keys + defined: + array{uint16} Bindings + Indices of application keys bound to the model + uint32 PublicationPeriod + Model publication period in milliseconds + uint16 Vendor + A 16-bit Bluetooth-assigned Company Identifier of the + vendor as defined by Bluetooth SIG + array{variant} Subscriptions + Addresses the model is subscribed to. + Each address is provided either as uint16 for group + addresses, or as array{byte} for virtual labels. */ func (a *Element1) UpdateModelConfiguration(model_id uint16, config map[string]interface{}) error { return a.client.Call("UpdateModelConfiguration", 0, model_id, config).Store() diff --git a/bluez/profile/mesh/gen_Management1.go b/bluez/profile/mesh/gen_Management1.go index 11f6d41c..c3724bfb 100644 --- a/bluez/profile/mesh/gen_Management1.go +++ b/bluez/profile/mesh/gen_Management1.go @@ -38,7 +38,6 @@ func NewManagement1(objectPath dbus.ObjectPath) (*Management1, error) { /* Management1 Mesh Provisioning Hierarchy - */ type Management1 struct { client *bluez.Client @@ -54,12 +53,12 @@ type Management1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *Management1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Management1Properties) Unlock() { p.lock.Unlock() } @@ -202,23 +201,24 @@ func (a *Management1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -UnprovisionedScan This method is used by the application that supports - org.bluez.mesh.Provisioner1 interface to start listening - (scanning) for unprovisioned devices in the area. - The options parameter is a dictionary with the following keys - defined: - uint16 Seconds - Specifies number of seconds for scanning to be active. - If set to 0 or if this key is not present, then the - scanning will continue until UnprovisionedScanCancel() - or AddNode() methods are called. - Each time a unique unprovisioned beacon is heard, the - ScanResult() method on the app will be called with the result. - PossibleErrors: - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.NotAuthorized - org.bluez.mesh.Error.Busy - +UnprovisionedScan + + This method is used by the application that supports + org.bluez.mesh.Provisioner1 interface to start listening + (scanning) for unprovisioned devices in the area. + The options parameter is a dictionary with the following keys + defined: + uint16 Seconds + Specifies number of seconds for scanning to be active. + If set to 0 or if this key is not present, then the + scanning will continue until UnprovisionedScanCancel() + or AddNode() methods are called. + Each time a unique unprovisioned beacon is heard, the + ScanResult() method on the app will be called with the result. + PossibleErrors: + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.NotAuthorized + org.bluez.mesh.Error.Busy */ func (a *Management1) UnprovisionedScan(options map[string]interface{}) error { return a.client.Call("UnprovisionedScan", 0, options).Store() @@ -232,225 +232,237 @@ func (a *Management1) UnprovisionedScanCancel() error { } /* -AddNode This method is used by the application that supports - org.bluez.mesh.Provisioner1 interface to add the - unprovisioned device specified by uuid, to the Network. - The uuid parameter is a 16-byte array that contains Device UUID - of the unprovisioned device to be added to the network. - The options parameter is a dictionary that may contain - additional configuration info (currently an empty placeholder - for forward compatibility). - PossibleErrors: - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.NotAuthorized - +AddNode + + This method is used by the application that supports + org.bluez.mesh.Provisioner1 interface to add the + unprovisioned device specified by uuid, to the Network. + The uuid parameter is a 16-byte array that contains Device UUID + of the unprovisioned device to be added to the network. + The options parameter is a dictionary that may contain + additional configuration info (currently an empty placeholder + for forward compatibility). + PossibleErrors: + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.NotAuthorized */ func (a *Management1) AddNode(uuid []byte, options map[string]interface{}) error { return a.client.Call("AddNode", 0, uuid, options).Store() } /* -CreateSubnet This method is used by the application to generate and add a new - network subnet key. - The net_index parameter is a 12-bit value (0x001-0xFFF) - specifying which net key to add. - This call affects the local bluetooth-meshd key database only. - PossibleErrors: - org.bluez.mesh.Error.Failed - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.AlreadyExists - +CreateSubnet + + This method is used by the application to generate and add a new + network subnet key. + The net_index parameter is a 12-bit value (0x001-0xFFF) + specifying which net key to add. + This call affects the local bluetooth-meshd key database only. + PossibleErrors: + org.bluez.mesh.Error.Failed + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.AlreadyExists */ func (a *Management1) CreateSubnet(net_index uint16) error { return a.client.Call("CreateSubnet", 0, net_index).Store() } /* -ImportSubnet This method is used by the application to add a network subnet - key, that was originally generated by a remote Config Client. - The net_index parameter is a 12-bit value (0x000-0xFFF) - specifying which net key to add. - The net_key parameter is the 16-byte value of the net key being - imported. - This call affects the local bluetooth-meshd key database only. - PossibleErrors: - org.bluez.mesh.Error.Failed - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.AlreadyExists - +ImportSubnet + + This method is used by the application to add a network subnet + key, that was originally generated by a remote Config Client. + The net_index parameter is a 12-bit value (0x000-0xFFF) + specifying which net key to add. + The net_key parameter is the 16-byte value of the net key being + imported. + This call affects the local bluetooth-meshd key database only. + PossibleErrors: + org.bluez.mesh.Error.Failed + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.AlreadyExists */ func (a *Management1) ImportSubnet(net_index uint16, net_key []byte) error { return a.client.Call("ImportSubnet", 0, net_index, net_key).Store() } /* -UpdateSubnet This method is used by the application to generate a new network - subnet key, and set it's key refresh state to Phase 1. - The net_index parameter is a 12-bit value (0x000-0xFFF) - specifying which net key to update. Note that the subnet must - exist prior to updating. - This call affects the local bluetooth-meshd key database only. - PossibleErrors: - org.bluez.mesh.Error.Failed - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.DoesNotExist - org.bluez.mesh.Error.Busy - +UpdateSubnet + + This method is used by the application to generate a new network + subnet key, and set it's key refresh state to Phase 1. + The net_index parameter is a 12-bit value (0x000-0xFFF) + specifying which net key to update. Note that the subnet must + exist prior to updating. + This call affects the local bluetooth-meshd key database only. + PossibleErrors: + org.bluez.mesh.Error.Failed + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.DoesNotExist + org.bluez.mesh.Error.Busy */ func (a *Management1) UpdateSubnet(net_index uint16) error { return a.client.Call("UpdateSubnet", 0, net_index).Store() } /* -DeleteSubnet This method is used by the application that to delete a subnet. - The net_index parameter is a 12-bit value (0x001-0xFFF) - specifying which net key to delete. The primary net key (0x000) - may not be deleted. - This call affects the local bluetooth-meshd key database only. - PossibleErrors: - org.bluez.mesh.Error.InvalidArguments - +DeleteSubnet + + This method is used by the application that to delete a subnet. + The net_index parameter is a 12-bit value (0x001-0xFFF) + specifying which net key to delete. The primary net key (0x000) + may not be deleted. + This call affects the local bluetooth-meshd key database only. + PossibleErrors: + org.bluez.mesh.Error.InvalidArguments */ func (a *Management1) DeleteSubnet(net_index uint16) error { return a.client.Call("DeleteSubnet", 0, net_index).Store() } /* -SetKeyPhase This method is used to set the flooding key update phase of the - given subnet. When finalizing the procedure, it is important - to CompleteAppKeyUpdate() on all app keys that have been - updated during the procedure prior to setting phase 3. - The net_index parameter is a 12-bit value (0x000-0xFFF) - specifying which subnet phase to set. - The phase parameter is used to cycle the local key database - through the phases as defined by the Mesh Profile Specification. - Allowed values: - 0 - Cancel Key Refresh (May only be called from Phase 1, - and should never be called once the new key has - started propagating) - 1 - Invalid Argument (see NetKeyUpdate method) - 2 - Go to Phase 2 (May only be called from Phase 1) - 3 - Complete Key Refresh procedure (May only be called - from Phase 2) - This call affects the local bluetooth-meshd key database only. - It is the responsibility of the application to maintain the key - refresh phases per the Mesh Profile Specification. - PossibleErrors: - org.bluez.mesh.Error.Failed - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.DoesNotExist - +SetKeyPhase + + This method is used to set the flooding key update phase of the + given subnet. When finalizing the procedure, it is important + to CompleteAppKeyUpdate() on all app keys that have been + updated during the procedure prior to setting phase 3. + The net_index parameter is a 12-bit value (0x000-0xFFF) + specifying which subnet phase to set. + The phase parameter is used to cycle the local key database + through the phases as defined by the Mesh Profile Specification. + Allowed values: + 0 - Cancel Key Refresh (May only be called from Phase 1, + and should never be called once the new key has + started propagating) + 1 - Invalid Argument (see NetKeyUpdate method) + 2 - Go to Phase 2 (May only be called from Phase 1) + 3 - Complete Key Refresh procedure (May only be called + from Phase 2) + This call affects the local bluetooth-meshd key database only. + It is the responsibility of the application to maintain the key + refresh phases per the Mesh Profile Specification. + PossibleErrors: + org.bluez.mesh.Error.Failed + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.DoesNotExist */ func (a *Management1) SetKeyPhase(net_index uint16, phase uint8) error { return a.client.Call("SetKeyPhase", 0, net_index, phase).Store() } /* -CreateAppKey This method is used by the application to generate and add a new - application key. - The net_index parameter is a 12-bit value (0x000-0xFFF) - specifying which net key to bind the application key to. - The app_index parameter is a 12-bit value (0x000-0xFFF) - specifying which app key to add. - This call affects the local bluetooth-meshd key database only. - PossibleErrors: - org.bluez.mesh.Error.Failed - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.AlreadyExists - org.bluez.mesh.Error.DoesNotExist - +CreateAppKey + + This method is used by the application to generate and add a new + application key. + The net_index parameter is a 12-bit value (0x000-0xFFF) + specifying which net key to bind the application key to. + The app_index parameter is a 12-bit value (0x000-0xFFF) + specifying which app key to add. + This call affects the local bluetooth-meshd key database only. + PossibleErrors: + org.bluez.mesh.Error.Failed + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.AlreadyExists + org.bluez.mesh.Error.DoesNotExist */ func (a *Management1) CreateAppKey(net_index uint16, app_index uint16) error { return a.client.Call("CreateAppKey", 0, net_index, app_index).Store() } /* -ImportAppKey This method is used by the application to add an application - key, that was originally generated by a remote Config Client. - The net_index parameter is a 12-bit value (0x000-0xFFF) - specifying which net key to bind the application key to. - The app_index parameter is a 12-bit value (0x000-0xFFF) - specifying which app key to import. - The app_key parameter is the 16-byte value of the key being - imported. - This call affects the local bluetooth-meshd key database only. - PossibleErrors: - org.bluez.mesh.Error.Failed - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.AlreadyExists - org.bluez.mesh.Error.DoesNotExist - +ImportAppKey + + This method is used by the application to add an application + key, that was originally generated by a remote Config Client. + The net_index parameter is a 12-bit value (0x000-0xFFF) + specifying which net key to bind the application key to. + The app_index parameter is a 12-bit value (0x000-0xFFF) + specifying which app key to import. + The app_key parameter is the 16-byte value of the key being + imported. + This call affects the local bluetooth-meshd key database only. + PossibleErrors: + org.bluez.mesh.Error.Failed + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.AlreadyExists + org.bluez.mesh.Error.DoesNotExist */ func (a *Management1) ImportAppKey(net_index uint16, app_index uint16, app_key []byte) error { return a.client.Call("ImportAppKey", 0, net_index, app_index, app_key).Store() } /* -UpdateAppKey This method is used by the application to generate a new - application key. - The app_index parameter is a 12-bit value (0x000-0xFFF) - specifying which app key to update. Note that the subnet that - the key is bound to must exist and be in Phase 1. - This call affects the local bluetooth-meshd key database only. - PossibleErrors: - org.bluez.mesh.Error.Failed - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.DoesNotExist - org.bluez.mesh.Error.InProgress - +UpdateAppKey + + This method is used by the application to generate a new + application key. + The app_index parameter is a 12-bit value (0x000-0xFFF) + specifying which app key to update. Note that the subnet that + the key is bound to must exist and be in Phase 1. + This call affects the local bluetooth-meshd key database only. + PossibleErrors: + org.bluez.mesh.Error.Failed + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.DoesNotExist + org.bluez.mesh.Error.InProgress */ func (a *Management1) UpdateAppKey(app_index uint16) error { return a.client.Call("UpdateAppKey", 0, app_index).Store() } /* -DeleteAppKey This method is used by the application to delete an application - key. - The app_index parameter is a 12-bit value (0x000-0xFFF) - specifying which app key to delete. - This call affects the local bluetooth-meshd key database only. - PossibleErrors: - org.bluez.mesh.Error.InvalidArguments - +DeleteAppKey + + This method is used by the application to delete an application + key. + The app_index parameter is a 12-bit value (0x000-0xFFF) + specifying which app key to delete. + This call affects the local bluetooth-meshd key database only. + PossibleErrors: + org.bluez.mesh.Error.InvalidArguments */ func (a *Management1) DeleteAppKey(app_index uint16) error { return a.client.Call("DeleteAppKey", 0, app_index).Store() } /* -ImportRemoteNode This method is used by the application to import a remote node - that has been provisioned by an external process. - The primary parameter specifies the unicast address of the - the node being imported. - The count parameter specifies the number of elements that are - assigned to this remote node. - The device_key parameter is the access layer key that will be - will used to decrypt privledged messages from this remote node. - This call affects the local bluetooth-meshd key database only. - It is an error to call this with address range overlapping - with local element addresses. - PossibleErrors: - org.bluez.mesh.Error.Failed - org.bluez.mesh.Error.InvalidArguments - +ImportRemoteNode + + This method is used by the application to import a remote node + that has been provisioned by an external process. + The primary parameter specifies the unicast address of the + the node being imported. + The count parameter specifies the number of elements that are + assigned to this remote node. + The device_key parameter is the access layer key that will be + will used to decrypt privledged messages from this remote node. + This call affects the local bluetooth-meshd key database only. + It is an error to call this with address range overlapping + with local element addresses. + PossibleErrors: + org.bluez.mesh.Error.Failed + org.bluez.mesh.Error.InvalidArguments */ func (a *Management1) ImportRemoteNode(primary uint16, count uint8, device_key []byte) error { return a.client.Call("ImportRemoteNode", 0, primary, count, device_key).Store() } /* -DeleteRemoteNode This method is used by the application to delete a remote node - from the local device key database. - The primary parameter specifies the unicast address of the - the node being deleted. - The count parameter specifies the number of elements that were - assigned to the remote node. - This call affects the local bluetooth-meshd key database only. - It is an error to call this with address range overlapping - with local element addresses. - PossibleErrors: - org.bluez.mesh.Error.InvalidArguments - +DeleteRemoteNode + + This method is used by the application to delete a remote node + from the local device key database. + The primary parameter specifies the unicast address of the + the node being deleted. + The count parameter specifies the number of elements that were + assigned to the remote node. + This call affects the local bluetooth-meshd key database only. + It is an error to call this with address range overlapping + with local element addresses. + PossibleErrors: + org.bluez.mesh.Error.InvalidArguments */ func (a *Management1) DeleteRemoteNode(primary uint16, count uint8) error { return a.client.Call("DeleteRemoteNode", 0, primary, count).Store() diff --git a/bluez/profile/mesh/gen_Network1.go b/bluez/profile/mesh/gen_Network1.go index edd11ab7..590b082c 100644 --- a/bluez/profile/mesh/gen_Network1.go +++ b/bluez/profile/mesh/gen_Network1.go @@ -38,7 +38,6 @@ func NewNetwork1() (*Network1, error) { /* Network1 Mesh Network Hierarchy - */ type Network1 struct { client *bluez.Client @@ -54,12 +53,12 @@ type Network1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *Network1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Network1Properties) Unlock() { p.lock.Unlock() } @@ -202,30 +201,31 @@ func (a *Network1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -Join This is the first method that an application has to call to - become a provisioned node on a mesh network. The call will - initiate broadcasting of Unprovisioned Device Beacon. - The app_root parameter is a D-Bus object root path of - the application that implements org.bluez.mesh.Application1 - interface. The application represents a node where child mesh - elements have their own objects that implement - org.bluez.mesh.Element1 interface. The application hierarchy - also contains a provision agent object that implements - org.bluez.mesh.ProvisionAgent1 interface. The standard - DBus.ObjectManager interface must be available on the - app_root path. - The uuid parameter is a 16-byte array that contains Device UUID. - This UUID must be unique (at least from the daemon perspective), - therefore attempting to call this function using already - registered UUID results in an error. The composition of the UUID - octets must be in compliance with RFC 4122. - When provisioning finishes, the daemon will call either - JoinComplete or JoinFailed method on object implementing - org.bluez.mesh.Application1 interface. - PossibleErrors: - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.AlreadyExists, - +Join + + This is the first method that an application has to call to + become a provisioned node on a mesh network. The call will + initiate broadcasting of Unprovisioned Device Beacon. + The app_root parameter is a D-Bus object root path of + the application that implements org.bluez.mesh.Application1 + interface. The application represents a node where child mesh + elements have their own objects that implement + org.bluez.mesh.Element1 interface. The application hierarchy + also contains a provision agent object that implements + org.bluez.mesh.ProvisionAgent1 interface. The standard + DBus.ObjectManager interface must be available on the + app_root path. + The uuid parameter is a 16-byte array that contains Device UUID. + This UUID must be unique (at least from the daemon perspective), + therefore attempting to call this function using already + registered UUID results in an error. The composition of the UUID + octets must be in compliance with RFC 4122. + When provisioning finishes, the daemon will call either + JoinComplete or JoinFailed method on object implementing + org.bluez.mesh.Application1 interface. + PossibleErrors: + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.AlreadyExists, */ func (a *Network1) Join(app_root dbus.ObjectPath, uuid []byte) error { return a.client.Call("Join", 0, app_root, uuid).Store() @@ -239,59 +239,60 @@ func (a *Network1) Cancel() error { } /* -Attach This is the first method that an application must call to get - access to mesh node functionalities. - The app_root parameter is a D-Bus object root path of - the application that implements org.bluez.mesh.Application1 - interface. The application represents a node where child mesh - elements have their own objects that implement - org.bluez.mesh.Element1 interface. The standard - DBus.ObjectManager interface must be available on the - app_root path. - The token parameter is a 64-bit number that has been assigned to - the application when it first got provisioned/joined mesh - network, i.e. upon receiving JoinComplete() method. The daemon - uses the token to verify whether the application is authorized - to assume the mesh node identity. - In case of success, the method call returns mesh node object - (see Mesh Node Hierarchy section) and current configuration - settings. The return value of configuration parameter is an - array, where each entry is a structure that contains element - configuration. The element configuration structure is organized - as follows: - byte - Element index, identifies the element to which this - configuration entry pertains. - array{struct} - Models array where each entry is a structure with the - following members: - uint16 - Either a SIG Model Identifier or, if Vendor key - is present in model configuration dictionary, a - 16-bit vendor-assigned Model Identifier - dict - A dictionary that contains model configuration - with the following keys defined: - array{uint16} Bindings - Indices of application keys bound to the - model - uint32 PublicationPeriod - Model publication period in milliseconds - uint16 Vendor - A 16-bit Company ID as defined by the - Bluetooth SIG - array{variant} Subscriptions - Addresses the model is subscribed to. - Each address is provided either as - uint16 for group addresses, or - as array{byte} for virtual labels. - PossibleErrors: - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.NotFound, - org.bluez.mesh.Error.AlreadyExists, - org.bluez.mesh.Error.Busy, - org.bluez.mesh.Error.Failed - +Attach + + This is the first method that an application must call to get + access to mesh node functionalities. + The app_root parameter is a D-Bus object root path of + the application that implements org.bluez.mesh.Application1 + interface. The application represents a node where child mesh + elements have their own objects that implement + org.bluez.mesh.Element1 interface. The standard + DBus.ObjectManager interface must be available on the + app_root path. + The token parameter is a 64-bit number that has been assigned to + the application when it first got provisioned/joined mesh + network, i.e. upon receiving JoinComplete() method. The daemon + uses the token to verify whether the application is authorized + to assume the mesh node identity. + In case of success, the method call returns mesh node object + (see Mesh Node Hierarchy section) and current configuration + settings. The return value of configuration parameter is an + array, where each entry is a structure that contains element + configuration. The element configuration structure is organized + as follows: + byte + Element index, identifies the element to which this + configuration entry pertains. + array{struct} + Models array where each entry is a structure with the + following members: + uint16 + Either a SIG Model Identifier or, if Vendor key + is present in model configuration dictionary, a + 16-bit vendor-assigned Model Identifier + dict + A dictionary that contains model configuration + with the following keys defined: + array{uint16} Bindings + Indices of application keys bound to the + model + uint32 PublicationPeriod + Model publication period in milliseconds + uint16 Vendor + A 16-bit Company ID as defined by the + Bluetooth SIG + array{variant} Subscriptions + Addresses the model is subscribed to. + Each address is provided either as + uint16 for group addresses, or + as array{byte} for virtual labels. + PossibleErrors: + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.NotFound, + org.bluez.mesh.Error.AlreadyExists, + org.bluez.mesh.Error.Busy, + org.bluez.mesh.Error.Failed */ func (a *Network1) Attach(app_root dbus.ObjectPath, token uint64) (dbus.ObjectPath, []ConfigurationItem, error) { var val0 dbus.ObjectPath @@ -301,91 +302,94 @@ func (a *Network1) Attach(app_root dbus.ObjectPath, token uint64) (dbus.ObjectPa } /* -Leave This removes the configuration information about the mesh node - identified by the 64-bit token parameter. The token parameter - has been obtained as a result of successful Join() method call. - PossibleErrors: - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.NotFound - org.bluez.mesh.Error.Busy - +Leave + + This removes the configuration information about the mesh node + identified by the 64-bit token parameter. The token parameter + has been obtained as a result of successful Join() method call. + PossibleErrors: + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.NotFound + org.bluez.mesh.Error.Busy */ func (a *Network1) Leave(token uint64) error { return a.client.Call("Leave", 0, token).Store() } /* -CreateNetwork This is the first method that an application calls to become - a Provisioner node, and a Configuration Client on a newly - created Mesh Network. - The app_root parameter is a D-Bus object root path of the - application that implements org.bluez.mesh.Application1 - interface, and a org.bluez.mesh.Provisioner1 interface. The - application represents a node where child mesh elements have - their own objects that implement org.bluez.mesh.Element1 - interface. The application hierarchy also contains a provision - agent object that implements org.bluez.mesh.ProvisionAgent1 - interface. The standard DBus.ObjectManager interface must be - available on the app_root path. - The uuid parameter is a 16-byte array that contains Device UUID. - This UUID must be unique (at least from the daemon perspective), - therefore attempting to call this function using already - registered UUID results in an error. The composition of the UUID - octets must be in compliance with RFC 4122. - The other information the bluetooth-meshd daemon will preserve - about the initial node, is to give it the initial primary - unicast address (0x0001), and create and assign a net_key as the - primary network net_index (0x000). - Upon successful processing of Create() method, the daemon - will call JoinComplete method on object implementing - org.bluez.mesh.Application1. - PossibleErrors: - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.AlreadyExists, - +CreateNetwork + + This is the first method that an application calls to become + a Provisioner node, and a Configuration Client on a newly + created Mesh Network. + The app_root parameter is a D-Bus object root path of the + application that implements org.bluez.mesh.Application1 + interface, and a org.bluez.mesh.Provisioner1 interface. The + application represents a node where child mesh elements have + their own objects that implement org.bluez.mesh.Element1 + interface. The application hierarchy also contains a provision + agent object that implements org.bluez.mesh.ProvisionAgent1 + interface. The standard DBus.ObjectManager interface must be + available on the app_root path. + The uuid parameter is a 16-byte array that contains Device UUID. + This UUID must be unique (at least from the daemon perspective), + therefore attempting to call this function using already + registered UUID results in an error. The composition of the UUID + octets must be in compliance with RFC 4122. + The other information the bluetooth-meshd daemon will preserve + about the initial node, is to give it the initial primary + unicast address (0x0001), and create and assign a net_key as the + primary network net_index (0x000). + Upon successful processing of Create() method, the daemon + will call JoinComplete method on object implementing + org.bluez.mesh.Application1. + PossibleErrors: + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.AlreadyExists, */ func (a *Network1) CreateNetwork(app_root dbus.ObjectPath, uuid []byte) error { return a.client.Call("CreateNetwork", 0, app_root, uuid).Store() } /* -Import This method creates a local mesh node based on node - configuration that has been generated outside bluetooth-meshd. - The app_root parameter is a D-Bus object root path of the - application that implements org.bluez.mesh.Application1 - interface. - The uuid parameter is a 16-byte array that contains Device UUID. - This UUID must be unique (at least from the daemon perspective), - therefore attempting to call this function using already - registered UUID results in an error. The composition of the UUID - octets must be in compliance with RFC 4122. - The dev_key parameter is the 16-byte value of the dev key of - the imported mesh node. - Remaining parameters correspond to provisioning data: - The net_key and net_index parameters describe the network (or a - subnet, if net_index is not 0) the imported mesh node belongs - to. - The flags parameter is a dictionary containing provisioning - flags. Supported values are: - boolean IvUpdate - When true, indicates that the network is in the - middle of IV Index Update procedure. - boolean KeyRefresh - When true, indicates that the specified net key - is in the middle of a key refresh procedure. - The iv_index parameter is the current IV Index value used by - the network. This value is known by the provisioner. - The unicast parameter is the primary unicast address of the - imported node. - Upon successful processing of Import() method, the daemon will - call JoinComplete method on object implementing - org.bluez.mesh.Application1 interface. - PossibleErrors: - org.bluez.mesh.Error.InvalidArguments, - org.bluez.mesh.Error.AlreadyExists, - org.bluez.mesh.Error.NotSupported, - org.bluez.mesh.Error.Failed - +Import + + This method creates a local mesh node based on node + configuration that has been generated outside bluetooth-meshd. + The app_root parameter is a D-Bus object root path of the + application that implements org.bluez.mesh.Application1 + interface. + The uuid parameter is a 16-byte array that contains Device UUID. + This UUID must be unique (at least from the daemon perspective), + therefore attempting to call this function using already + registered UUID results in an error. The composition of the UUID + octets must be in compliance with RFC 4122. + The dev_key parameter is the 16-byte value of the dev key of + the imported mesh node. + Remaining parameters correspond to provisioning data: + The net_key and net_index parameters describe the network (or a + subnet, if net_index is not 0) the imported mesh node belongs + to. + The flags parameter is a dictionary containing provisioning + flags. Supported values are: + boolean IvUpdate + When true, indicates that the network is in the + middle of IV Index Update procedure. + boolean KeyRefresh + When true, indicates that the specified net key + is in the middle of a key refresh procedure. + The iv_index parameter is the current IV Index value used by + the network. This value is known by the provisioner. + The unicast parameter is the primary unicast address of the + imported node. + Upon successful processing of Import() method, the daemon will + call JoinComplete method on object implementing + org.bluez.mesh.Application1 interface. + PossibleErrors: + org.bluez.mesh.Error.InvalidArguments, + org.bluez.mesh.Error.AlreadyExists, + org.bluez.mesh.Error.NotSupported, + org.bluez.mesh.Error.Failed */ func (a *Network1) Import(app_root dbus.ObjectPath, uuid []byte, dev_key []byte, net_key []byte, net_index uint16, flags map[string]interface{}, iv_index uint32, unicast uint16) error { return a.client.Call("Import", 0, app_root, uuid, dev_key, net_key, net_index, flags, iv_index, unicast).Store() diff --git a/bluez/profile/mesh/gen_Node1.go b/bluez/profile/mesh/gen_Node1.go index 064d8e75..cb557b5e 100644 --- a/bluez/profile/mesh/gen_Node1.go +++ b/bluez/profile/mesh/gen_Node1.go @@ -38,7 +38,6 @@ func NewNode1(objectPath dbus.ObjectPath) (*Node1, error) { /* Node1 Mesh Node Hierarchy - */ type Node1 struct { client *bluez.Client @@ -123,12 +122,12 @@ type Node1Properties struct { SequenceNumber uint32 } -//Lock access to properties +// Lock access to properties func (p *Node1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Node1Properties) Unlock() { p.lock.Unlock() } @@ -390,152 +389,157 @@ func (a *Node1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -Send This method is used to send a message originated by a local - model. - The element_path parameter is the object path of an element from - a collection of the application elements (see Mesh Application - Hierarchy section). - The destination parameter contains the destination address. This - destination must be a uint16 to a unicast address, or a well - known group address. - The key_index parameter determines which application key to use - for encrypting the message. The key_index must be valid for that - element, i.e., the application key must be bound to a model on - this element. Otherwise, org.bluez.mesh.Error.NotAuthorized will - be returned. - The options parameter is a dictionary with the following keys - defined: - bool ForceSegmented - Specifies whether to force sending of a short - message as one-segment payload. If not present, - the default setting is "false". - The data parameter is an outgoing message to be encypted by the - bluetooth-meshd daemon and sent on. - Possible errors: - org.bluez.mesh.Error.NotAuthorized - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.NotFound - +Send + + This method is used to send a message originated by a local + model. + The element_path parameter is the object path of an element from + a collection of the application elements (see Mesh Application + Hierarchy section). + The destination parameter contains the destination address. This + destination must be a uint16 to a unicast address, or a well + known group address. + The key_index parameter determines which application key to use + for encrypting the message. The key_index must be valid for that + element, i.e., the application key must be bound to a model on + this element. Otherwise, org.bluez.mesh.Error.NotAuthorized will + be returned. + The options parameter is a dictionary with the following keys + defined: + bool ForceSegmented + Specifies whether to force sending of a short + message as one-segment payload. If not present, + the default setting is "false". + The data parameter is an outgoing message to be encypted by the + bluetooth-meshd daemon and sent on. + Possible errors: + org.bluez.mesh.Error.NotAuthorized + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.NotFound */ func (a *Node1) Send(element_path dbus.ObjectPath, destination uint16, key_index uint16, options map[string]interface{}, data []byte) error { return a.client.Call("Send", 0, element_path, destination, key_index, options, data).Store() } /* -DevKeySend This method is used to send a message originated by a local - model encoded with the device key of the remote node. - The element_path parameter is the object path of an element from - a collection of the application elements (see Mesh Application - Hierarchy section). - The destination parameter contains the destination address. This - destination must be a uint16 to a unicast address, or a well - known group address. - The remote parameter, if true, looks up the device key by the - destination address in the key database to encrypt the message. - If remote is true, but requested key does not exist, a NotFound - error will be returned. If set to false, the local node's - device key is used. - The net_index parameter is the subnet index of the network on - which the message is to be sent. - The options parameter is a dictionary with the following keys - defined: - bool ForceSegmented - Specifies whether to force sending of a short - message as one-segment payload. If not present, - the default setting is "false". - The data parameter is an outgoing message to be encypted by the - meshd daemon and sent on. - Possible errors: - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.NotFound - +DevKeySend + + This method is used to send a message originated by a local + model encoded with the device key of the remote node. + The element_path parameter is the object path of an element from + a collection of the application elements (see Mesh Application + Hierarchy section). + The destination parameter contains the destination address. This + destination must be a uint16 to a unicast address, or a well + known group address. + The remote parameter, if true, looks up the device key by the + destination address in the key database to encrypt the message. + If remote is true, but requested key does not exist, a NotFound + error will be returned. If set to false, the local node's + device key is used. + The net_index parameter is the subnet index of the network on + which the message is to be sent. + The options parameter is a dictionary with the following keys + defined: + bool ForceSegmented + Specifies whether to force sending of a short + message as one-segment payload. If not present, + the default setting is "false". + The data parameter is an outgoing message to be encypted by the + meshd daemon and sent on. + Possible errors: + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.NotFound */ func (a *Node1) DevKeySend(element_path dbus.ObjectPath, destination uint16, remote bool, net_index uint16, options map[string]interface{}, data []byte) error { return a.client.Call("DevKeySend", 0, element_path, destination, remote, net_index, options, data).Store() } /* -AddNetKey This method is used to send add or update network key originated - by the local configuration client to a remote configuration - server. - The element_path parameter is the object path of an element from - a collection of the application elements (see Mesh Application - Hierarchy section). - The destination parameter contains the destination address. This - destination must be a uint16 to a nodes primary unicast address. - The subnet_index parameter refers to the subnet index of the - network that is being added or updated. This key must exist in - the local key database. - The net_index parameter is the subnet index of the network on - which the message is to be sent. - The update parameter indicates if this is an addition or an - update. If true, the subnet key must be in the phase 1 state of - the key update procedure. - Possible errors: - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.NotFound - +AddNetKey + + This method is used to send add or update network key originated + by the local configuration client to a remote configuration + server. + The element_path parameter is the object path of an element from + a collection of the application elements (see Mesh Application + Hierarchy section). + The destination parameter contains the destination address. This + destination must be a uint16 to a nodes primary unicast address. + The subnet_index parameter refers to the subnet index of the + network that is being added or updated. This key must exist in + the local key database. + The net_index parameter is the subnet index of the network on + which the message is to be sent. + The update parameter indicates if this is an addition or an + update. If true, the subnet key must be in the phase 1 state of + the key update procedure. + Possible errors: + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.NotFound */ func (a *Node1) AddNetKey(element_path dbus.ObjectPath, destination uint16, subnet_index uint16, net_index uint16, update bool) error { return a.client.Call("AddNetKey", 0, element_path, destination, subnet_index, net_index, update).Store() } /* -AddAppKey This method is used to send add or update network key originated - by the local configuration client to a remote configuration - server. - The element_path parameter is the object path of an element from - a collection of the application elements (see Mesh Application - Hierarchy section). - The destination parameter contains the destination address. This - destination must be a uint16 to a nodes primary unicast address. - The app_index parameter refers to the application key which is - being added or updated. This key must exist in the local key - database. - The net_index parameter is the subnet index of the network on - which the message is to be sent. - The update parameter indicates if this is an addition or an - update. If true, the subnet key must be in the phase 1 state of - the key update procedure. - Possible errors: - org.bluez.mesh.Error.InvalidArguments - org.bluez.mesh.Error.NotFound - +AddAppKey + + This method is used to send add or update network key originated + by the local configuration client to a remote configuration + server. + The element_path parameter is the object path of an element from + a collection of the application elements (see Mesh Application + Hierarchy section). + The destination parameter contains the destination address. This + destination must be a uint16 to a nodes primary unicast address. + The app_index parameter refers to the application key which is + being added or updated. This key must exist in the local key + database. + The net_index parameter is the subnet index of the network on + which the message is to be sent. + The update parameter indicates if this is an addition or an + update. If true, the subnet key must be in the phase 1 state of + the key update procedure. + Possible errors: + org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.NotFound */ func (a *Node1) AddAppKey(element_path dbus.ObjectPath, destination uint16, app_index uint16, net_index uint16, update bool) error { return a.client.Call("AddAppKey", 0, element_path, destination, app_index, net_index, update).Store() } /* -Publish This method is used to send a publication originated by a local - model. If the model does not exist, or it has no publication - record, the method returns org.bluez.mesh.Error.DoesNotExist - error. - The element_path parameter is the object path of an element from - a collection of the application elements (see Mesh Application - Hierarchy section). - The model parameter contains a model ID, as defined by the - Bluetooth SIG. If the options dictionary contains a "Vendor" - key, then this ID is defined by the specified vendor. - The options parameter is a dictionary with the following keys - defined: - bool ForceSegmented - Specifies whether to force sending of a short - message as one-segment payload. If not present, - the default setting is "false". - uint16 Vendor - A 16-bit Company ID as defined by the - Bluetooth SIG. This key should only exist when - publishing on a Vendor defined model. - The data parameter is an outgoing message to be encypted by the - meshd daemon and sent on. - Since only one Publish record may exist per element-model, the - destination and key_index are obtained from the Publication - record cached by the daemon. - Possible errors: - org.bluez.mesh.Error.DoesNotExist - org.bluez.mesh.Error.InvalidArguments - +Publish + + This method is used to send a publication originated by a local + model. If the model does not exist, or it has no publication + record, the method returns org.bluez.mesh.Error.DoesNotExist + error. + The element_path parameter is the object path of an element from + a collection of the application elements (see Mesh Application + Hierarchy section). + The model parameter contains a model ID, as defined by the + Bluetooth SIG. If the options dictionary contains a "Vendor" + key, then this ID is defined by the specified vendor. + The options parameter is a dictionary with the following keys + defined: + bool ForceSegmented + Specifies whether to force sending of a short + message as one-segment payload. If not present, + the default setting is "false". + uint16 Vendor + A 16-bit Company ID as defined by the + Bluetooth SIG. This key should only exist when + publishing on a Vendor defined model. + The data parameter is an outgoing message to be encypted by the + meshd daemon and sent on. + Since only one Publish record may exist per element-model, the + destination and key_index are obtained from the Publication + record cached by the daemon. + Possible errors: + org.bluez.mesh.Error.DoesNotExist + org.bluez.mesh.Error.InvalidArguments */ func (a *Node1) Publish(element_path dbus.ObjectPath, model uint16, options map[string]interface{}, data []byte) error { return a.client.Call("Publish", 0, element_path, model, options, data).Store() diff --git a/bluez/profile/mesh/gen_ProvisionAgent1.go b/bluez/profile/mesh/gen_ProvisionAgent1.go index 313e56ab..3275ab05 100644 --- a/bluez/profile/mesh/gen_ProvisionAgent1.go +++ b/bluez/profile/mesh/gen_ProvisionAgent1.go @@ -39,7 +39,6 @@ func NewProvisionAgent1(servicePath string, objectPath dbus.ObjectPath) (*Provis /* ProvisionAgent1 Provisioning Agent Hierarchy - */ type ProvisionAgent1 struct { client *bluez.Client @@ -95,12 +94,12 @@ type ProvisionAgent1Properties struct { URI string } -//Lock access to properties +// Lock access to properties func (p *ProvisionAgent1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *ProvisionAgent1Properties) Unlock() { p.lock.Unlock() } @@ -270,17 +269,18 @@ func (a *ProvisionAgent1) UnwatchProperties(ch chan *bluez.PropertyChanged) erro } /* -PrivateKey This method is called during provisioning if the Provisioner - has requested Out-Of-Band ECC key exchange. The Private key is - returned to the Daemon, and the Public Key is delivered to the - remote Provisioner using a method that does not involve the - Bluetooth Mesh system. The Private Key returned must be 32 - octets in size, or the Provisioning procedure will fail and be - canceled. - This function will only be called if the Provisioner has - requested pre-determined keys to be exchanged Out-of-Band, and - the local role is Unprovisioned device. - +PrivateKey + + This method is called during provisioning if the Provisioner + has requested Out-Of-Band ECC key exchange. The Private key is + returned to the Daemon, and the Public Key is delivered to the + remote Provisioner using a method that does not involve the + Bluetooth Mesh system. The Private Key returned must be 32 + octets in size, or the Provisioning procedure will fail and be + canceled. + This function will only be called if the Provisioner has + requested pre-determined keys to be exchanged Out-of-Band, and + the local role is Unprovisioned device. */ func (a *ProvisionAgent1) PrivateKey() ([]byte, error) { val0 := []byte{} @@ -289,16 +289,17 @@ func (a *ProvisionAgent1) PrivateKey() ([]byte, error) { } /* -PublicKey This method is called during provisioning if the local device is - the Provisioner, and is requestng Out-Of-Band ECC key exchange. - The Public key is returned to the Daemon that is the matched - pair of the Private key of the remote device. The Public Key - returned must be 64 octets in size, or the Provisioning - procedure will fail and be canceled. - This function will only be called if the Provisioner has - requested pre-determined keys to be exchanged Out-of-Band, and - the local role is Provisioner. - +PublicKey + + This method is called during provisioning if the local device is + the Provisioner, and is requestng Out-Of-Band ECC key exchange. + The Public key is returned to the Daemon that is the matched + pair of the Private key of the remote device. The Public Key + returned must be 64 octets in size, or the Provisioning + procedure will fail and be canceled. + This function will only be called if the Provisioner has + requested pre-determined keys to be exchanged Out-of-Band, and + the local role is Provisioner. */ func (a *ProvisionAgent1) PublicKey() ([]byte, error) { val0 := []byte{} @@ -307,49 +308,52 @@ func (a *ProvisionAgent1) PublicKey() ([]byte, error) { } /* -DisplayString This method is called when the Daemon has something important - for the Agent to Display, but does not require any additional - input locally. For instance: "Enter "ABCDE" on remote device". +DisplayString + This method is called when the Daemon has something important + for the Agent to Display, but does not require any additional + input locally. For instance: "Enter "ABCDE" on remote device". */ func (a *ProvisionAgent1) DisplayString(value string) error { return a.client.Call("DisplayString", 0, value).Store() } /* -DisplayNumeric This method is called when the Daemon has something important - for the Agent to Display, but does not require any additional - input locally. For instance: "Enter 14939264 on remote device". - The type parameter indicates the display method. Allowed values - are: - "blink" - Locally blink LED - "beep" - Locally make a noise - "vibrate" - Locally vibrate - "out-numeric" - Display value to enter remotely - "push" - Request pushes on remote button - "twist" - Request twists on remote knob - The number parameter is the specific value represented by the - Prompt. - +DisplayNumeric + + This method is called when the Daemon has something important + for the Agent to Display, but does not require any additional + input locally. For instance: "Enter 14939264 on remote device". + The type parameter indicates the display method. Allowed values + are: + "blink" - Locally blink LED + "beep" - Locally make a noise + "vibrate" - Locally vibrate + "out-numeric" - Display value to enter remotely + "push" - Request pushes on remote button + "twist" - Request twists on remote knob + The number parameter is the specific value represented by the + Prompt. */ func (a *ProvisionAgent1) DisplayNumeric(type1 string, number uint32) error { return a.client.Call("DisplayNumeric", 0, type1, number).Store() } /* -PromptNumeric This method is called when the Daemon requests the user to - enter a decimal value between 1-99999999. - The type parameter indicates the input method. Allowed values - are: - "blink" - Enter times remote LED blinked - "beep" - Enter times remote device beeped - "vibrate" - Enter times remote device vibrated - "in-numeric" - Enter remotely displayed value - "push" - Push local button remotely requested times - "twist" - Twist local knob remotely requested times - This agent should prompt the user for specific input. For - instance: "Enter value being displayed by remote device". - +PromptNumeric + + This method is called when the Daemon requests the user to + enter a decimal value between 1-99999999. + The type parameter indicates the input method. Allowed values + are: + "blink" - Enter times remote LED blinked + "beep" - Enter times remote device beeped + "vibrate" - Enter times remote device vibrated + "in-numeric" - Enter remotely displayed value + "push" - Push local button remotely requested times + "twist" - Twist local knob remotely requested times + This agent should prompt the user for specific input. For + instance: "Enter value being displayed by remote device". */ func (a *ProvisionAgent1) PromptNumeric(type1 string) (uint32, error) { var val0 uint32 @@ -358,18 +362,19 @@ func (a *ProvisionAgent1) PromptNumeric(type1 string) (uint32, error) { } /* -PromptStatic This method is called when the Daemon requires a 16 octet byte - array, as an Out-of-Band authentication. - The type parameter indicates the input method. Allowed values - are: - "static-oob" - return 16 octet array - "in-alpha" - return 16 octet alpha array - The Static data returned must be 16 octets in size, or the - Provisioning procedure will fail and be canceled. If input type - is "in-alpha", the printable characters should be - left-justified, with trailing 0x00 octets filling the remaining - bytes. - +PromptStatic + + This method is called when the Daemon requires a 16 octet byte + array, as an Out-of-Band authentication. + The type parameter indicates the input method. Allowed values + are: + "static-oob" - return 16 octet array + "in-alpha" - return 16 octet alpha array + The Static data returned must be 16 octets in size, or the + Provisioning procedure will fail and be canceled. If input type + is "in-alpha", the printable characters should be + left-justified, with trailing 0x00 octets filling the remaining + bytes. */ func (a *ProvisionAgent1) PromptStatic(type1 string) ([]byte, error) { val0 := []byte{} @@ -378,10 +383,11 @@ func (a *ProvisionAgent1) PromptStatic(type1 string) ([]byte, error) { } /* -Cancel This method gets called by the daemon to cancel any existing - Agent Requests. When called, any pending user input should be - canceled, and any display requests removed. +Cancel + This method gets called by the daemon to cancel any existing + Agent Requests. When called, any pending user input should be + canceled, and any display requests removed. */ func (a *ProvisionAgent1) Cancel() error { return a.client.Call("Cancel", 0).Store() diff --git a/bluez/profile/mesh/gen_Provisioner1.go b/bluez/profile/mesh/gen_Provisioner1.go index 5a7c97b0..938ad865 100644 --- a/bluez/profile/mesh/gen_Provisioner1.go +++ b/bluez/profile/mesh/gen_Provisioner1.go @@ -39,7 +39,6 @@ func NewProvisioner1(servicePath string, objectPath dbus.ObjectPath) (*Provision /* Provisioner1 Mesh Provisioner Hierarchy - */ type Provisioner1 struct { client *bluez.Client @@ -55,12 +54,12 @@ type Provisioner1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *Provisioner1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Provisioner1Properties) Unlock() { p.lock.Unlock() } @@ -203,41 +202,43 @@ func (a *Provisioner1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -ScanResult The method is called from the bluetooth-meshd daemon when a - unique UUID has been seen during UnprovisionedScan() for - unprovsioned devices. - The rssi parameter is a signed, normalized measurement of the - signal strength of the recieved unprovisioned beacon. - The data parameter is a variable length byte array, that may - have 1, 2 or 3 distinct fields contained in it including the 16 - byte remote device UUID (always), a 16 bit mask of OOB - authentication flags (optional), and a 32 bit URI hash (if URI - bit set in OOB mask). Whether these fields exist or not is a - decision of the remote device. - The options parameter is a dictionary that may contain - additional scan result info (currently an empty placeholder for - forward compatibility). - If a beacon with a UUID that has already been reported is - recieved by the daemon, it will be silently discarded unless it - was recieved at a higher rssi power level. - +ScanResult + + The method is called from the bluetooth-meshd daemon when a + unique UUID has been seen during UnprovisionedScan() for + unprovsioned devices. + The rssi parameter is a signed, normalized measurement of the + signal strength of the recieved unprovisioned beacon. + The data parameter is a variable length byte array, that may + have 1, 2 or 3 distinct fields contained in it including the 16 + byte remote device UUID (always), a 16 bit mask of OOB + authentication flags (optional), and a 32 bit URI hash (if URI + bit set in OOB mask). Whether these fields exist or not is a + decision of the remote device. + The options parameter is a dictionary that may contain + additional scan result info (currently an empty placeholder for + forward compatibility). + If a beacon with a UUID that has already been reported is + recieved by the daemon, it will be silently discarded unless it + was recieved at a higher rssi power level. */ func (a *Provisioner1) ScanResult(rssi int16, data []byte, options map[string]interface{}) error { return a.client.Call("ScanResult", 0, rssi, data, options).Store() } /* -RequestProvData This method is implemented by a Provisioner capable application - and is called when the remote device has been fully - authenticated and confirmed. - The count parameter is the number of consecutive unicast - addresses the remote device is requesting. - Return Parameters are from the Mesh Profile Spec: - net_index - Subnet index of the net_key - unicast - Primary Unicast address of the new node - PossibleErrors: - org.bluez.mesh.Error.Abort - +RequestProvData + + This method is implemented by a Provisioner capable application + and is called when the remote device has been fully + authenticated and confirmed. + The count parameter is the number of consecutive unicast + addresses the remote device is requesting. + Return Parameters are from the Mesh Profile Spec: + net_index - Subnet index of the net_key + unicast - Primary Unicast address of the new node + PossibleErrors: + org.bluez.mesh.Error.Abort */ func (a *Provisioner1) RequestProvData(count uint8) (uint16, error) { var val0 uint16 @@ -246,31 +247,33 @@ func (a *Provisioner1) RequestProvData(count uint8) (uint16, error) { } /* -AddNodeComplete This method is called when the node provisioning initiated - by an AddNode() method call successfully completed. - The unicast parameter is the primary address that has been - assigned to the new node, and the address of it's config server. - The count parameter is the number of unicast addresses assigned - to the new node. - The new node may now be sent messages using the credentials - supplied by the RequestProvData method. - +AddNodeComplete + + This method is called when the node provisioning initiated + by an AddNode() method call successfully completed. + The unicast parameter is the primary address that has been + assigned to the new node, and the address of it's config server. + The count parameter is the number of unicast addresses assigned + to the new node. + The new node may now be sent messages using the credentials + supplied by the RequestProvData method. */ func (a *Provisioner1) AddNodeComplete(uuid []byte, unicast uint16, count uint8) error { return a.client.Call("AddNodeComplete", 0, uuid, unicast, count).Store() } /* -AddNodeFailed This method is called when the node provisioning initiated by - AddNode() has failed. Depending on how far Provisioning - proceeded before failing, some cleanup of cached data may be - required. - The reason parameter identifies the reason for provisioning - failure. The defined values are: "aborted", "timeout", - "bad-pdu", "confirmation-failed", "out-of-resources", - "decryption-error", "unexpected-error", - "cannot-assign-addresses". - +AddNodeFailed + + This method is called when the node provisioning initiated by + AddNode() has failed. Depending on how far Provisioning + proceeded before failing, some cleanup of cached data may be + required. + The reason parameter identifies the reason for provisioning + failure. The defined values are: "aborted", "timeout", + "bad-pdu", "confirmation-failed", "out-of-resources", + "decryption-error", "unexpected-error", + "cannot-assign-addresses". */ func (a *Provisioner1) AddNodeFailed(uuid []byte, reason string) error { return a.client.Call("AddNodeFailed", 0, uuid, reason).Store() diff --git a/bluez/profile/network/gen_Network1.go b/bluez/profile/network/gen_Network1.go index 6648d6d5..19992754 100644 --- a/bluez/profile/network/gen_Network1.go +++ b/bluez/profile/network/gen_Network1.go @@ -38,7 +38,6 @@ func NewNetwork1(objectPath dbus.ObjectPath) (*Network1, error) { /* Network1 Network hierarchy - */ type Network1 struct { client *bluez.Client @@ -69,12 +68,12 @@ type Network1Properties struct { UUID string } -//Lock access to properties +// Lock access to properties func (p *Network1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Network1Properties) Unlock() { p.lock.Unlock() } @@ -259,18 +258,19 @@ func (a *Network1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -Connect Connect to the network device and return the network - interface name. Examples of the interface name are - bnep0, bnep1 etc. - uuid can be either one of "gn", "panu" or "nap" (case - insensitive) or a traditional string representation of - UUID or a hexadecimal number. - The connection will be closed and network device - released either upon calling Disconnect() or when - the client disappears from the message bus. - Possible errors: org.bluez.Error.AlreadyConnected - org.bluez.Error.ConnectionAttemptFailed - +Connect + + Connect to the network device and return the network + interface name. Examples of the interface name are + bnep0, bnep1 etc. + uuid can be either one of "gn", "panu" or "nap" (case + insensitive) or a traditional string representation of + UUID or a hexadecimal number. + The connection will be closed and network device + released either upon calling Disconnect() or when + the client disappears from the message bus. + Possible errors: org.bluez.Error.AlreadyConnected + org.bluez.Error.ConnectionAttemptFailed */ func (a *Network1) Connect(uuid string) (string, error) { var val0 string @@ -279,11 +279,12 @@ func (a *Network1) Connect(uuid string) (string, error) { } /* -Disconnect Disconnect from the network device. - To abort a connection attempt in case of errors or - timeouts in the client it is fine to call this method. - Possible errors: org.bluez.Error.Failed +Disconnect + Disconnect from the network device. + To abort a connection attempt in case of errors or + timeouts in the client it is fine to call this method. + Possible errors: org.bluez.Error.Failed */ func (a *Network1) Disconnect() error { return a.client.Call("Disconnect", 0).Store() diff --git a/bluez/profile/network/gen_NetworkServer1.go b/bluez/profile/network/gen_NetworkServer1.go index dd11ecd9..260f3aac 100644 --- a/bluez/profile/network/gen_NetworkServer1.go +++ b/bluez/profile/network/gen_NetworkServer1.go @@ -38,7 +38,6 @@ func NewNetworkServer1(objectPath dbus.ObjectPath) (*NetworkServer1, error) { /* NetworkServer1 Network server hierarchy - */ type NetworkServer1 struct { client *bluez.Client @@ -54,12 +53,12 @@ type NetworkServer1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *NetworkServer1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *NetworkServer1Properties) Unlock() { p.lock.Unlock() } @@ -202,25 +201,27 @@ func (a *NetworkServer1) UnwatchProperties(ch chan *bluez.PropertyChanged) error } /* -Register Register server for the provided UUID. Every new - connection to this server will be added the bridge - interface. - Valid UUIDs are "gn", "panu" or "nap". - Initially no network server SDP is provided. Only - after this method a SDP record will be available - and the BNEP server will be ready for incoming - connections. - +Register + + Register server for the provided UUID. Every new + connection to this server will be added the bridge + interface. + Valid UUIDs are "gn", "panu" or "nap". + Initially no network server SDP is provided. Only + after this method a SDP record will be available + and the BNEP server will be ready for incoming + connections. */ func (a *NetworkServer1) Register(uuid string, bridge string) error { return a.client.Call("Register", 0, uuid, bridge).Store() } /* -Unregister Unregister the server for provided UUID. - All servers will be automatically unregistered when - the calling application terminates. +Unregister + Unregister the server for provided UUID. + All servers will be automatically unregistered when + the calling application terminates. */ func (a *NetworkServer1) Unregister(uuid string) error { return a.client.Call("Unregister", 0, uuid).Store() diff --git a/bluez/profile/obex/gen_FileTransfer.go b/bluez/profile/obex/gen_FileTransfer.go index ce6f8b70..05780c06 100644 --- a/bluez/profile/obex/gen_FileTransfer.go +++ b/bluez/profile/obex/gen_FileTransfer.go @@ -38,7 +38,6 @@ func NewFileTransfer(objectPath dbus.ObjectPath) (*FileTransfer, error) { /* FileTransfer File Transfer hierarchy - */ type FileTransfer struct { client *bluez.Client @@ -54,12 +53,12 @@ type FileTransferProperties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *FileTransferProperties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *FileTransferProperties) Unlock() { p.lock.Unlock() } @@ -202,40 +201,43 @@ func (a *FileTransfer) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -ChangeFolder Change the current folder of the remote device. - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Failed +ChangeFolder + Change the current folder of the remote device. + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Failed */ func (a *FileTransfer) ChangeFolder(folder string) error { return a.client.Call("ChangeFolder", 0, folder).Store() } /* -CreateFolder Create a new folder in the remote device. - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Failed +CreateFolder + Create a new folder in the remote device. + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Failed */ func (a *FileTransfer) CreateFolder(folder string) error { return a.client.Call("CreateFolder", 0, folder).Store() } /* -ListFolder Returns a dictionary containing information about - the current folder content. - The following keys are defined: - string Name : Object name in UTF-8 format - string Type : Either "folder" or "file" - uint64 Size : Object size or number of items in - folder - string Permission : Group, owner and other - permission - uint64 Modified : Last change - uint64 Accessed : Last access - uint64 Created : Creation date - Possible errors: org.bluez.obex.Error.Failed - +ListFolder + + Returns a dictionary containing information about + the current folder content. + The following keys are defined: + string Name : Object name in UTF-8 format + string Type : Either "folder" or "file" + uint64 Size : Object size or number of items in + folder + string Permission : Group, owner and other + permission + uint64 Modified : Last change + uint64 Accessed : Last access + uint64 Created : Creation date + Possible errors: org.bluez.obex.Error.Failed */ func (a *FileTransfer) ListFolder() ([]map[string]interface{}, error) { val0 := []map[string]interface{}{} @@ -244,18 +246,19 @@ func (a *FileTransfer) ListFolder() ([]map[string]interface{}, error) { } /* -GetFile Copy the source file (from remote device) to the - target file (on local filesystem). - If an empty target file is given, a name will be - automatically calculated for the temporary file. - The returned path represents the newly created transfer, - which should be used to find out if the content has been - successfully transferred or if the operation fails. - The properties of this transfer are also returned along - with the object path, to avoid a call to GetProperties. - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Failed - +GetFile + + Copy the source file (from remote device) to the + target file (on local filesystem). + If an empty target file is given, a name will be + automatically calculated for the temporary file. + The returned path represents the newly created transfer, + which should be used to find out if the content has been + successfully transferred or if the operation fails. + The properties of this transfer are also returned along + with the object path, to avoid a call to GetProperties. + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Failed */ func (a *FileTransfer) GetFile(targetfile string, sourcefile string) (dbus.ObjectPath, map[string]interface{}, error) { var val0 dbus.ObjectPath @@ -265,16 +268,17 @@ func (a *FileTransfer) GetFile(targetfile string, sourcefile string) (dbus.Objec } /* -PutFile Copy the source file (from local filesystem) to the - target file (on remote device). - The returned path represents the newly created transfer, - which should be used to find out if the content has been - successfully transferred or if the operation fails. - The properties of this transfer are also returned along - with the object path, to avoid a call to GetProperties. - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Failed - +PutFile + + Copy the source file (from local filesystem) to the + target file (on remote device). + The returned path represents the newly created transfer, + which should be used to find out if the content has been + successfully transferred or if the operation fails. + The properties of this transfer are also returned along + with the object path, to avoid a call to GetProperties. + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Failed */ func (a *FileTransfer) PutFile(sourcefile string, targetfile string) (dbus.ObjectPath, map[string]interface{}, error) { var val0 dbus.ObjectPath @@ -284,32 +288,35 @@ func (a *FileTransfer) PutFile(sourcefile string, targetfile string) (dbus.Objec } /* -CopyFile Copy a file within the remote device from source file - to target file. - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Failed +CopyFile + Copy a file within the remote device from source file + to target file. + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Failed */ func (a *FileTransfer) CopyFile(sourcefile string, targetfile string) error { return a.client.Call("CopyFile", 0, sourcefile, targetfile).Store() } /* -MoveFile Move a file within the remote device from source file - to the target file. - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Failed +MoveFile + Move a file within the remote device from source file + to the target file. + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Failed */ func (a *FileTransfer) MoveFile(sourcefile string, targetfile string) error { return a.client.Call("MoveFile", 0, sourcefile, targetfile).Store() } /* -Delete Deletes the specified file/folder. - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Failed +Delete + Deletes the specified file/folder. + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Failed */ func (a *FileTransfer) Delete(file string) error { return a.client.Call("Delete", 0, file).Store() diff --git a/bluez/profile/obex/gen_Message1.go b/bluez/profile/obex/gen_Message1.go index cfe8cee8..8b285fff 100644 --- a/bluez/profile/obex/gen_Message1.go +++ b/bluez/profile/obex/gen_Message1.go @@ -38,7 +38,6 @@ func NewMessage1(objectPath dbus.ObjectPath) (*Message1, error) { /* Message1 Message hierarchy - */ type Message1 struct { client *bluez.Client @@ -139,12 +138,12 @@ type Message1Properties struct { Type string } -//Lock access to properties +// Lock access to properties func (p *Message1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Message1Properties) Unlock() { p.lock.Unlock() } @@ -497,17 +496,18 @@ func (a *Message1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -Get Download message and store it in the target file. - If an empty target file is given, a temporary file - will be automatically generated. - The returned path represents the newly created transfer, - which should be used to find out if the content has been - successfully transferred or if the operation fails. - The properties of this transfer are also returned along - with the object path, to avoid a call to GetProperties. - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Failed - +Get + + Download message and store it in the target file. + If an empty target file is given, a temporary file + will be automatically generated. + The returned path represents the newly created transfer, + which should be used to find out if the content has been + successfully transferred or if the operation fails. + The properties of this transfer are also returned along + with the object path, to avoid a call to GetProperties. + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Failed */ func (a *Message1) Get(targetfile string, attachment bool) (dbus.ObjectPath, map[string]interface{}, error) { var val0 dbus.ObjectPath diff --git a/bluez/profile/obex/gen_MessageAccess1.go b/bluez/profile/obex/gen_MessageAccess1.go index c0cd37d2..bd6632ed 100644 --- a/bluez/profile/obex/gen_MessageAccess1.go +++ b/bluez/profile/obex/gen_MessageAccess1.go @@ -38,7 +38,6 @@ func NewMessageAccess1(objectPath dbus.ObjectPath) (*MessageAccess1, error) { /* MessageAccess1 Message Access hierarchy - */ type MessageAccess1 struct { client *bluez.Client @@ -54,12 +53,12 @@ type MessageAccess1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *MessageAccess1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *MessageAccess1Properties) Unlock() { p.lock.Unlock() } @@ -202,25 +201,27 @@ func (a *MessageAccess1) UnwatchProperties(ch chan *bluez.PropertyChanged) error } /* -SetFolder Set working directory for current session, *name* may - be the directory name or '..[/dir]'. - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Failed +SetFolder + Set working directory for current session, *name* may + be the directory name or '..[/dir]'. + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Failed */ func (a *MessageAccess1) SetFolder(name string) error { return a.client.Call("SetFolder", 0, name).Store() } /* -ListFolders Returns a dictionary containing information about - the current folder content. - The following keys are defined: - string Name : Folder name - Possible filters: Offset and MaxCount - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Failed - +ListFolders + + Returns a dictionary containing information about + the current folder content. + The following keys are defined: + string Name : Folder name + Possible filters: Offset and MaxCount + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Failed */ func (a *MessageAccess1) ListFolders(filter map[string]interface{}) ([]map[string]interface{}, error) { val0 := []map[string]interface{}{} @@ -229,10 +230,11 @@ func (a *MessageAccess1) ListFolders(filter map[string]interface{}) ([]map[strin } /* -ListFilterFields Return all available fields that can be used in Fields - filter. - Possible errors: None +ListFilterFields + Return all available fields that can be used in Fields + filter. + Possible errors: None */ func (a *MessageAccess1) ListFilterFields() ([]string, error) { val0 := []string{} @@ -241,59 +243,60 @@ func (a *MessageAccess1) ListFilterFields() ([]string, error) { } /* -ListMessages Returns an array containing the messages found in the - given subfolder of the current folder, or in the - current folder if folder is empty. - Possible Filters: Offset, MaxCount, SubjectLength, Fields, - Type, PeriodStart, PeriodEnd, Status, Recipient, Sender, - Priority - Each message is represented by an object path followed - by a dictionary of the properties. - Properties: - string Subject: - Message subject - string Timestamp: - Message timestamp - string Sender: - Message sender name - string SenderAddress: - Message sender address - string ReplyTo: - Message Reply-To address - string Recipient: - Message recipient name - string RecipientAddress: - Message recipient address - string Type: - Message type - Possible values: "email", "sms-gsm", - "sms-cdma" and "mms" - uint64 Size: - Message size in bytes - boolean Text: - Message text flag - Specifies whether message has textual - content or is binary only - string Status: - Message status - Possible values for received messages: - "complete", "fractioned", "notification" - Possible values for sent messages: - "delivery-success", "sending-success", - "delivery-failure", "sending-failure" - uint64 AttachmentSize: - Message overall attachment size in bytes - boolean Priority: - Message priority flag - boolean Read: - Message read flag - boolean Sent: - Message sent flag - boolean Protected: - Message protected flag - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Failed - +ListMessages + + Returns an array containing the messages found in the + given subfolder of the current folder, or in the + current folder if folder is empty. + Possible Filters: Offset, MaxCount, SubjectLength, Fields, + Type, PeriodStart, PeriodEnd, Status, Recipient, Sender, + Priority + Each message is represented by an object path followed + by a dictionary of the properties. + Properties: + string Subject: + Message subject + string Timestamp: + Message timestamp + string Sender: + Message sender name + string SenderAddress: + Message sender address + string ReplyTo: + Message Reply-To address + string Recipient: + Message recipient name + string RecipientAddress: + Message recipient address + string Type: + Message type + Possible values: "email", "sms-gsm", + "sms-cdma" and "mms" + uint64 Size: + Message size in bytes + boolean Text: + Message text flag + Specifies whether message has textual + content or is binary only + string Status: + Message status + Possible values for received messages: + "complete", "fractioned", "notification" + Possible values for sent messages: + "delivery-success", "sending-success", + "delivery-failure", "sending-failure" + uint64 AttachmentSize: + Message overall attachment size in bytes + boolean Priority: + Message priority flag + boolean Read: + Message read flag + boolean Sent: + Message sent flag + boolean Protected: + Message protected flag + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Failed */ func (a *MessageAccess1) ListMessages(folder string, filter map[string]interface{}) ([]Message, error) { val0 := []Message{} diff --git a/bluez/profile/obex/gen_PhonebookAccess1.go b/bluez/profile/obex/gen_PhonebookAccess1.go index 9e0af17a..d406de07 100644 --- a/bluez/profile/obex/gen_PhonebookAccess1.go +++ b/bluez/profile/obex/gen_PhonebookAccess1.go @@ -38,7 +38,6 @@ func NewPhonebookAccess1(objectPath dbus.ObjectPath) (*PhonebookAccess1, error) /* PhonebookAccess1 Phonebook Access hierarchy - */ type PhonebookAccess1 struct { client *bluez.Client @@ -91,12 +90,12 @@ type PhonebookAccess1Properties struct { SecondaryCounter string } -//Lock access to properties +// Lock access to properties func (p *PhonebookAccess1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *PhonebookAccess1Properties) Unlock() { p.lock.Unlock() } @@ -309,46 +308,48 @@ func (a *PhonebookAccess1) UnwatchProperties(ch chan *bluez.PropertyChanged) err } /* -Select Select the phonebook object for other operations. Should - be call before all the other operations. - location : Where the phonebook is stored, possible - inputs : - "int" ( "internal" which is default ) - "sim" ( "sim1" ) - "sim2" - ... - phonebook : Possible inputs : - "pb" : phonebook for the saved contacts - "ich": incoming call history - "och": outgoing call history - "mch": missing call history - "cch": combination of ich och mch - "spd": speed dials entry ( only for "internal" ) - "fav": favorites entry ( only for "internal" ) - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Failed - +Select + + Select the phonebook object for other operations. Should + be call before all the other operations. + location : Where the phonebook is stored, possible + inputs : + "int" ( "internal" which is default ) + "sim" ( "sim1" ) + "sim2" + ... + phonebook : Possible inputs : + "pb" : phonebook for the saved contacts + "ich": incoming call history + "och": outgoing call history + "mch": missing call history + "cch": combination of ich och mch + "spd": speed dials entry ( only for "internal" ) + "fav": favorites entry ( only for "internal" ) + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Failed */ func (a *PhonebookAccess1) Select(location string, phonebook string) error { return a.client.Call("Select", 0, location, phonebook).Store() } /* -PullAll Return the entire phonebook object from the PSE server - in plain string with vcard format, and store it in - a local file. - If an empty target file is given, a name will be - automatically calculated for the temporary file. - The returned path represents the newly created transfer, - which should be used to find out if the content has been - successfully transferred or if the operation fails. - The properties of this transfer are also returned along - with the object path, to avoid a call to GetProperties. - Possible filters: Format, Order, Offset, MaxCount and - Fields - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Forbidden - +PullAll + + Return the entire phonebook object from the PSE server + in plain string with vcard format, and store it in + a local file. + If an empty target file is given, a name will be + automatically calculated for the temporary file. + The returned path represents the newly created transfer, + which should be used to find out if the content has been + successfully transferred or if the operation fails. + The properties of this transfer are also returned along + with the object path, to avoid a call to GetProperties. + Possible filters: Format, Order, Offset, MaxCount and + Fields + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Forbidden */ func (a *PhonebookAccess1) PullAll(targetfile string, filters map[string]interface{}) (dbus.ObjectPath, map[string]interface{}, error) { var val0 dbus.ObjectPath @@ -358,14 +359,15 @@ func (a *PhonebookAccess1) PullAll(targetfile string, filters map[string]interfa } /* -List Return an array of vcard-listing data where every entry - consists of a pair of strings containing the vcard - handle and the contact name. For example: - "1.vcf" : "John" - Possible filters: Order, Offset and MaxCount - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Forbidden - +List + + Return an array of vcard-listing data where every entry + consists of a pair of strings containing the vcard + handle and the contact name. For example: + "1.vcf" : "John" + Possible filters: Order, Offset and MaxCount + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Forbidden */ func (a *PhonebookAccess1) List(filters map[string]interface{}) ([]VCardItem, error) { val0 := []VCardItem{} @@ -374,20 +376,21 @@ func (a *PhonebookAccess1) List(filters map[string]interface{}) ([]VCardItem, er } /* -Pull Given a vcard handle, retrieve the vcard in the current - phonebook object and store it in a local file. - If an empty target file is given, a name will be - automatically calculated for the temporary file. - The returned path represents the newly created transfer, - which should be used to find out if the content has been - successfully transferred or if the operation fails. - The properties of this transfer are also returned along - with the object path, to avoid a call to GetProperties. - Possbile filters: Format and Fields - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Forbidden - org.bluez.obex.Error.Failed - +Pull + + Given a vcard handle, retrieve the vcard in the current + phonebook object and store it in a local file. + If an empty target file is given, a name will be + automatically calculated for the temporary file. + The returned path represents the newly created transfer, + which should be used to find out if the content has been + successfully transferred or if the operation fails. + The properties of this transfer are also returned along + with the object path, to avoid a call to GetProperties. + Possbile filters: Format and Fields + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Forbidden + org.bluez.obex.Error.Failed */ func (a *PhonebookAccess1) Pull(vcard string, targetfile string, filters map[string]interface{}) (dbus.ObjectPath, map[string]interface{}, error) { var val0 dbus.ObjectPath @@ -397,19 +400,20 @@ func (a *PhonebookAccess1) Pull(vcard string, targetfile string, filters map[str } /* -Search Search for entries matching the given condition and - return an array of vcard-listing data where every entry - consists of a pair of strings containing the vcard - handle and the contact name. - vcard : name paired string match the search condition. - field : the field in the vcard to search with - { "name" (default) | "number" | "sound" } - value : the string value to search for - Possible filters: Order, Offset and MaxCount - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Forbidden - org.bluez.obex.Error.Failed - +Search + + Search for entries matching the given condition and + return an array of vcard-listing data where every entry + consists of a pair of strings containing the vcard + handle and the contact name. + vcard : name paired string match the search condition. + field : the field in the vcard to search with + { "name" (default) | "number" | "sound" } + value : the string value to search for + Possible filters: Order, Offset and MaxCount + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Forbidden + org.bluez.obex.Error.Failed */ func (a *PhonebookAccess1) Search(field string, value string, filters map[string]interface{}) ([]VCardItem, error) { val0 := []VCardItem{} @@ -418,12 +422,13 @@ func (a *PhonebookAccess1) Search(field string, value string, filters map[string } /* -GetSize Return the number of entries in the selected phonebook - object that are actually used (i.e. indexes that - correspond to non-NULL entries). - Possible errors: org.bluez.obex.Error.Forbidden - org.bluez.obex.Error.Failed +GetSize + Return the number of entries in the selected phonebook + object that are actually used (i.e. indexes that + correspond to non-NULL entries). + Possible errors: org.bluez.obex.Error.Forbidden + org.bluez.obex.Error.Failed */ func (a *PhonebookAccess1) GetSize() (uint16, error) { var val0 uint16 @@ -432,21 +437,23 @@ func (a *PhonebookAccess1) GetSize() (uint16, error) { } /* -UpdateVersion Attempt to update PrimaryCounter and SecondaryCounter. - Possible errors: org.bluez.obex.Error.NotSupported - org.bluez.obex.Error.Forbidden - org.bluez.obex.Error.Failed +UpdateVersion + Attempt to update PrimaryCounter and SecondaryCounter. + Possible errors: org.bluez.obex.Error.NotSupported + org.bluez.obex.Error.Forbidden + org.bluez.obex.Error.Failed */ func (a *PhonebookAccess1) UpdateVersion() error { return a.client.Call("UpdateVersion", 0).Store() } /* -ListFilterFields Return All Available fields that can be used in Fields - filter. - Possible errors: None +ListFilterFields + Return All Available fields that can be used in Fields + filter. + Possible errors: None */ func (a *PhonebookAccess1) ListFilterFields() ([]string, error) { val0 := []string{} diff --git a/bluez/profile/obex/gen_Synchronization1.go b/bluez/profile/obex/gen_Synchronization1.go index eca34524..f8032049 100644 --- a/bluez/profile/obex/gen_Synchronization1.go +++ b/bluez/profile/obex/gen_Synchronization1.go @@ -38,7 +38,6 @@ func NewSynchronization1(objectPath dbus.ObjectPath) (*Synchronization1, error) /* Synchronization1 Synchronization hierarchy - */ type Synchronization1 struct { client *bluez.Client @@ -54,12 +53,12 @@ type Synchronization1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *Synchronization1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Synchronization1Properties) Unlock() { p.lock.Unlock() } @@ -202,35 +201,37 @@ func (a *Synchronization1) UnwatchProperties(ch chan *bluez.PropertyChanged) err } /* -SetLocation Set the phonebook object store location for other - operations. Should be called before all the other - operations. - location: Where the phonebook is stored, possible - values: - "int" ( "internal" which is default ) - "sim1" - "sim2" - ...... - Possible errors: org.bluez.obex.Error.InvalidArguments - +SetLocation + + Set the phonebook object store location for other + operations. Should be called before all the other + operations. + location: Where the phonebook is stored, possible + values: + "int" ( "internal" which is default ) + "sim1" + "sim2" + ...... + Possible errors: org.bluez.obex.Error.InvalidArguments */ func (a *Synchronization1) SetLocation(location string) error { return a.client.Call("SetLocation", 0, location).Store() } /* -GetPhonebook Retrieve an entire Phonebook Object store from remote - device, and stores it in a local file. - If an empty target file is given, a name will be - automatically calculated for the temporary file. - The returned path represents the newly created transfer, - which should be used to find out if the content has been - successfully transferred or if the operation fails. - The properties of this transfer are also returned along - with the object path, to avoid a call to GetProperties. - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Failed - +GetPhonebook + + Retrieve an entire Phonebook Object store from remote + device, and stores it in a local file. + If an empty target file is given, a name will be + automatically calculated for the temporary file. + The returned path represents the newly created transfer, + which should be used to find out if the content has been + successfully transferred or if the operation fails. + The properties of this transfer are also returned along + with the object path, to avoid a call to GetProperties. + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Failed */ func (a *Synchronization1) GetPhonebook(targetfile string) (dbus.ObjectPath, map[string]interface{}, error) { var val0 dbus.ObjectPath @@ -240,15 +241,16 @@ func (a *Synchronization1) GetPhonebook(targetfile string) (dbus.ObjectPath, map } /* -PutPhonebook Send an entire Phonebook Object store to remote device. - The returned path represents the newly created transfer, - which should be used to find out if the content has been - successfully transferred or if the operation fails. - The properties of this transfer are also returned along - with the object path, to avoid a call to GetProperties. - Possible errors: org.bluez.obex.Error.InvalidArguments - org.bluez.obex.Error.Failed - +PutPhonebook + + Send an entire Phonebook Object store to remote device. + The returned path represents the newly created transfer, + which should be used to find out if the content has been + successfully transferred or if the operation fails. + The properties of this transfer are also returned along + with the object path, to avoid a call to GetProperties. + Possible errors: org.bluez.obex.Error.InvalidArguments + org.bluez.obex.Error.Failed */ func (a *Synchronization1) PutPhonebook(sourcefile string) (dbus.ObjectPath, map[string]interface{}, error) { var val0 dbus.ObjectPath diff --git a/bluez/profile/obex_agent/gen_Agent1.go b/bluez/profile/obex_agent/gen_Agent1.go index 69c02d41..6be64814 100644 --- a/bluez/profile/obex_agent/gen_Agent1.go +++ b/bluez/profile/obex_agent/gen_Agent1.go @@ -39,7 +39,6 @@ func NewAgent1(servicePath string, objectPath dbus.ObjectPath) (*Agent1, error) /* Agent1 Agent hierarchy - */ type Agent1 struct { client *bluez.Client @@ -55,12 +54,12 @@ type Agent1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *Agent1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Agent1Properties) Unlock() { p.lock.Unlock() } @@ -203,27 +202,29 @@ func (a *Agent1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -Release This method gets called when the service daemon - unregisters the agent. An agent can use it to do - cleanup tasks. There is no need to unregister the - agent, because when this method gets called it has - already been unregistered. +Release + This method gets called when the service daemon + unregisters the agent. An agent can use it to do + cleanup tasks. There is no need to unregister the + agent, because when this method gets called it has + already been unregistered. */ func (a *Agent1) Release() error { return a.client.Call("Release", 0).Store() } /* -AuthorizePush This method gets called when the service daemon - needs to accept/reject a Bluetooth object push request. - Returns the full path (including the filename) where - the object shall be stored. The tranfer object will - contain a Filename property that contains the default - location and name that can be returned. - Possible errors: org.bluez.obex.Error.Rejected - org.bluez.obex.Error.Canceled - +AuthorizePush + + This method gets called when the service daemon + needs to accept/reject a Bluetooth object push request. + Returns the full path (including the filename) where + the object shall be stored. The tranfer object will + contain a Filename property that contains the default + location and name that can be returned. + Possible errors: org.bluez.obex.Error.Rejected + org.bluez.obex.Error.Canceled */ func (a *Agent1) AuthorizePush(transfer dbus.ObjectPath) (string, error) { var val0 string @@ -232,10 +233,11 @@ func (a *Agent1) AuthorizePush(transfer dbus.ObjectPath) (string, error) { } /* -Cancel This method gets called to indicate that the agent - request failed before a reply was returned. It cancels - the previous request. +Cancel + This method gets called to indicate that the agent + request failed before a reply was returned. It cancels + the previous request. */ func (a *Agent1) Cancel() error { return a.client.Call("Cancel", 0).Store() diff --git a/bluez/profile/obex_agent/gen_AgentManager1.go b/bluez/profile/obex_agent/gen_AgentManager1.go index fb654733..81052aae 100644 --- a/bluez/profile/obex_agent/gen_AgentManager1.go +++ b/bluez/profile/obex_agent/gen_AgentManager1.go @@ -38,7 +38,6 @@ func NewAgentManager1() (*AgentManager1, error) { /* AgentManager1 Agent Manager hierarchy - */ type AgentManager1 struct { client *bluez.Client @@ -54,12 +53,12 @@ type AgentManager1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *AgentManager1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *AgentManager1Properties) Unlock() { p.lock.Unlock() } @@ -202,22 +201,24 @@ func (a *AgentManager1) UnwatchProperties(ch chan *bluez.PropertyChanged) error } /* -RegisterAgent Register an agent to request authorization of - the user to accept/reject objects. Object push - service needs to authorize each received object. - Possible errors: org.bluez.obex.Error.AlreadyExists +RegisterAgent + Register an agent to request authorization of + the user to accept/reject objects. Object push + service needs to authorize each received object. + Possible errors: org.bluez.obex.Error.AlreadyExists */ func (a *AgentManager1) RegisterAgent(agent dbus.ObjectPath) error { return a.client.Call("RegisterAgent", 0, agent).Store() } /* -UnregisterAgent This unregisters the agent that has been previously - registered. The object path parameter must match the - same value that has been used on registration. - Possible errors: org.bluez.obex.Error.DoesNotExist +UnregisterAgent + This unregisters the agent that has been previously + registered. The object path parameter must match the + same value that has been used on registration. + Possible errors: org.bluez.obex.Error.DoesNotExist */ func (a *AgentManager1) UnregisterAgent(agent dbus.ObjectPath) error { return a.client.Call("UnregisterAgent", 0, agent).Store() diff --git a/bluez/profile/profile/gen_Profile1.go b/bluez/profile/profile/gen_Profile1.go index ceb7b87b..7d9af8db 100644 --- a/bluez/profile/profile/gen_Profile1.go +++ b/bluez/profile/profile/gen_Profile1.go @@ -31,7 +31,6 @@ func NewProfile1(servicePath string, objectPath dbus.ObjectPath) (*Profile1, err /* Profile1 Profile hierarchy - */ type Profile1 struct { client *bluez.Client @@ -47,12 +46,12 @@ type Profile1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *Profile1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Profile1Properties) Unlock() { p.lock.Unlock() } @@ -109,44 +108,47 @@ func (a *Profile1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error) { } /* -Release This method gets called when the service daemon - unregisters the profile. A profile can use it to do - cleanup tasks. There is no need to unregister the - profile, because when this method gets called it has - already been unregistered. +Release + This method gets called when the service daemon + unregisters the profile. A profile can use it to do + cleanup tasks. There is no need to unregister the + profile, because when this method gets called it has + already been unregistered. */ func (a *Profile1) Release() error { return a.client.Call("Release", 0).Store() } /* -NewConnection This method gets called when a new service level - connection has been made and authorized. - Common fd_properties: - uint16 Version Profile version (optional) - uint16 Features Profile features (optional) - Possible errors: org.bluez.Error.Rejected - org.bluez.Error.Canceled - +NewConnection + + This method gets called when a new service level + connection has been made and authorized. + Common fd_properties: + uint16 Version Profile version (optional) + uint16 Features Profile features (optional) + Possible errors: org.bluez.Error.Rejected + org.bluez.Error.Canceled */ func (a *Profile1) NewConnection(device dbus.ObjectPath, fd int32, fd_properties map[string]interface{}) error { return a.client.Call("NewConnection", 0, device, fd, fd_properties).Store() } /* -RequestDisconnection This method gets called when a profile gets - disconnected. - The file descriptor is no longer owned by the service - daemon and the profile implementation needs to take - care of cleaning up all connections. - If multiple file descriptors are indicated via - NewConnection, it is expected that all of them - are disconnected before returning from this - method call. - Possible errors: org.bluez.Error.Rejected - org.bluez.Error.Canceled - +RequestDisconnection + + This method gets called when a profile gets + disconnected. + The file descriptor is no longer owned by the service + daemon and the profile implementation needs to take + care of cleaning up all connections. + If multiple file descriptors are indicated via + NewConnection, it is expected that all of them + are disconnected before returning from this + method call. + Possible errors: org.bluez.Error.Rejected + org.bluez.Error.Canceled */ func (a *Profile1) RequestDisconnection(device dbus.ObjectPath) error { return a.client.Call("RequestDisconnection", 0, device).Store() diff --git a/bluez/profile/profile/gen_ProfileManager1.go b/bluez/profile/profile/gen_ProfileManager1.go index d3cb7769..fbe88aaf 100644 --- a/bluez/profile/profile/gen_ProfileManager1.go +++ b/bluez/profile/profile/gen_ProfileManager1.go @@ -30,7 +30,6 @@ func NewProfileManager1() (*ProfileManager1, error) { /* ProfileManager1 Profile Manager hierarchy - */ type ProfileManager1 struct { client *bluez.Client @@ -46,12 +45,12 @@ type ProfileManager1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *ProfileManager1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *ProfileManager1Properties) Unlock() { p.lock.Unlock() } @@ -108,84 +107,86 @@ func (a *ProfileManager1) GetObjectManagerSignal() (chan *dbus.Signal, func(), e } /* -RegisterProfile This registers a profile implementation. - If an application disconnects from the bus all - its registered profiles will be removed. - Some predefined services: - HFP AG UUID: 0000111f-0000-1000-8000-00805f9b34fb - Default profile Version is 1.7, profile Features - is 0b001001 and RFCOMM channel is 13. - Authentication is required. - HFP HS UUID: 0000111e-0000-1000-8000-00805f9b34fb - Default profile Version is 1.7, profile Features - is 0b000000 and RFCOMM channel is 7. - Authentication is required. - HSP AG UUID: 00001112-0000-1000-8000-00805f9b34fb - Default profile Version is 1.2, RFCOMM channel - is 12 and Authentication is required. Does not - support any Features, option is ignored. - HSP HS UUID: 00001108-0000-1000-8000-00805f9b34fb - Default profile Version is 1.2, profile Features - is 0b0 and RFCOMM channel is 6. Authentication - is required. Features is one bit value, specify - capability of Remote Audio Volume Control - (by default turned off). - Available options: - string Name - Human readable name for the profile - string Service - The primary service class UUID - (if different from the actual - profile UUID) - string Role - For asymmetric profiles that do not - have UUIDs available to uniquely - identify each side this - parameter allows specifying the - precise local role. - Possible values: "client", "server" - uint16 Channel - RFCOMM channel number that is used - for client and server UUIDs. - If applicable it will be used in the - SDP record as well. - uint16 PSM - PSM number that is used for client - and server UUIDs. - If applicable it will be used in the - SDP record as well. - boolean RequireAuthentication - Pairing is required before connections - will be established. No devices will - be connected if not paired. - boolean RequireAuthorization - Request authorization before any - connection will be established. - boolean AutoConnect - In case of a client UUID this will - force connection of the RFCOMM or - L2CAP channels when a remote device - is connected. - string ServiceRecord - Provide a manual SDP record. - uint16 Version - Profile version (for SDP record) - uint16 Features - Profile features (for SDP record) - Possible errors: org.bluez.Error.InvalidArguments - org.bluez.Error.AlreadyExists - +RegisterProfile + + This registers a profile implementation. + If an application disconnects from the bus all + its registered profiles will be removed. + Some predefined services: + HFP AG UUID: 0000111f-0000-1000-8000-00805f9b34fb + Default profile Version is 1.7, profile Features + is 0b001001 and RFCOMM channel is 13. + Authentication is required. + HFP HS UUID: 0000111e-0000-1000-8000-00805f9b34fb + Default profile Version is 1.7, profile Features + is 0b000000 and RFCOMM channel is 7. + Authentication is required. + HSP AG UUID: 00001112-0000-1000-8000-00805f9b34fb + Default profile Version is 1.2, RFCOMM channel + is 12 and Authentication is required. Does not + support any Features, option is ignored. + HSP HS UUID: 00001108-0000-1000-8000-00805f9b34fb + Default profile Version is 1.2, profile Features + is 0b0 and RFCOMM channel is 6. Authentication + is required. Features is one bit value, specify + capability of Remote Audio Volume Control + (by default turned off). + Available options: + string Name + Human readable name for the profile + string Service + The primary service class UUID + (if different from the actual + profile UUID) + string Role + For asymmetric profiles that do not + have UUIDs available to uniquely + identify each side this + parameter allows specifying the + precise local role. + Possible values: "client", "server" + uint16 Channel + RFCOMM channel number that is used + for client and server UUIDs. + If applicable it will be used in the + SDP record as well. + uint16 PSM + PSM number that is used for client + and server UUIDs. + If applicable it will be used in the + SDP record as well. + boolean RequireAuthentication + Pairing is required before connections + will be established. No devices will + be connected if not paired. + boolean RequireAuthorization + Request authorization before any + connection will be established. + boolean AutoConnect + In case of a client UUID this will + force connection of the RFCOMM or + L2CAP channels when a remote device + is connected. + string ServiceRecord + Provide a manual SDP record. + uint16 Version + Profile version (for SDP record) + uint16 Features + Profile features (for SDP record) + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.AlreadyExists */ func (a *ProfileManager1) RegisterProfile(profile dbus.ObjectPath, uuid string, options map[string]interface{}) error { return a.client.Call("RegisterProfile", 0, profile, uuid, options).Store() } /* -UnregisterProfile This unregisters the profile that has been previously - registered. The object path parameter must match the - same value that has been used on registration. - Possible errors: org.bluez.Error.DoesNotExist +UnregisterProfile + This unregisters the profile that has been previously + registered. The object path parameter must match the + same value that has been used on registration. + Possible errors: org.bluez.Error.DoesNotExist */ func (a *ProfileManager1) UnregisterProfile(profile dbus.ObjectPath) error { return a.client.Call("UnregisterProfile", 0, profile).Store() diff --git a/bluez/profile/sap/gen_SimAccess1.go b/bluez/profile/sap/gen_SimAccess1.go index a056be22..bf5652c1 100644 --- a/bluez/profile/sap/gen_SimAccess1.go +++ b/bluez/profile/sap/gen_SimAccess1.go @@ -38,7 +38,6 @@ func NewSimAccess1(objectPath dbus.ObjectPath) (*SimAccess1, error) { /* SimAccess1 Sim Access Profile hierarchy - */ type SimAccess1 struct { client *bluez.Client @@ -59,12 +58,12 @@ type SimAccess1Properties struct { Connected bool } -//Lock access to properties +// Lock access to properties func (p *SimAccess1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *SimAccess1Properties) Unlock() { p.lock.Unlock() } @@ -221,9 +220,10 @@ func (a *SimAccess1) UnwatchProperties(ch chan *bluez.PropertyChanged) error { } /* -Disconnect Disconnects SAP client from the server. - Possible errors: org.bluez.Error.Failed +Disconnect + Disconnects SAP client from the server. + Possible errors: org.bluez.Error.Failed */ func (a *SimAccess1) Disconnect() error { return a.client.Call("Disconnect", 0).Store() diff --git a/bluez/profile/thermometer/gen_Thermometer1.go b/bluez/profile/thermometer/gen_Thermometer1.go index fa8b3642..565f17f7 100644 --- a/bluez/profile/thermometer/gen_Thermometer1.go +++ b/bluez/profile/thermometer/gen_Thermometer1.go @@ -38,7 +38,6 @@ func NewThermometer1(objectPath dbus.ObjectPath) (*Thermometer1, error) { /* Thermometer1 Health Thermometer Profile hierarchy - */ type Thermometer1 struct { client *bluez.Client @@ -82,12 +81,12 @@ type Thermometer1Properties struct { Minimum uint16 } -//Lock access to properties +// Lock access to properties func (p *Thermometer1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *Thermometer1Properties) Unlock() { p.lock.Unlock() } diff --git a/bluez/profile/thermometer/gen_ThermometerManager1.go b/bluez/profile/thermometer/gen_ThermometerManager1.go index b06f0c0f..16607569 100644 --- a/bluez/profile/thermometer/gen_ThermometerManager1.go +++ b/bluez/profile/thermometer/gen_ThermometerManager1.go @@ -38,7 +38,6 @@ func NewThermometerManager1(objectPath dbus.ObjectPath) (*ThermometerManager1, e /* ThermometerManager1 Health Thermometer Manager hierarchy - */ type ThermometerManager1 struct { client *bluez.Client @@ -54,12 +53,12 @@ type ThermometerManager1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *ThermometerManager1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *ThermometerManager1Properties) Unlock() { p.lock.Unlock() } @@ -202,43 +201,47 @@ func (a *ThermometerManager1) UnwatchProperties(ch chan *bluez.PropertyChanged) } /* -RegisterWatcher Registers a watcher to monitor scanned measurements. - This agent will be notified about final temperature - measurements. - Possible Errors: org.bluez.Error.InvalidArguments +RegisterWatcher + Registers a watcher to monitor scanned measurements. + This agent will be notified about final temperature + measurements. + Possible Errors: org.bluez.Error.InvalidArguments */ func (a *ThermometerManager1) RegisterWatcher(agent dbus.ObjectPath) error { return a.client.Call("RegisterWatcher", 0, agent).Store() } /* -UnregisterWatcher Unregisters a watcher. +UnregisterWatcher + Unregisters a watcher. */ func (a *ThermometerManager1) UnregisterWatcher(agent dbus.ObjectPath) error { return a.client.Call("UnregisterWatcher", 0, agent).Store() } /* -EnableIntermediateMeasurement Enables intermediate measurement notifications - for this agent. Intermediate measurements will - be enabled only for thermometers which support it. - Possible Errors: org.bluez.Error.InvalidArguments +EnableIntermediateMeasurement + Enables intermediate measurement notifications + for this agent. Intermediate measurements will + be enabled only for thermometers which support it. + Possible Errors: org.bluez.Error.InvalidArguments */ func (a *ThermometerManager1) EnableIntermediateMeasurement(agent dbus.ObjectPath) error { return a.client.Call("EnableIntermediateMeasurement", 0, agent).Store() } /* -DisableIntermediateMeasurement Disables intermediate measurement notifications - for this agent. It will disable notifications in - thermometers when the last agent removes the - watcher for intermediate measurements. - Possible Errors: org.bluez.Error.InvalidArguments - org.bluez.Error.NotFound - +DisableIntermediateMeasurement + + Disables intermediate measurement notifications + for this agent. It will disable notifications in + thermometers when the last agent removes the + watcher for intermediate measurements. + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound */ func (a *ThermometerManager1) DisableIntermediateMeasurement(agent dbus.ObjectPath) error { return a.client.Call("DisableIntermediateMeasurement", 0, agent).Store() diff --git a/bluez/profile/thermometer/gen_ThermometerWatcher1.go b/bluez/profile/thermometer/gen_ThermometerWatcher1.go index 7756d84d..e02d7d3f 100644 --- a/bluez/profile/thermometer/gen_ThermometerWatcher1.go +++ b/bluez/profile/thermometer/gen_ThermometerWatcher1.go @@ -39,7 +39,6 @@ func NewThermometerWatcher1(servicePath string, objectPath dbus.ObjectPath) (*Th /* ThermometerWatcher1 Health Thermometer Watcher hierarchy - */ type ThermometerWatcher1 struct { client *bluez.Client @@ -55,12 +54,12 @@ type ThermometerWatcher1Properties struct { lock sync.RWMutex `dbus:"ignore"` } -//Lock access to properties +// Lock access to properties func (p *ThermometerWatcher1Properties) Lock() { p.lock.Lock() } -//Unlock access to properties +// Unlock access to properties func (p *ThermometerWatcher1Properties) Unlock() { p.lock.Unlock() } @@ -203,42 +202,43 @@ func (a *ThermometerWatcher1) UnwatchProperties(ch chan *bluez.PropertyChanged) } /* -MeasurementReceived This callback gets called when a measurement has been - scanned in the thermometer. - Measurement: - int16 Exponent: - int32 Mantissa: - Exponent and Mantissa values as - extracted from float value defined by - IEEE-11073-20601. - Measurement value is calculated as - (Mantissa) * (10^Exponent) - For special cases Exponent is - set to 0 and Mantissa is set to - one of following values: - +(2^23 - 1) NaN (invalid or - missing data) - -(2^23) NRes - +(2^23 - 2) +Infinity - -(2^23 - 2) -Infinity - string Unit: - Possible values: "celsius" or - "fahrenheit" - uint64 Time (optional): - Time of measurement, if - supported by device. - Expressed in seconds since epoch. - string Type (optional): - Only present if measurement type - is known. - Possible values: "armpit", "body", - "ear", "finger", "intestines", - "mouth", "rectum", "toe", - "tympanum" - string Measurement: - Possible values: "final" or - "intermediate" - +MeasurementReceived + + This callback gets called when a measurement has been + scanned in the thermometer. + Measurement: + int16 Exponent: + int32 Mantissa: + Exponent and Mantissa values as + extracted from float value defined by + IEEE-11073-20601. + Measurement value is calculated as + (Mantissa) * (10^Exponent) + For special cases Exponent is + set to 0 and Mantissa is set to + one of following values: + +(2^23 - 1) NaN (invalid or + missing data) + -(2^23) NRes + +(2^23 - 2) +Infinity + -(2^23 - 2) -Infinity + string Unit: + Possible values: "celsius" or + "fahrenheit" + uint64 Time (optional): + Time of measurement, if + supported by device. + Expressed in seconds since epoch. + string Type (optional): + Only present if measurement type + is known. + Possible values: "armpit", "body", + "ear", "finger", "intestines", + "mouth", "rectum", "toe", + "tympanum" + string Measurement: + Possible values: "final" or + "intermediate" */ func (a *ThermometerWatcher1) MeasurementReceived(measurement map[string]interface{}) error { return a.client.Call("MeasurementReceived", 0, measurement).Store() diff --git a/gen/generator/generator.go b/gen/generator/generator.go index 887b5d73..ab9089d6 100644 --- a/gen/generator/generator.go +++ b/gen/generator/generator.go @@ -14,7 +14,6 @@ import ( // Generate go code from the API definition func Generate(bluezApi gen.BluezAPI, outDir string, debug bool, forceOverwrite bool) error { - apiGroups := bluezApi.Api err := util.Mkdir(outDir) @@ -116,7 +115,7 @@ func Generate(bluezApi gen.BluezAPI, outDir string, debug bool, forceOverwrite b log.Tracef("format code: %s: %v", apiGenFilename, err) } - if err := ioutil.WriteFile(apiGenFilename, code, 0644); err != nil { + if err := ioutil.WriteFile(apiGenFilename, code, 0o644); err != nil { log.Tracef("rewrite with formatted code: %s", apiGenFilename) return err } diff --git a/gen/generator/generator_test.go b/gen/generator/generator_test.go index 9690ef98..afc00842 100644 --- a/gen/generator/generator_test.go +++ b/gen/generator/generator_test.go @@ -11,8 +11,6 @@ import ( ) func TestGenerate(t *testing.T) { - - TplPath = "../../gen/generator/tpl/%s.go.tpl" outdir := "../../test/out" bluezApi, err := gen.Parse("../../src/bluez/doc", []filters.Filter{}, false) @@ -36,5 +34,4 @@ func TestGenerate(t *testing.T) { assert.DirExists(t, outdir) assert.DirExists(t, fmt.Sprintf("%s/profile/adapter", outdir)) - } diff --git a/gen/generator/generator_tpl.go b/gen/generator/generator_tpl.go index 6e837cda..ff8f47ed 100644 --- a/gen/generator/generator_tpl.go +++ b/gen/generator/generator_tpl.go @@ -9,10 +9,9 @@ import ( ) func RootTemplate(filename string, api *types.ApiGroup) error { - fw, err := os.Create(filename) if err != nil { - return fmt.Errorf("create file: %s", err) + return fmt.Errorf("create file: %w", err) } apidoc := types.ApiGroupDoc{ @@ -25,7 +24,7 @@ func RootTemplate(filename string, api *types.ApiGroup) error { tmpl := loadtpl("root") err = tmpl.Execute(fw, apidoc) if err != nil { - return fmt.Errorf("write tpl: %s", err) + return fmt.Errorf("write tpl: %w", err) } // log.Debugf("Created %s", filename) @@ -33,10 +32,9 @@ func RootTemplate(filename string, api *types.ApiGroup) error { } func ErrorsTemplate(filename string, apis []*types.ApiGroup) error { - fw, err := os.Create(filename) if err != nil { - return fmt.Errorf("create file: %s", err) + return fmt.Errorf("create file: %w", err) } errors := []string{} @@ -72,7 +70,7 @@ func ErrorsTemplate(filename string, apis []*types.ApiGroup) error { tmpl := loadtpl("errors") err = tmpl.Execute(fw, errorsList) if err != nil { - return fmt.Errorf("tpl write: %s", err) + return fmt.Errorf("tpl write: %w", err) } // log.Debugf("Created %s", filename) @@ -80,10 +78,9 @@ func ErrorsTemplate(filename string, apis []*types.ApiGroup) error { } func InterfacesTemplate(filename string, apis []types.ApiGroup) error { - fw, err := os.Create(filename) if err != nil { - return fmt.Errorf("create file: %s", err) + return fmt.Errorf("create file: %w", err) } interfaces := []types.InterfaceDoc{} @@ -116,7 +113,7 @@ func InterfacesTemplate(filename string, apis []types.ApiGroup) error { tmpl := loadtpl("interfaces") err = tmpl.Execute(fw, ifaces) if err != nil { - return fmt.Errorf("tpl write: %s", err) + return fmt.Errorf("tpl write: %w", err) } // log.Debugf("Created %s", filename) diff --git a/gen/generator/generator_tpl_api.go b/gen/generator/generator_tpl_api.go index f15c5c4e..9417786c 100644 --- a/gen/generator/generator_tpl_api.go +++ b/gen/generator/generator_tpl_api.go @@ -12,7 +12,6 @@ import ( ) func ApiTemplate(filename string, api *types.Api, apiGroup *types.ApiGroup) error { - fw, err := os.Create(filename) if err != nil { return fmt.Errorf("create file: %s", err) @@ -89,7 +88,7 @@ func ApiTemplate(filename string, api *types.Api, apiGroup *types.ApiGroup) erro prop.RawTypeInitializer = rawTypeInitializer prop.RawType = getRawType(prop.Property.Type) - //log.Debugf("props --> %s %s", propName, propType) + // log.Debugf("props --> %s %s", propName, propType) } else { rawTypeInitializer, err := getRawTypeInitializer(propType) diff --git a/gen/generator/generator_tpl_constr.go b/gen/generator/generator_tpl_constr.go index cb243cfa..3817e642 100644 --- a/gen/generator/generator_tpl_constr.go +++ b/gen/generator/generator_tpl_constr.go @@ -16,7 +16,6 @@ func isDefaultService(s string) bool { } func createConstructors(api *types.Api) []types.Constructor { - // log.Debugf("-------------------------------------- %s", api.Interface) constructors := []types.Constructor{} @@ -59,12 +58,9 @@ func createConstructors(api *types.Api) []types.Constructor { } if overrides, hasOverride := override.GetConstructorsOverrides(api.Interface); hasOverride { - for _, coverride := range overrides { - // add new constructors which take an adapter as arg if coverride.AdapterAsArgument { - for _, c1 := range constructors { // log.Debugf("------ oveerride %+v", c1) @@ -78,11 +74,8 @@ func createConstructors(api *types.Api) []types.Constructor { } constructors = append(constructors, c) } - } - } - } // log.Debugf("constructors %++v", constructors) @@ -91,7 +84,6 @@ func createConstructors(api *types.Api) []types.Constructor { } func inspectServiceName(serviceName string, constructors []types.Constructor) []types.Constructor { - // log.Debugf("ObjectPath %s", api.ObjectPath) // log.Debugf("Interface %s", api.Interface) @@ -101,7 +93,6 @@ func inspectServiceName(serviceName string, constructors []types.Constructor) [] } if !isDefaultService(apiService) { - // log.Debugf("Service %s", apiService) // case 1 @@ -163,7 +154,6 @@ func inspectServiceName(serviceName string, constructors []types.Constructor) [] } func inspectObjectPath(objectPath string, constructors []types.Constructor) []types.Constructor { - constructors2 := []types.Constructor{} // log.Debugf("%d %s", len(constructors), objectPath) diff --git a/gen/generator/generator_tpl_test.go b/gen/generator/generator_tpl_test.go index 79e32842..a82df61a 100644 --- a/gen/generator/generator_tpl_test.go +++ b/gen/generator/generator_tpl_test.go @@ -8,7 +8,6 @@ import ( ) func TestCastType(t *testing.T) { - log.SetLevel(log.DebugLevel) typedef := "object" @@ -24,5 +23,4 @@ func TestCastType(t *testing.T) { if res != "[]dbus.ObjectPath, string" { t.Fatal(fmt.Sprintf("%s != %s", typedef, res)) } - } diff --git a/gen/generator/generator_types.go b/gen/generator/generator_types.go index 34765d46..374c08a8 100644 --- a/gen/generator/generator_types.go +++ b/gen/generator/generator_types.go @@ -61,7 +61,6 @@ func listCastType(typedef string) string { } func castType(rawtype string) string { - if rawtype == "" { return "" } @@ -72,7 +71,7 @@ func castType(rawtype string) string { typedef := listCastType(rawtype) - //eg. array{string} or array{string, foo} + // eg. array{string} or array{string, foo} re := regexp.MustCompile(`array\{([a-zA-Z0-9, ()]+)\}`) matches := re.FindSubmatch([]byte(rawtype)) // log.Warnf("submatch -> %s", matches) @@ -81,7 +80,7 @@ func castType(rawtype string) string { subtype := string(matches[1]) subtype = listCastType(subtype) - //special case 1 (obex): `array{string vcard, string name}` + // special case 1 (obex): `array{string vcard, string name}` pts := strings.Split(subtype, ", ") pts2 := []string{} for _, pt := range pts { @@ -129,7 +128,7 @@ func getRawType(t string) string { func getRawTypeInitializer(t string) (string, error) { t = getRawType(t) - var checkType = func(text string, match string) bool { + checkType := func(text string, match string) bool { minlen := len(match) return len(text) >= minlen && strings.ToLower(t[:minlen]) == match } diff --git a/gen/generator/generator_util.go b/gen/generator/generator_util.go index 0c1db2cf..13091e67 100644 --- a/gen/generator/generator_util.go +++ b/gen/generator/generator_util.go @@ -1,17 +1,24 @@ package generator import ( - "fmt" - "os" + "embed" "strings" "text/template" + "github.com/Masterminds/sprig/v3" "github.com/muka/go-bluetooth/gen/types" ) -var TplPath = "gen/generator/tpl/%s.go.tpl" +//go:embed tpl/*.tpl +var _tplFS embed.FS -//rename variable name to avoid collision with Go languages +var tpl = template.Must( + template.New(""). + Funcs(sprig.TxtFuncMap()). + ParseFS(_tplFS, "tpl/*.tpl"), +) + +// rename variable name to avoid collision with Go languages func renameReserved(varname string) string { switch varname { case "type": @@ -21,20 +28,12 @@ func renameReserved(varname string) string { } } -func getBaseDir() string { - baseDir := os.Getenv("BASEDIR") - if baseDir == "" { - baseDir = "." - } - return baseDir -} - -func getTplPath() string { - return fmt.Sprintf("%s/%s", getBaseDir(), TplPath) -} - func loadtpl(name string) *template.Template { - return template.Must(template.ParseFiles(fmt.Sprintf(getTplPath(), name))) + res := tpl.Lookup(name + ".go.tpl") + if res == nil { + panic("not found template with name " + name) + } + return res } func prepareDocs(src string, skipFirstComment bool, leftpad int) string { diff --git a/gen/generator/generator_version.go b/gen/generator/generator_version.go index cef916ab..8fafb342 100644 --- a/gen/generator/generator_version.go +++ b/gen/generator/generator_version.go @@ -7,7 +7,6 @@ import ( // VersionTemplate generate the version file func VersionTemplate(filename, version string) error { - tpl := `// Code generated by go-bluetooth generator DO NOT EDIT. package profile @@ -15,7 +14,7 @@ package profile const Version = %s ` - err := ioutil.WriteFile(filename, []byte(fmt.Sprintf(tpl, version)), 0644) + err := ioutil.WriteFile(filename, []byte(fmt.Sprintf(tpl, version)), 0o644) if err != nil { return fmt.Errorf("tpl write: %s", err) } diff --git a/gen/generator/tpl/api.go.tpl b/gen/generator/tpl/api.go.tpl index 6eaaf5b9..866272fa 100644 --- a/gen/generator/tpl/api.go.tpl +++ b/gen/generator/tpl/api.go.tpl @@ -236,7 +236,8 @@ func (a *{{.InterfaceName}}) UnwatchProperties(ch chan *bluez.PropertyChanged) e {{- range .Methods}} /* -{{.Name}} {{.Docs}} +{{.Name}} +{{.Docs}} */ func (a *{{$InterfaceName}}) {{.Name}}({{.ArgsList}}) {{.Method.ReturnType}} { {{- if .SingleReturn}} diff --git a/go.mod b/go.mod index d832412b..a0bc2638 100644 --- a/go.mod +++ b/go.mod @@ -1,16 +1,35 @@ module github.com/muka/go-bluetooth -go 1.14 +go 1.20 require ( + github.com/Masterminds/sprig/v3 v3.2.3 github.com/fatih/structs v1.1.0 github.com/godbus/dbus/v5 v5.0.3 - github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.6.0 github.com/stretchr/testify v1.6.1 github.com/suapapa/go_eddystone v1.3.1 - golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 - golang.org/x/tools v0.0.0-20200925191224-5d1fdd8fa346 + golang.org/x/sys v0.2.0 + golang.org/x/tools v0.1.12 +) + +require ( + github.com/Masterminds/goutils v1.1.1 // indirect + github.com/Masterminds/semver/v3 v3.2.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/google/uuid v1.1.1 // indirect + github.com/huandu/xstrings v1.3.3 // indirect + github.com/imdario/mergo v0.3.11 // indirect + github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect + github.com/mitchellh/copystructure v1.0.0 // indirect + github.com/mitchellh/reflectwalk v1.0.0 // indirect + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/shopspring/decimal v1.2.0 // indirect + github.com/spf13/cast v1.3.1 // indirect + golang.org/x/crypto v0.3.0 // indirect + golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect + gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect ) diff --git a/go.sum b/go.sum index 8a09e344..2aa85006 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,9 @@ +github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= +github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -7,11 +13,19 @@ github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= +github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/paypal/gatt v0.0.0-20151011220935-4ae819d591cf/go.mod h1:+AwQL2mK3Pd3S+TUwg0tYQjid0q1txyNUJuuSmz8Kdk= @@ -19,43 +33,57 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/suapapa/go_eddystone v1.3.1 h1:mfW3eNoRPpaZ0iARRZtEyudFfNFtytqeCexwXg1wIKE= github.com/suapapa/go_eddystone v1.3.1/go.mod h1:bXC11TfJOS+3g3q/Uzd7FKd5g62STQEfeEIhcKe4Qy8= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 h1:sIky/MyNRSHTrdxfsiUSS4WIAMvInbeXljJz+jDjeYE= -golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200925191224-5d1fdd8fa346 h1:hzJjkvxUIF3bSt+v8N5tBQNx/605vszZJ+3XsIamzZo= -golang.org/x/tools v0.0.0-20200925191224-5d1fdd8fa346/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/src/bluez b/src/bluez index 41f8c466..63b01d0b 160000 --- a/src/bluez +++ b/src/bluez @@ -1 +1 @@ -Subproject commit 41f8c466f3d558b7188470991dc61134f5ebd30d +Subproject commit 63b01d0b0661d6a0048107dcb9e6f12ceac409e0 From f82436453d5bac23a0cc2a691c858aa9386cb483 Mon Sep 17 00:00:00 2001 From: Feresey Date: Wed, 21 Jun 2023 23:30:08 +0300 Subject: [PATCH 2/2] Remove sprig package --- gen/generator/generator_util.go | 2 -- go.mod | 10 ------- go.sum | 48 --------------------------------- 3 files changed, 60 deletions(-) diff --git a/gen/generator/generator_util.go b/gen/generator/generator_util.go index 13091e67..6fd8c4fa 100644 --- a/gen/generator/generator_util.go +++ b/gen/generator/generator_util.go @@ -5,7 +5,6 @@ import ( "strings" "text/template" - "github.com/Masterminds/sprig/v3" "github.com/muka/go-bluetooth/gen/types" ) @@ -14,7 +13,6 @@ var _tplFS embed.FS var tpl = template.Must( template.New(""). - Funcs(sprig.TxtFuncMap()). ParseFS(_tplFS, "tpl/*.tpl"), ) diff --git a/go.mod b/go.mod index a0bc2638..b9a91624 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/muka/go-bluetooth go 1.20 require ( - github.com/Masterminds/sprig/v3 v3.2.3 github.com/fatih/structs v1.1.0 github.com/godbus/dbus/v5 v5.0.3 github.com/pkg/errors v0.9.1 @@ -15,20 +14,11 @@ require ( ) require ( - github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/google/uuid v1.1.1 // indirect - github.com/huandu/xstrings v1.3.3 // indirect - github.com/imdario/mergo v0.3.11 // indirect github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect - github.com/mitchellh/copystructure v1.0.0 // indirect - github.com/mitchellh/reflectwalk v1.0.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/shopspring/decimal v1.2.0 // indirect - github.com/spf13/cast v1.3.1 // indirect - golang.org/x/crypto v0.3.0 // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect diff --git a/go.sum b/go.sum index 2aa85006..937ce400 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,3 @@ -github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= -github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= -github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -13,19 +7,11 @@ github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= -github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/paypal/gatt v0.0.0-20151011220935-4ae819d591cf/go.mod h1:+AwQL2mK3Pd3S+TUwg0tYQjid0q1txyNUJuuSmz8Kdk= @@ -33,57 +19,23 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/suapapa/go_eddystone v1.3.1 h1:mfW3eNoRPpaZ0iARRZtEyudFfNFtytqeCexwXg1wIKE= github.com/suapapa/go_eddystone v1.3.1/go.mod h1:bXC11TfJOS+3g3q/Uzd7FKd5g62STQEfeEIhcKe4Qy8= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A= -golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=