edmiGetRepositoryOpenModeBN
EdmiError edmiGetRepositoryOpenModeBN(SdaiString repositoryName,
SdaiAccessMode *mode);
Returns the current open mode, i.e. the current access rights to the specified repository.
Arguments
Type | Name | Comment |
SdaiString | repositoryName | Specifies the name of the repository. Repository names are case sensitive. |
SdaiAccessMode | mode | Address of the variable that will receive the current open mode of the specified repository.The possible returned values are:
|
Return Value
Options
Example
SdaiAccessMode mode;
EdmiError rstat;
. . .
if (rstat = edmiGetRepositoryOpenModeBN ("DataRepository", &mode)) {
/* Error in operation */
printf("\nError: %s in edmiGetRepositoryOpenModeBN\n",
edmiGetErrorText(rstat));
goto error;
}
switch (mode) {
case sdaiRO:
. . . /* READ ONLY access */
break;
case sdaiRW:
. . . /* READ and WRITE access */
break;
case sdaiNOACCESS:
. . . /* No access, i.e., model is closed */
break;
default:
/* unknown value */
}
. . .
See also