summaryrefslogtreecommitdiff
path: root/src/modules/evas/vg_savers
diff options
context:
space:
mode:
authorSubhransu Mohanty <sub.mohanty@samsung.com>2016-11-02 19:26:15 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-10-27 14:58:38 +0900
commitbf79ec359d7f7c6bbb5d6cd5dbb22d233551ae58 (patch)
tree0629d81ad4ad18f29c131932b3efb5287cb9ebbf /src/modules/evas/vg_savers
parent24ac2d65160058193ec881f37a9ba8a4271d0605 (diff)
vg_savers/eet: Added implementaion of vg saver to eet file
Diffstat (limited to 'src/modules/evas/vg_savers')
-rw-r--r--src/modules/evas/vg_savers/eet/evas_vg_save_eet.c34
1 files changed, 24 insertions, 10 deletions
diff --git a/src/modules/evas/vg_savers/eet/evas_vg_save_eet.c b/src/modules/evas/vg_savers/eet/evas_vg_save_eet.c
index 700c55bb2c..c0166d33eb 100644
--- a/src/modules/evas/vg_savers/eet/evas_vg_save_eet.c
+++ b/src/modules/evas/vg_savers/eet/evas_vg_save_eet.c
@@ -1,9 +1,4 @@
1#ifdef HAVE_CONFIG_H 1#include "vg_common.h"
2# include <config.h>
3#endif
4
5#include "evas_common_private.h"
6#include "evas_private.h"
7 2
8static int _evas_vg_saver_eet_log_dom = -1; 3static int _evas_vg_saver_eet_log_dom = -1;
9 4
@@ -18,10 +13,22 @@ static int _evas_vg_saver_eet_log_dom = -1;
18#define INF(...) EINA_LOG_DOM_INFO(_evas_vg_saver_eet_log_dom, __VA_ARGS__) 13#define INF(...) EINA_LOG_DOM_INFO(_evas_vg_saver_eet_log_dom, __VA_ARGS__)
19 14
20int 15int
21evas_vg_save_file_eet(void *vg EINA_UNUSED, const char *file EINA_UNUSED, const char *key EINA_UNUSED, int compress EINA_UNUSED) 16evas_vg_save_file_eet(Vg_File_Data *evg_data, const char *file, const char *key, int compress)
22{ 17{
23 INF("No Implementation Yet"); 18 Eet_Data_Descriptor *svg_node_eet;
24 return 0; 19 Svg_Node *root;
20 Eet_File *ef;
21
22 ef = eet_open(file, EET_FILE_MODE_WRITE);
23 if (!ef)
24 return EVAS_LOAD_ERROR_GENERIC;
25
26 svg_node_eet = vg_common_svg_node_eet();
27 root = vg_common_create_svg_node(evg_data);
28 eet_data_write(ef, svg_node_eet, key, root, compress);
29 eet_close(ef);
30
31 return EVAS_LOAD_ERROR_NONE;
25} 32}
26 33
27static Evas_Vg_Save_Func evas_vg_save_eet_func = 34static Evas_Vg_Save_Func evas_vg_save_eet_func =
@@ -34,6 +41,13 @@ module_open(Evas_Module *em)
34{ 41{
35 if (!em) return 0; 42 if (!em) return 0;
36 em->functions = (void *)(&evas_vg_save_eet_func); 43 em->functions = (void *)(&evas_vg_save_eet_func);
44 _evas_vg_saver_eet_log_dom = eina_log_domain_register
45 ("vg-save-eet", EVAS_DEFAULT_LOG_COLOR);
46 if (_evas_vg_saver_eet_log_dom < 0)
47 {
48 EINA_LOG_ERR("Can not create a module log domain.");
49 return 0;
50 }
37 return 1; 51 return 1;
38} 52}
39 53
@@ -53,7 +67,7 @@ static Evas_Module_Api evas_modapi =
53 } 67 }
54}; 68};
55 69
56EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_VG_LOADER, vg_saver, eet); 70EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_VG_SAVER, vg_saver, eet);
57 71
58#ifndef EVAS_STATIC_BUILD_VG_EET 72#ifndef EVAS_STATIC_BUILD_VG_EET
59EVAS_EINA_MODULE_DEFINE(vg_saver, eet); 73EVAS_EINA_MODULE_DEFINE(vg_saver, eet);