![]() |
![]() |
![]() |
Camel Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
typedef camel_hash_t; CamelPartitionKey; CamelPartitionKeyBlock; CamelPartitionMap; CamelPartitionMapBlock; CamelPartitionTable; CamelPartitionTable * camel_partition_table_new (struct _CamelBlockFile *bs, camel_block_t root); int camel_partition_table_sync (CamelPartitionTable *cpi); int camel_partition_table_add (CamelPartitionTable *cpi, const char *key, camel_key_t keyid); camel_key_t camel_partition_table_lookup (CamelPartitionTable *cpi, const char *key); void camel_partition_table_remove (CamelPartitionTable *cpi, const char *key); CamelKeyBlock; CamelKeyRootBlock; struct CamelKeyKey; #define CAMEL_KEY_TABLE_MAX_KEY CamelKeyTable; CamelKeyTable * camel_key_table_new (CamelBlockFile *bs, camel_block_t root); int camel_key_table_sync (CamelKeyTable *ki); camel_key_t camel_key_table_add (CamelKeyTable *ki, const char *key, camel_block_t data, unsigned int flags); void camel_key_table_set_data (CamelKeyTable *ki, camel_key_t keyid, camel_block_t data); void camel_key_table_set_flags (CamelKeyTable *ki, camel_key_t keyid, unsigned int flags, unsigned int set); camel_block_t camel_key_table_lookup (CamelKeyTable *ki, camel_key_t keyid, char **key, unsigned int *flags); camel_key_t camel_key_table_next (CamelKeyTable *ki, camel_key_t next, char **keyp, unsigned int *flagsp, camel_block_t *datap);
typedef struct { guint32 used; struct _CamelPartitionKey keys[(CAMEL_BLOCK_SIZE-4)/sizeof(struct _CamelPartitionKey)]; } CamelPartitionKeyBlock;
typedef struct { camel_block_t next; guint32 used; struct _CamelPartitionMap partition[(CAMEL_BLOCK_SIZE-8)/sizeof(struct _CamelPartitionMap)]; } CamelPartitionMapBlock;
typedef struct { CamelObject parent; struct _CamelPartitionTablePrivate *priv; CamelBlockFile *blocks; camel_block_t rootid; int (*is_key)(CamelPartitionTable *cpi, const char *key, camel_key_t keyid, void *data); void *is_key_data; /* we keep a list of partition blocks active at all times */ CamelDList partition; } CamelPartitionTable;
CamelPartitionTable * camel_partition_table_new (struct _CamelBlockFile *bs, camel_block_t root);
|
|
|
|
Returns : |
int camel_partition_table_sync (CamelPartitionTable *cpi);
|
|
Returns : |
int camel_partition_table_add (CamelPartitionTable *cpi, const char *key, camel_key_t keyid);
|
|
|
|
|
|
Returns : |
camel_key_t camel_partition_table_lookup (CamelPartitionTable *cpi, const char *key);
|
|
|
|
Returns : |
void camel_partition_table_remove (CamelPartitionTable *cpi, const char *key);
|
|
|
typedef struct { camel_block_t next; guint32 used; union { struct _CamelKeyKey keys[(CAMEL_BLOCK_SIZE-8)/sizeof(struct _CamelKeyKey)]; char keydata[CAMEL_BLOCK_SIZE-8]; } u; } CamelKeyBlock;
typedef struct { camel_block_t first; camel_block_t last; camel_key_t free; /* free list */ } CamelKeyRootBlock;
struct CamelKeyKey { camel_block_t data; unsigned int offset:10; unsigned int flags:22; };
typedef struct { CamelObject parent; struct _CamelKeyTablePrivate *priv; CamelBlockFile *blocks; camel_block_t rootid; CamelKeyRootBlock *root; CamelBlock *root_block; } CamelKeyTable;
CamelKeyTable * camel_key_table_new (CamelBlockFile *bs, camel_block_t root);
|
|
|
|
Returns : |
camel_key_t camel_key_table_add (CamelKeyTable *ki, const char *key, camel_block_t data, unsigned int flags);
|
|
|
|
|
|
|
|
Returns : |
void camel_key_table_set_data (CamelKeyTable *ki, camel_key_t keyid, camel_block_t data);
|
|
|
|
|
void camel_key_table_set_flags (CamelKeyTable *ki, camel_key_t keyid, unsigned int flags, unsigned int set);
|
|
|
|
|
|
|
camel_block_t camel_key_table_lookup (CamelKeyTable *ki, camel_key_t keyid, char **key, unsigned int *flags);
|
|
|
|
|
|
|
|
Returns : |
camel_key_t camel_key_table_next (CamelKeyTable *ki, camel_key_t next, char **keyp, unsigned int *flagsp, camel_block_t *datap);
|
|
|
|
|
|
|
|
|
|
Returns : |