e_config: remove the unused functions 01/318301/1
authorSooChan Lim <sc1.lim@samsung.com>
Tue, 14 Jan 2025 08:14:32 +0000 (17:14 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 15 Jan 2025 08:08:45 +0000 (17:08 +0900)
remove them.

Change-Id: Ibe594b497d8af909da6ba17a2779c10e97c15cfd

src/bin/core/e_config.c
src/bin/core/e_config_intern.h

index b5c3db918bf9da2174e0e278c7d67cfa4fa1bed9..b482795d3de911ce1369f3c3bba21c1e17360a5b 100644 (file)
@@ -583,13 +583,6 @@ e_config_load(void)
    E_CONFIG_LIMIT(e_config->pointer_thread_mode, 0, 1);
 }
 
-EINTERN int
-e_config_save(void)
-{
-   _e_config_save_cb(NULL);
-   return e_config_domain_save("e", _e_config_edd, e_config);
-}
-
 E_API void
 e_config_save_queue(void)
 {
@@ -611,109 +604,6 @@ e_config_profile_set(const char *prof)
    e_util_env_set("E_CONF_PROFILE", _e_config_profile);
 }
 
-EINTERN char *
-e_config_profile_dir_get(const char *prof)
-{
-   char buf[PATH_MAX];
-
-   e_user_dir_snprintf(buf, sizeof(buf), "config/%s", prof);
-   if (ecore_file_is_dir(buf)) return strdup(buf);
-   e_prefix_data_snprintf(buf, sizeof(buf), "data/config/%s", prof);
-   if (ecore_file_is_dir(buf)) return strdup(buf);
-   return NULL;
-}
-
-static int
-_cb_sort_files(char *f1, char *f2)
-{
-   return strcmp(f1, f2);
-}
-
-EINTERN Eina_List *
-e_config_profile_list(void)
-{
-   Eina_List *files;
-   char buf[PATH_MAX], *p;
-   Eina_List *flist = NULL;
-   size_t len;
-
-   len = e_user_dir_concat_static(buf, "config");
-   if (len + 1 >= (int)sizeof(buf))
-     return NULL;
-
-   files = ecore_file_ls(buf);
-
-   buf[len] = '/';
-   len++;
-
-   p = buf + len;
-   len = sizeof(buf) - len;
-   if (files)
-     {
-        char *file;
-
-        files = eina_list_sort(files, 0, (Eina_Compare_Cb)_cb_sort_files);
-        EINA_LIST_FREE(files, file)
-          {
-             if (eina_strlcpy(p, file, len) >= len)
-               {
-                  free(file);
-                  continue;
-               }
-             if (ecore_file_is_dir(buf))
-               flist = eina_list_append(flist, file);
-             else
-               free(file);
-          }
-     }
-   len = e_prefix_data_concat_static(buf, "data/config");
-   if (len + 1 >= sizeof(buf))
-     return NULL;
-
-   files = ecore_file_ls(buf);
-
-   buf[len] = '/';
-   len++;
-
-   p = buf + len;
-   len = sizeof(buf) - len;
-   if (files)
-     {
-        char *file;
-        files = eina_list_sort(files, 0, (Eina_Compare_Cb)_cb_sort_files);
-        EINA_LIST_FREE(files, file)
-          {
-             if (eina_strlcpy(p, file, len) >= len)
-               {
-                  free(file);
-                  continue;
-               }
-             if (ecore_file_is_dir(buf))
-               {
-                  const Eina_List *l;
-                  const char *tmp;
-                  EINA_LIST_FOREACH(flist, l, tmp)
-                    if (!strcmp(file, tmp)) break;
-
-                  if (!l) flist = eina_list_append(flist, file);
-                  else free(file);
-               }
-             else
-               free(file);
-          }
-     }
-   return flist;
-}
-
-EINTERN void
-e_config_profile_add(const char *prof)
-{
-   char buf[4096];
-   if (e_user_dir_snprintf(buf, sizeof(buf), "config/%s", prof) >= sizeof(buf))
-     return;
-   ecore_file_mkdir(buf);
-}
-
 EINTERN void
 e_config_profile_del(const char *prof)
 {
index b29afb4dceab067c04158b0c2ee841a24de8f0c4..2cce55eefaf6ac7d345666c117b10f8f2b262397 100644 (file)
@@ -8,12 +8,8 @@ EINTERN int         e_config_init(void);
 EINTERN int         e_config_shutdown(void);
 
 EINTERN void        e_config_load(void);
-EINTERN int         e_config_save(void);
 EINTERN const char *e_config_profile_get(void);
-EINTERN char       *e_config_profile_dir_get(const char *prof);
 EINTERN void        e_config_profile_set(const char *prof);
-EINTERN Eina_List  *e_config_profile_list(void);
-EINTERN void        e_config_profile_add(const char *prof);
 EINTERN void        e_config_profile_del(const char *prof);
 EINTERN void        e_config_save_block_set(int block);
 EINTERN int         e_config_save_block_get(void);