Le 03/11/2014 07:55, Wu, JiangboX a écrit :
> Samsung Enterprise Portal mySingle
>
> Hi Kim:
>
>       Thanks for your kind reply, and We are very glad talk about it.
> Below is my comments.
>
> [Kim] May I present one scenario to access bluetooth by different
> processes. Please let me give one smartphone example.
>
> 1. A smartphone user turns the bluetooth on using the setting menu.
> Then, the bluetooth is enabled state.
>
> 2.The user wants to play game that has multi-play function through
> bluetooth link, so he turns on the game app. that runs on different
> process with setting app.
>
> 3. At that time, bluetooth game app. should check whether the
> bluetooth is enabled or not using bt_adapter_get_state() API
> beforetrying to connect with other game user.
>
> 4. In current NTB code, bt_adapter_get_state() checks "initialized",
> "default_adapter", and "adapter_state" variables before asking to
> bluez (bluez_adapter_get_property_powered()). In this case, setting
> app. has specificvalues of these variables, but the game app. has the
> values such as initialized=false, default_adapter=NULL, and
> adapter_state=NULL at the same time.
>
> 5. The game app. will get BT_ERROR_* return values from the bluetooth,
> accordingly it doesn't seem to work properly in this kind of scenario.
>
> In my opinion, some variables have to keep identical value at the same
> time by different processes. For this scenario, I don't think vconfis
> appropriate solution.
>
> [Jiangbo]The game application need tocall bt_intialize() to initialize
> bluetooth platform firstly, that contain parse BlueZ adapter objects
> and device objects. And then “default_adapter” and “adapter_state” can
> be used, otherwise you can’t use anything. All bluetooth operations
> must call bt_initialize() firstly to build the Tizen Bluetooth
> Platform. This is the basically operation for all applications. Before
> bt_intialize(), all other CAPIs call will
> return“BT_ERROR_NOT_INITLIAZED”, this is the CAPIs doc define.
>
> The CAPIs is the library, all data is separate in different process.
> bt_intialize() will help applicationto parse BlueZ’s adapter, and then
> you will know whether BlueZ has adapter, if you call
> bt_adapter_get_state() or other CAPIs before bt_initialize(), but at
> the same time, BlueZ don’t have adapter, your function call will
> failed, and it will go through the whole Tizen Bluetooth Framework and
> IPC(DBus call to BlueZ), I think it will waste more time and be a bad
> design. CAPIs already define bt_initliaze() and describe that function
> is initialize bluetooth framework, why don’t use this function to
> initialize bluetooth framework, please remember all application should
> use bt_initialize() to initialize the application private Tizen
> Bluetooth Framework firstly. J
>
Sorry as said in a previous email.
Sharing data between Apps is not acceptable for security reasons.
An other solution will be required (vconf/Buston might be your friend).

-- 
Dominig ar Foll
Senior Software Architect
Intel Open Source Technology Centre

_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev

Reply via email to