EssLROListObjects() retrieves a list of all objects linked to cells in the active database for a given user name and/or modification date.
ESS_FUNC_M EssLROListObjects (hCtx, userName, listDate, pulLROCount, pLRODescList));
ESS_HCTX_T | hCtx |
ESS_CHAR_T | userName |
ESS_TIME_T | listDate |
ESS_ULONG_T | pulLROCount |
ESS_PLRODESC_API_T | pLRODescList; |
hCtx | Essbase API context handle. |
userName | A user name. If specified, returns a list of all objects last modified by the given user. |
listDate | A modification date. If specified, returns a list of all objects modified before the given date. The time is a ULONG representing the number of seconds since January 1, 1970. |
pulLROCount | Number of LRO catalog entries returned. |
pLRODescList | Address of pointer to the list of LRO catalog entries returned. |
If successful, returns ESS_STS_NOERR. Otherwise, returns an error code.
A call to this function requires read privileges (ESS_PRIV_READ) to the active database.
ESS_FUNC_M ESS_LRO ListObjects (ESS_HCTX_T hCtx, ESS_HINST_T hInst) { ESS_FUNC_M sts = ESS_STS_NOERR; ESS_LRODESC_API_T plroDescList=NULL; ESS_ULONG_T ulLroCount; ESS_CHAR_T userName[ESS_USERNAMELEN]; ESS_CHAR_T listDate[ESS_DATESIZE]; ESS_CHAR_T buf[ESS_DATESIZE]; ESS_TIME_T timestamp; struct tm *pTmStruct, time_str; strcpy( userName, "user1"); strcpy( listDate, "09/05/1997"); time(×tamp); pTmStruct = localtime((ESS_PLONG_T)×tamp); memset(&time_str, 0, sizeof(struct tm)); strncpy (buf, (const char *)&listDate[8], 2); time_str.tm_year = atoi(buf); strncpy(buf, listDate, 2); time_str.tm_mon = atoi(buf)-1; strncpy(buf, (const char *)&listDate[3], 2); time_str.tm_mday = atoi(buf); time_str.tm_hour = 0; time_str.tm_min = 0; time_str.tm_sec = 1; time_str.tm_isdst = -1; if ((time_str.tm_mon != pTmStruct->tm_mon) || (time_str.tm_year != pTmStruct->tm_year) || (time_str.tm_mday != pTmStruct->tm_mday)) { time_str.tm_mday++; timestamp = mktime(&time_str); } sts = EssLROListObjects(hCtx, userName, timestamp, &ulLroCount, &plroDescList); if(sts) { printf("Could not list linked objects. \n"); } if (plroDescList) EssFree(hInst, plroDescList); return sts; }
LRO Constant and Structure Definitions
EssLROGetCatalog()
EssLROPurgeObjects()