jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bf79ec359d7f7c6bbb5d6cd5dbb22d233551ae58
commit bf79ec359d7f7c6bbb5d6cd5dbb22d233551ae58 Author: Subhransu Mohanty <sub.moha...@samsung.com> Date: Wed Nov 2 19:26:15 2016 +0900 vg_savers/eet: Added implementaion of vg saver to eet file --- src/modules/evas/vg_savers/eet/evas_vg_save_eet.c | 34 ++++++++++++++++------- 1 file 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 @@ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include "evas_common_private.h" -#include "evas_private.h" +#include "vg_common.h" static int _evas_vg_saver_eet_log_dom = -1; @@ -18,10 +13,22 @@ static int _evas_vg_saver_eet_log_dom = -1; #define INF(...) EINA_LOG_DOM_INFO(_evas_vg_saver_eet_log_dom, __VA_ARGS__) int -evas_vg_save_file_eet(void *vg EINA_UNUSED, const char *file EINA_UNUSED, const char *key EINA_UNUSED, int compress EINA_UNUSED) +evas_vg_save_file_eet(Vg_File_Data *evg_data, const char *file, const char *key, int compress) { - INF("No Implementation Yet"); - return 0; + Eet_Data_Descriptor *svg_node_eet; + Svg_Node *root; + Eet_File *ef; + + ef = eet_open(file, EET_FILE_MODE_WRITE); + if (!ef) + return EVAS_LOAD_ERROR_GENERIC; + + svg_node_eet = vg_common_svg_node_eet(); + root = vg_common_create_svg_node(evg_data); + eet_data_write(ef, svg_node_eet, key, root, compress); + eet_close(ef); + + return EVAS_LOAD_ERROR_NONE; } static Evas_Vg_Save_Func evas_vg_save_eet_func = @@ -34,6 +41,13 @@ module_open(Evas_Module *em) { if (!em) return 0; em->functions = (void *)(&evas_vg_save_eet_func); + _evas_vg_saver_eet_log_dom = eina_log_domain_register + ("vg-save-eet", EVAS_DEFAULT_LOG_COLOR); + if (_evas_vg_saver_eet_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } return 1; } @@ -53,7 +67,7 @@ static Evas_Module_Api evas_modapi = } }; -EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_VG_LOADER, vg_saver, eet); +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_VG_SAVER, vg_saver, eet); #ifndef EVAS_STATIC_BUILD_VG_EET EVAS_EINA_MODULE_DEFINE(vg_saver, eet); --