Re: [RFC BlueZ 7/7] doc: Add Register/Unregister GATT based services

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

 



Hi,

On Mon, Jul 23, 2012, Anderson Lizardo wrote:
> --- a/doc/service-api.txt
> +++ b/doc/service-api.txt
> @@ -43,6 +43,39 @@ Methods		uint32 AddRecord(string record)
>  					 org.bluez.Error.DoesNotExist
>  					 org.bluez.Error.Failed
>  
> +		void Register(string uuid, dict settings,
> +					array{object} characteristics)
> +
> +			Add a GATT based service. The uuid represents the
> +			primary/secondary service UUID. The settings
> +			dictionary has the following format:
> +			{
> +				"id": string (optional)
> +			}
> +
> +			settings field is being added to allow API
> +			flexibility. The "id" field allows the core to
> +			manage handle allocation and internal GATT storage.
> +
> +			GATT included services is supported by providing the
> +			same characteristic object path (restricted to same
> +			provider/owner).
> +
> +			The characteristic objects implemented by the
> +			caller shall follow the interface defined in the
> +			attribute API.
> +
> +			Possible errors: org.bluez.Error.InvalidArguments
> +					 org.bluez.Error.AlreadyExists
> +
> +		void Unregister(string uuid)
> +
> +			Removes a given GATT based service previously
> +			registered by the caller.
> +
> +			Possible errors: org.bluez.Error.InvalidArguments
> +					 org.bluez.Error.NotAuthorized

I don't think the Register/Unregister names are right since this is
purely LE/GATT specific. Or do you foresee this being used for
traditional (non-GATT) BR/EDR profiles? I'd either propose having a new
interface for these or then rename them (e.g. RegisterGATT?).

FWIW I'm also not sure that the interface name org.bluez.Service is
quite right. Interface names are supposed to describe something about
the object which implements them, but the object this interface is used
for (adapter) cannot be said to "be" a service. Instead, this interface
abstracts a local database of services. What would you think of calling
it ServiceManager or ServiceDatabase?

Johan
--
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