|
Fetch a profile element.
- Parameters:
-
sess | A MACS session |
meth | The profile method. If NULL, uses a default. |
rid | The id of the resource whose profile item we're fetching. |
nsid | The id of the name-space of the profile item we're fetching. |
type | A pointer to the type of profile value to fetch. If NULL, returns the value of the current type, which is the last type to be used at this name-space for this resource. On successful return, contains the type actually returned, one of MACS_TYPE_INT, MACS_TYPE_FLOAT, MACS_TYPE_CHAR, MACS_TYPE_BLOB, MACS_TYPE_LINK or MACS_TYPE_RES |
siz | On successful return, contains the length of the profile value, or -1 if the type returned is MACS_TYPE_INT or MACS_TYPE_FLOAT |
- Returns:
- NULL on failure, or a pointer to the element's value. Should be free()'d. Returns NULL on error (e.g., if the session is not logged in.)
The return value should be cast to the appropriate type as follows:
MACS_TYPE_INT -> (int *)MACS_TYPE_FLOAT -> (double *)MACS_TYPE_CHAR, MACS_TYPE_LINK and MACS_TYPE_RES -> (char *)MACS_TYPE_BLOB -> (void *)
|