if (length) {
Eina_List* list = 0;
for (int i = 0; i < length; ++i) {
- char* result = *resultFilename[i];
+ char* result = *(resultFilename[i]);
int len = strlen(result) + 1;
char* fileName = static_cast<char*>(malloc(sizeof(char) * len));
memset(fileName, 0, sizeof(char) * len);
return false;
service_set_operation(svcHandle, SERVICE_OPERATION_CREATE_CONTENT);
- service_set_mime(svcHandle, "image/jpg");
+ service_set_mime(svcHandle, "image/*");
service_add_extra_data(svcHandle, "CALLER", "webkit");
service_add_extra_data(svcHandle, "http://tizen.org/appcontrol/data/camera/allow_switch", "false");
return false;
service_set_operation(svcHandle, SERVICE_OPERATION_CREATE_CONTENT);
- service_set_mime(svcHandle, "video/3gp");
+ service_set_mime(svcHandle, "video/*");
service_add_extra_data(svcHandle, "CALLER", "webkit");
service_add_extra_data(svcHandle, "http://tizen.org/appcontrol/data/camera/allow_switch", "false");
service_h service = NULL;
if (service_create(&service) != SERVICE_ERROR_NONE)
return false;
- service_add_extra_data(service, "path", "/opt/media");
-
- if (is_audio_all_type && !is_video_all_type && !is_image_all_type && !is_video_extension_type && !is_image_extension_type) {
- service_add_extra_data(service, "file_type", "SOUND");
- } else if (is_video_all_type && !is_image_all_type && !is_audio_all_type && !is_image_extension_type && !is_audio_extension_type) {
- service_add_extra_data(service, "file_type", "VIDEO");
- } else if (is_image_all_type && !is_audio_all_type && !is_video_all_type && !is_audio_extension_type && !is_video_extension_type) {
- service_add_extra_data(service, "file_type", "IMAGE");
- } else if (is_audio_all_type && is_video_all_type && !is_image_all_type && !is_image_extension_type) {
- service_add_extra_data(service, "file_type", "VS");
- } else if (is_video_all_type && is_image_all_type && !is_audio_all_type && !is_audio_extension_type) {
- service_add_extra_data(service, "file_type", "IV");
- } else if (is_image_all_type && is_audio_all_type && !is_video_all_type && !is_video_extension_type) {
- service_add_extra_data(service, "file_type", "IS");
- } else if (!is_audio_all_type && !is_video_all_type && !is_image_all_type &&
- (is_video_extension_type || is_image_extension_type || is_audio_extension_type)) {
- service_add_extra_data(service, "file_type", extensions);
- } else {
- service_add_extra_data(service, "file_type", "ALL");
- }
- /* Set file select mode : multiple/single */
+ service_set_operation(service, SERVICE_OPERATION_PICK);
+
+ if (is_audio_all_type && !is_video_all_type && !is_image_all_type && !is_video_extension_type && !is_image_extension_type)
+ service_set_mime(service, "audio/*");
+ else if (is_video_all_type && !is_image_all_type && !is_audio_all_type && !is_image_extension_type && !is_audio_extension_type)
+ service_set_mime(service, "video/*");
+ else if (is_image_all_type && !is_audio_all_type && !is_video_all_type && !is_audio_extension_type && !is_video_extension_type)
+ service_set_mime(service, "image/*");
+ else
+ service_set_mime(service, "*/*");
+
if (allow_multiple_files == TRUE){
- service_add_extra_data(service, "select_type", "MULTI_FILE");
+ service_add_extra_data(service, "http://tizen.org/appcontrol/data/selection_mode", "multiple");
} else {
- service_add_extra_data(service, "select_type", "SINGLE_FILE");
+ service_add_extra_data(service, "http://tizen.org/appcontrol/data/selection_mode", "single");
}
- struct ug_cbs cbs = {0, 0, 0, 0};
- cbs.layout_cb = layout_cb;
- cbs.result_cb = result_cb;
- cbs.destroy_cb = destroy_cb;
- cbs.priv = (void*)this;
+ service_set_app_id (service, "tizen.filemanager");
- if(!ug_create(NULL, "myfile-efl", UG_MODE_FULLVIEW, service, &cbs)) {
- TIZEN_LOGE("ug_create FAIL");
+ int ret = service_send_launch_request(service, _cameraResultCb, this);
+ if (ret != SERVICE_ERROR_NONE) {
+ service_destroy(service);
+ TIZEN_LOGE("ret(%d)", ret);
return false;
}