#include <sys/types.h>
#include <ifaddrs.h>
#include <linux/if_link.h>
-#include <app_control.h>
#include <system_info.h>
#include "bluetooth.h"
bt_adapter_disable();
break;
}
- case BT_UNIT_TEST_FUNCTION_APP_CONTROL_DEFAULT: {
- char *mode = "setting";
-
- if (g_test_param.param_count > 0)
- mode = g_test_param.params[0];
-
- app_control_h service = NULL;
-
- app_control_create(&service);
- app_control_set_app_id(service, "com.samsung.bluetooth-single");
- app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT);
- app_control_add_extra_data(service, "launch-type", mode);
- ret = app_control_send_launch_request(service, NULL, NULL);
- TC_PRT("returns %d", ret);
-
- app_control_destroy(service);
- break;
- }
- case BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_3_BT_ONOFF: {
- app_control_h service = NULL;
-
- app_control_create(&service);
- app_control_set_operation(service, APP_CONTROL_OPERATION_EDIT);
- app_control_set_mime(service, "application/x-bluetooth-on-off");
-
- ret = app_control_send_launch_request(service, NULL, NULL);
- TC_PRT("returns %d", ret);
-
- app_control_destroy(service);
-
- break;
- }
- case BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_3_BT_VISIBILITY: {
- app_control_h service = NULL;
-
- app_control_create(&service);
- app_control_set_operation(service, APP_CONTROL_OPERATION_EDIT);
- app_control_set_mime(service, "application/x-bluetooth-visibility");
-
- ret = app_control_send_launch_request(service, NULL, NULL);
- TC_PRT("returns %d", ret);
-
- app_control_destroy(service);
-
- break;
- }
- case BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_4_BT_ONOFF: {
- app_control_h service = NULL;
-
- app_control_create(&service);
- app_control_set_operation(service, APP_CONTROL_OPERATION_SETTING_BT_ENABLE);
-
- ret = app_control_send_launch_request(service, NULL, NULL);
- TC_PRT("returns %d", ret);
-
- app_control_destroy(service);
-
- break;
- }
- case BT_UNIT_TEST_FUNCTION_APP_CONTROL_2_4_BT_VISIBILITY: {
- app_control_h service = NULL;
-
- app_control_create(&service);
- app_control_set_operation(service, APP_CONTROL_OPERATION_SETTING_BT_VISIBILITY);
-
- ret = app_control_send_launch_request(service, NULL, NULL);
- TC_PRT("returns %d", ret);
-
- app_control_destroy(service);
-
- break;
- }
case BT_UNIT_TEST_FUNCTION_CHECK_FEATURE: {
int ret;
bool is_supported = false;