#define CAMERA_FEATURE_NAME "http://tizen.org/feature/camera"
#define CAMERA_PRIVILEGE_NAME "http://tizen.org/privilege/camera"
-#define MUSED_KEY_DEVICE_STATE_CHECK "camera_get_device_state_is_called"
-#define MUSED_KEY_DEVICE_STATE_RETURN "camera_get_device_state_return"
#define MUSED_KEY_FLASH_STATE_CHECK "camera_get_flash_state_is_called"
#define MUSED_KEY_FLASH_STATE_RETURN "camera_get_flash_state_return"
#define MUSED_KEY_FLASH_STATE_COUNT "camera_get_flash_state_count"
int camera_dispatcher_get_device_state(muse_module_h module)
{
int ret = CAMERA_ERROR_NONE;
- int is_called = false;
char value_key[KEY_LENGTH] = {'\0',};
bool camera_feature_supported = false;
camera_h camera = NULL;
return MUSE_CAMERA_ERROR_NONE;
}
- muse_server_module_get_value(module, MUSED_KEY_DEVICE_STATE_CHECK, &is_called);
-
- if (!is_called) {
- ret = legacy_camera_create(device_type, &camera);
- if (camera) {
- legacy_camera_destroy(camera);
- camera = NULL;
- }
+ ret = legacy_camera_create(device_type, &camera);
+ if (camera) {
+ legacy_camera_destroy(camera);
+ camera = NULL;
+ }
- /* camera feature support check */
- if (ret == CAMERA_ERROR_NONE) {
- if (muse_server_get_platform_info(CAMERA_FEATURE_NAME, &camera_feature_supported) != MM_ERROR_NONE)
- CAM_LOG_ERROR("failed to get platform info for camera support");
+ /* camera feature support check */
+ if (ret == CAMERA_ERROR_NONE) {
+ if (muse_server_get_platform_info(CAMERA_FEATURE_NAME, &camera_feature_supported) != MM_ERROR_NONE)
+ CAM_LOG_ERROR("failed to get platform info for camera support");
- if (!camera_feature_supported) {
- CAM_LOG_ERROR("CAMERA NOT SUPPORTED, BUT INI FILE FOR CAMERA IS EXISTED. RECOMMEND TO REMOVE IT.");
- ret = CAMERA_ERROR_NOT_SUPPORTED;
- }
+ if (!camera_feature_supported) {
+ CAM_LOG_ERROR("CAMERA NOT SUPPORTED, BUT INI FILE FOR CAMERA IS EXISTED. RECOMMEND TO REMOVE IT.");
+ ret = CAMERA_ERROR_NOT_SUPPORTED;
}
-
- muse_server_module_set_value(module, MUSED_KEY_DEVICE_STATE_RETURN, ret);
- muse_server_module_set_value(module, MUSED_KEY_DEVICE_STATE_CHECK, (int)true);
- } else {
- muse_server_module_get_value(module, MUSED_KEY_DEVICE_STATE_RETURN, &ret);
}
- CAM_LOG_INFO("is_called[%d], ret[0x%x]", is_called, ret);
+ CAM_LOG_INFO("ret[0x%x]", ret);
if (ret != CAMERA_ERROR_NONE) {
CAM_LOG_ERROR("failed to create camera handle[0x%x]", ret);