Fix N_SE-22522, uri of filepath is supported
authorSoonmin Jung <sm0415.jung@samsung.com>
Tue, 22 Jan 2013 11:44:12 +0000 (20:44 +0900)
committerSoonmin Jung <sm0415.jung@samsung.com>
Tue, 22 Jan 2013 11:44:12 +0000 (20:44 +0900)
Change-Id: I4f3665aabe05bb452ef650547e5ddfa9bd61ea45

composer/src/ui-composer/msg-ui-composer-main.c
main/message.c

index f88fe60..33ef138 100755 (executable)
@@ -390,8 +390,12 @@ static void __msgc_get_service_app_svc_op(MSG_COMPOSER_VIEW_DATA_S *cd, service_
                                 __msgc_ui_parse_mmsto_uri(cd, svc_handle, (const char *)uri);
                        } else if (g_str_has_prefix(uri, MSG_BUNDLE_VALUE_FILE_URI)) { /* URI : file */
                                 __msgc_ui_parse_file_uri(cd, svc_handle, (const char *)uri);
+                       } else if (g_str_has_prefix(uri, "/")) {
+                               cd->attachlist = make_tokenize_list((const char *)uri, COMPOSER_BUNDLE_ATTACH_TOKEN);
+                               if (cd->attachlist)
+                                       msg_ui_composer_body_items_add(cd);
                        } else {
-                               D_EMSG("Not supported mime type");
+                               D_EMSG("Not supported URI type");
                                return;
                        }
                } else {
index 80ea57c..9cb04c9 100755 (executable)
@@ -348,8 +348,16 @@ static service_h __get_service_app_svc_op(const char *operation, service_h servi
                                        D_MSG("cb is NULL");
                                        return NULL;
                                }
+                       } else if (g_str_has_prefix(uri, "/")) {
+                               if (service_create(&svc_handle) < 0 || svc_handle == NULL) {
+                                       D_EMSG("service_create() is failed !!");
+                                       return NULL;
+                               }
+
+                               D_MSG("APPSVC ATTACHMENT = [%s]", uri);
+                               service_add_extra_data(svc_handle, MSG_BUNDLE_KEY_ATTACHFILE, uri);
                        } else {
-                               D_MSG("Not supported mime type");
+                               D_MSG("Not supported URI type");
                                return NULL;
                        }
                } else {