e_config : add aux_hint_supported_list to e_config 13/97213/4 accepted/tizen/3.0/common/20161130.065359 accepted/tizen/3.0/ivi/20161130.013149 accepted/tizen/3.0/mobile/20161130.013054 accepted/tizen/3.0/tv/20161130.013113 accepted/tizen/3.0/wearable/20161130.013129 accepted/tizen/common/20161129.173704 accepted/tizen/ivi/20161130.015810 accepted/tizen/mobile/20161130.015717 accepted/tizen/tv/20161130.015735 accepted/tizen/wearable/20161130.015749 submit/tizen/20161129.125210 submit/tizen_3.0/20161129.125357
authorJunghwan Choi <jhhh.choi@samsung.com>
Fri, 11 Nov 2016 11:48:06 +0000 (20:48 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 29 Nov 2016 12:39:48 +0000 (04:39 -0800)
Change-Id: I17a487734603f72fecb72e79feaf5670513d8401
Signed-off-by: Junghwan Choi <jhhh.choi@samsung.com>
src/bin/e_config.c
src/bin/e_config.h
src/bin/e_policy_wl.c

index e3c3622..24392b7 100644 (file)
@@ -23,6 +23,7 @@ static E_Config_DD *_e_config_env_var_edd = NULL;
 static E_Config_DD *_e_config_client_type_edd = NULL;
 static E_Config_DD *_e_config_policy_desk_edd = NULL;
 static E_Config_DD *_e_config_socket_access_edd = NULL;
+static E_Config_DD *_e_config_aux_hint_supported_edd = NULL;
 
 E_API int E_EVENT_CONFIG_MODE_CHANGED = 0;
 
@@ -51,6 +52,7 @@ _e_config_edd_shutdown(void)
    E_CONFIG_DD_FREE(_e_config_client_type_edd);
    E_CONFIG_DD_FREE(_e_config_policy_desk_edd);
    E_CONFIG_DD_FREE(_e_config_socket_access_edd);
+   E_CONFIG_DD_FREE(_e_config_aux_hint_supported_edd);
 }
 
 static void
@@ -147,6 +149,13 @@ _e_config_edd_init(Eina_Bool old)
    E_CONFIG_VAL(D, T, sock_symlink_access.smack.value, STR);
    E_CONFIG_VAL(D, T, sock_symlink_access.smack.flags, INT);
 
+   _e_config_aux_hint_supported_edd = E_CONFIG_DD_NEW("E_Config_Aux_Hint_Supported", E_Config_Aux_Hint_Supported);
+#undef T
+#undef D
+#define T E_Config_Aux_Hint_Supported
+#define D _e_config_aux_hint_supported_edd
+   E_CONFIG_VAL(D, T, name, STR);
+
    _e_config_edd = E_CONFIG_DD_NEW("E_Config", E_Config);
 #undef T
 #undef D
@@ -255,6 +264,7 @@ _e_config_edd_init(Eina_Bool old)
    E_CONFIG_VAL(D, T, delayed_load_idle_count, INT);
    E_CONFIG_VAL(D, T, use_buffer_flush, UCHAR);
    E_CONFIG_LIST(D, T, sock_accesses, _e_config_socket_access_edd);
+   E_CONFIG_LIST(D, T, aux_hint_supported, _e_config_aux_hint_supported_edd);
 }
 
 /* externally accessible functions */
@@ -834,6 +844,7 @@ _e_config_free(E_Config *ecf)
    E_Config_Desktop_Window_Profile *wp;
    E_Config_Policy_Desk *pd;
    E_Config_Socket_Access *sa;
+   E_Config_Aux_Hint_Supported *auxhint;
 
    if (!ecf) return;
 
@@ -888,6 +899,12 @@ _e_config_free(E_Config *ecf)
         E_FREE(sa);
      }
 
+   EINA_LIST_FREE(ecf->aux_hint_supported, auxhint)
+     {
+        eina_stringshare_del(auxhint->name);
+        E_FREE(auxhint);
+     }
+
    E_FREE(ecf);
 }
 
index 7e02f10..d2bccdd 100644 (file)
@@ -11,6 +11,7 @@ typedef struct _E_Config_Env_Var                E_Config_Env_Var;
 typedef struct _E_Config_Client_Type            E_Config_Client_Type;
 typedef struct _E_Config_Policy_Desk            E_Config_Policy_Desk;
 typedef struct _E_Config_Socket_Access          E_Config_Socket_Access;
+typedef struct _E_Config_Aux_Hint_Supported     E_Config_Aux_Hint_Supported;
 
 #else
 #ifndef E_CONFIG_H
@@ -157,6 +158,7 @@ struct _E_Config
    int delayed_load_idle_count;
    Eina_Bool use_buffer_flush;
    Eina_List *sock_accesses;
+   Eina_List *aux_hint_supported;
 };
 
 struct _E_Config_Desklock_Background
@@ -265,6 +267,11 @@ struct _E_Config_Socket_Access
    } sock_symlink_access;
 };
 
+struct _E_Config_Aux_Hint_Supported
+{
+   const char *name;
+};
+
 EINTERN int                   e_config_init(void);
 EINTERN int                   e_config_shutdown(void);
 
index 9889920..80c80d1 100644 (file)
@@ -5397,12 +5397,22 @@ void
 e_policy_wl_aux_hint_init(void)
 {
    int i, n;
+   E_Config_Aux_Hint_Supported *auxhint;
+   Eina_List *l;
+
    n = (sizeof(hint_names) / sizeof(char *));
 
    for (i = 0; i < n; i++)
      {
         e_hints_aux_hint_supported_add(hint_names[i]);
      }
+
+   EINA_LIST_FOREACH(e_config->aux_hint_supported, l, auxhint)
+     {
+        if (!auxhint->name) continue;
+        e_hints_aux_hint_supported_add(auxhint->name);
+     }
+
    return;
 }