return popup;
}
+static bt_file_type_e __get_file_type(char *name)
+{
+ FN_START;
+
+ char *extn = NULL;
+
+ extn = strrchr(name, '.');
+ if (extn != NULL)
+ extn++;
+
+ DBG("extn : %s", extn);
+
+ if (extn != NULL) {
+ if (!strcasecmp(extn, "png") || !strcasecmp(extn, "bmp") || !strcasecmp(extn, "gif") ||
+ !strcasecmp(extn, "jpg") || !strcasecmp(extn, "jpeg") || !strcasecmp(extn, "jpe") ||
+ !strcasecmp(extn, "jp2") || !strcasecmp(extn, "pjpeg") || !strcasecmp(extn, "tif") ||
+ !strcasecmp(extn, "wbmp") || !strcasecmp(extn, "wmf"))
+ return BT_FILE_IMAGE;
+ else if (!strcasecmp(extn, "vcf"))
+ return BT_FILE_VCARD;
+ else if (!strcasecmp(extn, "vcs"))
+ return BT_FILE_VCAL;
+ else if (!strcasecmp(extn, "vbm"))
+ return BT_FILE_VBOOKMARK;
+ }
+ FN_END;
+ return BT_FILE_OTHER;
+}
+
static gboolean __bt_open_file(const char *path)
{
FN_START;
app_control_h handle;
int ret;
+ bt_file_type_e file_type;
bt_share_appdata_t *ad = app_state;
app_control_create(&handle);
app_control_set_operation(handle, APP_CONTROL_OPERATION_VIEW);
app_control_set_uri(handle, path);
+
+ file_type = __get_file_type(path);
+
+ if (file_type == BT_FILE_IMAGE) {
+ app_control_set_mime(handle, "image/*");
+ app_control_add_extra_data(handle, "Path", path);
+ app_control_set_launch_mode(handle, APP_CONTROL_LAUNCH_MODE_GROUP);
+ }
+
ret = app_control_send_launch_request(handle, NULL, NULL);
if (ret == APP_CONTROL_ERROR_APP_NOT_FOUND)
#define BT_ANI_UPLOAD "bt_share_upload"
#define BT_ANI_DOWNLOAD "bt_share_download"
+typedef enum {
+ BT_FILE_IMAGE, /**<IMAGE */
+ BT_FILE_VCARD, /**<VCARD */
+ BT_FILE_VCAL, /**<VCAL */
+ BT_FILE_VBOOKMARK, /**<VBOOKMARK */
+ BT_FILE_VMEMO,
+ BT_FILE_DOC, /**<DOC, */
+ BT_FILE_OTHER /**<OTHER*/
+} bt_file_type_e;
+
Evas_Object *_bt_create_win(const char *name);
void _bt_terminate_app(void);
void _bt_genlist_prepend_tr_data_item(bt_share_appdata_t *ad,