2008-03-07 23:28:12 -08:00
|
|
|
/*
|
|
|
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
|
|
|
*/
|
|
|
|
|
2003-02-02 17:07:58 -08:00
|
|
|
#ifndef _EET_PRIVATE_H
|
|
|
|
#define _EET_PRIVATE_H
|
|
|
|
|
2009-09-29 06:24:45 -07:00
|
|
|
#include <Eina.h>
|
|
|
|
|
|
|
|
typedef enum _Eet_Convert_Type Eet_Convert_Type;
|
|
|
|
|
|
|
|
enum _Eet_Convert_Type
|
|
|
|
{
|
2010-07-27 18:45:57 -07:00
|
|
|
EET_D_NOT_CONVERTED = 0,
|
|
|
|
EET_D_FLOAT = 1 << 1,
|
|
|
|
EET_D_DOUBLE = 1 << 2,
|
|
|
|
EET_D_FIXED_POINT = 1 << 4
|
2009-09-29 06:24:45 -07:00
|
|
|
};
|
|
|
|
|
2010-07-27 18:45:57 -07:00
|
|
|
typedef struct _Eet_String Eet_String;
|
2008-02-29 22:38:09 -08:00
|
|
|
|
|
|
|
struct _Eet_String
|
|
|
|
{
|
2010-07-27 18:45:57 -07:00
|
|
|
const char *mmap;
|
|
|
|
char *str;
|
2008-02-29 22:38:09 -08:00
|
|
|
|
2010-07-27 18:45:57 -07:00
|
|
|
int hash;
|
|
|
|
int len;
|
2008-03-09 09:16:40 -07:00
|
|
|
|
2010-07-27 18:45:57 -07:00
|
|
|
int next;
|
|
|
|
int prev;
|
2008-03-09 09:16:40 -07:00
|
|
|
|
2010-07-27 18:45:57 -07:00
|
|
|
float f;
|
|
|
|
double d;
|
|
|
|
Eina_F32p32 fp;
|
2008-02-29 22:38:09 -08:00
|
|
|
|
2010-07-27 18:45:57 -07:00
|
|
|
Eet_Convert_Type type;
|
2008-02-29 22:38:09 -08:00
|
|
|
};
|
|
|
|
struct _Eet_Dictionary
|
|
|
|
{
|
2010-07-27 18:45:57 -07:00
|
|
|
Eet_String *all;
|
2008-02-29 22:38:09 -08:00
|
|
|
|
2010-07-27 18:45:57 -07:00
|
|
|
int size;
|
|
|
|
int offset;
|
2008-02-29 22:38:09 -08:00
|
|
|
|
2010-07-27 18:45:57 -07:00
|
|
|
int hash[256];
|
2008-02-29 22:38:09 -08:00
|
|
|
|
2010-07-27 18:45:57 -07:00
|
|
|
int count;
|
|
|
|
int total;
|
2008-03-06 09:52:59 -08:00
|
|
|
|
2010-07-27 18:45:57 -07:00
|
|
|
const char *start;
|
|
|
|
const char *end;
|
2008-02-29 22:38:09 -08:00
|
|
|
};
|
|
|
|
|
2009-04-16 05:18:18 -07:00
|
|
|
struct _Eet_Node
|
|
|
|
{
|
2010-07-27 18:45:57 -07:00
|
|
|
int type;
|
|
|
|
int count;
|
2009-04-16 05:18:18 -07:00
|
|
|
const char *name;
|
|
|
|
const char *key;
|
2010-07-27 18:45:57 -07:00
|
|
|
Eet_Node *values;
|
|
|
|
Eet_Node *next;
|
|
|
|
Eet_Node *parent;
|
2010-01-21 04:45:35 -08:00
|
|
|
Eet_Node_Data data;
|
2009-04-16 05:18:18 -07:00
|
|
|
};
|
|
|
|
|
2009-10-01 20:59:17 -07:00
|
|
|
/*
|
2009-09-15 04:22:11 -07:00
|
|
|
* variable and macros used for the eina_log module
|
|
|
|
*/
|
|
|
|
extern int _eet_log_dom_global;
|
|
|
|
|
2009-10-01 20:59:17 -07:00
|
|
|
/*
|
|
|
|
* Macros that are used everywhere
|
2009-09-15 04:22:11 -07:00
|
|
|
*
|
|
|
|
* the first four macros are the general macros for the lib
|
|
|
|
*/
|
|
|
|
#ifdef EET_DEFAULT_LOG_COLOR
|
2009-10-08 22:38:52 -07:00
|
|
|
# undef EET_DEFAULT_LOG_COLOR
|
2009-09-15 04:22:11 -07:00
|
|
|
#endif
|
2009-09-17 07:33:06 -07:00
|
|
|
#define EET_DEFAULT_LOG_COLOR EINA_COLOR_CYAN
|
2009-09-15 04:22:11 -07:00
|
|
|
#ifdef ERR
|
2009-10-08 22:38:52 -07:00
|
|
|
# undef ERR
|
2009-09-15 04:22:11 -07:00
|
|
|
#endif
|
2009-10-01 20:59:17 -07:00
|
|
|
#define ERR(...) EINA_LOG_DOM_ERR(_eet_log_dom_global, __VA_ARGS__)
|
2009-09-15 04:22:11 -07:00
|
|
|
#ifdef DBG
|
2009-10-08 22:38:52 -07:00
|
|
|
# undef DBG
|
2009-09-15 04:22:11 -07:00
|
|
|
#endif
|
2009-10-01 20:59:17 -07:00
|
|
|
#define DBG(...) EINA_LOG_DOM_DBG(_eet_log_dom_global, __VA_ARGS__)
|
2009-09-15 04:22:11 -07:00
|
|
|
#ifdef INF
|
2009-10-08 22:38:52 -07:00
|
|
|
# undef INF
|
2009-09-15 04:22:11 -07:00
|
|
|
#endif
|
2009-10-01 20:59:17 -07:00
|
|
|
#define INF(...) EINA_LOG_DOM_INFO(_eet_log_dom_global, __VA_ARGS__)
|
2009-09-15 04:22:11 -07:00
|
|
|
#ifdef WRN
|
2009-10-08 22:38:52 -07:00
|
|
|
# undef WRN
|
2009-09-15 04:22:11 -07:00
|
|
|
#endif
|
2009-10-01 20:59:17 -07:00
|
|
|
#define WRN(...) EINA_LOG_DOM_WARN(_eet_log_dom_global, __VA_ARGS__)
|
2009-09-15 04:22:11 -07:00
|
|
|
#ifdef CRIT
|
2009-10-08 22:38:52 -07:00
|
|
|
# undef CRIT
|
2009-09-15 04:22:11 -07:00
|
|
|
#endif
|
2009-10-01 20:59:17 -07:00
|
|
|
#define CRIT(...) EINA_LOG_DOM_CRIT(_eet_log_dom_global, __VA_ARGS__)
|
2009-09-15 04:22:11 -07:00
|
|
|
|
2010-07-27 18:45:57 -07:00
|
|
|
Eet_Dictionary *eet_dictionary_add(void);
|
|
|
|
void eet_dictionary_free(Eet_Dictionary *ed);
|
|
|
|
int eet_dictionary_string_add(Eet_Dictionary *ed,
|
|
|
|
const char *string);
|
|
|
|
int eet_dictionary_string_get_size(const Eet_Dictionary *ed,
|
|
|
|
int index);
|
|
|
|
const char * eet_dictionary_string_get_char(const Eet_Dictionary *ed,
|
|
|
|
int index);
|
|
|
|
Eina_Bool eet_dictionary_string_get_float(const Eet_Dictionary *ed,
|
|
|
|
int index,
|
|
|
|
float *result);
|
|
|
|
Eina_Bool eet_dictionary_string_get_double(const Eet_Dictionary *ed,
|
|
|
|
int index,
|
|
|
|
double *result);
|
|
|
|
Eina_Bool eet_dictionary_string_get_fp(const Eet_Dictionary *ed,
|
|
|
|
int index,
|
|
|
|
Eina_F32p32 *result);
|
|
|
|
int eet_dictionary_string_get_hash(const Eet_Dictionary *ed,
|
|
|
|
int index);
|
|
|
|
|
|
|
|
int _eet_hash_gen(const char *key, int hash_size);
|
|
|
|
|
|
|
|
const void * eet_identity_check(const void *data_base,
|
|
|
|
unsigned int data_length,
|
|
|
|
void **sha1,
|
|
|
|
int *sha1_length,
|
|
|
|
const void *signature_base,
|
|
|
|
unsigned int signature_length,
|
|
|
|
const void **raw_signature_base,
|
|
|
|
unsigned int *raw_signature_length,
|
|
|
|
int *x509_length);
|
|
|
|
void * eet_identity_compute_sha1(const void *data_base,
|
|
|
|
unsigned int data_length,
|
|
|
|
int *sha1_length);
|
|
|
|
Eet_Error eet_cipher(const void *data,
|
|
|
|
unsigned int size,
|
|
|
|
const char *key,
|
|
|
|
unsigned int length,
|
|
|
|
void **result,
|
|
|
|
unsigned int *result_length);
|
|
|
|
Eet_Error eet_decipher(const void *data,
|
|
|
|
unsigned int size,
|
|
|
|
const char *key,
|
|
|
|
unsigned int length,
|
|
|
|
void **result,
|
|
|
|
unsigned int *result_length);
|
2008-09-08 02:19:57 -07:00
|
|
|
Eet_Error eet_identity_sign(FILE *fp, Eet_Key *key);
|
2010-07-27 18:45:57 -07:00
|
|
|
void eet_identity_unref(Eet_Key *key);
|
|
|
|
void eet_identity_ref(Eet_Key *key);
|
2008-09-08 02:19:57 -07:00
|
|
|
|
2010-07-27 18:45:57 -07:00
|
|
|
void eet_node_shutdown(void);
|
|
|
|
int eet_node_init(void);
|
2010-01-17 06:32:58 -08:00
|
|
|
Eet_Node *eet_node_new(void);
|
2010-07-27 18:45:57 -07:00
|
|
|
void eet_node_free(Eet_Node *node);
|
2010-01-17 06:32:58 -08:00
|
|
|
|
2003-07-10 03:32:27 -07:00
|
|
|
#ifndef PATH_MAX
|
2009-11-02 00:18:33 -08:00
|
|
|
# define PATH_MAX 4096
|
2003-07-10 03:32:27 -07:00
|
|
|
#endif
|
|
|
|
|
2008-06-26 08:47:25 -07:00
|
|
|
#ifdef DNDEBUG
|
2010-07-27 18:45:57 -07:00
|
|
|
# define EET_ASSERT(Test, Do) if (Test == 0) {Do; }
|
2008-06-26 08:47:25 -07:00
|
|
|
#else
|
2010-07-27 18:45:57 -07:00
|
|
|
# define EET_ASSERT(Test, Do) if (Test == 0) {abort(); }
|
2008-06-26 08:47:25 -07:00
|
|
|
#endif
|
|
|
|
|
2003-02-02 17:07:58 -08:00
|
|
|
#endif
|