RE: [PATCH 1/4] Sim Access Profile API

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

 



Hi, 

>Hi,

>>> >> +          void Disconnect(boolean type)
>>> >> +
>>> >> +                  Disconnect SAP client from the server.
>>> >The 'type'
>>> >> +                  parameter indicates disconnection type.
>>> >> +
>>> >> +                  True  - gracefull disconnection
>>> >> +                  False - immediate disconnection
>>> >> +
>>> >> +                  Possible errors: org.bluez.Error.Failed
>>> >
>>> >I don't like this style of method names at all. Using method names 
>>> >like GracefulDisconnect and ImmediateDisconnect would be better.
>>>
>>> That's fine.
>>>
>>> >However I am not sure we should differentiate here at all. 
>We should 
>>> >always to the graceful disconnect. What will the immediate 
>>> >disconnect bring us?
>>>
>>> That's actually intended for testing only. One of PTS test 
>cases expects the tester to trigger immediate disconnect.
>>> In practce, it is only used when connection to sim card is 
>lost, but this is obviously done internally.
>>
>>
>> So this shouldn't be in the API, no one is going to use it. You can 
>> create something internally for the immediate disconnection that you 
>> go and set manually inside the code. Make sure to comment in 
>the code 
>> why you are adding this there. That can also be a option in some of 
>> the bluetooth config files. Let's see what others think here.
>
>Actually this looks a lot like virtual cable unplug that PTS 
>wants to hid, it is just crap that nobody use, so maybe e.g.
>--enable-pts-bullshit would actually make sense to activate 
>the nonsense that pts wants, well it is still annoying to 
>recompile just to run PTS tests. For hid the virtual cable 
>unplug can be emulate via RemoveDevice, so maybe it make sense 
>to do a immediate disconnect in such case for sap too, but 
>this is still inconvenient since you have to repair after doing it.
>

So, simply let's get rid of immediate disconnect from sap api and leave if for sap-driver (sap-*.c file ) provider. I could extend sap-dummy api just for an example.

Service		org.bluez 
Interface	org.bluez.SimAccess 
Object path	[variable prefix]/{hci0,hci1,...}

Methods		void Disconnect()

			Disconnects SAP client from the server.

			Possible errors: org.bluez.Error.Failed

		void SetProperty(string name, variant value)

			Changes the value of the specified property. Only
			properties that are listed a read-write are changeable.

			Possible Errors: org.bluez.Error.DoesNotExist 
					org.bluez.Error.InvalidArguments

		dict GetProperties()

			Return all properties for the interface. See the
			properties section for available properties.

			Possible Errors: org.bluez.Error.Failed

Signals		PropertyChanged(string name, variant value)

			This signal indicates a changed value of the given
			property.

Properties	boolean Enabled [readwrite]

			Set to true to start-up SAP server and register SDP record for 
			it. Set to false to shutdown SAP server and remove the SDP record.

		boolean Connected [readonly]

			Indicates if SAP client is connected to the server. 


More comments ?

Thanks,
/Waldek
--
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