diff options
author | Cedric BAIL <cedric@osg.samsung.com> | 2016-03-23 12:56:14 -0700 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2016-03-23 13:24:41 -0700 |
commit | c2a1c49ab2042f559b28e840e54feb8494888e0e (patch) | |
tree | c6eb110b7c479499854eede9d0c3ab0a80c9a11a /src/bin/elementary/elm_prefs_cc_out.c | |
parent | 9340855597e7e465435c69b6278650346688da14 (diff) | |
download | efl-c2a1c49ab2042f559b28e840e54feb8494888e0e.tar.gz |
elementary: move all legacy files to their expected new location.
Diffstat (limited to 'src/bin/elementary/elm_prefs_cc_out.c')
-rw-r--r-- | src/bin/elementary/elm_prefs_cc_out.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/bin/elementary/elm_prefs_cc_out.c b/src/bin/elementary/elm_prefs_cc_out.c new file mode 100644 index 0000000000..8913b71712 --- /dev/null +++ b/src/bin/elementary/elm_prefs_cc_out.c @@ -0,0 +1,52 @@ +#ifdef HAVE_CONFIG_H +# include "elementary_config.h" +#endif + +#include "elm_prefs_cc.h" +#include "elm_prefs_edd.x" + +Elm_Prefs_File *elm_prefs_file = NULL; + +void +data_init() +{ + eet_init(); + _elm_prefs_descriptors_init(); +} + +void +data_shutdown() +{ + _elm_prefs_descriptors_shutdown(); + eet_shutdown(); +} + +void +data_write() +{ + Eina_List *l; + Eet_File *ef; + Elm_Prefs_Page_Node *page; + + if (!elm_prefs_file || !elm_prefs_file->pages) + { + ERR("No data to put in \"%s\"", file_out); + exit(-1); + } + + ef = eet_open(file_out, EET_FILE_MODE_WRITE); + if (!ef) + { + ERR("Unable to open \"%s\" for writing output", file_out); + exit(-1); + } + + EINA_LIST_FOREACH (elm_prefs_file->pages, l, page) + { + if (!(eet_data_write + (ef, _page_edd, page->name, page, EET_COMPRESSION_DEFAULT))) + ERR("Failed to write page %s to file %s", page->name, file_out); + } + + eet_close(ef); +} |