summaryrefslogtreecommitdiff
path: root/legacy/eet/src/lib/eet_data.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2010-01-21 12:45:35 +0000
committerCedric BAIL <cedric.bail@free.fr>2010-01-21 12:45:35 +0000
commit5a087664ba873a320886ee231ab379408b6cace1 (patch)
treebc9dc96f193e05027a5756c4deb44688369fbeea /legacy/eet/src/lib/eet_data.c
parent33ba2279fcf0e6bcc022d4dae0715a2cd12cb0e7 (diff)
* eet: Add an experimentale API for walking Eet_Node.
This API should be used to generate native scripting object from an Eet_Data. SVN revision: 45389
Diffstat (limited to 'legacy/eet/src/lib/eet_data.c')
-rw-r--r--legacy/eet/src/lib/eet_data.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/legacy/eet/src/lib/eet_data.c b/legacy/eet/src/lib/eet_data.c
index bb71ba22fb..34a3b2bde7 100644
--- a/legacy/eet/src/lib/eet_data.c
+++ b/legacy/eet/src/lib/eet_data.c
@@ -1947,7 +1947,7 @@ _eet_data_dump_encode(int parent_type,
1947 { 1947 {
1948 case EET_T_STRING: 1948 case EET_T_STRING:
1949 case EET_T_INLINED_STRING: 1949 case EET_T_INLINED_STRING:
1950 data = eet_data_put_type(ed, n->type, &(n->data.str), &size); 1950 data = eet_data_put_type(ed, n->type, &(n->data.value.str), &size);
1951 if (data) eet_data_encode(ed, ds, data, node->name, size, n->type, node->type); 1951 if (data) eet_data_encode(ed, ds, data, node->name, size, n->type, node->type);
1952 break; 1952 break;
1953 case EET_T_NULL: 1953 case EET_T_NULL:
@@ -1982,7 +1982,7 @@ _eet_data_dump_encode(int parent_type,
1982 { 1982 {
1983 case EET_T_STRING: 1983 case EET_T_STRING:
1984 case EET_T_INLINED_STRING: 1984 case EET_T_INLINED_STRING:
1985 data = eet_data_put_type(ed, n->type, &(n->data.str), &size); 1985 data = eet_data_put_type(ed, n->type, &(n->data.value.str), &size);
1986 if (data) eet_data_encode(ed, ds, data, node->name, size, n->type, node->type); 1986 if (data) eet_data_encode(ed, ds, data, node->name, size, n->type, node->type);
1987 break; 1987 break;
1988 case EET_T_NULL: 1988 case EET_T_NULL:
@@ -2022,7 +2022,7 @@ _eet_data_dump_encode(int parent_type,
2022 { 2022 {
2023 case EET_T_STRING: 2023 case EET_T_STRING:
2024 case EET_T_INLINED_STRING: 2024 case EET_T_INLINED_STRING:
2025 data = eet_data_put_type(ed, n->type, &(n->data.str), &size); 2025 data = eet_data_put_type(ed, n->type, &(n->data.value.str), &size);
2026 if (data) eet_data_encode(ed, ds, data, node->name, size, n->type, node->type); 2026 if (data) eet_data_encode(ed, ds, data, node->name, size, n->type, node->type);
2027 break; 2027 break;
2028 case EET_T_NULL: 2028 case EET_T_NULL:
@@ -2045,7 +2045,7 @@ _eet_data_dump_encode(int parent_type,
2045 2045
2046#define EET_DATA_NODE_ENCODE(Eet_Type, Type) \ 2046#define EET_DATA_NODE_ENCODE(Eet_Type, Type) \
2047 case Eet_Type: \ 2047 case Eet_Type: \
2048 data = eet_data_put_type(ed, node->type, &(node->data.Type), &size); \ 2048 data = eet_data_put_type(ed, node->type, &(node->data.value.Type), &size); \
2049 if (data) \ 2049 if (data) \
2050 { \ 2050 { \
2051 eet_data_encode(ed, ds, data, node->name, size, node->type, parent_type); \ 2051 eet_data_encode(ed, ds, data, node->name, size, node->type, parent_type); \
@@ -2214,67 +2214,67 @@ _eet_data_dump_parse(Eet_Dictionary *ed,
2214 if (!strcmp(tok3, "char:")) 2214 if (!strcmp(tok3, "char:"))
2215 { 2215 {
2216 n->type = EET_T_CHAR; 2216 n->type = EET_T_CHAR;
2217 sscanf(tok4, "%hhi", &(n->data.c)); 2217 sscanf(tok4, "%hhi", &(n->data.value.c));
2218 } 2218 }
2219 else if (!strcmp(tok3, "short:")) 2219 else if (!strcmp(tok3, "short:"))
2220 { 2220 {
2221 n->type = EET_T_SHORT; 2221 n->type = EET_T_SHORT;
2222 sscanf(tok4, "%hi", &(n->data.s)); 2222 sscanf(tok4, "%hi", &(n->data.value.s));
2223 } 2223 }
2224 else if (!strcmp(tok3, "int:")) 2224 else if (!strcmp(tok3, "int:"))
2225 { 2225 {
2226 n->type = EET_T_INT; 2226 n->type = EET_T_INT;
2227 sscanf(tok4, "%i", &(n->data.i)); 2227 sscanf(tok4, "%i", &(n->data.value.i));
2228 } 2228 }
2229 else if (!strcmp(tok3, "long_long:")) 2229 else if (!strcmp(tok3, "long_long:"))
2230 { 2230 {
2231 n->type = EET_T_LONG_LONG; 2231 n->type = EET_T_LONG_LONG;
2232 sscanf(tok4, "%lli", &(n->data.l)); 2232 sscanf(tok4, "%lli", &(n->data.value.l));
2233 } 2233 }
2234 else if (!strcmp(tok3, "float:")) 2234 else if (!strcmp(tok3, "float:"))
2235 { 2235 {
2236 n->type = EET_T_FLOAT; 2236 n->type = EET_T_FLOAT;
2237 sscanf(tok4, "%f", &(n->data.f)); 2237 sscanf(tok4, "%f", &(n->data.value.f));
2238 } 2238 }
2239 else if (!strcmp(tok3, "double:")) 2239 else if (!strcmp(tok3, "double:"))
2240 { 2240 {
2241 n->type = EET_T_DOUBLE; 2241 n->type = EET_T_DOUBLE;
2242 sscanf(tok4, "%lf", &(n->data.d)); 2242 sscanf(tok4, "%lf", &(n->data.value.d));
2243 } 2243 }
2244 else if (!strcmp(tok3, "uchar:")) 2244 else if (!strcmp(tok3, "uchar:"))
2245 { 2245 {
2246 n->type = EET_T_UCHAR; 2246 n->type = EET_T_UCHAR;
2247 sscanf(tok4, "%hhu", &(n->data.uc)); 2247 sscanf(tok4, "%hhu", &(n->data.value.uc));
2248 } 2248 }
2249 else if (!strcmp(tok3, "ushort:")) 2249 else if (!strcmp(tok3, "ushort:"))
2250 { 2250 {
2251 n->type = EET_T_USHORT; 2251 n->type = EET_T_USHORT;
2252 sscanf(tok4, "%hu", &(n->data.us)); 2252 sscanf(tok4, "%hu", &(n->data.value.us));
2253 } 2253 }
2254 else if (!strcmp(tok3, "uint:")) 2254 else if (!strcmp(tok3, "uint:"))
2255 { 2255 {
2256 n->type = EET_T_UINT; 2256 n->type = EET_T_UINT;
2257 sscanf(tok4, "%u", &(n->data.ui)); 2257 sscanf(tok4, "%u", &(n->data.value.ui));
2258 } 2258 }
2259 else if (!strcmp(tok3, "ulong_long:")) 2259 else if (!strcmp(tok3, "ulong_long:"))
2260 { 2260 {
2261 n->type = EET_T_ULONG_LONG; 2261 n->type = EET_T_ULONG_LONG;
2262 sscanf(tok4, "%llu", &(n->data.ul)); 2262 sscanf(tok4, "%llu", &(n->data.value.ul));
2263 } 2263 }
2264 else if (!strcmp(tok3, "string:")) 2264 else if (!strcmp(tok3, "string:"))
2265 { 2265 {
2266 n->type = EET_T_STRING; 2266 n->type = EET_T_STRING;
2267 n->data.str = eina_stringshare_add(tok4); 2267 n->data.value.str = eina_stringshare_add(tok4);
2268 } 2268 }
2269 else if (!strcmp(tok3, "inlined:")) 2269 else if (!strcmp(tok3, "inlined:"))
2270 { 2270 {
2271 n->type = EET_T_INLINED_STRING; 2271 n->type = EET_T_INLINED_STRING;
2272 n->data.str = eina_stringshare_add(tok4); 2272 n->data.value.str = eina_stringshare_add(tok4);
2273 } 2273 }
2274 else if (!strcmp(tok3, "null")) 2274 else if (!strcmp(tok3, "null"))
2275 { 2275 {
2276 n->type = EET_T_NULL; 2276 n->type = EET_T_NULL;
2277 n->data.str = NULL; 2277 n->data.value.str = NULL;
2278 } 2278 }
2279 else 2279 else
2280 { 2280 {