tfs/rdmAllocTFS.c
RDM_RETCODE
exampleTfs_rdmAllocTFS (
const
char
*databaseName)
{
RDM_RETCODE
rc;
RDM_TFS
tfs;
RDM_DB
db;
/* Set the TFS type to 'embedded' */
rc =
rdm_rdmAllocTFS
(&tfs);
if
(rc ==
sOKAY
)
{
rc =
rdm_tfsSetOptions
(tfs,
"tfstype=embed"
);
if
(rc ==
sOKAY
)
{
rc =
rdm_tfsInitialize
(tfs);
if
(rc ==
sOKAY
)
{
rc =
rdm_tfsAllocDatabase
(tfs, &db);
if
(rc ==
sOKAY
)
{
rc =
rdm_dbOpen
(db, databaseName,
RDM_OPEN_SHARED
);
if
(rc ==
sOKAY
)
{
printf (
"Database (%s) is open!\n"
, databaseName);
rc =
rdm_dbFree
(db);
}
}
}
}
rc =
rdm_tfsFree
(tfs);
}
return
rc;
}