#define EMAIL_UG_NAME "email-composer-efl"
#define CONTACT_UG_NAME "contacts-list-efl"
#define MYFILE_DETAIL_UG_NAME "myfile-detail-efl"
-#define BLUETOOTH_UG_NAME "setting-bluetooth-efl"
+#define BLUETOOTH_UG_NAME "ug-bluetooth-efl"
#define MYFILE_UG_NAME "myfile-efl"
#define CONTACT_SELECT_UG_NAME "contacts-tabui-efl"
+#define BLUETOOTH_SETTING_NAME "setting-bluetooth-efl"
#define VIDEOPLAYER_PKG_NAME "org.tizen.video-player"
#define BLUETOOTH_PKG_NAME "org.tizen.bluetooth"
return false;
}
- ret = service_set_operation(handle, "http://tizen.org/appcontrol/operation/send");
+ ret = service_set_operation(handle, SERVICE_OPERATION_SEND);
if(ret != SERVICE_ERROR_NONE)
{
MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
goto BT_END;
}*/
- ug = _ivug_ext_launch_ug(BLUETOOTH_UG_NAME, handle, func, data);
+ ug = _ivug_ext_launch_ug(BLUETOOTH_SETTING_NAME, handle, func, data);
BT_END:
destroy_ret = service_destroy(handle);
return (ret == SERVICE_ERROR_NONE ? true : false);
}
+bool ivug_ext_launch_to_send(const char *uri, const char *pkg, ug_destroy_cb func, void *data, ui_gadget_h ug)
+{
+ MSG_IMAGEVIEW_HIGH("%s: %s %s", __func__, uri, pkg);
+
+ bool ret = false;
+ ug = NULL;
+
+ if (!strcmp(pkg, MESSAGE_UG_NAME))
+ {
+ ug = ivug_ext_launch_message(uri, func, data);
+ ret = ug ? true : false;
+ }
+ else if (!strcmp(pkg, EMAIL_UG_NAME))
+ {
+ ret = ivug_ext_launch_email(uri);
+ }
+ else if (!strcmp(pkg, BLUETOOTH_PKG_NAME) || !strcmp(pkg, BLUETOOTH_UG_NAME))
+ {
+ ug = ivug_ext_launch_bluetooth_send(uri, func, data);
+ ret = ug ? true : false;
+ }
+ else
+ {
+ /* Use default launch for other execs but bluetooth, that always requires settings */
+ ret = ivug_ext_launch_default(uri, SERVICE_OPERATION_SEND, pkg, data);
+ }
+
+ return ret;
+}
+
bool ivug_ext_launch_print(const char *uri)
{
MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
path = mdata->filepath;
bool ret = false;
-
- ret = ivug_ext_launch_default(path, "http://tizen.org/appcontrol/operation/send", label, data);
+ ret = ivug_ext_launch_to_send(path, label, _on_ext_ug_destroy_cb, data, pMainView->ext_ug);
/* appsvc failed or ug_create failed */
if(ret == false)
service_h service;
service_create(&service);
- service_set_operation(service, "http://tizen.org/appcontrol/operation/send");
+ service_set_operation(service, SERVICE_OPERATION_SEND);
service_set_uri(service, mdata->filepath);
service_foreach_app_matched(service, _share_pkg_cb, (void *)popup);