fixed typos and other minor things
This commit is contained in:
76
src/obidms.h
76
src/obidms.h
@ -35,43 +35,18 @@ typedef struct OBIDMS {
|
||||
*/
|
||||
} OBIDMS_t, *OBIDMS_p;
|
||||
|
||||
/**
|
||||
* @defgroup OBIDMSErrors OBIDMS related error codes
|
||||
*
|
||||
* Error codes set in errno following an error related
|
||||
* to the manipulation of an OBIDMS.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
#define OBIDMS_EXIST_ERROR (1) /**< Try to create an OBIDMS with a name
|
||||
* that corresponds to an existing OBIDMS
|
||||
*/
|
||||
#define OBIDMS_NOT_EXIST_ERROR (2) /**< Try to open a non-existing OBIDMS
|
||||
*/
|
||||
#define OBIDMS_LONG_NAME_ERROR (3) /**< The specified OBIDMS name is too long
|
||||
*/
|
||||
#define OBIDMS_MEMORY_ERROR (4) /**< A memory error occurred during allocation
|
||||
*/
|
||||
#define OBIDMS_UNKNOWN_ERROR (5) /**< Not determined error
|
||||
*/
|
||||
#define OBIDMS_ACCESS_ERROR (6) /**< Permission error for accessing to the database
|
||||
*/
|
||||
#define OBIDMS_BAD_ENDIAN_ERROR (7) /**< The opened data structure does not corresponds
|
||||
* to the endianess of the platform.
|
||||
*/
|
||||
/**@}*/
|
||||
|
||||
/*@
|
||||
* @brief Check if a OBIDMS exist
|
||||
* @brief Checks if an OBIDMS exists
|
||||
*
|
||||
* @param name a pointer to a C string containing the name of the database
|
||||
* the actual directory name used to store the DMS will be
|
||||
* `<name>.obidms`
|
||||
* @param name a pointer to a C string containing the name of the database.
|
||||
* The actual directory name used to store the DMS will be
|
||||
* `<name>.obidms`.
|
||||
*
|
||||
* @return an integer value indicating the status of the database
|
||||
* @retvalue 1 the database exist
|
||||
* @retvalue 0 the database does not exist
|
||||
* @retvalue -1 an error occurs
|
||||
* @retvalue -1 an error occured
|
||||
*
|
||||
* @see obi_close_dms()
|
||||
* @since May 2015
|
||||
@ -79,15 +54,16 @@ typedef struct OBIDMS {
|
||||
*/
|
||||
int obi_dms_exists(const char* name);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Create a new OBITools Data Management instance (OBIDMS).
|
||||
* @brief Creates a new OBITools Data Management instance (OBIDMS).
|
||||
*
|
||||
* A `DMS` is implemented as a directory. This function takes care
|
||||
* to check if a directory with this name does not already exist
|
||||
* before creating the new database
|
||||
* A `DMS` is implemented as a directory. This function checks
|
||||
* if a directory with this name does not already exist
|
||||
* before creating the new database.
|
||||
*
|
||||
* @param name a pointer to a C string containing the name of the database
|
||||
* the actual directory name used to store the DMS will be
|
||||
* @param name a pointer to a C string containing the name of the database.
|
||||
* The actual directory name used to store the DMS will be
|
||||
* `<name>.obidms`
|
||||
*
|
||||
* @return a pointer to an OBIDMS structure describing the newly created DMS
|
||||
@ -96,7 +72,7 @@ int obi_dms_exists(const char* name);
|
||||
* ###Error values
|
||||
* - OBIDMS_EXIST_ERROR : a database with the same name already exists.
|
||||
* - OBIDMS_LONG_NAME_ERROR : the database name exceeds the limit.
|
||||
* - OBIDMS_MEMORY_ERROR : something wrong occurs during memory allocation.
|
||||
* - OBIDMS_MEMORY_ERROR : something wrong occured during memory allocation.
|
||||
*
|
||||
* @see obi_close_dms()
|
||||
* @since May 2015
|
||||
@ -104,11 +80,12 @@ int obi_dms_exists(const char* name);
|
||||
*/
|
||||
OBIDMS_p obi_create_dms(const char *name);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Open an existing OBITools Data Management instance (OBIDMS).
|
||||
* @brief Opens an existing OBITools Data Management instance (OBIDMS).
|
||||
*
|
||||
* @param name a pointer to a C string containing the name of the database
|
||||
* the actual directory name used to store the DMS will be
|
||||
* @param name a pointer to a C string containing the name of the database.
|
||||
* The actual directory name used to store the DMS will be
|
||||
* `<name>.obidms`
|
||||
*
|
||||
* @return a pointer to an OBIDMS structure describing the newly created DMS
|
||||
@ -117,7 +94,7 @@ OBIDMS_p obi_create_dms(const char *name);
|
||||
* ###Error values
|
||||
* - OBIDMS_EXIST_ERROR : a database with the same name already exists.
|
||||
* - OBIDMS_LONG_NAME_ERROR : the database name exceeds the limit.
|
||||
* - OBIDMS_MEMORY_ERROR : something wrong occurs during memory allocation.
|
||||
* - OBIDMS_MEMORY_ERROR : something wrong occured during memory allocation.
|
||||
*
|
||||
* @see obi_close_dms()
|
||||
* @since May 2015
|
||||
@ -125,14 +102,15 @@ OBIDMS_p obi_create_dms(const char *name);
|
||||
*/
|
||||
OBIDMS_p obi_open_dms(const char *name);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Create a new OBIDMS instance.
|
||||
* @brief Creates a new OBIDMS instance.
|
||||
*
|
||||
* If the database already exist this function open it, otherwise it
|
||||
* creates a new databse.
|
||||
* If the database already exists, this function opens it, otherwise it
|
||||
* creates a new database.
|
||||
*
|
||||
* @param name a pointer to a C string containing the name of the database
|
||||
* the actual directory name used to store the DMS is
|
||||
* @param name a pointer to a C string containing the name of the database.
|
||||
* The actual directory name used to store the DMS is
|
||||
* `<name>.obidms`
|
||||
*
|
||||
* @return a pointer to an OBIDMS structure describing the newly created DMS
|
||||
@ -140,7 +118,7 @@ OBIDMS_p obi_open_dms(const char *name);
|
||||
*
|
||||
* ###Error values
|
||||
* - OBIDMS_LONG_NAME_ERROR : the database name exceeds the limit.
|
||||
* - OBIDMS_MEMORY_ERROR : something wrong occurs during memory allocation.
|
||||
* - OBIDMS_MEMORY_ERROR : something wrong occured during memory allocation.
|
||||
*
|
||||
* @see obi_close_dms()
|
||||
* @since May 2015
|
||||
@ -148,8 +126,9 @@ OBIDMS_p obi_open_dms(const char *name);
|
||||
*/
|
||||
OBIDMS_p obi_dms(const char *name);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Close an opened OBITools Data Management instance (OBIDMS).
|
||||
* @brief Closes an opened OBITools Data Management instance (OBIDMS).
|
||||
*
|
||||
* @param dms a pointer as returned by obi_create_dms() or obi_open_dms()
|
||||
*
|
||||
@ -165,4 +144,5 @@ OBIDMS_p obi_dms(const char *name);
|
||||
*/
|
||||
int obi_close_dms(OBIDMS_p dms);
|
||||
|
||||
|
||||
#endif /* OBIDMS_H_ */
|
||||
|
Reference in New Issue
Block a user