Sm_Api_DmsContext_t
This structure provides DMS-specific context.
casso1283
This structure provides DMS-specific context.
Syntax
typedef struct{unsigned char bIsUserContext;char* lpszAdminUserNamechar* lpszAdminUserPath;char* lpszDirPath;void lpReserved1;char* lpszDirServer;char* lpszDirNamespace;char* lpszSessionId;void* lpDirParam;void* lpAdminParam;Sm_Api_GetUserProp fGetAdminProp;Sm_Api_GetDmsDnProp fGetDnProp;} Sm_Api_DmsContext_t;
Field | Description |
bIsUserContext
| Flag indicating that SiteMinder has established the user's identity and stored it in lpszAdminUserName . When this flag is set, the function referenced in fGetAdminProp can be used to obtain properties of this user. |
lpszAdminUserName
| The DMS administrator user name. This will be a full distinguished name for Administrator events, else it will be an empty string. |
lpszAdminUserPath
| The DMS administrator user path in the SiteMinder notation, for Administrator events only. |
lpszDirPath
| Directory path, in the SiteMinder notation, of a SiteMinder user directory specified by the registration scheme. |
lpReserved1
| Reserved for internal use. |
lpszDirServer
| The directory server of a SiteMinder user directory specified by the registration scheme. |
lpszDirNamespace
| The directory namespace. |
lpszSessionId
| The DMS session ID. |
lpDirParam
| Pointer to the parameters to be passed to fGetDnProp . |
lpAdminParam
| Pointer to the parameters to be passed to fGetAdminProp . |
fGetAdminProp
| Function that returns attributes of the administrative user. The calling syntax for this function is: int nMaxBufSize = 256; char lpszResult[256]; int nBuflen = lpDmsContext->fGetProp ( lpDmsContext->lpAdminParam, "mail", nMaxBufSize, lpszResult); If the function succeeds, the return value is the number of bytes in the output buffer. If the function fails, the return value is -1. |
fGetDnProp
| Function that returns attributes given a distinguished name. Any object may be examined as long as it can be retrieved from the directory server. The calling syntax for this function is: int nMaxBufSize = 256; char lpszResult[256]; char lpszDn[] = "uid=jsmith,ou=People,o=dms.com"; int nBuflen = lpDmsContext->fGetProp ( lpDmsContext->lpDirParam, lpszDn, "mail", nMaxBufSize, lpszResult); If the function succeeds, the return value is the number of bytes in the output buffer. If the function fails, the return value is -1. |
Function Declarations
In structure Sm_Api_DmsContext_t, the functions fGetAdminProp and fGetDnProp are declared in SmApi.h as follows:
fGetAdminProp
typedef int (SM_EXTERN *Sm_Api_GetUserProp)(const void* lpParam, /* The function parameter */const char* lpszPropName, /* User property name (null-term) */const int nBytesValueBuf, /* Max size of user property buffer */char* lpszValueBuf /* Output buffer to hold the user property */);
fGetDnProp
typedef int (SM_EXTERN *Sm_Api_GetDmsDnProp)(const void* lpParam, /* The function parameter */const char* lpszDN, /* The DN of the object */const char* lpszPropName, /* Object property name (null-term) */const int nBytesValueBuf, /* Max size of object property buffer */char* lpszValueBuf /* Output buffer to hold the object property */);