diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/eet/src/lib/Eet_private.h | 191 |
1 files changed, 191 insertions, 0 deletions
diff --git a/libraries/eet/src/lib/Eet_private.h b/libraries/eet/src/lib/Eet_private.h new file mode 100644 index 0000000..83f4c18 --- /dev/null +++ b/libraries/eet/src/lib/Eet_private.h | |||
@@ -0,0 +1,191 @@ | |||
1 | #ifndef _EET_PRIVATE_H | ||
2 | #define _EET_PRIVATE_H | ||
3 | |||
4 | #include <Eina.h> | ||
5 | |||
6 | typedef enum _Eet_Convert_Type Eet_Convert_Type; | ||
7 | |||
8 | enum _Eet_Convert_Type | ||
9 | { | ||
10 | EET_D_NOTHING = 0, | ||
11 | EET_D_FLOAT = 1 << 1, | ||
12 | EET_D_DOUBLE = 1 << 2, | ||
13 | EET_D_FIXED_POINT = 1 << 4 | ||
14 | }; | ||
15 | |||
16 | typedef struct _Eet_String Eet_String; | ||
17 | typedef struct _Eet_Convert Eet_Convert; | ||
18 | |||
19 | struct _Eet_Convert | ||
20 | { | ||
21 | float f; | ||
22 | double d; | ||
23 | Eina_F32p32 fp; | ||
24 | |||
25 | Eet_Convert_Type type; | ||
26 | }; | ||
27 | |||
28 | struct _Eet_String | ||
29 | { | ||
30 | const char *str; | ||
31 | |||
32 | int len; | ||
33 | |||
34 | int next; | ||
35 | int prev; | ||
36 | |||
37 | unsigned char hash; | ||
38 | unsigned char allocated : 1; | ||
39 | }; | ||
40 | struct _Eet_Dictionary | ||
41 | { | ||
42 | Eet_String *all; | ||
43 | Eina_Hash *converts; | ||
44 | |||
45 | int size; | ||
46 | int offset; | ||
47 | |||
48 | int hash[256]; | ||
49 | |||
50 | int count; | ||
51 | int total; | ||
52 | |||
53 | const char *start; | ||
54 | const char *end; | ||
55 | }; | ||
56 | |||
57 | struct _Eet_Node | ||
58 | { | ||
59 | int type; | ||
60 | int count; | ||
61 | const char *name; | ||
62 | const char *key; | ||
63 | Eet_Node *values; | ||
64 | Eet_Node *next; | ||
65 | Eet_Node *parent; | ||
66 | Eet_Node_Data data; | ||
67 | }; | ||
68 | |||
69 | /* | ||
70 | * variable and macros used for the eina_log module | ||
71 | */ | ||
72 | extern int _eet_log_dom_global; | ||
73 | |||
74 | /* | ||
75 | * Macros that are used everywhere | ||
76 | * | ||
77 | * the first four macros are the general macros for the lib | ||
78 | */ | ||
79 | #ifdef EET_DEFAULT_LOG_COLOR | ||
80 | # undef EET_DEFAULT_LOG_COLOR | ||
81 | #endif /* ifdef EET_DEFAULT_LOG_COLOR */ | ||
82 | #define EET_DEFAULT_LOG_COLOR EINA_COLOR_CYAN | ||
83 | #ifdef ERR | ||
84 | # undef ERR | ||
85 | #endif /* ifdef ERR */ | ||
86 | #define ERR(...) EINA_LOG_DOM_ERR(_eet_log_dom_global, __VA_ARGS__) | ||
87 | #ifdef DBG | ||
88 | # undef DBG | ||
89 | #endif /* ifdef DBG */ | ||
90 | #define DBG(...) EINA_LOG_DOM_DBG(_eet_log_dom_global, __VA_ARGS__) | ||
91 | #ifdef INF | ||
92 | # undef INF | ||
93 | #endif /* ifdef INF */ | ||
94 | #define INF(...) EINA_LOG_DOM_INFO(_eet_log_dom_global, __VA_ARGS__) | ||
95 | #ifdef WRN | ||
96 | # undef WRN | ||
97 | #endif /* ifdef WRN */ | ||
98 | #define WRN(...) EINA_LOG_DOM_WARN(_eet_log_dom_global, __VA_ARGS__) | ||
99 | #ifdef CRIT | ||
100 | # undef CRIT | ||
101 | #endif /* ifdef CRIT */ | ||
102 | #define CRIT(...) EINA_LOG_DOM_CRIT(_eet_log_dom_global, __VA_ARGS__) | ||
103 | |||
104 | Eet_Dictionary * | ||
105 | eet_dictionary_add(void); | ||
106 | void | ||
107 | eet_dictionary_free(Eet_Dictionary *ed); | ||
108 | int | ||
109 | eet_dictionary_string_add(Eet_Dictionary *ed, | ||
110 | const char *string); | ||
111 | int | ||
112 | eet_dictionary_string_get_size(const Eet_Dictionary *ed, | ||
113 | int index); | ||
114 | const char * | ||
115 | eet_dictionary_string_get_char(const Eet_Dictionary *ed, | ||
116 | int index); | ||
117 | Eina_Bool | ||
118 | eet_dictionary_string_get_float(const Eet_Dictionary *ed, | ||
119 | int index, | ||
120 | float *result); | ||
121 | Eina_Bool | ||
122 | eet_dictionary_string_get_double(const Eet_Dictionary *ed, | ||
123 | int index, | ||
124 | double *result); | ||
125 | Eina_Bool | ||
126 | eet_dictionary_string_get_fp(const Eet_Dictionary *ed, | ||
127 | int index, | ||
128 | Eina_F32p32 *result); | ||
129 | int | ||
130 | eet_dictionary_string_get_hash(const Eet_Dictionary *ed, | ||
131 | int index); | ||
132 | |||
133 | int _eet_hash_gen(const char *key, | ||
134 | int hash_size); | ||
135 | |||
136 | const void * | ||
137 | eet_identity_check(const void *data_base, | ||
138 | unsigned int data_length, | ||
139 | void **sha1, | ||
140 | int *sha1_length, | ||
141 | const void *signature_base, | ||
142 | unsigned int signature_length, | ||
143 | const void **raw_signature_base, | ||
144 | unsigned int *raw_signature_length, | ||
145 | int *x509_length); | ||
146 | void * | ||
147 | eet_identity_compute_sha1(const void *data_base, | ||
148 | unsigned int data_length, | ||
149 | int *sha1_length); | ||
150 | Eet_Error | ||
151 | eet_cipher(const void *data, | ||
152 | unsigned int size, | ||
153 | const char *key, | ||
154 | unsigned int length, | ||
155 | void **result, | ||
156 | unsigned int *result_length); | ||
157 | Eet_Error | ||
158 | eet_decipher(const void *data, | ||
159 | unsigned int size, | ||
160 | const char *key, | ||
161 | unsigned int length, | ||
162 | void **result, | ||
163 | unsigned int *result_length); | ||
164 | Eet_Error | ||
165 | eet_identity_sign(FILE *fp, | ||
166 | Eet_Key *key); | ||
167 | void | ||
168 | eet_identity_unref(Eet_Key *key); | ||
169 | void | ||
170 | eet_identity_ref(Eet_Key *key); | ||
171 | |||
172 | void | ||
173 | eet_node_shutdown(void); | ||
174 | int | ||
175 | eet_node_init(void); | ||
176 | Eet_Node * | ||
177 | eet_node_new(void); | ||
178 | void | ||
179 | eet_node_free(Eet_Node *node); | ||
180 | |||
181 | #ifndef PATH_MAX | ||
182 | # define PATH_MAX 4096 | ||
183 | #endif /* ifndef PATH_MAX */ | ||
184 | |||
185 | #ifdef DNDEBUG | ||
186 | # define EET_ASSERT(Test, Do) if (Test == 0) {Do; } | ||
187 | #else /* ifdef DNDEBUG */ | ||
188 | # define EET_ASSERT(Test, Do) if (Test == 0) {abort(); } | ||
189 | #endif /* ifdef DNDEBUG */ | ||
190 | |||
191 | #endif /* ifndef _EET_PRIVATE_H */ | ||