RE: [RFC PATCH BlueZ] doc: Document Broadcaster/Observer API

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

 



Lizardo,

> -----Original Message-----
> From: linux-bluetooth-owner@xxxxxxxxxxxxxxx [mailto:linux-bluetooth-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Anderson Lizardo
> Sent: Thursday, April 12, 2012 4:04 AM
> To: linux-bluetooth@xxxxxxxxxxxxxxx
> Cc: Anderson Lizardo
> Subject: [RFC PATCH BlueZ] doc: Document Broadcaster/Observer API
> 
> ---
>  doc/adapter-api.txt |   56
> +++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 56 insertions(+), 0 deletions(-)
> 
> diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt
> index 20cef03..67f9f62 100644
> --- a/doc/adapter-api.txt
> +++ b/doc/adapter-api.txt
> @@ -181,6 +181,48 @@ Methods		dict GetProperties()
> 
>  			Possible errors: org.bluez.Error.DoesNotExist
> 
> +		void RegisterBroadcaster(dict values)
> +
> +			Set Advertising data for broadcast. Different
> +			applications can register different Adv. data types,
> +			and they are all concatenated to form the Adv. data.
> +			Broadcasting is enabled as soon as the first
> +			RegisterBroadcaster() call is made.
> +
> +			Use UnregisterBroadcaster() to release Adv. data for
> +			the application. Advertising data is also released
> when
> +			application exits, and once the last Broadcaster
> exits,
> +			advertising is disabled.
> +
> +			Possible Errors: org.bluez.Error.InvalidArguments
> +					 org.bluez.Error.Failed
> +
What if the data changes? What if I register for Service Data, and the service data changes? Do I need to RegisterBroadcaster again?

> +		void UnregisterBroadcaster()
> +
> +			This method will release any previously set
> Advertising
> +			data.
> +
> +			Note that a broadcast procedure is shared between all
> +			sessions, thus calling UnregisterBroadcaster() will
> +			only release a single session.
> +
> +			Possible errors: org.bluez.Error.Failed
> +
> +		void RegisterObserver(object agent, array{byte} data_types)
> +
> +			Registers an observer agent to monitor broadcasts.
> This
> +			agent will be notified whenever a broadcast is
> received
> +			that contains any of selected Advertising data types.
> +
> +			Possible errors: org.bluez.Error.InvalidArguments
> +
Will this automatically start the scanning for advertising? How will you combine this with the device search for dual mode devices?


> +		void UnregisterObserver(object agent)
> +
> +			Unregisters an observer. Broadcasts will not be
> +			notified to this agent anymore.
> +
> +			Possible errors: org.bluez.Error.InvalidArguments
Will unregistering ALL observers stop the scan for advertising ?

> +
>  Signals		PropertyChanged(string name, variant value)
> 
>  			This signal indicates a changed value of the given
> @@ -284,3 +326,17 @@ Properties	string Address [readonly]
> 
>  			List of 128-bit UUIDs that represents the available
>  			local services.
> +
> +
> +Observer hierarchy
> +==================
> +
> +Service		unique name
> +Interface	org.bluez.Observer
> +Object path	freely definable
> +
> +Methods		void BroadcastReceived(string address, byte
> data_type,
> +								variant value)
> +
> +			This callback gets called when a broadcast data has
> +			arrived with selected Advertising Data type.
> --
> 1.7.5.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-
> bluetooth" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Thanks,
Chen Ganir

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux