return 0;
}
-/**
- * @testcase CTc_Bluetooth_PrivilegeBluetooth_hdp_register_unregister_sink_app
- * @since_tizen 3.0
- * @author SRID(arvin.mittal)
- * @reviewer SRID(shobhit.v)
- * @type auto
- * @description check if HDP is supported and startup_flag is asserted then register the app
- * that acts as sink role for HDP and checked for errors.
- * @scenario Registers the given application that acts as the @a Sink role of HDP(Health Device Profile).
- * @apicovered bt_hdp_register_sink_app, bt_hdp_unregister_sink_app
- * @passcase If target privileged API returns TIZEN_ERROR_PERMISSION_DENIED
- * @failcase If target privileged API does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition API returns non error value
- * @precondition Bluetooth must be initialized
- * @postcondition Bluetooth must be deinitialized
- */
-int CTc_Bluetooth_PrivilegeBluetooth_hdp_register_unregister_sink_app(void)
-{
- START_TEST;
-
- int nRet;
- char *app_id = NULL;
- bool bIsSupported = false;
- bool bIsSupported_hdp =false;
- unsigned short data_type = 0x1007;
- IS_FEATURE_SUPPORTED(FEATURE_BLUETOOTH, bIsSupported, API_NAMESPACE);
- IS_FEATURE_SUPPORTED(FEATURE_BLUETOOTH_HDP, bIsSupported_hdp, API_NAMESPACE);
- if ( (false == bIsSupported_hdp) || (false == bIsSupported) )
- {
- FPRINTF("[Line : %d][%s] Feature is not supported \\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- else
- {
- nRet = bt_initialize();
- PRINT_RESULT(BT_ERROR_NONE, nRet, "bt_initialize", BluetoothGetError(nRet));
-
- nRet = bt_hdp_register_sink_app(data_type, &app_id);
- if(nRet == BT_ERROR_NONE)
- {
- bt_hdp_unregister_sink_app(app_id);
- }
- PRINT_RESULT_CLEANUP(TIZEN_ERROR_PERMISSION_DENIED, nRet, "bt_hdp_register_sink_app", BluetoothGetError(nRet),bt_deinitialize());
- free(app_id);
- app_id = NULL;
- nRet = bt_deinitialize();
- PRINT_RESULT_NORETURN(BT_ERROR_NONE, nRet, "bt_deinitialize", BluetoothGetError(nRet));
- }
- return 0;
-}
-
/**
* @testcase CTc_Bluetooth_PrivilegeBluetooth_adapter_set_remove_remote_oob_data
* @since_tizen 3.0
extern int CTc_Bluetooth_PrivilegeBluetooth_adapter_le_start_stop_scan(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_le_start_advertising_new(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_adapter_le_set_advertising_mode(void);
-extern int CTc_Bluetooth_PrivilegeBluetooth_hdp_register_unregister_sink_app(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_adapter_set_remove_remote_oob_data(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_gatt_connect(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_audio_connect_disconnect(void);
{"CTc_Bluetooth_PrivilegeBluetooth_adapter_le_start_stop_scan",CTc_Bluetooth_PrivilegeBluetooth_adapter_le_start_stop_scan,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_le_start_advertising_new",CTc_Bluetooth_PrivilegeBluetooth_le_start_advertising_new,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_adapter_le_set_advertising_mode",CTc_Bluetooth_PrivilegeBluetooth_adapter_le_set_advertising_mode,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
- {"CTc_Bluetooth_PrivilegeBluetooth_hdp_register_unregister_sink_app",CTc_Bluetooth_PrivilegeBluetooth_hdp_register_unregister_sink_app,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_adapter_set_remove_remote_oob_data",CTc_Bluetooth_PrivilegeBluetooth_adapter_set_remove_remote_oob_data,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_gatt_connect",CTc_Bluetooth_PrivilegeBluetooth_gatt_connect,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_audio_connect_disconnect",CTc_Bluetooth_PrivilegeBluetooth_audio_connect_disconnect,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
extern int CTc_Bluetooth_PrivilegeBluetooth_adapter_le_start_stop_scan(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_le_start_advertising_new(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_adapter_le_set_advertising_mode(void);
-extern int CTc_Bluetooth_PrivilegeBluetooth_hdp_register_unregister_sink_app(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_adapter_set_remove_remote_oob_data(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_gatt_connect(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_audio_connect_disconnect(void);
{"CTc_Bluetooth_PrivilegeBluetooth_adapter_le_start_stop_scan",CTc_Bluetooth_PrivilegeBluetooth_adapter_le_start_stop_scan,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_le_start_advertising_new",CTc_Bluetooth_PrivilegeBluetooth_le_start_advertising_new,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_adapter_le_set_advertising_mode",CTc_Bluetooth_PrivilegeBluetooth_adapter_le_set_advertising_mode,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
- {"CTc_Bluetooth_PrivilegeBluetooth_hdp_register_unregister_sink_app",CTc_Bluetooth_PrivilegeBluetooth_hdp_register_unregister_sink_app,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_adapter_set_remove_remote_oob_data",CTc_Bluetooth_PrivilegeBluetooth_adapter_set_remove_remote_oob_data,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_gatt_connect",CTc_Bluetooth_PrivilegeBluetooth_gatt_connect,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_audio_connect_disconnect",CTc_Bluetooth_PrivilegeBluetooth_audio_connect_disconnect,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
extern int CTc_Bluetooth_PrivilegeBluetooth_bt_opp_server_set_destination(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_adapter_le_start_stop_scan(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_adapter_le_set_advertising_mode(void);
-extern int CTc_Bluetooth_PrivilegeBluetooth_hdp_register_unregister_sink_app(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_adapter_set_remove_remote_oob_data(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_gatt_connect(void);
extern int CTc_Bluetooth_PrivilegeBluetooth_audio_connect_disconnect(void);
{"CTc_Bluetooth_PrivilegeBluetooth_bt_opp_server_set_destination",CTc_Bluetooth_PrivilegeBluetooth_bt_opp_server_set_destination,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_adapter_le_start_stop_scan",CTc_Bluetooth_PrivilegeBluetooth_adapter_le_start_stop_scan,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_adapter_le_set_advertising_mode",CTc_Bluetooth_PrivilegeBluetooth_adapter_le_set_advertising_mode,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
- {"CTc_Bluetooth_PrivilegeBluetooth_hdp_register_unregister_sink_app",CTc_Bluetooth_PrivilegeBluetooth_hdp_register_unregister_sink_app,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_adapter_set_remove_remote_oob_data",CTc_Bluetooth_PrivilegeBluetooth_adapter_set_remove_remote_oob_data,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_gatt_connect",CTc_Bluetooth_PrivilegeBluetooth_gatt_connect,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},
{"CTc_Bluetooth_PrivilegeBluetooth_audio_connect_disconnect",CTc_Bluetooth_PrivilegeBluetooth_audio_connect_disconnect,CTs_platform_permission_bluetooth_startup,CTs_platform_permission_bluetooth_cleanup},