Updated the documentation for obidms functions

This commit is contained in:
Celine Mercier
2016-04-22 11:28:09 +02:00
parent 4ead37ee48
commit 22e3c3eeed
2 changed files with 124 additions and 40 deletions

View File

@ -420,7 +420,7 @@ OBIDMS_p obi_open_dms(const char* dms_name)
dms->opened_columns = (Opened_columns_list_p) malloc(sizeof(Opened_columns_list_t));
(dms->opened_columns)->nb_opened_columns = 0;
// Initialize the list of opened indexers // TODO should be handled somewhere else?
// Initialize the list of opened indexers
dms->opened_indexers = (Opened_indexers_list_p) malloc(sizeof(Opened_indexers_list_t));
(dms->opened_indexers)->nb_opened_indexers = 0;
@ -463,7 +463,7 @@ int obi_close_dms(OBIDMS_p dms)
free(dms);
return -1;
}
if (closedir(dms->indexer_directory) < 0) // TODO should be handled somewhere else?
if (closedir(dms->indexer_directory) < 0)
{
obi_set_errno(OBI_INDEXER_ERROR);
obidebug(1, "\nError closing an indexer directory");
@ -488,10 +488,10 @@ int obi_dms_is_column_name_in_list(OBIDMS_p dms, const char* column_name)
{
if (!strcmp(((*((columns_list->columns)+i))->header)->name, column_name))
{ // Found it
return 0;
return 1;
}
}
return 1;
return 0;
}
@ -512,7 +512,7 @@ OBIDMS_column_p obi_dms_get_column_from_list(OBIDMS_p dms, const char* column_na
}
void obi_dms_list_column(OBIDMS_p dms, OBIDMS_column_p column)
void obi_dms_list_column(OBIDMS_p dms, OBIDMS_column_p column) // TODO add check if column already in list?
{
*(((dms->opened_columns)->columns)+((dms->opened_columns)->nb_opened_columns)) = column;
((dms->opened_columns)->nb_opened_columns)++;
@ -551,7 +551,7 @@ Obi_indexer_p obi_dms_get_indexer_from_list(OBIDMS_p dms, const char* indexer_na
for (i=0; i < (indexers_list->nb_opened_indexers); i++)
{
if (!strcmp(((indexers_list->indexers)[i])->name, indexer_name)) // TODO it references something in AVL_group struct
if (!strcmp(((indexers_list->indexers)[i])->name, indexer_name)) // TODO get_name function indexer
{ // Found the indexer already opened, return it
return (indexers_list->indexers)[i];
}
@ -602,8 +602,8 @@ char* obi_dms_get_dms_path(OBIDMS_p dms)
return NULL;
}
if (getcwd(full_path, MAX_PATH_LEN) == NULL) // TODO not sure at all about this because the DMS must be in the working directory.
{ // Maybe better to store when opening, but opening function seems to assume that too.
if (getcwd(full_path, MAX_PATH_LEN) == NULL) // TODO store when opening
{
obi_set_errno(OBI_UTILS_ERROR);
obidebug(1, "\nError getting the path to a file or directory");
return NULL;