Obiblob_indexer API

This commit is contained in:
Celine Mercier
2016-04-12 14:53:33 +02:00
parent cd4e65e190
commit d8107533d8
21 changed files with 252 additions and 131 deletions

View File

@ -25,16 +25,16 @@
#include "obierrno.h"
#define OBIDMS_MAX_NAME (2048) /**< The maximum length of an OBIDMS name.
*/
#define AVL_TREES_DIR_NAME "AVL_trees" /**< The name of the AVL trees directory.
*/
#define TAXONOMY_DIR_NAME "TAXONOMY" /**< The name of the taxonomy directory.
*/
#define MAX_NB_OPENED_COLUMNS (100) /**< The maximum number of columns open at the same time.
*/
#define MAX_NB_OPENED_AVL_TREES (1000) /**< The maximum number of AVL trees open at the same time.
*/
#define OBIDMS_MAX_NAME (2048) /**< The maximum length of an OBIDMS name.
*/
#define INDEXER_DIR_NAME "OBIBLOB_INDEXERS" /**< The name of the Obiblob indexer directory.
*/
#define TAXONOMY_DIR_NAME "TAXONOMY" /**< The name of the taxonomy directory.
*/
#define MAX_NB_OPENED_COLUMNS (100) /**< The maximum number of columns open at the same time.
*/
#define MAX_NB_OPENED_INDEXERS (1000) /**< The maximum number of indexers open at the same time.
*/
struct OBIDMS_column; // TODO
@ -47,10 +47,10 @@ typedef struct Opened_columns_list {
struct OBIDMS_avl; // TODO
typedef struct Opened_avls_list {
size_t nb_opened_avls;
struct OBIDMS_avl** avls;
} Opened_avls_list_t, *Opened_avls_list_p;
typedef struct Opened_indexers_list {
size_t nb_opened_indexers;
struct OBIDMS_avl** indexers; // TODO indexer but not AVL_group
} Opened_indexers_list_t, *Opened_indexers_list_p;
/**
@ -69,17 +69,17 @@ typedef struct OBIDMS {
int dir_fd; /**< The file descriptor of the directory entry
* usable to refer and scan the database directory.
*/
DIR* avl_directory; /**< A directory entry usable to
* refer and scan the AVL trees directory.
DIR* indexer_directory; /**< A directory entry usable to
* refer and scan the indexer directory.
*/
int avl_dir_fd; /**< The file descriptor of the directory entry
* usable to refer and scan the AVL trees directory.
int indexer_dir_fd; /**< The file descriptor of the directory entry
* usable to refer and scan the indexer directory.
*/
bool little_endian; /**< Endianness of the database.
*/
Opened_columns_list_p opened_columns; /**< List of opened columns.
*/
Opened_avls_list_p opened_avls; /**< List of opened AVL trees.
Opened_indexers_list_p opened_indexers; /**< List of opened indexers.
*/
} OBIDMS_t, *OBIDMS_p;
@ -107,7 +107,7 @@ int obi_dms_exists(const char* dms_name);
* if a directory with this name does not already exist
* before creating the new database.
*
* A directory to store AVL trees is also created.
* A directory to store Obiblob indexers is also created.
*
* @param dms_name A pointer to a C string containing the name of the database.
* The actual directory name used to store the DMS will be