support "file://" prefix
authorJisung Ahn <jcastle.ahn@samsung.com>
Fri, 24 Aug 2012 06:48:53 +0000 (15:48 +0900)
committerJisung Ahn <jcastle.ahn@samsung.com>
Fri, 24 Aug 2012 06:48:53 +0000 (15:48 +0900)
Change-Id: Iffdef64bd50c4c0f42a96e7b1466189f3f6545f9

main/src/control/ivug-parameter.c

index 5bc94c7..ae5232e 100755 (executable)
@@ -54,7 +54,9 @@
 
 //default values
 #define IVUG_DEFAULT_MODE IVUG_MODE_SINGLE
-#define IVUG_DEFAULT_INDEX (1)                         // First item
+#define IVUG_DEFAULT_INDEX (1)                         // First item\r
+\r
+#define IVUG_FILE_PREFIX               "file://"\r
 
 static inline
 void _ivug_free(char **val)
@@ -355,8 +357,15 @@ ivug_param_create_from_bundle(service_h service)
 
        service_get_extra_data (service, IVUG_BUNDLE_KEY_PATH, &szFilePath);
        if ( szFilePath != NULL )
-       {
-               data->filepath = strdup(szFilePath);
+       {\r
+               if(strncmp(IVUG_FILE_PREFIX, szFilePath, strlen(IVUG_FILE_PREFIX)) == 0)\r
+               {\r
+                       data->filepath = strdup(szFilePath + strlen(IVUG_FILE_PREFIX));\r
+               }\r
+               else\r
+               {\r
+                       data->filepath = strdup(szFilePath);\r
+               }\r
                MSG_IVUG_HIGH("Current File = %s", data->filepath);
                _ivug_free(&szFilePath);
        }