xmldb_init -> xmldb_create
This commit is contained in:
parent
a2c2375b38
commit
4bcb966dac
7 changed files with 288 additions and 33 deletions
|
|
@ -104,7 +104,7 @@ typedef int (xmldb_exists_t)(xmldb_handle xh, char *db);
|
|||
typedef int (xmldb_delete_t)(xmldb_handle xh, char *db);
|
||||
|
||||
/* Type of xmldb init function */
|
||||
typedef int (xmldb_init_t)(xmldb_handle xh, char *db);
|
||||
typedef int (xmldb_create_t)(xmldb_handle xh, char *db);
|
||||
|
||||
/* plugin init struct for the api */
|
||||
struct xmldb_api{
|
||||
|
|
@ -125,7 +125,7 @@ struct xmldb_api{
|
|||
xmldb_islocked_t *xa_islocked_fn;
|
||||
xmldb_exists_t *xa_exists_fn;
|
||||
xmldb_delete_t *xa_delete_fn;
|
||||
xmldb_init_t *xa_init_fn;
|
||||
xmldb_create_t *xa_create_fn;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -150,6 +150,6 @@ int xmldb_unlock_all(clicon_handle h, int pid);
|
|||
int xmldb_islocked(clicon_handle h, char *db);
|
||||
int xmldb_exists(clicon_handle h, char *db);
|
||||
int xmldb_delete(clicon_handle h, char *db);
|
||||
int xmldb_init(clicon_handle h, char *db);
|
||||
int xmldb_create(clicon_handle h, char *db);
|
||||
|
||||
#endif /* _CLIXON_XML_DB_H */
|
||||
|
|
|
|||
|
|
@ -652,15 +652,15 @@ xmldb_delete(clicon_handle h,
|
|||
return retval;
|
||||
}
|
||||
|
||||
/*! Initialize database. Open database for writing.
|
||||
/*! Create a database. Open database for writing.
|
||||
* @param[in] h Clicon handle
|
||||
* @param[in] db Database
|
||||
* @retval 0 OK
|
||||
* @retval -1 Error
|
||||
*/
|
||||
int
|
||||
xmldb_init(clicon_handle h,
|
||||
char *db)
|
||||
xmldb_create(clicon_handle h,
|
||||
char *db)
|
||||
{
|
||||
int retval = -1;
|
||||
xmldb_handle xh;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue