Sm_PolicyApi_GetChildren()
Builds the hierarchical realm and rule tree.
casso127
Builds the hierarchical realm and rule tree.
This function retrieves a list of OIDs. The OIDs are of type realms, or realms and rules. If the function is called with a domain OID, it retrieves a list of top-level realm OIDs. If the function is called with a realm OID, it retrieves a list of realm and rule OIDs under that realm. The
iObjectId
field in Sm_PolicyApi_Oid_t specifies the type of OID.If there are no children for the domain or realm OID, the function returns an empty list.
Type
Realm function, domain scope.
Syntax
int SM_EXTERN Sm_PolicyApi_GetChildren (void*pSessionHandle,const char*pszOid,Sm_PolicyApi_Oid_t**ppStructObject);
Parameter | I/O | Description |
pSessionHandle
| I | A pointer to an internal Policy Management API data structure. The structure holds information about the administrator session and the client session. |
pszOid
| I | A null-terminated string containing the object identifier of a domain or a realm. |
ppStructObject
| O | The address of a pointer to a Sm_PolicyApi_Oid_t structure. |
Returns
- Sm_PolicyApi_Success. The get was successful.
- Sm_PolicyApi_Failure. Memory could not be allocated for Sm_PolicyApi_Oid_t.
- Sm_PolicyApi_NoSession. There is no valid administrator session.
- Sm_PolicyApi_InvalidHandle. There was no valid initialization prior to this call.
- Sm_PolicyApi_NoPrivilege. The administrator does not have the privilege to get a list of realms and rules.
- Sm_PolicyApi_InvalidOid. The domain or realm OID was not found.
- Sm_PolicyApi_NoChildren. The domain has no realms or the realm has no realms or rules.