view release on metacpan or search on metacpan
if(ref($q) eq "ARQualifierStructPtr") {
$q = ars_perl_qualifier($c, $q);
die Carp::longmess("ars_perl_qualifier failed: $ARS::ars_errstr")
unless defined($q);
}
if(0) {
while($#_) {
my ($f, $v) = (shift @_, shift @_);
my $fh = ars_GetField($c, $s, $f);
if(($fh->{'dataType'} eq "char") ||
($fh->{'dataType'} eq "diary")) {
$v = "\"$v\"";
}
}
}
print "walktree..\n";
walkTree($q);
exit 0;
}
sub walkTree {
CODE:
{
int a = 0,
i = 0,
c = (items - 2) / 2;
AREntryIdType entryId;
ARFieldValueList fieldList;
ARInternalIdList getFieldIds;
ARStatusList status;
int ret = 0, rv = 0;
unsigned int dataType = 0, j = 0;
HV *cacheFields;
RETVAL=NULL;
(void) ARError_reset();
Zero(&entryId, 1, AREntryIdType);
Zero(&fieldList, 1, ARFieldValueList);
Zero(&getFieldIds, 1, ARInternalIdList);
Zero(&status, 1, ARStatusList);
if (((items - 2) % 2) || c < 1) {
(void) ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS);
if( ! cacheFields ){
goto create_entry_end;
}
fieldList.numItems = c;
AMALLOCNN(fieldList.fieldValueList,c,ARFieldValueStruct);
getFieldIds.numItems = 0;
getFieldIds.internalIdList = NULL;
/* try to get data type from field cache, collect fieldIds which are not cached */
for (i=0; i<c; ++i) {
ARInternalId fieldId;
a = i*2+2;
fieldId = fieldList.fieldValueList[i].fieldId = SvIV(ST(a));
dataType = fieldcache_get_data_type( cacheFields, fieldId );
if (dataType <= AR_DATA_TYPE_MAX_TYPE) {
/* printf( "%s [%d] found in cache\n", schema, fieldId ); fflush(stdout); */ /* _DEBUG_ */
if (sv_to_ARValue(ctrl, ST(a+1), dataType, &fieldList.fieldValueList[i].value) < 0) {
goto create_entry_end;
}
}else{
if( getFieldIds.numItems == 0 ){
AMALLOCNN(getFieldIds.internalIdList,c,ARInternalId);
}
/* printf( "%s [%d] collect for loading\n", schema, fieldId ); fflush(stdout); */ /* _DEBUG_ */
getFieldIds.internalIdList[getFieldIds.numItems] = fieldId;
++getFieldIds.numItems;
}
/* load missing fields into cache */
if( getFieldIds.numItems > 0 ){
/* printf( "--- load missing fields ---\n" ); fflush(stdout); */ /* _DEBUG_ */
/* if( fieldcache_load_schema(ctrl,schema,&getFieldIds,NULL) != AR_RETURN_OK ){ */
if( fieldcache_load_schema(ctrl,schema,&getFieldIds,NULL) > AR_RETURN_WARNING ){
goto create_entry_end;
}
}
/* now get data type from the freshly cached fields */
i = 0;
for (j=0; j<getFieldIds.numItems; ++j) {
ARInternalId fieldId = getFieldIds.internalIdList[j];
while(fieldId != fieldList.fieldValueList[i].fieldId) ++i;
a = i*2+2;
dataType = fieldcache_get_data_type( cacheFields, fieldId );
if (dataType <= AR_DATA_TYPE_MAX_TYPE) {
/* printf( "%s [%d] freshly loaded\n", schema, fieldId ); fflush(stdout); */ /* _DEBUG_ */
if (sv_to_ARValue(ctrl, ST(a+1), dataType, &fieldList.fieldValueList[i].value) < 0) {
goto create_entry_end;
}
}else{
char errTxt[256];
sprintf( errTxt, "Failed to fetch field %d from hash", fieldId );
ARError_add(AR_RETURN_ERROR, AP_ERR_FIELD_TYPE);
ARError_add(AR_RETURN_ERROR, AP_ERR_CONTINUE, errTxt );
goto create_entry_end;
}
}
for(i=1; i<items; i++) {
requestList.requestList[i-1] = SvIV(ST(i));
}
ret = ARGetServerStatistics(ctrl, &requestList, &serverInfo, &status);
#ifdef PROFILE
((ars_ctrl *)ctrl)->queries++;
#endif
if (!ARError(ret, status)) {
for(ui=0; ui<serverInfo.numItems; ui++) {
XPUSHs(sv_2mortal(newSViv(serverInfo.serverInfoList[ui].operation)));
switch(serverInfo.serverInfoList[ui].value.dataType) {
case AR_DATA_TYPE_ENUM:
case AR_DATA_TYPE_TIME:
case AR_DATA_TYPE_BITMASK:
case AR_DATA_TYPE_INTEGER:
XPUSHs(sv_2mortal(newSViv(serverInfo.serverInfoList[ui].value.u.intVal)));
break;
case AR_DATA_TYPE_REAL:
XPUSHs(sv_2mortal(newSVnv(serverInfo.serverInfoList[ui].value.u.realVal)));
break;
case AR_DATA_TYPE_CHAR:
HV *
ars_GetField(ctrl,schema,id)
ARControlStruct * ctrl
char * schema
unsigned long id
CODE:
{
int ret;
ARStatusList Status;
unsigned int dataType, option, createMode;
#if AR_CURRENT_API_VERSION >= 12
unsigned int fieldOption;
#endif
ARValueStruct defaultVal;
ARPermissionList assignedGroupList;
ARPermissionList permissions;
ARFieldLimitStruct limit;
ARNameType fieldName;
ARFieldMappingStruct fieldMap;
ARDisplayInstanceList displayList;
Zero(fieldName, 1, ARNameType);
Zero(&fieldMap, 1, ARFieldMappingStruct);
Zero(&displayList, 1, ARDisplayInstanceList);
Zero(×tamp, 1, ARTimestamp);
Zero(owner, 1, ARAccessNameType);
Zero(lastChanged, 1, ARAccessNameType);
Zero(&diaryList, 1, ARDiaryList);
Zero(&objPropList, 1, ARPropList);
#if AR_CURRENT_API_VERSION >= 17
ret = ARGetFieldCached(ctrl, schema, id, fieldName, &fieldMap, &dataType, &option, &createMode, &fieldOption, &defaultVal, &assignedGroupList, &permissions, &limit, &displayList, &helpText, ×tamp, owner, lastChanged, &changeDiary, &objPropLis...
#elif AR_CURRENT_API_VERSION >= 12
ret = ARGetFieldCached(ctrl, schema, id, fieldName, &fieldMap, &dataType, &option, &createMode, &fieldOption, &defaultVal, &permissions, &limit, &displayList, &helpText, ×tamp, owner, lastChanged, &changeDiary, &Status);
#else
ret = ARGetFieldCached(ctrl, schema, id, fieldName, &fieldMap, &dataType, &option, &createMode, &defaultVal, &permissions, &limit, &displayList, &helpText, ×tamp, owner, lastChanged, &changeDiary, &Status);
#endif
#ifdef PROFILE
((ars_ctrl *)ctrl)->queries++;
#endif
if (! ARError( ret, Status)) {
RETVAL = newHV();
sv_2mortal( (SV*) RETVAL );
/* store field id for convenience */
hv_store(RETVAL, "fieldId", strlen("fieldId") , newSViv(id), 0);
if (createMode == AR_FIELD_OPEN_AT_CREATE)
hv_store(RETVAL, "createMode", strlen("createMode") , newSVpv("open",0), 0);
else
hv_store(RETVAL, "createMode", strlen("createMode") ,
newSVpv("protected",0), 0);
hv_store(RETVAL, "option", strlen("option") , newSViv(option), 0);
#if AR_CURRENT_API_VERSION >= 12
hv_store(RETVAL, "fieldOption", strlen("fieldOption") , newSViv(fieldOption), 0);
#endif
hv_store(RETVAL, "dataType", strlen("dataType") ,
perl_dataType_names(ctrl, &dataType), 0);
hv_store(RETVAL, "defaultVal", strlen("defaultVal") ,
perl_ARValueStruct(ctrl, &defaultVal), 0);
#if AR_CURRENT_API_VERSION >= 17
hv_store(RETVAL, "assignedGroupList", strlen("assignedGroupList") ,
perl_ARPermissionList(ctrl, &assignedGroupList, PERMTYPE_FIELD), 0);
#endif
hv_store(RETVAL, "permissions", strlen("permissions") ,
perl_ARPermissionList(ctrl, &permissions, PERMTYPE_FIELD), 0);
hv_store(RETVAL, "limit", strlen("limit") ,
char * entry_id
unsigned long getTime
CODE:
{
int a = 0, i = 0, c = (items - 4) / 2;
int offset = 4;
ARFieldValueList fieldList;
ARInternalIdList getFieldIds;
ARStatusList status;
int ret = 0;
unsigned int dataType = 0, j = 0;
unsigned int option = AR_JOIN_SETOPTION_NONE;
AREntryIdList entryList;
HV *cacheFields;
(void) ARError_reset();
Zero(&status, 1,ARStatusList);
Zero(&fieldList, 1, ARFieldValueList);
Zero(&getFieldIds, 1, ARInternalIdList);
Zero(&entryList, 1,AREntryIdList);
RETVAL = 0; /* assume error */
getFieldIds.numItems = 0;
getFieldIds.internalIdList = NULL;
for (i=0; i<c; i++) {
ARInternalId fieldId;
a = i*2+offset;
fieldId = fieldList.fieldValueList[i].fieldId = SvIV(ST(a));
if (! SvOK(ST(a+1))) {
/* pass a NULL */
fieldList.fieldValueList[i].value.dataType = AR_DATA_TYPE_NULL;
}else{
/* determine data type and pass value */
dataType = fieldcache_get_data_type( cacheFields, fieldId );
if (dataType <= AR_DATA_TYPE_MAX_TYPE) {
if (sv_to_ARValue(ctrl, ST(a+1), dataType, &fieldList.fieldValueList[i].value) < 0) {
goto set_entry_end;
}
}else{
if( getFieldIds.numItems == 0 ){
AMALLOCNN(getFieldIds.internalIdList,c,ARInternalId);
}
/* printf( "%s [%d] collect for loading\n", schema, fieldId ); fflush(stdout); */ /* _DEBUG_ */
getFieldIds.internalIdList[getFieldIds.numItems] = fieldId;
++getFieldIds.numItems;
}
/* load missing fields into cache */
if( getFieldIds.numItems > 0 ){
/* printf( "--- load missing fields ---\n" ); fflush(stdout); */ /* _DEBUG_ */
/* if( fieldcache_load_schema(ctrl,schema,&getFieldIds,NULL) != AR_RETURN_OK ){ */
if( fieldcache_load_schema(ctrl,schema,&getFieldIds,NULL) > AR_RETURN_WARNING ){
goto set_entry_end;
}
}
/* now get data type from the freshly cached fields */
i = 0;
for (j=0; j<getFieldIds.numItems; ++j) {
ARInternalId fieldId = getFieldIds.internalIdList[j];
while(fieldId != fieldList.fieldValueList[i].fieldId) ++i;
a = i*2+offset;
dataType = fieldcache_get_data_type( cacheFields, fieldId );
if (dataType <= AR_DATA_TYPE_MAX_TYPE) {
/* printf( "%s [%d] freshly loaded\n", schema, fieldId ); fflush(stdout); */ /* _DEBUG_ */
if (sv_to_ARValue(ctrl, ST(a+1), dataType, &fieldList.fieldValueList[i].value) < 0) {
goto set_entry_end;
}
}else{
char errTxt[256];
sprintf( errTxt, "Failed to fetch field %d from hash", fieldId );
ARError_add(AR_RETURN_ERROR, AP_ERR_FIELD_TYPE);
ARError_add(AR_RETURN_ERROR, AP_ERR_CONTINUE, errTxt );
goto set_entry_end;
}
}
serverInfo.numItems = (items - 1) / 2;
serverInfo.serverInfoList = MALLOCNN(serverInfo.numItems * sizeof(ARServerInfoStruct));
/* Zero(serverInfo.serverInfoList, 1, ARServerInfoStruct); # happens already in MALLOCNN */
for(j = 0 ; j < serverInfo.numItems ; ++j) {
i = 2 * j + 1;
infoType = lookUpServerInfoTypeHint(SvIV(ST(i)));
serverInfo.serverInfoList[j].operation = SvIV(ST(i));
serverInfo.serverInfoList[j].value.dataType = infoType;
switch(infoType) {
case AR_DATA_TYPE_CHAR:
serverInfo.serverInfoList[j].value.u.charVal = strdup(SvPV(ST(i+1), PL_na));
break;
case AR_DATA_TYPE_INTEGER:
serverInfo.serverInfoList[j].value.u.intVal = SvIV(ST(i+1));
break;
default:
sprintf( buf, "(%d) type = %d", serverInfo.serverInfoList[j].operation, serverInfo.serverInfoList[j].value.dataType );
(void) ARError_add(AR_RETURN_ERROR, AP_ERR_INV_ARGS,
buf);
FreeARServerInfoList(&serverInfo, FALSE);
XPUSHs(sv_2mortal(newSViv(0))); /* ERR */
goto SetServerInfo_fail;
}
}
ret = ARSetServerInfo(ctrl, &serverInfo, &status);
FreeARServerInfoList(&serverInfo, FALSE);
if(ARError(ret, status)) {
ret = ARGetServerInfo(ctrl, &requestList, &serverInfo, &status);
#ifdef PROFILE
((ars_ctrl *)ctrl)->queries++;
#endif
if(!ARError( ret, status)) {
for(ui = 0 ; ui < serverInfo.numItems ; ui++) {
/* provided we have a mapping for the operation code,
* push out it's translation. else push out the code itself
*/
if(serverInfo.serverInfoList[ui].operation <= AR_MAX_SERVER_INFO_USED) {
/* printf( "%d %s: data type = %d\n", serverInfo.serverInfoList[ui].operation, ServerInfoMap[serverInfo.serverInfoList[ui].operation].name, serverInfo.serverInfoList[ui].value.dataType ); */
XPUSHs(sv_2mortal(newSVpv(ServerInfoMap[serverInfo.serverInfoList[ui].operation].name, 0)));
} else {
XPUSHs(sv_2mortal(newSViv(serverInfo.serverInfoList[ui].operation)));
}
XPUSHs(sv_2mortal(perl_ARValueStruct(ctrl,
&(serverInfo.serverInfoList[ui].value))));
}
}
FreeARServerInfoList(&serverInfo, FALSE);
}
SV * fieldDefRef
ARBoolean reservedIdOK
CODE:
{
#if AR_EXPORT_VERSION >= 6L
int ret = 0, rv = 0;
ARInternalId fieldId;
ARNameType fieldName;
ARFieldMappingStruct fieldMap;
unsigned int dataType;
unsigned int option;
unsigned int createMode = AR_FIELD_PROTECTED_AT_CREATE;
#if AR_EXPORT_VERSION >= 9L
unsigned int fieldOption;
#endif
ARValueStruct *defaultVal = NULL;
ARPermissionList permissions;
ARFieldLimitStruct *limit = NULL;
ARDisplayInstanceList dInstanceList;
char *helpText = NULL;
}else{
croak("usage: ars_CreateField(...)");
}
rv += ulongcpyHVal( fieldDef, "fieldId", &fieldId );
rv += strcpyHVal( fieldDef, "fieldName", fieldName, AR_MAX_NAME_SIZE );
fieldMap.fieldType = AR_FIELD_REGULAR;
rv += rev_ARFieldMappingStruct( ctrl, fieldDef, "fieldMap", &fieldMap );
rv += strcpyHVal( fieldDef, "dataType", strTemp, STR_TEMP_SIZE );
dataType = caseLookUpTypeNumber( (TypeMapStruct*) DataTypeMap, strTemp );
rv += uintcpyHVal( fieldDef, "option", &option );
rv += strcpyHVal( fieldDef, "createMode", strTemp, STR_TEMP_SIZE );
if( !strncmp(strTemp,"open",STR_TEMP_SIZE) ){
createMode = AR_FIELD_OPEN_AT_CREATE;
}else if( !strncmp(strTemp,"protected",STR_TEMP_SIZE) ){
createMode = AR_FIELD_PROTECTED_AT_CREATE;
}else{
ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL,
"ars_CreateField: invalid createmode:");
ARError_add(AR_RETURN_WARNING, AP_ERR_CONTINUE,
strTemp ? strTemp : "n/a");
}
#if AR_EXPORT_VERSION >= 9L
rv += uintcpyHVal( fieldDef, "fieldOption", &fieldOption );
#endif
pSvTemp = hv_fetch( fieldDef, "defaultVal", strlen("defaultVal") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
defaultVal = (ARValueStruct*) MALLOCNN( sizeof(ARValueStruct) );
rv += rev_ARValueStruct( ctrl, fieldDef, "defaultVal", "dataType", defaultVal );
}
permissions.numItems = 0;
permissions.permissionList = NULL;
rv += rev_ARPermissionList( ctrl, fieldDef, "permissions", &permissions );
pSvTemp = hv_fetch( fieldDef, "limit", strlen("limit") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
limit = (ARFieldLimitStruct*) MALLOCNN( sizeof(ARFieldLimitStruct) );
/* rv += rev_ARFieldLimitStruct( ctrl, fieldDef, "limit", "dataType", limit ); */
rv += rev_ARFieldLimitStruct( ctrl, fieldDef, "limit", limit );
}
#if AR_CURRENT_API_VERSION >= 17
pSvTemp = hv_fetch( fieldDef, "objPropList", strlen("objPropList") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
objPropList = (ARPropList*) MALLOCNN( sizeof(ARPropList) );
/* rv += rev_ARPropList( ctrl, fieldDef, "objPropList", "dataType", objPropList ); */
rv += rev_ARPropList( ctrl, fieldDef, "objPropList", objPropList );
}
#endif
rv += rev_ARDisplayInstanceList( ctrl, fieldDef, "displayInstanceList", &dInstanceList );
if( hv_exists(fieldDef,"helpText",8) ){
rv += strmakHVal( fieldDef, "helpText", &helpText );
}
if( hv_exists(fieldDef,"owner",5) ){
rv += strcpyHVal( fieldDef, "owner", owner, AR_MAX_ACCESS_NAME_SIZE );
rv += strmakHVal( fieldDef, "changeDiary", &changeDiary );
}
if( rv == 0 ){
ret = ARCreateField( ctrl,
schema,
&fieldId,
reservedIdOK,
fieldName,
&fieldMap,
dataType,
option,
createMode,
#if AR_EXPORT_VERSION >= 9L
fieldOption,
#endif
defaultVal,
&permissions,
limit,
&dInstanceList,
helpText,
#if AR_EXPORT_VERSION >= 9L
pSvTemp = hv_fetch( fieldDef, "fieldOption", strlen("fieldOption") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
fieldOption = (unsigned int*) MALLOCNN( sizeof(unsigned int) );
rv += uintcpyHVal( fieldDef, "fieldOption", fieldOption );
}
#endif
pSvTemp = hv_fetch( fieldDef, "defaultVal", strlen("defaultVal") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
defaultVal = (ARValueStruct*) MALLOCNN( sizeof(ARValueStruct) );
rv += rev_ARValueStruct( ctrl, fieldDef, "defaultVal", "dataType", defaultVal );
}
pSvTemp = hv_fetch( fieldDef, "permissions", strlen("permissions") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
permissions = (ARPermissionList*) MALLOCNN( sizeof(ARPermissionList) );
rv += rev_ARPermissionList( ctrl, fieldDef, "permissions", permissions );
}
pSvTemp = hv_fetch( fieldDef, "limit", strlen("limit") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
limit = (ARFieldLimitStruct*) MALLOCNN( sizeof(ARFieldLimitStruct) );
/* rv += rev_ARFieldLimitStruct( ctrl, fieldDef, "limit", "dataType", limit ); */
rv += rev_ARFieldLimitStruct( ctrl, fieldDef, "limit", limit );
}
#if AR_CURRENT_API_VERSION >= 17
pSvTemp = hv_fetch( fieldDef, "objPropList", strlen("objPropList") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
objPropList = (ARPropList*) MALLOCNN( sizeof(ARPropList) );
/* rv += rev_ARPropList( ctrl, fieldDef, "objPropList", "dataType", objPropList ); */
rv += rev_ARPropList( ctrl, fieldDef, "objPropList", objPropList );
}
#endif
pSvTemp = hv_fetch( fieldDef, "displayInstanceList", strlen("displayInstanceList") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
dInstanceList = (ARDisplayInstanceList*) MALLOCNN( sizeof(ARDisplayInstanceList) );
rv += rev_ARDisplayInstanceList( ctrl, fieldDef, "displayInstanceList", dInstanceList );
}
if( hv_exists(fieldDef,"helpText",8) ){
/* dereference the qual pointer */
if(qhv && *qhv && SvROK(*qhv)) {
query = (ARQualifierStruct *)SvIV((SV *)SvRV(*qhv));
/* query = (ARQualifierStruct*) MALLOCNN( sizeof(ARQualifierStruct) );
rv += rev_ARQualifierStruct( ctrl, alDef, "query", query ); */
} else {
query = (ARQualifierStruct *)NULL;
}
/* copy the various hash entries into the appropriate
* data structure. if any are missing, we fail.
*/
rv = 0;
rv += strcpyHVal( alDef, "name", name, AR_MAX_NAME_SIZE);
#if AR_EXPORT_VERSION >= 5
rv += rev_ARNameList( ctrl, alDef, "schemaList", schemaList.u.schemaList );
#else
rv += strcpyHVal( alDef, "schema", schema, AR_MAX_NAME_SIZE);
#endif
rv += uintcpyHVal( alDef, "order", &order);
rv += ulongcpyHVal( alDef, "field", &field);
if(executeMask & AR_EXECUTE_ON_BUTTON)
rv += rev_ARDisplayList(ctrl, alDef, "displayList",
&displayList);
#endif
#if AR_EXPORT_VERSION >= 5
if(hv_exists(alDef, "objPropList", strlen("objPropList") ))
rv += rev_ARPropList(ctrl, alDef, "objPropList",
&objPropList);
#endif
/* at this point all datastructures (hopefully) are
* built. we can call the api routine to create the
* active link.
*/
if(rv == 0) {
#if AR_EXPORT_VERSION >= 5
ret = ARCreateActiveLink(ctrl, name, order, &schemaList,
&groupList, executeMask,
&controlField, &focusField,
enable, query,
&actionList, &elseList,
/* dereference the qual pointer */
if( qhv && *qhv && SvROK(*qhv) ){
query = (ARQualifierStruct *)SvIV((SV *)SvRV(*qhv));
/* query = (ARQualifierStruct*) MALLOCNN( sizeof(ARQualifierStruct) );
rv += rev_ARQualifierStruct( ctrl, objDef, "query", query ); */
}
/* copy the various hash entries into the appropriate
* data structure. if any are missing, we fail.
*/
rv = 0;
if( hv_exists(objDef,"name",4) ){
rv += strcpyHVal( objDef, "name", newName, AR_MAX_NAME_SIZE );
newNamePtr = newName;
}
if( hv_exists(objDef,"schemaList",10) ){
schemaList = (ARWorkflowConnectStruct*) MALLOCNN(sizeof(ARWorkflowConnectStruct));
schemaList->type = AR_WORKFLOW_CONN_SCHEMA_LIST;
(*executeMask & AR_EXECUTE_ON_MENU_CHOICE)) {
focusField = (ARInternalId*) MALLOCNN(sizeof(ARInternalId));
rv += ulongcpyHVal( objDef, "focusField", focusField);
}
if(*executeMask & AR_EXECUTE_ON_BUTTON) {
controlField = (ARInternalId*) MALLOCNN(sizeof(ARInternalId));
rv += ulongcpyHVal( objDef, "controlField", controlField);
}
}
/* at this point all datastructures (hopefully) are
* built. we can call the api routine to modify the workflow object
*/
if(rv == 0) {
ret = ARSetActiveLink(ctrl, name, newNamePtr, order, schemaList,
groupList, executeMask,
controlField, focusField,
enable, query,
actionList, elseList,
helpText, ownerPtr, changeDiary,
objPropList,
/* dereference the qual pointer */
if(qhv && *qhv && SvROK(*qhv)) {
query = (ARQualifierStruct *)SvIV((SV *)SvRV(*qhv));
/* query = (ARQualifierStruct*) MALLOCNN( sizeof(ARQualifierStruct) );
rv += rev_ARQualifierStruct( ctrl, objDef, "query", query ); */
} else {
query = (ARQualifierStruct *)NULL;
}
/* copy the various hash entries into the appropriate
* data structure. if any are missing, we fail.
*/
rv = 0;
rv += strcpyHVal( objDef, "name", name, AR_MAX_NAME_SIZE);
rv += rev_ARNameList( ctrl, objDef, "schemaList", schemaList.u.schemaList );
rv += uintcpyHVal( objDef, "order", &order);
rv += uintcpyHVal( objDef, "opSet", &opSet);
rv += uintcpyHVal( objDef, "enable", &enable);
if(hv_exists(objDef, "owner", strlen("owner") ))
rv += rev_ARPropList(ctrl, objDef, "objPropList",
&objPropList);
#if AR_CURRENT_API_VERSION >= 13
if( hv_exists(objDef, "errorFilterOptions", strlen("errorFilterOptions")) )
rv += uintcpyHVal( objDef, "errorFilterOptions", &errorFilterOptions );
if( hv_exists(objDef, "errorFilterName", strlen("errorFilterName")) )
rv += strcpyHVal( objDef, "errorFilterName", errorFilterName, AR_MAX_NAME_SIZE );
#endif
/* at this point all datastructures (hopefully) are
* built. we can call the api routine to create the
* filter.
*/
if(rv == 0) {
ret = ARCreateFilter(ctrl, name, order, &schemaList,
opSet,
enable, query,
&actionList, &elseList,
helpText, owner, changeDiary,
&objPropList,
/* dereference the qual pointer */
if( qhv && *qhv && SvROK(*qhv) ){
query = (ARQualifierStruct *)SvIV((SV *)SvRV(*qhv));
/* query = (ARQualifierStruct*) MALLOCNN( sizeof(ARQualifierStruct) );
rv += rev_ARQualifierStruct( ctrl, objDef, "query", query ); */
}
/* copy the various hash entries into the appropriate
* data structure. if any are missing, we fail.
*/
rv = 0;
if( hv_exists(objDef,"name",4) ){
rv += strcpyHVal( objDef, "name", newName, AR_MAX_NAME_SIZE );
newNamePtr = newName;
}
if( hv_exists(objDef,"schemaList",10) ){
schemaList = (ARWorkflowConnectStruct*) MALLOCNN(sizeof(ARWorkflowConnectStruct));
schemaList->type = AR_WORKFLOW_CONN_SCHEMA_LIST;
errorFilterOptions = (unsigned int*) MALLOCNN(sizeof(unsigned int));
rv += uintcpyHVal( objDef, "errorFilterOptions", errorFilterOptions);
}
if(hv_exists(objDef, "errorFilterName", strlen("errorFilterName") )){
rv += strcpyHVal( objDef, "errorFilterName", errorFilterName, AR_MAX_NAME_SIZE);
errorFilterNamePtr = errorFilterName;
}
#endif
/* at this point all datastructures (hopefully) are
* built. we can call the api routine to modify the workflow object
*/
if(rv == 0) {
ret = ARSetFilter(ctrl, name, newNamePtr, order, schemaList,
opSet,
enable, query,
actionList, elseList,
helpText, ownerPtr, changeDiary,
objPropList,
#if AR_CURRENT_API_VERSION >= 13
/* dereference the qual pointer */
if(qhv && *qhv && SvROK(*qhv)) {
query = (ARQualifierStruct *)SvIV((SV *)SvRV(*qhv));
/* query = (ARQualifierStruct*) MALLOCNN( sizeof(ARQualifierStruct) );
rv += rev_ARQualifierStruct( ctrl, objDef, "query", query ); */
} else {
query = (ARQualifierStruct *)NULL;
}
/* copy the various hash entries into the appropriate
* data structure. if any are missing, we fail.
*/
rv = 0;
rv += strcpyHVal( objDef, "name", name, AR_MAX_NAME_SIZE);
rv += rev_ARNameList( ctrl, objDef, "schemaList", schemaList.u.schemaList );
rv += uintcpyHVal( objDef, "enable", &enable);
/* rv += rev_AREscalationTmStruct( ctrl, objDef, "escalationTm", &escalationTm ); */
rv += uintcpyHVal( objDef, "TmType", &(escalationTm.escalationTmType) );
rv += rev_ARFilterActionList(ctrl, objDef, "actionList",
&actionList);
rv += rev_ARFilterActionList(ctrl, objDef, "elseList",
&elseList);
if(hv_exists(objDef, "objPropList", strlen("objPropList") ))
rv += rev_ARPropList(ctrl, objDef, "objPropList",
&objPropList);
/* at this point all datastructures (hopefully) are
* built. we can call the api routine to create the
* escalation.
*/
if(rv == 0) {
ret = ARCreateEscalation(ctrl, name,
&escalationTm,
&schemaList,
enable, query,
&actionList, &elseList,
helpText, owner, changeDiary,
/* dereference the qual pointer */
if( qhv && *qhv && SvROK(*qhv) ){
query = (ARQualifierStruct *)SvIV((SV *)SvRV(*qhv));
/* query = (ARQualifierStruct*) MALLOCNN( sizeof(ARQualifierStruct) );
rv += rev_ARQualifierStruct( ctrl, objDef, "query", query ); */
}
/* copy the various hash entries into the appropriate
* data structure. if any are missing, we fail.
*/
rv = 0;
if( hv_exists(objDef,"name",4) ){
rv += strcpyHVal( objDef, "name", newName, AR_MAX_NAME_SIZE );
newNamePtr = newName;
}
if( hv_exists(objDef,"schemaList",10) ){
schemaList = (ARWorkflowConnectStruct*) MALLOCNN(sizeof(ARWorkflowConnectStruct));
schemaList->type = AR_WORKFLOW_CONN_SCHEMA_LIST;
if(hv_exists(objDef, "elseList", strlen("elseList") )){
elseList = (ARFilterActionList*) MALLOCNN(sizeof(ARFilterActionList));
rv += rev_ARFilterActionList(ctrl, objDef, "elseList", elseList);
}
if(hv_exists(objDef, "objPropList", strlen("objPropList") )){
objPropList = (ARPropList*) MALLOCNN(sizeof(ARPropList));
rv += rev_ARPropList(ctrl, objDef, "objPropList", objPropList);
}
/* at this point all datastructures (hopefully) are
* built. we can call the api routine to modify the workflow object
*/
if(rv == 0) {
ret = ARSetEscalation(ctrl, name, newNamePtr,
escalationTm,
schemaList,
enable, query,
actionList, elseList,
helpText, ownerPtr, changeDiary,
objPropList,
Zero(&imageBuf, 1,ARImageDataStruct);
Zero(owner, 1, ARAccessNameType);
Zero(&objPropList, 1, ARPropList);
if(SvTYPE((SV *)SvRV(objDefRef)) != SVt_PVHV) {
ARError_add( AR_RETURN_ERROR, AP_ERR_EXPECT_PVHV);
} else {
HV *objDef = (HV *)SvRV(objDefRef);
/* copy the various hash entries into the appropriate
* data structure. if any are missing, we fail.
*/
rv = 0;
rv += strcpyHVal( objDef, "name", name, AR_MAX_NAME_SIZE);
rv += rev_ARImageDataStruct( ctrl, objDef, "imageData", &imageBuf );
rv += strmakHVal( objDef, "imageType", &imageType);
if(hv_exists(objDef, "description", strlen("description") ))
rv += strmakHVal( objDef, "description", &description);
if(hv_exists(objDef, "changeDiary", strlen("changeDiary") ))
rv += strmakHVal( objDef, "changeDiary", &changeDiary);
if(hv_exists(objDef, "helpText", strlen("helpText") ))
rv += strmakHVal( objDef, "helpText", &helpText);
if(hv_exists(objDef, "objPropList", strlen("objPropList") ))
rv += rev_ARPropList(ctrl, objDef, "objPropList",
&objPropList);
/* at this point all datastructures (hopefully) are
* built. we can call the api routine to create the
* image.
*/
if( rv == 0 ){
ret = ARCreateImage( ctrl, name,
&imageBuf,
imageType,
description,
helpText, owner, changeDiary,
&objPropList,
Zero(&status, 1,ARStatusList);
Zero(newName, 1, ARNameType);
Zero(owner, 1, ARAccessNameType);
if(SvTYPE((SV *)SvRV(objDefRef)) != SVt_PVHV) {
ARError_add( AR_RETURN_ERROR, AP_ERR_EXPECT_PVHV);
} else {
HV *objDef = (HV *)SvRV(objDefRef);
/* copy the various hash entries into the appropriate
* data structure. if any are missing, we fail.
*/
rv = 0;
if( hv_exists(objDef,"name",4) ){
rv += strcpyHVal( objDef, "name", newName, AR_MAX_NAME_SIZE );
newNamePtr = newName;
}
if(hv_exists(objDef, "owner", strlen("owner") )){
rv += strcpyHVal( objDef, "owner", owner, AR_MAX_ACCESS_NAME_SIZE);
ownerPtr = owner;
}
if(hv_exists(objDef, "description", strlen("description") ))
rv += strmakHVal( objDef, "description", &description);
if(hv_exists(objDef, "objPropList", strlen("objPropList") )){
objPropList = (ARPropList*) MALLOCNN(sizeof(ARPropList));
rv += rev_ARPropList(ctrl, objDef, "objPropList", objPropList);
}
/* at this point all datastructures (hopefully) are
* built. we can call the api routine to create the
* image.
*/
if( rv == 0 ){
ret = ARSetImage( ctrl, name,
newNamePtr,
imageBuf,
imageType,
description,
helpText, owner, changeDiary,
ars_MergeEntry(ctrl, schema, mergeType, ...)
ARControlStruct * ctrl
char * schema
unsigned int mergeType
CODE:
{
int a, i, c = (items - 3) / 2;
ARFieldValueList fieldList;
ARStatusList status;
int ret = 0;
unsigned int dataType = 0;
AREntryIdType entryId;
(void) ARError_reset();
Zero(&status, 1, ARStatusList);
Zero(&fieldList, 1, ARFieldValueList);
Zero(&entryId, 1, AREntryIdType);
RETVAL = "";
if ((items - 3) % 2 || c < 1) {
(void) ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS);
}
fieldList.numItems = c;
AMALLOCNN(fieldList.fieldValueList, c, ARFieldValueStruct);
for (i = 0; i < c; i++) {
a = i*2 + 3;
fieldList.fieldValueList[i].fieldId = SvIV(ST(a));
if (! SvOK(ST(a+1))) {
/* pass a NULL */
fieldList.fieldValueList[i].value.dataType =
AR_DATA_TYPE_NULL;
} else {
#if AR_CURRENT_API_VERSION >= 17
ret = ARGetFieldCached(ctrl, schema,
fieldList.fieldValueList[i].fieldId,
NULL, NULL, &dataType, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &status);
#elif AR_EXPORT_VERSION >= 9
ret = ARGetFieldCached(ctrl, schema,
fieldList.fieldValueList[i].fieldId,
NULL, NULL, &dataType, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, &status);
#elif AR_EXPORT_VERSION >= 3
ret = ARGetFieldCached(ctrl, schema,
fieldList.fieldValueList[i].fieldId,
NULL, NULL, &dataType, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, &status);
#else
ret = ARGetFieldCached(ctrl, schema,
fieldList.fieldValueList[i].fieldId, &dataType,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, &status);
#endif
if (ARError( ret, status)) {
DBG( ("GetFieldCached failed %d\n", ret) );
goto merge_entry_end;
}
if (sv_to_ARValue(ctrl, ST(a+1), dataType,
&fieldList.fieldValueList[i].value) < 0) {
DBG( ("failed to convert to ARValue struct stack %d\n", a+1) );
goto merge_entry_end;
}
}
}
ret = ARMergeEntry(ctrl, schema, &fieldList, mergeType,
#if AR_CURRENT_API_VERSION >= 18
NULL, /* ARQualifier *query */
{
#if AR_EXPORT_VERSION >= 6
ARStatusList status;
ARValueStruct variableValue;
int ret;
char numToCharBuf[32];
(void) ARError_reset();
Zero(&status, 1, ARStatusList);
variableValue.dataType = AR_DATA_TYPE_INTEGER;
variableValue.u.intVal = value;
if (variableId == 12 || variableId == 13)
{
// just a quick and dirty solution because those variables need to be characters
sprintf(numToCharBuf, "%ld", value);
variableValue.dataType = AR_DATA_TYPE_CHAR;
variableValue.u.charVal = numToCharBuf;
}
ret = ARSetSessionConfiguration( ctrl, variableId, &variableValue, &status );
if(ARError(ret, status)) {
XPUSHs(sv_2mortal(newSViv(0))); /* ERR */
} else {
XPUSHs(sv_2mortal(newSViv(1))); /* OK */
}
ARS/CodeTemplate.pm view on Meta::CPAN
sub include {
my( $file ) = @_;
local $/ = undef;
local *FILE;
open( FILE, $file ) or do {
warn "Cannot open \"$file\": $!\n";
return undef;
};
my $data = <FILE>;
close FILE;
return $data;
}
sub modByRegex {
package main;
my( $val, @regex ) = @_;
foreach my $regex ( @regex ){
eval "\$val =~ $regex";
warn $@, "\n" if $@;
}
return $val;
ARS/OOform.pm view on Meta::CPAN
$self->{'fields_rev'} = \%rev;
my(%t, %enums);
foreach (keys %f) {
print "caching field: $_\n" if $self->{'connection'}->{'.debug'};
my $fv = ARS::ars_GetField($self->{'connection'}->{'ctrl'},
$self->{'form'},
$f{$_});
$connection->tryCatch();
$t{$_} = $fv->{'dataType'};
print "\tdatatype: $t{$_}\n" if $self->{'connection'}->{'.debug'};
if ($fv->{'dataType'} eq "enum") {
if (ref($fv->{'limit'}->{'enumLimits'}) eq "ARRAY") {
my $i = 0;
$enums{$_} = { map { $i++, $_ } @{$fv->{'limit'}->{'enumLimits'}} };
}
elsif (exists $fv->{'limit'}->{'enumLimits'}->{'regularList'}) {
my $i = 0;
$enums{$_} = { map { $i++, $_ } @{$fv->{'limit'}->{'enumLimits'}->{'regularList'}} };
} else {
$enums{$_} = { map { $_->{itemNumber}, $_->{itemName} } @{$fv->{'limit'}->{'enumLimits'}->{customList}} };
}
ARS/OOform.pm view on Meta::CPAN
# they didnt give us a name, but instead gave us an id. look up the
# name and return the type.
if(defined($id)) {
my $n = $this->getFieldName(-id => $id);
return $this->{'fieldtypes'}->{$n};
}
$this->{'connection'}->pushMessage(&ARS::AR_RETURN_ERROR,
81003,
"couldn't determine dataType for field.");
}
# delete(-entry => id)
sub delete {
my $this = shift;
my ($id) = ARS::rearrange([ENTRY],@_);
$this->{'connection'}->pushMessage(&ARS::AR_RETURN_ERROR,
81000,
ARS/OOform.pm view on Meta::CPAN
my ($allfields) = 1;
if(defined($fields)) {
$allfields = 0;
foreach (@{$fields}) {
push @fieldlist, $this->getFieldID($_);
}
}
# what we want to do is: retrieve all of the values, but for
# certain datatypes (attachments) we want to insert
# an object instead of the field value. for enum types,
# we want to decode the value.
#print "("; print $this->{'form'}; print ", $eid, @fieldlist)\n";
my @v;
if($allfields == 0) {
@v = ARS::ars_GetEntry($this->{'connection'}->{'ctrl'},
$this->{'form'},
$eid, @fieldlist);
(TS) added ars_CreateFilter, ars_SetFilter, ars_CreateEscalation, ars_SetEscalation,
ars_SetActiveLink
(TS) added declaration of boolcpyHVal(...) to supportrev.h
(TS) added declaration of revTypeName(...) to supportrev.h
(TS) added "rev_ARReferenceStruct" to supportrev.c
(TS) changed perl_ARReferenceStruct (added "value_dataType" key, necessary for
ars_CreateContainer)
(TS) changed ars_CreateActiveLink to read "schemaList" from alDef struct
(TS) bugfix in rev_ARMessageStruct
( hv_exists(h,"messageType"... -> hv_exists(a,"messageType"... )
(TS) moved declaration of rev_ARMessageStruct from supportrev.c to supportrev.h
(TS) bugfix in rev_ARAssignFieldStruct_helper: hv_exists needs key length
(TS) bugfix in rev_ARActiveLinkMacroParmList (copymem -> strdup)
(TS) changed rev_ARValueStructDiary to support non-hashref diary values
(necessary in ARAssignStruct context)
(TS) added ars_CreateSchema, ars_SetSchema, ars_CreateField, ars_SetField,
ars_CreateVUI, ars_SetVUI
(TS) added scripts (StructDef.pl, rev_AR_template.pl) for automatic generation of
conversion code (perl data structures -> AR API structs)
(TS) added module (ARS/CodeTemplate.pm) for code generation
(TS) change in perl_ARFieldValueOrArithStruct; if tag == AR_VALUE, put dataType into hash
(TS) added check for h != NULL to strcpyHVal
(TS) added "case AR_COND_OP_FROM_FIELD" to perl_qualifier()
(TS) changed handling of qualifier structs in perl_ARFieldLimitStruct, perl_ARJoinSchema,
perl_ARArchiveInfoStruct; those functions now return the converted perl structure
instead of the pointer to a C structure.
(TS) fixed Makefile.PL to work with $ARSAPI containing spaces on Windows
(JCM) fixed a typo in support.c
Released: 11/23/99 Version: 1.65
(JCM) added better support for decoding filters/activelinks
for arsystem 4.0 (not finished yet)
(JCM) added support for data type "decimal" when performing
(Set|Create)Entry
Released: 04/7/99 Version: 1.6403 BETA
(JCM) tested/fixed compiling against pre-4.0 apis.
(JCM) OO: now checks named params to ensure you don't
mis-spell them.
INSTALLATION view on Meta::CPAN
The expansion of the rrr.se targzip's will result in a directory similar to
"api764sp5linux" depending on the version of the API. The actual AR System
libraries as provided by Remedy need to be found by the linker in the lib
subdirectory of the $ARSAPI variable value set in Makefile.PL and with shortened
names as follows.
Example:
cp api764sp5linux/bin/* api764sp5linux/lib
cd api764sp5linux/lib
ln -s libicudatabmc.so.32 libicudatabmc.so
ln -s libicui18nbmc.so.32 libicui18nbmc.so
ln -s libicuiobmc.so.32 libicuiobmc.so
ln -s libicuucbmc.so.32 libicuucbmc.so
ln -s libicudatabmc_lx64.so.32 libicudatabmc_lx64.so
ln -s libicui18nbmc_lx64.so.32 libicui18nbmc_lx64.so
ln -s libicuiobmc_lx64.so.32 libicuiobmc_lx64.so
ln -s libicuucbmc_lx64.so.32 libicuucbmc_lx64.so
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<base path>/api764sp5linux/lib
TESTED OS'S
This extension has been successfully built and used under the following
Makefile.PL view on Meta::CPAN
$ARS_LIBS = " -lar$LARCH -lnsl ";
$ARS_LIBS = " -lar$LARCH -larencrypt$LARCH -lnsl " if $ENCRYPT;
}
if ($GNU_WIN) {
$ARS_LIBS = join(' ', map { "$ARSAPI/lib/" . $_ } @{$ra_arlibs});
} elsif ($WINDOWS) {
$ARS_LIBS = join(' ', map { '-l' . $_ } @{$ra_arlibs});
} else {
$ARS_LIBS .= " -lpthread ";
$ARS_LIBS .= " -licuucbmc$LARCH -licui18nbmc$LARCH -licudatabmc$LARCH " if $ARAPIVERSION >= ARS_VERSION_70;
}
$AUTODEFINES .= " -DARS32 -DARS452 ";
if( ($ARAPIVERSION >= ARS_VERSION_50) && ($^O eq 'linux') && $LARCH !~ /64/ ){
$AUTODEFINES .= " -malign-double ";
}
# e.g for 5.004_03 ..
#
ars_GetCharMenu for query menus, the
labelField is no longer
a scalar. it's now an
array ref.
1.68 Notes
----------
The 1.68 release includes ARS 4.5 integration. When compiling against ARS
4.5 APIs, the following data structures will change which _might_ break
existing scripts. You might need to update those scripts when recompiling
ARSperl against the 4.5 (or later) libraries.
Data Structure Used/Returned By
--------------------------------------------------------------
Active Link Hash ars_GetActiveLink()
Active Link Hash ars_CreateActiveLink()
Filter Hash ars_GetFilter()
Escalation Hash ars_GetEscalation()
StructDef.pl view on Meta::CPAN
$INVD_PREFIX = '#';
%CONVERT = (
ARFieldLimitList => {
_num => 'p->numItems',
_list => 'p->fieldLimitList',
_type => 'ARFieldLimitStruct',
},
ARFieldLimitStruct => {
# _typeparam => 1,
_switch => 'p->dataType',
# _map => 'DataTypeMap',
# _switch => 'p->dataType',
_map => 'dataType',
_case => {
AR_DATA_TYPE_INTEGER => {
_type => 'ARIntegerLimitsStruct',
_data => 'p->u.intLimits',
},
AR_DATA_TYPE_REAL => {
_type => 'ARRealLimitsStruct',
_data => 'p->u.realLimits',
},
AR_DATA_TYPE_CHAR => {
_type => 'ARCharLimitsStruct',
_data => 'p->u.charLimits',
},
AR_DATA_TYPE_DIARY => {
_type => 'ARDiaryLimitsStruct',
_data => 'p->u.diaryLimits',
},
AR_DATA_TYPE_ENUM => {
_min_version => '5.0.0',
_type => 'AREnumLimitsStruct',
_data => 'p->u.enumLimits',
},
AR_DATA_TYPE_DECIMAL => {
_type => 'ARDecimalLimitsStruct',
_data => 'p->u.decimalLimits',
},
AR_DATA_TYPE_ATTACH => {
_type => 'ARAttachLimitsStruct',
_data => 'p->u.attachLimits',
},
AR_DATA_TYPE_CURRENCY => {
_min_version => '5.1.0',
_type => 'ARCurrencyLimitsStruct',
_data => 'p->u.currencyLimits',
},
AR_DATA_TYPE_DATE => {
_min_version => '5.1.0',
_type => 'ARDateLimitsStruct',
_data => 'p->u.dateLimits',
},
AR_DATA_TYPE_TABLE => {
_type => 'ARTableLimitsStruct',
_data => 'p->u.tableLimits',
},
AR_DATA_TYPE_COLUMN => {
_type => 'ARColumnLimitsStruct',
_data => 'p->u.columnLimits',
},
AR_DATA_TYPE_VIEW => {
_min_version => '5.0.0',
_type => 'ARViewLimits',
_data => 'p->u.viewLimits',
},
AR_DATA_TYPE_DISPLAY => {
_min_version => '5.0.0',
_type => 'ARDisplayLimits',
_data => 'p->u.displayLimits',
},
},
},
ARIntegerLimitsStruct => {
min => {
_type => 'long',
_data => 'p->rangeLow',
},
max => {
_type => 'long',
_data => 'p->rangeHigh',
},
},
ARRealLimitsStruct => {
min => {
_type => 'double',
_data => 'p->rangeLow',
},
max => {
_type => 'double',
_data => 'p->rangeHigh',
},
precision => {
_type => 'int',
_data => 'p->precision',
},
},
ARCharLimitsStruct => {
maxLength => {
_type => 'unsigned int',
_data => 'p->maxLength',
},
menuStyle => {
_type => 'unsigned int',
_data => 'p->menuStyle',
_map => {
AR_MENU_APPEND => 'append',
AR_MENU_OVERWRITE => 'overwrite',
},
},
match => {
_type => 'unsigned int',
_data => 'p->qbeMatchOperation',
_map => {
AR_QBE_MATCH_ANYWHERE => 'anywhere',
AR_QBE_MATCH_LEADING => 'leading',
AR_QBE_MATCH_EQUAL => 'equal',
},
},
charMenu => {
_type => 'ARNameType',
_data => 'p->charMenu',
},
pattern => {
_type => 'char*',
_data => 'p->pattern',
},
fullTextOptions => {
_type => 'unsigned int',
_data => 'p->fullTextOptions',
_map => {
AR_FULLTEXT_OPTIONS_NONE => 'none',
AR_FULLTEXT_OPTIONS_INDEXED => 'indexed',
},
},
lengthUnits => {
_min_version => '7.5.0',
_type => 'unsigned int',
_data => 'p->lengthUnits',
_map => {
AR_LENGTH_UNIT_BYTE => 'byte',
AR_LENGTH_UNIT_CHAR => 'char',
},
},
storageOptionForCLOB => {
_min_version => '7.5.0',
_type => 'unsigned int',
_data => 'p->storageOptionForCLOB',
_map => {
AR_STORE_OPT_DEF => 'default',
AR_STORE_OPT_INROW => 'inrow',
AR_STORE_OPT_OUTROW => 'outrow',
},
},
},
ARDiaryLimitsStruct => {
fullTextOptions => {
_type => 'unsigned int',
_data => 'p->fullTextOptions',
_map => {
AR_FULLTEXT_OPTIONS_NONE => 'none',
AR_FULLTEXT_OPTIONS_INDEXED => 'indexed',
},
},
},
AREnumLimitsStruct => {
_min_version => '5.0.0',
enumLimits => {
_switch => 'p->listStyle',
_case => {
AR_ENUM_STYLE_REGULAR => {
regularList => {
_type => 'ARNameList',
_data => 'p->u.regularList',
},
},
AR_ENUM_STYLE_CUSTOM => {
customList => {
_type => 'AREnumItemList',
_data => 'p->u.customList',
},
},
AR_ENUM_STYLE_QUERY => {
queryList => {
_type => 'AREnumQueryStruct',
_data => 'p->u.queryList',
},
},
},
},
},
ARAttachLimitsStruct => {
maxSize => {
_type => 'unsigned long',
_data => 'p->maxSize',
},
attachType => {
_type => 'unsigned int',
_data => 'p->attachType',
},
},
ARTableLimitsStruct => {
numColumns => {
_type => 'unsigned int',
_data => 'p->numColumns',
},
qualifier => {
_type => 'ARQualifierStruct',
_data => 'p->qualifier',
},
maxRetrieve => {
_type => 'unsigned int',
_data => 'p->maxRetrieve',
},
schema => {
_type => 'ARNameType',
_data => 'p->schema',
},
server => {
_type => 'ARServerNameType',
_data => 'p->server',
},
sampleSchema => {
_min_version => '6.0.0',
_type => 'ARNameType',
_data => 'p->sampleSchema',
},
sampleServer => {
_min_version => '6.0.0',
_type => 'ARServerNameType',
_data => 'p->sampleServer',
},
},
ARColumnLimitsStruct => {
parent => {
_type => 'ARInternalId',
_data => 'p->parent',
},
dataField => {
_type => 'ARInternalId',
_data => 'p->dataField',
},
dataSource => {
_type => 'unsigned int',
_data => 'p->dataSource',
},
colLength => {
_type => 'unsigned int',
_data => 'p->colLength',
},
},
ARDecimalLimitsStruct => {
rangeLow => {
_type => 'char*',
_data => 'p->rangeLow',
},
rangeHigh => {
_type => 'char*',
_data => 'p->rangeHigh',
},
precision => {
_type => 'int',
_data => 'p->precision',
},
},
ARViewLimits => {
_min_version => '5.0.0',
maxLength => {
_type => 'unsigned int',
_data => 'p->maxLength',
},
},
ARDisplayLimits => {
_min_version => '5.0.0',
maxLength => {
_type => 'unsigned int',
_data => 'p->maxLength',
},
lengthUnits => {
_min_version => '7.5.0',
_type => 'unsigned int',
_data => 'p->lengthUnits',
_map => {
AR_LENGTH_UNIT_BYTE => 'byte',
AR_LENGTH_UNIT_CHAR => 'char',
},
},
},
ARDateLimitsStruct => {
_min_version => '5.1.0',
minDate => {
_type => 'int',
_data => 'p->minDate',
},
maxDate => {
_type => 'int',
_data => 'p->maxDate',
},
},
ARCurrencyLimitsStruct => {
_min_version => '5.1.0',
rangeLow => {
_type => 'char*',
_data => 'p->rangeLow',
},
rangeHigh => {
_type => 'char*',
_data => 'p->rangeHigh',
},
precision => {
_type => 'int',
_data => 'p->precision',
},
functionalCurrencies => {
_type => 'ARCurrencyDetailList',
_data => 'p->functionalCurrencies',
},
allowableCurrencies => {
_type => 'ARCurrencyDetailList',
_data => 'p->allowableCurrencies',
},
},
ARNameList => {
_num => 'p->numItems',
_list => 'p->nameList',
_type => 'ARNameType',
},
ARCurrencyDetailList => {
_min_version => '5.1.0',
_num => 'p->numItems',
_list => 'p->currencyDetailList',
_type => 'ARCurrencyDetailStruct',
},
ARCurrencyDetailStruct => {
_min_version => '5.1.0',
currencyCode => {
_type => 'ARCurrencyCodeType',
_data => 'p->currencyCode',
},
precision => {
_type => 'int',
_data => 'p->precision',
},
},
AREnumItemList => {
_min_version => '5.0.0',
_num => 'p->numItems',
_list => 'p->enumItemList',
_type => 'AREnumItemStruct',
},
AREnumQueryStruct => {
_min_version => '5.0.0',
schema => {
_type => 'ARNameType',
_data => 'p->schema',
},
server => {
_type => 'char[AR_MAX_SERVER_SIZE+1]',
_data => 'p->server',
},
qualifier => {
_type => 'ARQualifierStruct',
_data => 'p->qualifier',
},
nameField => {
_type => 'ARInternalId',
_data => 'p->nameField',
},
numberField => {
_type => 'ARInternalId',
_data => 'p->numberField',
},
},
AREnumItemStruct => {
_min_version => '5.0.0',
itemName => {
_type => 'ARNameType',
_data => 'p->itemName',
},
itemNumber => {
_type => 'unsigned long',
_data => 'p->itemNumber',
},
},
ARInternalId => {
_typedef => 'unsigned long',
},
ARNameType => {
_typedef => 'char[AR_MAX_NAME_SIZE+1]',
},
ARServerNameType => {
_typedef => 'char[AR_MAX_SERVER_SIZE+1]',
StructDef.pl view on Meta::CPAN
_map => [ 'fieldType', {
AR_FIELD_NONE => 0,
AR_FIELD_REGULAR => 1,
AR_FIELD_JOIN => 2,
AR_FIELD_VIEW => 3,
AR_FIELD_VENDOR => 4,
AR_FIELD_INHERITANCE => 5,
} ],
_case => {
AR_FIELD_NONE => {
_nodata => 1,
},
AR_FIELD_REGULAR => {
_nodata => 1,
},
AR_FIELD_JOIN => {
'join' => {
_type => 'ARJoinMappingStruct',
_data => 'p->u.join',
},
},
AR_FIELD_VIEW => {
view => {
_type => 'ARViewMappingStruct',
_data => 'p->u.view',
},
},
AR_FIELD_VENDOR => {
_min_version => '5.0.0',
vendor => {
_type => 'ARVendorMappingStruct',
_data => 'p->u.vendor',
},
},
AR_FIELD_INHERITANCE => {
_min_version => '6.0.0',
inheritance => {
_type => 'ARInheritanceMappingStruct',
_data => 'p->u.inheritance',
},
},
},
},
ARJoinMappingStruct => {
schemaIndex => {
_type => 'unsigned int',
_data => 'p->schemaIndex',
},
realId => {
_type => 'ARInternalId',
_data => 'p->realId',
},
},
ARViewMappingStruct => {
fieldName => {
_type => 'ARNameType',
_data => 'p->fieldName',
},
},
ARVendorMappingStruct => {
_min_version => '5.0.0',
fieldName => {
_type => 'ARNameType',
_data => 'p->fieldName',
},
},
ARInheritanceMappingStruct => {
_min_version => '6.0.0',
srcSchema => {
_type => 'ARNameType',
_data => 'p->srcSchema',
},
referenceMask => {
_type => 'unsigned int',
_data => 'p->referenceMask',
},
dataMappingId => {
_type => 'unsigned int',
_data => 'p->dataMappingId',
},
},
ARQualifierStruct => {
_switch => 'p->operation',
_map => [ 'oper', {
AR_COND_OP_AND => 'and',
AR_COND_OP_OR => 'or',
AR_COND_OP_NOT => 'not',
AR_COND_OP_REL_OP => 'rel_op',
AR_COND_OP_FROM_FIELD => 'external',
} ],
_case => {
AR_COND_OP_NONE => {
_default => 1,
},
AR_COND_OP_AND => {
left => {
_type => 'ARQualifierStruct*',
_data => 'p->u.andor.operandLeft',
},
right => {
_type => 'ARQualifierStruct*',
_data => 'p->u.andor.operandRight',
},
},
AR_COND_OP_OR => {
left => {
_type => 'ARQualifierStruct*',
_data => 'p->u.andor.operandLeft',
},
right => {
_type => 'ARQualifierStruct*',
_data => 'p->u.andor.operandRight',
},
},
AR_COND_OP_NOT => {
'not' => {
_type => 'ARQualifierStruct*',
_data => 'p->u.not',
},
},
AR_COND_OP_REL_OP => {
rel_op => {
_type => 'ARRelOpStruct*',
_data => 'p->u.relOp',
}
},
AR_COND_OP_FROM_FIELD => {
fieldId => {
_type => 'ARInternalId',
_data => 'p->u.fieldId',
},
},
},
},
ARRelOpStruct => {
oper => {
_type => 'unsigned int',
_data => 'p->operation',
_map => {
AR_REL_OP_EQUAL => '==',
AR_REL_OP_GREATER => '>',
AR_REL_OP_GREATER_EQUAL => '>=',
AR_REL_OP_LESS => '<',
AR_REL_OP_LESS_EQUAL => '<=',
AR_REL_OP_NOT_EQUAL => '!=',
AR_REL_OP_LIKE => 'like',
AR_REL_OP_IN => 'in',
},
},
left => {
_type => 'ARFieldValueOrArithStruct',
_data => 'p->operandLeft',
},
right => {
_type => 'ARFieldValueOrArithStruct',
_data => 'p->operandRight',
},
},
ARFieldValueOrArithStruct => {
_switch => 'p->tag',
_case => {
AR_FIELD => {
fieldId => {
_type => 'ARInternalId',
_data => 'p->u.fieldId',
},
},
AR_VALUE => {
value => {
_type => 'ARValueStruct',
_data => 'p->u.value',
},
},
AR_ARITHMETIC => {
arith => {
_type => 'ARArithOpStruct*',
_data => 'p->u.arithOp',
},
},
AR_STAT_HISTORY => {
statHistory => {
_type => 'ARStatHistoryValue',
_data => 'p->u.statHistory',
},
},
AR_VALUE_SET => {
valueSet => {
_type => 'ARValueList',
_data => 'p->u.valueSet',
},
},
AR_CURRENCY_FLD => {
_min_version => '5.1.0',
currencyField => {
_type => 'ARCurrencyPartStruct*',
_data => 'p->u.currencyField',
},
},
AR_FIELD_TRAN => {
TR_fieldId => {
_type => 'ARInternalId',
_data => 'p->u.fieldId',
},
},
AR_FIELD_DB => {
DB_fieldId => {
_type => 'ARInternalId',
_data => 'p->u.fieldId',
},
},
AR_LOCAL_VARIABLE => {
variable => {
_type => 'unsigned int',
_data => 'p->u.variable',
},
},
AR_QUERY => {
queryValue => {
_type => 'ARQueryValueStruct*',
_data => 'p->u.queryValue',
},
},
AR_FIELD_CURRENT => {
queryCurrent => {
_type => 'ARInternalId',
_data => 'p->u.fieldId',
},
},
},
},
#ARArithOpStruct => {
# oper => {
# _type => 'unsigned int',
# _data => 'p->operation',
# _map => {
# AR_ARITH_OP_ADD => '+',
# AR_ARITH_OP_SUBTRACT => '-',
# AR_ARITH_OP_MULTIPLY => '*',
# AR_ARITH_OP_DIVIDE => '/',
# AR_ARITH_OP_MODULO => '%',
# AR_ARITH_OP_NEGATE => '-',
# },
# },
# left => {
# _type => 'ARFieldValueOrArithStruct',
# _data => 'p->operandLeft',
# },
# right => {
# _type => 'ARFieldValueOrArithStruct',
# _data => 'p->operandRight',
# },
#},
ARStatHistoryValue => {
_header_only => 1,
enumVal => {
_type => 'unsigned long',
_data => 'p->enumVal',
},
userOrTime => {
_type => 'unsigned int',
_data => 'p->userOrTime',
},
},
ARQueryValueStruct => {
schema => {
_type => 'ARNameType',
_data => 'p->schema',
},
server => {
_type => 'char[AR_MAX_SERVER_SIZE+1]',
_data => 'p->server',
},
qualifier => {
_type => 'ARQualifierStruct*',
_data => 'p->qualifier',
},
valueField => {
_type => 'ARInternalId',
_data => 'p->valueField',
},
multi => {
_type => 'unsigned int',
_data => 'p->multiMatchCode',
_map => {
AR_QUERY_VALUE_MULTI_ERROR => 'error',
AR_QUERY_VALUE_MULTI_FIRST => 'first',
AR_QUERY_VALUE_MULTI_SET => 'set',
},
},
},
ARValueList => {
_num => 'p->numItems',
_list => 'p->valueList',
StructDef.pl view on Meta::CPAN
_switch => 'p->schemaType',
_map => [ 'schemaType', {
AR_SCHEMA_REGULAR => 'regular',
AR_SCHEMA_JOIN => 'join',
AR_SCHEMA_VIEW => 'view',
AR_SCHEMA_DIALOG => 'dialog',
AR_SCHEMA_VENDOR => 'vendor',
} ],
_case => {
AR_SCHEMA_REGULAR => {
_nodata => 1,
},
AR_SCHEMA_DIALOG => {
_nodata => 1,
},
AR_SCHEMA_JOIN => {
'join' => {
_type => 'ARJoinSchema',
_data => 'p->u.join',
},
},
AR_SCHEMA_VIEW => {
view => {
_type => 'ARViewSchema',
_data => 'p->u.view',
},
},
AR_SCHEMA_VENDOR => {
_min_version => '5.0.0',
vendor => {
_type => 'ARVendorSchema',
_data => 'p->u.vendor',
},
},
},
},
ARJoinSchema => {
memberA => {
_type => 'ARNameType',
_data => 'p->memberA',
},
memberB => {
_type => 'ARNameType',
_data => 'p->memberB',
},
joinQual => {
_type => 'ARQualifierStruct',
_data => 'p->joinQual',
},
option => {
_type => 'unsigned int',
_data => 'p->option',
},
},
ARViewSchema => {
tableName => {
_type => 'char[AR_MAX_TABLENAME_SIZE+1]',
_data => 'p->tableName',
},
keyField => {
_type => 'ARNameType',
_data => 'p->keyField',
},
},
ARVendorSchema => {
_min_version => '5.0.0',
vendorName => {
_type => 'ARNameType',
_data => 'p->vendorName',
},
tableName => {
_type => 'char[AR_MAX_TABLENAME_SIZE+1]',
_data => 'p->tableName',
},
},
AREntryListFieldList => {
_num => 'p->numItems',
_list => 'p->fieldsList',
_type => 'AREntryListFieldStruct',
},
AREntryListFieldStruct => {
fieldId => {
_type => 'ARInternalId',
_data => 'p->fieldId',
},
columnWidth => {
_type => 'unsigned int',
_data => 'p->columnWidth',
},
separator => {
_type => 'char[10]',
_data => 'p->separator',
},
},
ARSortList => {
_num => 'p->numItems',
_list => 'p->sortList',
_type => 'ARSortStruct',
},
ARSortStruct => {
fieldId => {
_type => 'ARInternalId',
_data => 'p->fieldId',
},
sortOrder => {
_type => 'unsigned int',
_data => 'p->sortOrder',
},
},
ARIndexList => {
_num => 'p->numItems',
_list => 'p->indexList',
_type => 'ARIndexStruct',
},
ARIndexStruct => {
fieldIds => {
_num => 'p->numFields',
_list => 'p->fieldIds',
_type => 'ARInternalId[]',
},
unique => {
_type => 'ARBoolean',
_data => 'p->unique',
_default => 'FALSE',
},
# indexName => {
# _type => 'ARNameType',
# _data => 'p->indexName',
# },
# dataMappingUsageCnt => {
# _type => 'unsigned int',
# _data => 'p->dataMappingUsageCnt',
# },
},
ARBoolean => {
_typedef => 'unsigned char',
},
ARDayStruct => {
monthday => {
_type => 'long',
_data => 'p->monthday',
},
weekday => {
_type => 'long',
_data => 'p->weekday',
},
hourmask => {
_type => 'long',
_data => 'p->hourmask',
},
minute => {
_type => 'unsigned int',
_data => 'p->minute',
},
},
ARContainerOwnerObjList => {
_num => 'p->numItems',
_list => 'p->ownerObjList',
_type => 'ARContainerOwnerObj',
},
ARReferenceList => {
_num => 'p->numItems',
_list => 'p->referenceList',
_type => 'ARReferenceStruct',
},
ARContainerOwnerObj => {
type => {
_type => 'unsigned int',
_data => 'p->type',
_map => {
ARCONOWNER_NONE => 'none',
ARCONOWNER_ALL => 'all',
ARCONOWNER_SCHEMA => 'schema',
},
},
ownerName => {
_type => 'ARNameType',
_data => 'p->ownerName',
},
},
ARPushFieldsActionStruct => {
_min_version => '6.0.0',
pushFieldsList => {
_type => 'ARPushFieldsList',
_data => 'p->pushFieldsList',
},
sampleServer => {
_type => 'ARServerNameType',
_data => 'p->sampleServer',
},
sampleSchema => {
_type => 'ARNameType',
_data => 'p->sampleSchema',
},
},
AROpenDlgStruct => {
serverName => {
_type => 'ARServerNameType',
_data => 'p->serverName',
},
schemaName => {
_type => 'ARNameType',
_data => 'p->schemaName',
},
vuiLabel => {
_type => 'ARNameType',
_data => 'p->vuiLabel',
},
closeBox => {
_map => {
FALSE => 'false',
TRUE => 'true',
},
_type => 'ARBoolean',
_data => 'p->closeBox',
},
inputValueFieldPairs => {
_type => 'ARFieldAssignList',
_data => 'p->inputValueFieldPairs',
},
outputValueFieldPairs => {
_type => 'ARFieldAssignList',
_data => 'p->outputValueFieldPairs',
},
windowMode => {
_max_version => '5.1.2',
_map => {
AR_ACTIVE_LINK_ACTION_OPEN_DLG => "open_dlg",
AR_ACTIVE_LINK_ACTION_OPEN_SEARCH => "open_search",
AR_ACTIVE_LINK_ACTION_OPEN_SUBMIT => "open_submit",
AR_ACTIVE_LINK_ACTION_OPEN_MODIFY_LST => "open_modify_lst",
AR_ACTIVE_LINK_ACTION_OPEN_MODIFY_DETAIL => "open_modify_detail",
AR_ACTIVE_LINK_ACTION_OPEN_MODIFY_SPLIT => "open_modify_split",
AR_ACTIVE_LINK_ACTION_OPEN_DSPLY_LST => "open_dsply_lst",
AR_ACTIVE_LINK_ACTION_OPEN_DSPLY_DETAIL => "open_dsply_detail",
AR_ACTIVE_LINK_ACTION_OPEN_DSPLY_SPLIT => "open_dsply_split",
AR_ACTIVE_LINK_ACTION_OPEN_REPORT => "open_report",
},
_type => 'int',
_data => 'p->windowMode',
},
'windowMode+' => {
_min_version => '6.0.0',
_map => {
AR_ACTIVE_LINK_ACTION_OPEN_DLG => "open_dlg",
AR_ACTIVE_LINK_ACTION_OPEN_SEARCH => "open_search",
AR_ACTIVE_LINK_ACTION_OPEN_SUBMIT => "open_submit",
AR_ACTIVE_LINK_ACTION_OPEN_MODIFY_LST => "open_modify_lst",
AR_ACTIVE_LINK_ACTION_OPEN_MODIFY_DETAIL => "open_modify_detail",
AR_ACTIVE_LINK_ACTION_OPEN_MODIFY_SPLIT => "open_modify_split",
AR_ACTIVE_LINK_ACTION_OPEN_DSPLY_LST => "open_dsply_lst",
AR_ACTIVE_LINK_ACTION_OPEN_DSPLY_DETAIL => "open_dsply_detail",
AR_ACTIVE_LINK_ACTION_OPEN_DSPLY_SPLIT => "open_dsply_split",
AR_ACTIVE_LINK_ACTION_OPEN_REPORT => "open_report",
AR_ACTIVE_LINK_ACTION_OPEN_MODIFY => "open_modify",
AR_ACTIVE_LINK_ACTION_OPEN_DSPLY => "open_dsply",
},
_type => 'int',
_data => 'p->windowMode',
},
targetLocation => {
_type => 'char *',
_data => 'p->targetLocation',
},
query => {
_type => 'ARQualifierStruct',
_data => 'p->query',
},
noMatchContinue => {
_map => {
FALSE => 'false',
TRUE => 'true',
},
_type => 'ARBoolean',
_data => 'p->noMatchContinue',
},
suppressEmptyList => {
_map => {
FALSE => 'false',
TRUE => 'true',
},
_type => 'ARBoolean',
_data => 'p->suppressEmptyLst',
},
message => {
_type => 'ARMessageStruct',
_data => 'p->msg',
},
pollinginterval => {
_type => 'ARULong32',
_data => 'p->pollinginterval',
},
reportString => {
_type => 'char *',
_data => 'p->reportString',
},
sortOrderList => {
_type => 'ARSortList',
_data => 'p->sortOrderList',
},
},
ARCloseWndStruct => {
closeAll => {
_map => {
FALSE => 'false',
TRUE => 'true',
},
_type => 'ARBoolean',
_data => 'p->closeAll',
},
},
ARCommitChangesStruct => {
schemaName => {
_type => 'ARNameType',
_data => 'p->schemaName',
},
},
ARCallGuideStruct => {
serverName => {
_type => 'ARServerNameType',
_data => 'p->serverName',
},
guideName => {
_type => 'ARNameType',
_data => 'p->guideName',
},
guideMode => {
_type => 'int',
_data => 'p->guideMode',
},
loopTable => {
_type => 'ARInternalId',
_data => 'p->guideTableId',
},
inputValueFieldPairs => {
_min_version => '6.0.0',
_type => 'ARFieldAssignList',
_data => 'p->inputValueFieldPairs',
},
outputValueFieldPairs => {
_min_version => '6.0.0',
_type => 'ARFieldAssignList',
_data => 'p->outputValueFieldPairs',
},
sampleServer => {
_min_version => '6.0.0',
_type => 'ARServerNameType',
_data => 'p->sampleServer',
},
sampleGuide => {
_min_version => '6.0.0',
_type => 'ARNameType',
_data => 'p->sampleGuide',
},
},
ARExitGuideStruct => {
closeAll => {
_map => {
FALSE => 'false',
TRUE => 'true',
},
_type => 'ARBoolean',
_data => 'p->closeAll',
},
},
ARGotoGuideLabelStruct => {
label => {
_type => 'char *',
_data => 'p->label',
},
},
ARGotoActionStruct => {
tag => {
_type => 'unsigned int',
_data => 'p->tag',
},
fieldIdOrValue => {
_type => 'ARULong32',
_data => 'p->fieldIdOrValue',
},
},
ARWaitStruct => {
continueButtonTitle => {
_type => 'char *',
_data => 'p->continueButtonTitle',
},
},
ARDDEStruct => {
serviceName => {
_type => 'char *',
_data => 'p->serviceName',
},
topic => {
_type => 'char *',
_data => 'p->topic',
},
action => {
_type => 'unsigned int',
_data => 'p->action',
},
pathToProgram => {
_type => 'char *',
_data => 'p->pathToProgram',
},
command => {
_type => 'char *',
_data => 'p->command',
},
item => {
_type => 'char *',
_data => 'p->item',
},
},
ARAutomationStruct => {
autoServerName => {
_type => 'char *',
_data => 'p->autoServerName',
},
clsId => {
_type => 'char *',
_data => 'p->clsId',
},
action => {
_type => 'char *',
_data => 'p->action',
},
isVisible => {
_map => {
FALSE => 'false',
TRUE => 'true',
},
_type => 'ARBoolean',
_data => 'p->isVisible',
},
methodList => {
_type => 'ARCOMMethodList',
_data => 'p->methodList',
},
},
ARCOMMethodList => {
_num => 'p->numItems',
_list => 'p->methodList',
_type => 'ARCOMMethodStruct',
},
ARCOMMethodStruct => {
methodName => {
_type => 'char *',
_data => 'p->methodName',
},
methodIId => {
_type => 'char *',
_data => 'p->methodIId',
},
methodType => {
_type => 'unsigned int',
_data => 'p->methodType',
},
methodValue => {
_type => 'ARCOMValueStruct',
_data => 'p->methodValue',
},
parameterList => {
_type => 'ARCOMMethodParmList',
_data => 'p->parameterList',
},
},
ARCOMValueStruct => {
valueIId => {
_type => 'char *',
_data => 'p->valueIId',
},
transId => {
_type => 'ARInternalId',
_data => 'p->transId',
},
valueType => {
_type => 'unsigned int',
_data => 'p->valueType',
},
_switch => 'p->valueType',
_map => {
AR_COM_PARM_NULL => 'null',
AR_COM_PARM_FIELDID => 'fieldid',
AR_COM_PARM_VALUE => 'value',
},
_case => {
AR_COM_PARM_NULL => {
_default => 1,
},
AR_COM_PARM_FIELDID => {
fieldId => {
_type => 'ARInternalId',
_data => 'p->u.fieldId',
}
},
AR_COM_PARM_VALUE => {
value => {
_type => 'ARValueStruct',
_data => 'p->u.value',
},
},
},
},
ARCOMMethodParmList => {
_num => 'p->numItems',
_list => 'p->parameterList',
_type => 'ARCOMMethodParmStruct',
},
ARCOMMethodParmStruct => {
parmName => {
_type => 'char *',
_data => 'p->parmName',
},
parmType => {
_type => 'unsigned int',
_data => 'p->parmType',
},
parmValue => {
_type => 'ARCOMValueStruct',
_data => 'p->parmValue',
},
},
ARULong32 => {
_typedef => 'unsigned long',
},
ARLong32 => {
_typedef => 'long',
},
ARPushFieldsList => {
_num => 'p->numItems',
_list => 'p->pushFieldsList',
_type => 'ARPushFieldsStruct',
},
ARPushFieldsStruct => {
field => {
_type => 'ARAssignFieldStruct',
_data => 'p->field',
},
assign => {
_type => 'ARAssignStruct',
_data => 'p->assign',
},
},
ARCurrencyPartStruct => {
_min_version => '5.1.0',
fieldId => {
_type => 'ARInternalId',
_data => 'p->fieldId',
},
partTag => {
_type => 'unsigned int',
_data => 'p->partTag',
},
currencyCode => {
_type => 'ARCurrencyCodeType',
_data => 'p->currencyCode',
},
},
ARFilterActionList => {
_num => 'p->numItems',
_list => 'p->actionList',
_type => 'ARFilterActionStruct',
},
ARFilterActionStruct => {
_switch => 'p->action',
_map => {
StructDef.pl view on Meta::CPAN
AR_FILTER_ACTION_EXITGUIDE => 'exitGuide',
AR_FILTER_ACTION_GOTOGUIDELABEL => 'gotoGuide',
},
_case => {
AR_FILTER_ACTION_NONE => {
_default => 1,
},
AR_FILTER_ACTION_NOTIFY => {
notify => {
_type => 'ARFilterActionNotify',
_data => 'p->u.notify',
},
},
AR_FILTER_ACTION_MESSAGE => {
message => {
_type => 'ARFilterStatusStruct',
_data => 'p->u.message',
},
},
AR_FILTER_ACTION_LOG => {
log => {
_type => 'char*',
_data => 'p->u.logFile',
},
},
AR_FILTER_ACTION_FIELDS => {
_min_version => '6.0.0',
assign_fields => {
_type => 'ARSetFieldsActionStruct',
_data => 'p->u.setFields',
},
},
'AR_FILTER_ACTION_FIELDS+' => {
_max_version => '5.1.2',
assign_fields => {
_type => 'ARFieldAssignList',
_data => 'p->u.fieldList',
},
},
AR_FILTER_ACTION_PROCESS => {
process => {
_type => 'char*',
_data => 'p->u.process',
},
},
AR_FILTER_ACTION_FIELDP => {
_min_version => '6.0.0',
fieldp => {
_type => 'ARPushFieldsActionStruct',
_data => 'p->u.pushFields',
},
},
'AR_FILTER_ACTION_FIELDP+' => {
_max_version => '5.1.2',
fieldp => {
_type => 'ARPushFieldsList',
_data => 'p->u.pushFieldsList',
},
},
AR_FILTER_ACTION_SQL => {
sqlCommand => {
_type => 'ARSQLStruct',
_data => 'p->u.sqlCommand',
},
},
AR_FILTER_ACTION_GOTOACTION => {
gotoAction => {
_type => 'ARGotoActionStruct',
_data => 'p->u.gotoAction',
},
},
AR_FILTER_ACTION_CALLGUIDE => {
callGuide => {
_type => 'ARCallGuideStruct',
_data => 'p->u.callGuide',
},
},
AR_FILTER_ACTION_EXITGUIDE => {
exitGuide => {
_type => 'ARExitGuideStruct',
_data => 'p->u.exitGuide',
},
},
AR_FILTER_ACTION_GOTOGUIDELABEL => {
gotoGuide => {
_type => 'char*',
_data => 'p->u.gotoGuide.label',
},
},
},
},
ARFilterActionNotify => {
user => {
_type => 'char *',
_data => 'p->user',
},
notifyText => {
_type => 'char *',
_data => 'p->notifyText',
},
notifyPriority => {
_type => 'unsigned int',
_data => 'p->notifyPriority',
},
notifyMechanism => {
_type => 'unsigned int',
_data => 'p->notifyMechanism',
},
notifyMechanismXRef => {
_type => 'ARInternalId',
_data => 'p->notifyMechanismXRef',
},
subjectText => {
_type => 'char *',
_data => 'p->subjectText',
},
fieldIdListType => {
_type => 'unsigned int',
_data => 'p->fieldIdListType',
},
fieldList => {
_type => 'ARInternalIdList',
_data => 'p->fieldIdList',
},
notifyBehavior => {
_min_version => '5.1.0',
_type => 'unsigned int',
_data => 'p->notifyBehavior',
},
notifyPermission => {
_min_version => '5.1.0',
_type => 'unsigned int',
_data => 'p->notifyPermission',
},
notifyAdvanced => {
_min_version => '5.1.0',
_type => 'ARFilterActionNotifyAdvanced*',
_data => 'p->notifyAdvanced',
_default => 'NULL',
},
},
ARSetFieldsActionStruct => {
_min_version => '6.0.0',
fieldList => {
_type => 'ARFieldAssignList',
_data => 'p->fieldList',
},
sampleServer => {
_type => 'ARServerNameType',
_data => 'p->sampleServer',
},
sampleSchema => {
_type => 'ARNameType',
_data => 'p->sampleSchema',
},
},
ARSQLStruct => {
server => {
_type => 'char[AR_MAX_SERVER_SIZE+1]',
_data => 'p->server',
},
command => {
_type => 'char *',
_data => 'p->command',
},
},
ARFilterActionNotifyAdvanced => {
_min_version => '5.1.0',
from => {
_type => 'char *',
_data => 'p->from',
},
replyTo => {
_type => 'char *',
_data => 'p->replyTo',
},
cc => {
_type => 'char *',
_data => 'p->cc',
},
bcc => {
_type => 'char *',
_data => 'p->bcc',
},
organization => {
_type => 'char *',
_data => 'p->organization',
},
mailboxName => {
_type => 'char *',
_data => 'p->mailboxName',
},
headerTemplate => {
_type => 'char *',
_data => 'p->headerTemplate',
},
footerTemplate => {
_type => 'char *',
_data => 'p->footerTemplate',
},
contentTemplate => {
_type => 'char *',
_data => 'p->contentTemplate',
},
# reserved1 => {
# _type => 'ARULong32',
# _data => 'p->reserved1',
# },
# reserved2 => {
# _type => 'ARULong32',
# _data => 'p->reserved2',
# },
# reserved3 => {
# _type => 'ARULong32',
# _data => 'p->reserved3',
# },
},
AREscalationTmStruct => {
_switch => 'p->escalationTmType',
_case => {
AR_ESCALATION_TYPE_INTERVAL => {
exitGuide => {
_type => 'ARLong32',
_data => 'p->u.interval',
},
},
AR_ESCALATION_TYPE_TIMEMARK => {
exitGuide => {
_type => 'ARDayStruct',
_data => 'p->u.date',
},
},
},
},
ARUnsignedIntList => {
_num => 'p->numItems',
_list => 'p->intList',
_type => 'unsigned int',
},
AREntryListFieldValueList => {
_num => 'p->numItems',
_list => 'p->entryList',
_type => 'AREntryListFieldValueStruct',
},
AREntryListFieldValueStruct => {
entryId => {
_type => 'AREntryIdList',
_data => 'p->entryId',
},
entryValues => {
_type => 'ARFieldValueList*',
_data => 'p->entryValues',
},
},
AREntryIdList => {
_num => 'p->numItems',
_list => 'p->entryIdList',
_type => 'AREntryIdType',
},
ARFieldValueList => {
_num => 'p->numItems',
_list => 'p->fieldValueList',
_type => 'ARFieldValueStruct',
},
ARFieldValueStruct => {
fieldId => {
_type => 'ARInternalId',
_data => 'p->fieldId',
},
value => {
_type => 'ARValueStruct',
_data => 'p->value',
},
},
AREntryIdType => {
_typedef => 'char[AR_MAX_ENTRYID_SIZE+1]',
},
ARAuditInfoStruct => {
_min_version => '7.0.0',
enable => {
_type => 'unsigned int',
_data => 'p->enable',
},
style => {
_type => 'unsigned int',
_data => 'p->style',
},
formName => {
_type => 'ARNameType',
_data => 'p->formName',
},
query => {
_type => 'ARQualifierStruct',
_data => 'p->query',
},
},
ARBulkEntryReturnList => {
_min_version => '6.3.0',
_num => 'p->numItems',
_list => 'p->entryReturnList',
_type => 'ARBulkEntryReturn',
},
ARBulkEntryReturn => {
_min_version => '6.3.0',
_switch => 'p->entryCallType',
_case => {
AR_BULK_ENTRY_CREATE => {
createEntryReturn => {
_type => 'AREntryReturn',
_data => 'p->u.createEntryReturn',
},
},
AR_BULK_ENTRY_SET => {
setEntryReturn => {
_type => 'ARStatusList',
_data => 'p->u.setEntryReturn',
},
},
AR_BULK_ENTRY_DELETE => {
deleteEntryReturn => {
_type => 'ARStatusList',
_data => 'p->u.deleteEntryReturn',
},
},
AR_BULK_ENTRY_MERGE => {
mergeEntryReturn => {
_type => 'AREntryReturn',
_data => 'p->u.mergeEntryReturn',
},
},
AR_BULK_ENTRY_XMLCREATE => {
xmlCreateEntryReturn => {
_type => 'ARXMLEntryReturn',
_data => 'p->u.xmlCreateEntryReturn',
},
},
AR_BULK_ENTRY_XMLSET => {
xmlSetEntryReturn => {
_type => 'ARXMLEntryReturn',
_data => 'p->u.xmlSetEntryReturn',
},
},
AR_BULK_ENTRY_XMLDELETE => {
xmlDeleteEntryReturn => {
_type => 'ARStatusList',
_data => 'p->u.xmlDeleteEntryReturn',
},
},
},
},
AREntryReturn => {
_min_version => '6.3.0',
entryId => {
_type => 'AREntryIdType',
_data => 'p->entryId',
},
status => {
_type => 'ARStatusList',
_data => 'p->status',
},
},
ARXMLEntryReturn => {
_min_version => '6.3.0',
outputDoc => {
_type => 'char *',
_data => 'p->outputDoc',
},
status => {
_type => 'ARStatusList',
_data => 'p->status',
},
},
ARStatusList => {
_num => 'p->numItems',
_list => 'p->statusList',
_type => 'ARStatusStruct',
},
ARCharMenuList => {
_num => 'p->numItems',
_list => 'p->charMenuList',
_type => 'ARCharMenuItemStruct',
},
ARCharMenuQueryStruct => {
schema => {
_type => 'ARNameType',
_data => 'p->schema',
},
server => {
_type => 'char[AR_MAX_SERVER_SIZE+1]',
_data => 'p->server',
},
labelField => {
_type => 'ARInternalId[AR_MAX_LEVELS_DYNAMIC_MENU]',
_data => 'p->labelField',
},
valueField => {
_type => 'ARInternalId',
_data => 'p->valueField',
},
sortOnLabel => {
_type => 'ARBoolean',
_data => 'p->sortOnLabel',
},
qualifier => {
_type => 'ARQualifierStruct',
_data => 'p->qualifier',
},
},
ARCharMenuFileStruct => {
fileLocation => {
_type => 'unsigned int',
_data => 'p->fileLocation',
},
filename => {
_type => 'char *',
_data => 'p->filename',
},
},
ARCharMenuSQLStruct => {
server => {
_type => 'char[AR_MAX_SERVER_SIZE+1]',
_data => 'p->server',
},
labelIndex => {
_type => 'int[AR_MAX_LEVELS_DYNAMIC_MENU]',
_data => 'p->labelIndex',
},
valueIndex => {
_type => 'int',
_data => 'p->valueIndex',
},
sqlCommand => {
_type => 'char *',
_data => 'p->sqlCommand',
},
},
ARCharMenuSSStruct => {
menuName => {
_type => 'ARNameType',
_data => 'p->menuName',
},
keywordList => {
_type => 'ARFieldValueList',
_data => 'p->keywordList',
},
parameterList => {
_type => 'ARFieldValueList',
_data => 'p->parameterList',
},
externList => {
_type => 'ARQualifierList',
_data => 'p->externList',
},
server => {
_type => 'char *',
_data => 'p->server',
},
schema => {
_type => 'char *',
_data => 'p->schema',
},
},
ARCharMenuDDStruct => {
server => {
_type => 'char[AR_MAX_SERVER_SIZE+1]',
_data => 'p->server',
},
nameType => {
_type => 'unsigned int',
_data => 'p->nameType',
},
valueFormat => {
_type => 'unsigned int',
_data => 'p->valueFormat',
},
structType => {
_type => 'unsigned int',
_data => 'p->structType',
},
_switch => 'p->structType',
_map => 'structType',
_case => {
AR_CHAR_MENU_DD_FORM => {
_type => 'ARCharMenuDDFormStruct',
_data => 'p->u.formDefn',
},
AR_CHAR_MENU_DD_FIELD => {
_type => 'ARCharMenuDDFieldStruct',
_data => 'p->u.fieldDefn',
},
},
},
ARCharMenuDDFormStruct => {
schemaType => {
_type => 'unsigned int',
_data => 'p->schemaType',
},
includeHidden => {
_type => 'ARBoolean',
_data => 'p->includeHidden',
_map => {
FALSE => 'false',
TRUE => 'true',
},
},
},
ARCharMenuDDFieldStruct => {
fieldType => {
_type => 'unsigned int',
_data => 'p->fieldType',
},
schema => {
_type => 'ARNameType',
_data => 'p->schema',
},
},
ARQualifierList => {
_num => 'p->numItems',
_list => 'p->qualifierList',
_type => 'ARQualifierStruct',
},
ARActiveLinkSvcActionStruct => {
_min_version => '7.1.0',
serverName => {
_type => 'ARServerNameType',
_data => 'p->serverName',
},
serviceSchema => {
_type => 'ARNameType',
_data => 'p->serviceSchema',
},
requestIdMap => {
_type => 'ARInternalId',
_data => 'p->requestIdMap',
},
inputFieldMapping => {
_type => 'ARFieldAssignList',
_data => 'p->inputFieldMapping',
},
outputFieldMapping => {
_type => 'ARFieldAssignList',
_data => 'p->outputFieldMapping',
},
sampleServer => {
_type => 'ARServerNameType',
_data => 'p->sampleServer',
},
sampleSchema => {
_type => 'ARNameType',
_data => 'p->sampleSchema',
},
},
ARLicenseDateStruct => {
month => {
_type => 'int',
_data => 'p->month',
},
day => {
_type => 'int',
_data => 'p->day',
},
year => {
_type => 'int',
_data => 'p->year',
},
},
ARLicenseValidStruct => {
numLicenses => {
_type => 'int',
_data => 'p->numLicenses',
},
isDemo => {
_type => 'ARBoolean',
_data => 'p->isDemo',
},
expireDate => {
_type => 'ARLicenseDateStruct',
_data => 'p->expireDate',
},
tokenList => {
_type => 'char *',
_data => 'p->tokenList',
},
},
ARMultiSchemaQueryFromList => {
_min_version => '7.5.0',
_num => 'p->numItems',
_list => 'p->listPtr',
_type => 'ARMultiSchemaQueryFromStruct',
},
ARMultiSchemaQueryFromStruct => {
_min_version => '7.5.0',
_switch => 'p->type',
queryFromAlias => {
_type => 'ARNameType',
_data => 'p->queryFromAlias',
},
joinType => {
_type => 'unsigned int',
_data => 'p->joinType',
},
joinQual => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->joinQual',
_default => 'NULL',
},
_switch => 'p->type',
_case => {
AR_MULTI_SCHEMA_SCHEMA_NAME => {
schemaName => {
_type => 'ARNameType',
_data => 'p->u.schemaName',
},
},
AR_MULTI_SCHEMA_NESTED_QUERY => {
nestedQuery => {
_type => 'ARMultiSchemaNestedQueryStruct*',
_data => 'p->u.nestedQuery',
},
},
AR_MULTI_SCHEMA_RECURSIVE_QUERY => {
recursiveQuery => {
_type => 'ARMultiSchemaRecursiveQueryStruct*',
_data => 'p->u.recursiveQuery',
},
},
},
},
ARMultiSchemaNestedQueryStruct => {
_min_version => '7.5.0',
queryFromList => {
_type => 'ARMultiSchemaQueryFromList',
_data => 'p->queryFromList',
},
getListFields => {
_type => 'ARMultiSchemaFieldIdList',
_data => 'p->getListFields',
},
qualifier => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->qualifier',
},
},
ARMultiSchemaRecursiveQueryStruct => {
_min_version => '7.5.0',
recursiveSchemaAlias => {
_type => 'ARNameType',
_data => 'p->recursiveSchemaAlias',
},
queryFromList => {
_type => 'ARMultiSchemaQueryFromList',
_data => 'p->queryFromList',
},
getListFields => {
_type => 'ARMultiSchemaFieldIdList',
_data => 'p->getListFields',
},
startQual => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->startQual',
},
recursionQual => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->recursionQual',
},
levelsToRetrieve => {
_type => 'int',
_data => 'p->levelsToRetrieve',
},
},
ARMultiSchemaQualifierStruct => {
_min_version => '7.5.0',
_switch => 'p->operation',
_map => [ 'oper', {
AR_COND_OP_AND => 'and',
AR_COND_OP_OR => 'or',
AR_COND_OP_NOT => 'not',
AR_COND_OP_REL_OP => 'rel_op',
AR_COND_OP_FROM_FIELD => 'external',
} ],
_case => {
AR_COND_OP_NONE => {
_default => 1,
},
AR_COND_OP_AND => {
left => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->u.andor.operandLeft',
},
right => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->u.andor.operandRight',
},
},
AR_COND_OP_OR => {
left => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->u.andor.operandLeft',
},
right => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->u.andor.operandRight',
},
},
AR_COND_OP_NOT => {
'not' => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->u.notQual',
},
},
AR_COND_OP_REL_OP => {
rel_op => {
_type => 'ARMultiSchemaRelOpStruct*',
_data => 'p->u.relOp',
},
},
AR_COND_OP_FROM_FIELD => {
fieldId => {
_type => 'ARMultiSchemaFieldIdStruct',
_data => 'p->u.fieldId',
},
},
},
},
ARMultiSchemaRelOpStruct => {
_min_version => '7.5.0',
oper => {
_type => 'unsigned int',
_data => 'p->operation',
_map => {
AR_REL_OP_EQUAL => '==',
AR_REL_OP_GREATER => '>',
AR_REL_OP_GREATER_EQUAL => '>=',
AR_REL_OP_LESS => '<',
AR_REL_OP_LESS_EQUAL => '<=',
AR_REL_OP_NOT_EQUAL => '!=',
AR_REL_OP_LIKE => 'like',
AR_REL_OP_IN => 'in',
},
},
left => {
_type => 'ARMultiSchemaFieldValueOrArithStruct',
_data => 'p->operandLeft',
},
right => {
_type => 'ARMultiSchemaFieldValueOrArithStruct',
_data => 'p->operandRight',
},
},
ARMultiSchemaFieldValueOrArithStruct => {
_min_version => '7.5.0',
_switch => 'p->tag',
_case => {
AR_FIELD => {
fieldId => {
_type => 'ARMultiSchemaFieldIdStruct',
_data => 'p->u.fieldId',
},
},
AR_VALUE => {
value => {
_type => 'ARValueStruct',
_data => 'p->u.value',
},
},
AR_ARITHMETIC => {
arith => {
_type => 'ARMultiSchemaArithOpStruct*',
_data => 'p->u.arithOp',
},
},
AR_STAT_HISTORY => {
_max_version => '7.5.0',
statHistory => {
_type => 'ARMultiSchemaStatHistoryValue',
_data => 'p->u.statHistory',
},
},
AR_STAT_HISTORY => {
_min_version => '7.6.3',
statHistory => {
_type => 'ARMultiSchemaFuncStatHistoryValue',
_data => 'p->u.statHistory',
},
},
AR_VALUE_SET => {
valueSet => {
_type => 'ARValueList',
_data => 'p->u.valueSet',
},
},
AR_CURRENCY_FLD => {
_min_version => '5.1.0',
_max_version => '7.5.0',
currencyField => {
_type => 'ARMultiSchemaCurrencyPartStruct*',
_data => 'p->u.currencyField',
},
},
AR_CURRENCY_FLD => {
_min_version => '7.6.3',
currencyField => {
_type => 'ARMultiSchemaFuncCurrencyPartStruct*',
_data => 'p->u.currencyField',
},
},
AR_VALUE_SET_QUERY => {
_max_version => '7.5.0',
queryValue => {
_type => 'ARMultiSchemaValueSetQueryStruct*',
_data => 'p->u.valueSetQuery',
},
},
AR_VALUE_SET_QUERY => {
_min_version => '7.6.3',
queryValue => {
_type => 'ARMultiSchemaValueSetFuncQueryStruct*',
_data => 'p->u.valueSetQuery',
},
},
},
},
#ARMultiSchemaArithOpStruct => {
# _min_version => '7.5.0',
# operation => {
# _type => 'unsigned int',
# _data => 'p->operation',
# },
# operandLeft => {
# _type => 'ARMultiSchemaFieldValueOrArithStruct',
# _data => 'p->operandLeft',
# },
# operandRight => {
# _type => 'ARMultiSchemaFieldValueOrArithStruct',
# _data => 'p->operandRight',
# },
#},
ARMultiSchemaCurrencyPartStruct => {
_min_version => '7.5.0',
_max_version => '7.5.0',
fieldId => {
_type => 'ARMultiSchemaFieldIdStruct',
_data => 'p->fieldId',
},
partTag => {
_type => 'unsigned int',
_data => 'p->partTag',
},
currencyCode => {
_type => 'ARCurrencyCodeType',
_data => 'p->currencyCode',
},
},
ARMultiSchemaValueSetQueryStruct => {
_min_version => '7.5.0',
queryFromList => {
_type => 'ARMultiSchemaQueryFromList',
_data => 'p->queryFromList',
},
fieldId => {
_type => 'ARMultiSchemaFieldIdStruct',
_data => 'p->fieldId',
},
qualifier => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->qualifier',
},
},
ARMultiSchemaStatHistoryValue => {
_min_version => '7.5.0',
queryFromAlias => {
_type => 'ARNameType',
_data => 'p->queryFromAlias',
},
enumVal => {
_type => 'unsigned long',
_data => 'p->enumVal',
},
userOrTime => {
_type => 'unsigned int',
_data => 'p->userOrTime',
},
},
ARMultiSchemaFieldIdList => {
_min_version => '7.5.0',
_num => 'p->numItems',
_list => 'p->listPtr',
_type => 'ARMultiSchemaFieldIdStruct',
},
ARMultiSchemaSortList => {
_min_version => '7.5.0',
_num => 'p->numItems',
_list => 'p->listPtr',
_type => 'ARMultiSchemaSortStruct',
},
ARMultiSchemaSortStruct => {
_min_version => '7.5.0',
fieldId => {
_type => 'ARMultiSchemaFieldIdStruct',
_data => 'p->fieldId',
},
sortOrder => {
_type => 'unsigned int',
_data => 'p->sortOrder',
},
},
ARMultiSchemaFuncStatHistoryValue => {
_min_version => '7.6.3',
queryFromAlias => {
_type => 'ARNameType',
_data => 'p->queryFromAlias',
},
enumVal => {
_type => 'unsigned long',
_data => 'p->enumVal',
},
userOrTime => {
_type => 'unsigned int',
_data => 'p->userOrTime',
},
funcId => {
_type => 'int',
_data => 'p->funcId',
},
},
ARMultiSchemaFuncCurrencyPartStruct => {
_min_version => '7.6.3',
fieldFunc => {
_type => 'ARMultiSchemaFieldFuncStruct',
_data => 'p->fieldFunc',
},
partTag => {
_type => 'unsigned int',
_data => 'p->partTag',
},
currencyCode => {
_type => 'ARCurrencyCodeType',
_data => 'p->currencyCode',
},
},
ARMultiSchemaValueSetFuncQueryStruct => {
_min_version => '7.6.3',
queryFromList => {
_type => 'ARMultiSchemaFuncQueryFromList',
_data => 'p->queryFromList',
},
fieldId => {
_type => 'ARMultiSchemaFieldIdStruct',
_data => 'p->fieldId',
},
qualifier => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->qualifier',
},
groupBy => {
_type => 'ARMultiSchemaFieldIdList',
_data => 'p->groupBy',
},
having => {
_type => 'ARMultiSchemaFuncQualifierStruct*',
_data => 'p->having',
},
},
ARMultiSchemaFuncQueryFromList => {
_min_version => '7.6.3',
_num => 'p->numItems',
_list => 'p->listPtr',
_type => 'ARMultiSchemaFuncQueryFromStruct',
},
ARMultiSchemaFuncQueryFromStruct => {
_min_version => '7.6.3',
queryFromAlias => {
_type => 'ARNameType',
_data => 'p->queryFromAlias',
},
joinType => {
_type => 'unsigned int',
_data => 'p->joinType',
},
joinQual => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->joinQual',
},
_switch => 'p->type',
_case => {
AR_MULTI_SCHEMA_SCHEMA_NAME => {
'name' => {
_type => 'ARNameType',
_data => 'p->u.schemaName',
},
},
AR_MULTI_SCHEMA_NESTED_QUERY => {
'extRef' => {
_type => 'ARMultiSchemaNestedFuncQueryStruct*',
_data => 'p->u.nestedQuery',
},
},
AR_MULTI_SCHEMA_RECURSIVE_QUERY => {
'extRef' => {
_type => 'ARMultiSchemaRecursiveFuncQueryStruct*',
_data => 'p->u.recursiveQuery',
},
},
},
},
ARMultiSchemaFuncQualifierStruct => {
_min_version => '7.6.3',
_switch => 'p->operation',
_map => [ 'oper', {
AR_COND_OP_AND => 'and',
AR_COND_OP_OR => 'or',
StructDef.pl view on Meta::CPAN
AR_COND_OP_REL_OP => 'rel_op',
AR_COND_OP_FROM_FIELD => 'external',
} ],
_case => {
AR_COND_OP_NONE => {
_default => 1,
},
AR_COND_OP_AND => {
left => {
_type => 'ARMultiSchemaFuncQualifierStruct*',
_data => 'p->u.andor.operandLeft',
},
right => {
_type => 'ARMultiSchemaFuncQualifierStruct*',
_data => 'p->u.andor.operandRight',
},
},
AR_COND_OP_OR => {
left => {
_type => 'ARMultiSchemaFuncQualifierStruct*',
_data => 'p->u.andor.operandLeft',
},
right => {
_type => 'ARMultiSchemaFuncQualifierStruct*',
_data => 'p->u.andor.operandRight',
},
},
AR_COND_OP_NOT => {
'not' => {
_type => 'ARMultiSchemaFuncQualifierStruct*',
_data => 'p->u.notQual',
},
},
AR_COND_OP_REL_OP => {
rel_op => {
_type => 'ARMultiSchemaFuncRelOpStruct*',
_data => 'p->u.relOp',
},
},
AR_COND_OP_FROM_FIELD => {
fieldFunc => {
_type => 'ARMultiSchemaFieldFuncStruct',
_data => 'p->u.fieldFunc',
},
},
},
},
ARMultiSchemaNestedFuncQueryStruct => {
_min_version => '7.6.3',
queryFromList => {
_type => 'ARMultiSchemaFuncQueryFromList',
_data => 'p->queryFromList',
},
getListFuncs => {
_type => 'ARMultiSchemaFieldFuncList',
_data => 'p->getListFuncs',
},
qualifier => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->qualifier',
},
groupBy => {
_type => 'ARMultiSchemaFieldIdList',
_data => 'p->groupBy',
},
having => {
_type => 'ARMultiSchemaFuncQualifierStruct*',
_data => 'p->having',
},
},
ARMultiSchemaFieldFuncList => {
_min_version => '7.6.3',
_num => 'p->numItems',
_list => 'p->listPtr',
_type => 'ARMultiSchemaFieldFuncStruct',
},
ARMultiSchemaFieldFuncStruct => {
_min_version => '7.6.3',
queryFromAlias => {
_type => 'ARNameType',
_data => 'p->queryFromAlias',
},
fieldId => {
_type => 'ARInternalId',
_data => 'p->fieldId',
},
funcId => {
_type => 'int',
_data => 'p->funcId',
},
},
ARMultiSchemaFuncRelOpStruct => {
_min_version => '7.6.3',
operation => {
_type => 'unsigned int',
_data => 'p->operation',
},
operandLeft => {
_type => 'ARMultiSchemaFieldFuncValueOrArithStruct',
_data => 'p->operandLeft',
},
operandRight => {
_type => 'ARMultiSchemaFieldFuncValueOrArithStruct',
_data => 'p->operandRight',
},
},
ARMultiSchemaRecursiveFuncQueryStruct => {
_min_version => '7.6.3',
recursiveSchemaAlias => {
_type => 'ARNameType',
_data => 'p->recursiveSchemaAlias',
},
queryFromList => {
_type => 'ARMultiSchemaFuncQueryFromList',
_data => 'p->queryFromList',
},
getListFuncs => {
_type => 'ARMultiSchemaFieldFuncList',
_data => 'p->getListFuncs',
},
startQual => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->startQual',
},
recursionQual => {
_type => 'ARMultiSchemaQualifierStruct*',
_data => 'p->recursionQual',
},
levelsToRetrieve => {
_type => 'int',
_data => 'p->levelsToRetrieve',
},
groupBy => {
_type => 'ARMultiSchemaFieldIdList',
_data => 'p->groupBy',
},
having => {
_type => 'ARMultiSchemaFuncQualifierStruct*',
_data => 'p->having',
},
},
ARMultiSchemaFieldFuncValueOrArithStruct => {
_min_version => '7.6.3',
_switch => 'p->tag',
_case => {
AR_FIELD => {
fieldFunc => {
_type => 'ARMultiSchemaFieldFuncStruct',
_data => 'p->u.fieldFunc',
},
},
AR_VALUE => {
value => {
_type => 'ARValueStruct',
_data => 'p->u.value',
},
},
AR_ARITHMETIC => {
arith => {
_type => 'ARMultiSchemaFuncArithOpStruct*',
_data => 'p->u.arithOp',
},
},
AR_STAT_HISTORY => {
statHistory => {
_type => 'ARMultiSchemaFuncStatHistoryValue',
_data => 'p->u.statHistory',
},
},
AR_VALUE_SET => {
valueSet => {
_type => 'ARValueList',
_data => 'p->u.valueSet',
},
},
AR_CURRENCY_FLD => {
_min_version => '5.1.0',
currencyField => {
_type => 'ARMultiSchemaFuncCurrencyPartStruct*',
_data => 'p->u.currencyField',
},
},
AR_VALUE_SET_QUERY => {
queryValue => {
_type => 'ARMultiSchemaValueSetFuncQueryStruct*',
_data => 'p->u.valueSetQuery',
},
},
},
},
ARMultiSchemaFuncArithOpStruct => {
_min_version => '7.6.3',
operation => {
_type => 'unsigned int',
_data => 'p->operation',
},
operandLeft => {
_type => 'ARMultiSchemaFieldFuncValueOrArithStruct',
_data => 'p->operandLeft',
},
operandRight => {
_type => 'ARMultiSchemaFieldFuncValueOrArithStruct',
_data => 'p->operandRight',
},
},
#ARMultiSchemaFieldIdStruct => {
# _min_version => '7.5.0',
# queryFromAlias => {
# _type => 'ARNameType',
# _data => 'p->queryFromAlias',
# },
# fieldId => {
# _type => 'ARInternalId',
# _data => 'p->fieldId',
# },
#},
#ARArchiveInfoStruct => {
# _min_version => '6.0.0',
# _switch => 'p->archiveType',
## _default => 'AR_FIELD_REGULAR',
# _map => [ 'archiveType', {
StructDef.pl view on Meta::CPAN
# AR_ARCHIVE_FILE_XML => 4,
# AR_ARCHIVE_FILE_ARX => 8,
# } ],
# _case => {
# AR_ARCHIVE_NONE => {
# _default => 1,
# },
# AR_ARCHIVE_FORM => {
# formName => {
# _type => 'ARNameType',
# _data => 'p->u.formName',
# },
# },
# AR_ARCHIVE_DELETE => {
# formName => {
# _type => 'ARNameType',
# _data => 'p->u.formName',
# },
# },
# 'AR_ARCHIVE_FORM | AR_ARCHIVE_DELETE' => {
# formName => {
# _type => 'ARNameType',
# _data => 'p->u.formName',
# },
# },
# AR_ARCHIVE_FILE_XML => {
# dirPath => {
# _type => 'char*',
# _data => 'p->u.dirPath',
# },
# },
# AR_ARCHIVE_FILE_ARX => {
# dirPath => {
# _type => 'char*',
# _data => 'p->u.dirPath',
# },
# },
# },
# archiveType => {
# _type => 'unsigned int',
# _data => 'p->archiveType',
# },
# enable => {
# _type => 'unsigned int',
# _data => 'p->enable',
# _map => {
# FALSE => 'false',
# TRUE => 'true',
# },
# },
## archiveTime => {
## _type => 'ARDayStruct',
## _data => 'p->archiveTime',
## },
#
# TmMonthDayMask => {
# _type => 'long',
# _data => 'p->archiveTime.monthday',
# },
# TmWeekDayMask => {
# _type => 'long',
# _data => 'p->archiveTime.weekday',
# },
# TmHourMask => {
# _type => 'long',
# _data => 'p->archiveTime.hourmask',
# },
# TmMinute => {
# _type => 'unsigned int',
# _data => 'p->archiveTime.minute',
# },
#
# query => {
# _type => 'ARQualifierStruct',
# _data => 'p->query',
# },
# archiveFrom => {
# _type => 'ARNameType',
# _data => 'p->archiveFrom',
# },
#},
#ARCharMenuItemStruct => {
# menuLabel => {
# _type => 'ARNameType',
# _data => 'p->menuLabel',
# },
# _switch => 'p->menuType',
# _map => {
# AR_MENU_TYPE_VALUE => 'menuValue',
# AR_MENU_TYPE_MENU => 'childMenu',
# },
# _case => {
# AR_MENU_TYPE_VALUE => {
# menuValue => {
# _type => 'char *',
# _data => 'p->u.menuValue',
# },
# },
# AR_MENU_TYPE_MENU => {
# childMenu => {
## _type => 'ARCharMenuStruct*',
## _data => 'p->u.childMenu',
# _type => 'ARCharMenuList',
# _data => 'p->u.childMenu->u.menuList',
# },
# },
# },
#},
#ARCharMenuStruct => {
# _switch => 'p->menuType',
# _map => 'CharMenuTypeMap',
# _case => {
# AR_CHAR_MENU_LIST => {
# _type => 'ARCharMenuList',
# _data => 'p->u.menuList',
# },
# AR_CHAR_MENU_QUERY => {
# _type => 'ARCharMenuQueryStruct',
# _data => 'p->u.menuQuery',
# },
# AR_CHAR_MENU_FILE => {
# _type => 'ARCharMenuFileStruct',
# _data => 'p->u.menuFile',
# },
# AR_CHAR_MENU_SQL => {
# _type => 'ARCharMenuSQLStruct',
# _data => 'p->u.menuSQL',
# },
# AR_CHAR_MENU_SS => {
# _type => 'ARCharMenuSSStruct',
# _data => 'p->u.menuSS',
# },
# AR_CHAR_MENU_DATA_DICTIONARY => {
# _type => 'ARCharMenuDDStruct',
# _data => 'p->u.menuDD',
# },
# },
#},
#ARInternalIdList => {
# _num => 'p->numItems',
# _list => 'p->internalIdList',
# _type => 'ARInternalId',
#},
StructDef.pl view on Meta::CPAN
#},
#ARWorkflowConnectStruct => {
# _switch => 'p->type',
# _case => {
# AR_WORKFLOW_CONN_NONE => {
# _default => 1,
# },
# AR_WORKFLOW_CONN_SCHEMA_LIST => {
# schemaList => {
# _type => 'ARNameList',
# _data => 'p->u.schemaList',
# },
# },
# },
#},
#ARReferenceStruct => {
# label => {
# _type => 'char *',
# _data => 'p->label',
# },
# description => {
# _type => 'char *',
# _data => 'p->description',
# },
# type => {
# _type => 'unsigned int',
# _data => 'p->type',
# },
#
# _switch => 'p->reference.dataType',
# _map => 'dataType',
# _case => {
# ARREF_DATA_ARSREF => {
# 'name' => {
# _type => 'ARNameType',
# _data => 'p->reference.u.name',
# },
# },
# ARREF_DATA_EXTREF => {
# 'extRef' => {
# _type => 'ARExtReferenceStruct',
# _data => 'p->reference.u.extRef',
# },
# },
# },
#},
#ARExtReferenceStruct => {
# permittedGroups => {
# _type => 'ARInternalIdList',
# _data => 'p->permittedGroups',
# },
# value => {
# _type => 'ARValueStruct',
# _data => 'p->value',
# },
#},
# Structures from "ardbc.h":
#ARVendorFieldList => {
# _num => 'p->numItems',
# _list => 'p->fieldList',
# _type => 'ARVendorFieldStruct',
#},
#ARVendorFieldStruct => {
# fieldName => {
# _type => 'ARNameType',
# _data => 'p->fieldName',
# },
# fieldId => {
# _type => 'ARInternalId',
# _data => 'p->fieldId',
# },
# dataType => {
# _type => 'int',
# _data => 'p->dataType',
# },
#},
);
# perl C:\usr\perl_install\5.8.8\ARSperl\TS\printStructTemplate.pl AR...
#
# x => {
# _type => '',
# _data => '',
# },
# s/.*/$& => {\n\t_type => '',\n\t_data => 'p->u.',\n},/
%TEMPLATES = (
_copy => [
'ARValueStruct' => 'rev_%T( ctrl, h, k, "dataType", &(%L) )',
'ARValueStruct\*' => '%L = MALLOCNN(sizeof(%B)); rev_%B( ctrl, h, k, "dataType", %L )',
'AR\w+' => 'rev_%T( ctrl, h, k, &(%L) )',
'AR\w+\*' => '%L = MALLOCNN(sizeof(%B)); rev_%B( ctrl, h, k, %L )',
'(int|long|unsigned\s+int|unsigned\s+long)' => '%L = SvIV(%R)',
'(float|double)' => '%L = SvNV(%R)',
'unsigned\s+char' => '%L = (char) SvIV(%R)',
'char\s*\*' => '%L = strdup( SvPV_nolen(%R) )',
'char\[.+]' => 'strncpy( %L, SvPV_nolen(%R), sizeof(%L) )',
'ARInternalId\[(\w+)\]' => 'copyUIntArray( %1, %L, %R )',
'int\[(\w+)\]' => 'copyIntArray( %1, %L, %R )',
],
changes.dat view on Meta::CPAN
TS added ars_SetSessionConfiguration
TS completed sv_to_ARCurrencyStruct (support.c)
TS ARS.pm: set $ARS::logging_file_ptr = 0 to avoid "uninitialized" warning
TS changed t/01import.t to import form "ARSperl Test3"
TS added ars_CreateContainer, ars_SetContainer
TS added ars_CreateFilter, ars_SetFilter, ars_CreateEscalation, ars_SetEscalation,
ars_SetActiveLink
TS added declaration of boolcpyHVal(...) to supportrev.h
TS added declaration of revTypeName(...) to supportrev.h
TS added "rev_ARReferenceStruct" to supportrev.c
TS changed perl_ARReferenceStruct (added "value_dataType" key, necessary for
ars_CreateContainer)
TS changed ars_CreateActiveLink to read "schemaList" from alDef struct
TS bugfix in rev_ARMessageStruct
( hv_exists(h,"messageType"... -> hv_exists(a,"messageType"... )
TS moved declaration of rev_ARMessageStruct from supportrev.c to supportrev.h
TS bugfix in rev_ARAssignFieldStruct_helper: hv_exists needs key length
TS bugfix in rev_ARAssignFieldStruct_helper: hv_exists needs key length
(dup_qualifier2(...) != NULL ... return ...)
TS added case: AR_COND_OP_FROM_FIELD to dup_qualifier2
TS added functions perl_ARSetFieldsActionStruct, perl_ARPushFieldsActionStruct;
changes.dat view on Meta::CPAN
not operandLeft), fixed condition for AR_ARITH_OP_NEGATE.
TS bugfix in rev_ARAssignSQLStruct
(strcpyHVal(hr,"sqlCommand"...) -> strmakHVal(hr, "sqlCommand"...))
TS bugfix in rev_ARActiveLinkMacroParmList (... == SVt_PVAV -> ... == SVt_PVHV)
TS bugfix in rev_ARActiveLinkMacroParmList (copymem -> strdup)
TS changed rev_ARValueStructDiary to support non-hashref diary values
(necessary in ARAssignStruct context)
TS added ars_CreateSchema, ars_SetSchema, ars_CreateField, ars_SetField,
ars_CreateVUI, ars_SetVUI
TS added scripts (StructDef.pl, rev_AR_template.pl) for automatic generation of
conversion code (perl data structures -> AR API structs)
TS added module (ARS/CodeTemplate.pm) for code generation
TS change in perl_ARFieldValueOrArithStruct; if tag == AR_VALUE, put dataType into hash
TS added check for h != NULL to strcpyHVal
TS added "case AR_COND_OP_FROM_FIELD" to perl_qualifier()
TS changed handling of qualifier structs in perl_ARFieldLimitStruct, perl_ARJoinSchema,
perl_ARArchiveInfoStruct; those functions now return the converted perl structure
instead of the pointer to a C structure.
TS fixed Makefile.PL to work with $ARSAPI containing spaces on Windows
TS added ars_DeleteContainer (changes to ARS.xs, ARS.pm)
TS fixed Makefile.PL to use $ra_arlibs for Version <= 5.0 on Windows
TS fixed rev_ARValueStructStr2Type: use strcasecmp instead of strncasecmp
(failure to differentiate between string and substring)
changes.dat view on Meta::CPAN
released=2/17/00 version=1.67
JCM ars_SetServerPort() added
JCM fixed bug in ars_GetListSQL()
released=12/3/99 version=1.66
JCM fixed a typo in support.c
released=11/23/99 version=1.65
JCM added better support for decoding filters/activelinks
for arsystem 4.0 (not finished yet)
JCM added support for data type "decimal" when performing
(Set|Create)Entry
released=04/7/99 version=1.6403 BETA
JCM tested/fixed compiling against pre-4.0 apis.
JCM OO: now checks named params to ensure you don't
mis-spell them.
JCM attachment allows specify a 'name' hash key so you can
customize the name that appears in the attachment field
in the usertool. (Nick Stoughton {NickS at ISRWORLD.com})
JCM OO: form->setSort method added
example/GetField.pl view on Meta::CPAN
print "Fetching field information ..\n";
( my $fieldInfo = ars_GetField( $ctrl, $schema, $fids{$fieldname} ) )
|| die "GetField: $ars_errstr";
print "Here are some of the field attributes. More are available.
fieldId: $fieldInfo->{fieldId}
createMode: $fieldInfo->{createMode}
dataType: $fieldInfo->{dataType}
defaultVal: $fieldInfo->{defaultVal}
owner: $fieldInfo->{owner}
";
dumpKV( $fieldInfo, 0 );
ars_Logoff($ctrl);
exit 0;
example/WhoUsesIt.pl view on Meta::CPAN
print "Searching for Menu \"$opt_m\" in schema \"$opt_s\"...\n";
print "(this may take some time)\n";
foreach $schema (@schemas) {
if($schema =~ /$SCHEMA/) {
print "Searching schema: $opt_s\n" if $debug;
@fields = ars_GetListField($ctrl, $schema);
foreach $field (@fields) {
$finfo = ars_GetField($ctrl, $schema, $field);
if(($finfo->{dataType} eq "char") &&
defined($finfo->{limit})) {
if(($finfo->{limit}{charMenu} ne "") &&
($finfo->{limit}{charMenu} =~ /$opt_m/)) {
$users{$schema} .= "$finfo->{limit}{charMenu},";
}
}
}
}
}
example/ars_GetListEntryWithMultiSchemaFields.pl view on Meta::CPAN
schemaName => 'Group',
joinType => 0,
joinQual => {
oper => 'rel_op',
rel_op => {
oper => 'like',
left => {
fieldId => 'U.104',
},
right => {
dataType => 'char',
value => '%',
},
# right => {
# arith => {
# oper => '+',
# left => {
# dataType => 'char',
# value => '%',
# },
# right => {
# arith => {
# oper => '+',
# left => {
# fieldId => 'G.106',
# },
# right => {
# dataType => 'char',
# value => ';%',
# },
# },
# },
# },
# },
},
},
}];
my $hQualifier = undef;
my $hQualifier2 = {
oper => 'rel_op',
rel_op => {
oper => '==',
left => {
fieldId => 'G.106',
},
right => {
dataType => 'integer',
value => 3,
},
},
};
my $aFields = [ 'U.101', 'U.104', 'G.105', 'G.106' ];
my $aSortList = [ 'G.106' => 1 ];
example/ars_MergeEntry.pl view on Meta::CPAN
print "\nAppending \"Foobar!\" to first entry.\n";
${$val{$fid}}[0]->{value} .= " Foobar!";
print "Constructing encoded diary.\n";
($encodedDiary = ars_EncodeDiary(@{$val{$fid}})) ||
die "ars_EncodeDiary failed";
print "Merging entry back into database.\n";
# see html doc page for explanation of numeric flags.
# http://www.arsperl.org/manual/ars_MergeEntry.html
# ... mergeType=4, eid-fid, entryid, diary-fid, encoded-diary
($eid = ars_MergeEntry($c, $SC, 4, 1, $EID, $fid, $encodedDiary)) ||
die "ars_MergeEntry: $ars_errstr";
ars_Logoff($c);
exit(0);
example/ars_QualDecode.pl view on Meta::CPAN
}
}
# a transaction field reference
elsif(defined($h->{TR_fieldId})) {
print "\tTR_fieldId: $h->{TR_fieldId}\n" if $debug;
$e = "'TR.".$fids{$h->{TR_fieldId}}."'";
}
# a database value field reference
elsif(defined($h->{DB_fieldId})) {
print "\tDB_fieldId: $h->{DB_fieldId}\n" if $debug;
$e = "'DB.".$fids{$h->{DB_fieldId}}."'";
}
# a value
elsif(exists($h->{value})) {
if(! defined($h->{value})) {
html/DumpSetup.html view on Meta::CPAN
<HTML>
<HEAD>
<TITLE>ARSperl Utilities: DumpSetup.pl</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2>DumpSetup.pl</H2>
<H3> Purpose </H3>
This utility helps you maintain backup copies of your ARS definitions
(but not table data). It accomplishes this by exporting all of the
definitions to text files and then "checking them in" to an RCS system.
In this fashion, no additional diskspace is used for maintaining backup
copies unless there is a change to the definition file.
<H3> Ancillary Utilities </H3>
RCS. See GNU FTP Site <A HREF="ftp://prep.ai.mit.edu/pub/gnu/">prep.ai.mit.edu</A>
<H3> Author </H3>
Joel Murphy<BR>
html/changes.html view on Meta::CPAN
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added ars_CreateContainer, ars_SetContainer
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added ars_CreateFilter, ars_SetFilter, ars_CreateEscalation, ars_SetEscalation,
ars_SetActiveLink </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added declaration of boolcpyHVal(...) to supportrev.h
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added declaration of revTypeName(...) to supportrev.h
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added "rev_ARReferenceStruct" to supportrev.c
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>changed perl_ARReferenceStruct (added "value_dataType" key, necessary for
ars_CreateContainer) </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>changed ars_CreateActiveLink to read "schemaList" from alDef struct
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>bugfix in rev_ARMessageStruct
( hv_exists(h,"messageType"... -> hv_exists(a,"messageType"... ) </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>moved declaration of rev_ARMessageStruct from supportrev.c to supportrev.h
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>bugfix in rev_ARAssignFieldStruct_helper: hv_exists needs key length
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>bugfix in rev_ARAssignFieldStruct_helper: hv_exists needs key length
html/changes.html view on Meta::CPAN
(strcpyHVal(hr,"sqlCommand"...) -> strmakHVal(hr, "sqlCommand"...)) </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>bugfix in rev_ARActiveLinkMacroParmList (... == SVt_PVAV -> ... == SVt_PVHV)
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>bugfix in rev_ARActiveLinkMacroParmList (copymem -> strdup)
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>changed rev_ARValueStructDiary to support non-hashref diary values
(necessary in ARAssignStruct context) </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added ars_CreateSchema, ars_SetSchema, ars_CreateField, ars_SetField,
ars_CreateVUI, ars_SetVUI </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added scripts (StructDef.pl, rev_AR_template.pl) for automatic generation of
conversion code (perl data structures -> AR API structs) </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added module (ARS/CodeTemplate.pm) for code generation
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>change in perl_ARFieldValueOrArithStruct; if tag == AR_VALUE, put dataType into hash
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added check for h != NULL to strcpyHVal
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added "case AR_COND_OP_FROM_FIELD" to perl_qualifier()
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>changed handling of qualifier structs in perl_ARFieldLimitStruct, perl_ARJoinSchema,
perl_ARArchiveInfoStruct; those functions now return the converted perl structure instead of the pointer to a C structure. </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed Makefile.PL to work with $ARSAPI containing spaces on Windows
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added ars_DeleteContainer (changes to ARS.xs, ARS.pm)
html/changes.html view on Meta::CPAN
<TD width='100%'>
<TABLE CELLSPACING='0' CELLPADDING='3' WIDTH='100%' BORDER='0'
BGCOLOR='lightblue'>
<tr><td colspan='2'>
<table width='100%' border='0'><tr>
<td width='50%'>Released: <B>11/23/99</B></td>
<td width='50%'>Version: <B>1.65
</B></td>
</tr></table></td>
</tr><tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added better support for decoding filters/activelinks
for arsystem 4.0 (not finished yet) </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added support for data type "decimal" when performing
(Set|Create)Entry </table></td></tr></table>
<P>
<TABLE CELLSPACING='0'
CELLPADDING='2'
WIDTH='100%'
BORDER='0'
BGCOLOR='black'>
html/manual/OO/connection.html view on Meta::CPAN
<tr><td>ARS::AR_LIST_SCHEMA_REGULAR</td><td> get list of all regular
schemas</td></tr>
<tr><td>ARS::AR_LIST_SCHEMA_JOIN </td><td> get list of all join schemas </td></tr>
<tr><td>ARS::AR_LIST_SCHEMA_VIEW </td><td> get list of all view schemas </td></tr>
<tr><td>ARS::AR_LIST_SCHEMA_UPLINK </td><td> get list of all schemas
depending </td></tr>
<tr><td>ARS::AR_LIST_SCHEMA_DOWNLINK </td><td> get list of all schemas the
given </td></tr>A
<tr><td>ARS::AR_LIST_SCHEMA_DIALOG </td><td> get list of all dialog schemas</td></tr>
<tr><td>ARS::AR_LIST_SCHEMA_ALL_WITH_DATA </td><td> get list of all schemas
with data</td></tr>
</table>
In addition, you may optionally OR (logical OR) the value
<code>ARS::AR_HIDDEN_INCREMENT</code> with the above to include
hidden schemas in the final list of available schemas.
<DT><A NAME="openForm"><B>openForm()</B></A><DD>
<PRE>
$f = $c->openForm(-form => scalar string,
html/manual/OO/form.html view on Meta::CPAN
for a given field. If the field is not an enumeration field,
an exception is thrown (type=ERROR, num=81006).
<P>
<DT><A NAME="getFieldType"><B>getFieldType()</B></A>
<PRE>
$type = $f->getFieldType(-name => scalar string,
-id => scalar string);
</PRE>
This an "internal" function that is used to retrieve the datatype of a
particular field. You must specify one of the parameters. If you
specify both, the -id parameter is ignore in favor of the -name
parameer. Eventually, it will obey the VUI you specified.
<P>
<DT><A NAME="create"><B>create()</B></A>
<PRE>
$id = $f->create(-values => { field1 => value1, ... });
</PRE>
This function allows you to create a new entry in this form. You can
specify field name to field value mappings with out regard for the
html/manual/ars_GetClientCharSet.html view on Meta::CPAN
/*]]>*/
/*<![CDATA[*/
p.c1 {font-style: italic}
/*]]>*/
</style>
</head>
<body>
<h2>
<code>ars_GetClientCharSet(control)</code>
</h2>Retrieves a string that represents the name of the character set the client is using. The
API assumes that all character data the client passes it is encoded in this character set, and
returns all character data encoded in this character set. If this differs from the server
charset (see <a href="ars_GetServerCharSet.html">ars_GetServerCharSet</a>), the API converts
the data to the right character set.<br />
<dl>
<dt class="c1">
On success
</dt>
<dd>
Returns a string.
</dd>
<dt class="c1">
On failure
</dt>
html/manual/ars_GetListEntryWithFields.html view on Meta::CPAN
[ $class_title, $class_location, $enrollee_login ],
)
) || die("GLEWF Failed: $ars_errstr");
foreach my $entry_id (keys %entries) {
print
"$entry_id\t $entries{$entry_id}{$class_title}\t $entries{$entry_id}{$class_location}\t $entries{$entry_id}{$enrollee_login}\n";
}
</pre>
<p>
<b>Notes:</b> This is a high-performance command that returns a lot of data with one API
call. Care should be taken to delete the returned data structure (e.g., with "<code>undef
%entries</code>") when it is no longer needed, to avoid memory problems.
</p>
<p>
See Also: <a href="ars_GetListEntry.html">ars_GetListEntry</a>, <a href=
"ars_GetMultipleEntries.html">ars_GetMultipleEntries</a>
</p>
<p>
<a href="toc.html">Back to Table of Contents</a>
</p>
<p></p>
html/manual/ars_GetListField.html view on Meta::CPAN
<h2><code>ars_GetListField(control,schema,changedsince=0,fieldType)</code></h2>
Fetches the Field ID's for all fields in the schema specified. <code>changedsince</code>
is an optional unix timestamp and defaults to 0.
<ul>
The <code>fieldType</code> parameter allows you to specify
what field type(s) to retrieve. This is a bitmask.
<ul>
<li>Bit 0: Retrieve data fields (AR_FIELD_TYPE_DATA).
</li>
<li>Bit 1: Retrieve trim fields (AR_FIELD_TYPE_TRIM).
</li>
<li>Bit 2: Retrieve control fields (AR_FIELD_TYPE_CONTROL).
</li>
<li>Bit 3: Retrieve page fields (AR_FIELD_TYPE_PAGE).
</li>
html/manual/ars_GetListSQL.html view on Meta::CPAN
<HTML>
<HEAD>
<TITLE>ARSperl Manual - ars_GetListSQL</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2><CODE>ars_GetListSQL(ctrl, sqlCommand, maxRetriev=AR_NO_MAX_LIST_RETRIEVE)</CODE></H2>
Execute the given sqlCommand on the database that the server is attached to.
sqlCommand executes with privs associated with the ARAdmin database user.
<P> See also:
<A HREF="ds_getlistsql_hash.html">GetListSQL Hash Values</A>.
<P>
<DL>
<DT><B>On success</B><DD>
Returns a HASH.
<DT><B>On failure</B><DD>
Returns undef.
</DL>
html/manual/ars_GetMultipleEntries.html view on Meta::CPAN
<PRE>
%Entries = ( "0000000001" => { 7 => 1,
10 => { decoded_history_hash } },
"0000000046" => undef, # entry does not exist
"0000000138" => { 7 => 3,
10 => { another_diary } }
)
</PRE>
<p>
<b>Notes:</b> <CODE>ars_GetMultipleEntries</CODE> can download a lot
of data with one API call. It is advisable to use
the fieldID list to specify only the fields you need. Care should
be taken to delete the returned data structure (e.g., with "<CODE>undef
%Entries</CODE>") when it is no longer needed.<p>
The underlying <CODE>ARGetMultipleEntries</CODE> API call has an inherent limit
to the number of entries that can be returned in a single call.
The ARS 4.5 Programmer's Guide recommends using lists of 100 or fewer
entries for each request.<p>
<CODE>ars_GetMultipleEntries</CODE> can only be used with API
version 4.0 or later.<p>
html/manual/ars_GetServerCharSet.html view on Meta::CPAN
/*<![CDATA[*/
dt.c1 {font-weight: bold}
p.c1 {font-style: italic}
/*]]>*/
</style>
</head>
<body>
<h2>
<code>ars_GetServerCharSet(control)</code>
</h2>Retrieves a string that represents the name of the character set the API library uses to
communicate with the server. If this differs from the client charset, the API converts the data
to the right character set.<br />
<dl>
<dt class="c1">
On success
</dt>
<dd>
Returns a string.
</dd>
<dt class="c1">
On failure
html/manual/ars_LoadQualifier.html view on Meta::CPAN
<BODY BGCOLOR="#FFFFFF">
<H2><CODE>ars_LoadQualifier(ctrl, schema, qualstring, displayTag)</CODE></H2>
Converts a qualifier string into a scalar qualifier record.<P>
The qualifier string may contain field IDs or field labels. Using field labels,
however, does reportedly not always work reliable, so it is strongly recommended
to use field IDs.<P>
When mapping field labels, the server will refer to the view specified
in <code>displayTag</code>. If no view is specified, the server will use the
default admin view. It is NOT possible to use database names (returned as "fieldName"
by <a href="ars_GetField.html"><code>ars_GetField</code></a>) in a qualifier string.
<DL>
<DT><B>On success</B><DD>
Returns the qualifier record.
<DT><B>On failure</B><DD>
Returns <CODE>undef</CODE>.
</DL>
<P>Example:
html/manual/ars_SetContainer.html view on Meta::CPAN
<I> This example changes the name of the container "TEST:FilterGuide".
It also adds a filter to the end of the list.</I></BLOCKQUOTE>
<PRE>
($ct = ars_GetContainer($c, "TEST:FilterGuide")) ||
die $ars_errstr;
push @{$ct->{referenceList}}, {
type => 3,
name => "TEST:Filter",
dataType => 0,
description => "",
label => "",
};
ars_SetContainer( $c, "TEST:FilterGuide", {
name => "TEST:FilterGuide 2",
referenceList => $ct->{referenceList},
} ) || die $ars_errstr;
</PRE>
html/manual/ds_field_hash.html view on Meta::CPAN
<body bgcolor="#ffffff">
<h2>Field Properties Structure</h2>
The routine
<a href="ars_GetField.html"><code>ars_GetField</code></a>
returns a reference to the field properties structure.
<pre>{<br> "changeDiary" => <i>list</i> of references to <a href="ds_diaryentry_hash.html">Diary Entry Structures</a>,<br> "createMode" => open <i>or</i> protected,<br> "dataType" => string,<br> "defaultVal" => string,<br> "d...
<hr width="30%">
<p>
<a href="toc.html"><img alt="<--" src="arrow.gif" align="middle"> Table of Contents </a>
</p>
<p>
</p>
<address>
Last changes to this page 2 Aug 2007 by Michiel Beijen
</address>
html/manual/ds_reference.html view on Meta::CPAN
<BODY BGCOLOR="#FFFFFF">
<H2>References Structure</H2>
<PRE>
{
"label" => value of Label, if applicable (string),
"description" => description of reference, if applicable (string),
"type" => type of reference (integer)
"dataType" => either 0 (AR System reference) or 1 (external refrence)
}
</PRE>
<P>If <EM>dataType</EM> is 0 then hash will also contain:</P>
<PRE>
{
"name" => name of this reference (string)
}
</PRE>
<P>If <EM>dataType</EM> is 1 then hash will also contain:</P>
<PRE>
{
"permittedGroups" => <EM>list</EM> of groups (ids) who can access this item
"value" => value of this reference (string)
}
</PRE>
<P>
<HR WIDTH="30%">
<P>
rev_AR_template.pl view on Meta::CPAN
return 0;
}
<@ versionEndif($obj) @>
@> }
@> sub perlToStruct {
@> my( $obj, $class, $LINE_INDENT ) = @_;
{
@> if( $obj->{_data} ){
@> my( $type, $data ) = ( $obj->{_type}, $obj->{_data} );
@> if( $obj->{_map} ){
int flag = 0;
@> foreach my $key ( keys %{$obj->{_map}} ){
if( !strcmp(SvPV_nolen(*val),"<@ $obj->{_map}{$key} @>") ){
<@ $obj->{_data} @> = <@ $key @>;
flag = 1;
}
@> }
if( flag == 0 ){
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_<@ $class @>: invalid key value" );
ARError_add( AR_RETURN_ERROR, AP_ERR_CONTINUE, SvPV_nolen(*val) );
}
@> }else{
<@ typeCopy($type,$data,'*val') @>;
@> }
@> }
@> if( $obj->{_switch} ){
{
char *pcase = NULL;
char errText[512];
@> if( $obj->{_map} && !ref($obj->{_map}) ){
// pcase = SvPV_nolen(*val);
rev_AR_template.pl view on Meta::CPAN
ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, "rev_<@ $class @>: key doesn't exist");
ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, pcase );
return -2;
}
}else{
ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, "rev_<@ $class @>: hv_fetch (hval) returned null");
return -2;
}
@> }else{
if( 0 ){
@> foreach my $key ( keyFilter($obj->{_case},'_data') ){
@> # my( $pcase, $dummy ) = each %{$obj->{_case}{$key}};
@> my( $pcase ) = grep {!/^_/} keys %{$obj->{_case}{$key}};
@> my $key2 = $key;
@> $key2 =~ s/\W+$//;
<@ versionIf($obj->{_case}{$key}) @>
}else if( hv_exists(h,"<@ $pcase @>",<@ length($pcase) @>) ){
<@ $obj->{_switch} @> = <@ $key2 @>;
k = "<@ $pcase @>";
<@ versionEndif($obj->{_case}{$key}) @>
@> }
rev_AR_template.pl view on Meta::CPAN
<@ $obj->{_switch} @> = <@ $key @>;
@> }
}else{
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_<@ $class @>: map error" );
}
@> }
@> }
switch( <@ $obj->{_switch} @> ){
@> foreach my $key ( keyFilter($obj->{_case},'_data') ){
@> my $key2 = $key;
@> $key2 =~ s/\W+$//;
@> my $type = $obj->{_case}{$key}{_type};
@> my $data = $obj->{_case}{$key}{_data};
<@ versionIf($obj->{_case}{$key}) @>
case <@ $key2 @>:
@> perlToStruct( $obj->{_case}{$key}, $class, "$LINE_INDENT\t\t\t\t" );
break;
<@ versionEndif($obj->{_case}{$key}) @>
@> }
@> foreach my $key ( keyFilter($obj->{_case},'_default','_nodata') ){
case <@ $key @>:
break;
@> }
default:
sprintf( errText, "rev_<@ $class @>: invalid switch value %d", <@ $obj->{_switch} @> );
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
}
}
@> }
@> if( $obj->{_list} ){
@> my( $type, $data ) = ( $obj->{_type}, $obj->{_list}.'[i]' );
{
if( SvTYPE(SvRV(*val)) == SVt_PVAV ){
int i = 0, num = 0;
AV *ar = (AV*) SvRV((SV*) *val);
num = av_len(ar) + 1;
<@ $obj->{_num} @> = num;
if( num == 0 ) return 0;
@> unless( $type =~ s/\[\]// ){
rev_AR_template.pl view on Meta::CPAN
for( i = 0; i < num; ++i ){
SV **item = av_fetch( ar, i, 0 );
if( item && *item ){
char *k = "_";
HV *h = newHV();
SvREFCNT_inc( *item );
hv_store( h, k, strlen(k), *item, 0 );
<@ typeCopy($type,$data,'*item') @>;
hv_undef( h );
}else{
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_<@ $class @>: invalid inner array value" );
}
}
}else{
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_<@ $class @>: hash value is not an array reference" );
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, k );
return -1;
}
rev_AR_template.pl view on Meta::CPAN
@> $key2 =~ s/\W+$//;
<@ versionIf($obj->{$key}) @>
{
SV **val;
strncpy( k, "<@ $key2 @>", 255 );
val = hv_fetch( h, "<@ $key2 @>", <@ length($key2) @>, 0 );
if( val && *val && <@ ($obj->{$key}{_type} eq 'ARValueStruct')? '(SvOK(*val) || SvTYPE(*val) == SVt_NULL)' : 'SvOK(*val)' @> ){
@> perlToStruct( $obj->{$key}, $class, "$LINE_INDENT\t\t\t" );
}else{
@> if( $obj->{$key}{_default} ){
<@ $obj->{$key}{_data} @> = <@ $obj->{$key}{_default} @>;
@> }else{
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "hv_fetch error: key \"<@ $key2 @>\"" );
return -1;
@> }
}
}
<@ versionEndif($obj->{$key}) @>
@> }
}else{
rev_AR_template.pl view on Meta::CPAN
@> structToPerl( $obj, "\t" );
return ret;
}
@> }
@> sub structToPerl {
@> my( $obj, $LINE_INDENT ) = @_;
{
@> if( $obj->{_data} ){
@> my( $type, $data ) = ( $obj->{_type}, $obj->{_data} );
SV *val;
<@ perlCopy($type,'val',$data) @>;
ret = val;
@> }elsif( $obj->{_switch} ){
SV *val;
switch( <@ $obj->{_switch} @> ){
@> foreach my $key ( keys %{$obj->{_case}} ){
case <@ $key @>:
@> structToPerl( $obj->{_case}{$key}, "$LINE_INDENT\t" );
break;
@> }
default:
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "<@ $class @>: Invalid case" );
break;
}
ret = val;
@> }elsif( $obj->{_list} ){
@> my( $type, $data ) = ( $obj->{_type}, $obj->{_list}.'[i]' );
AV *array;
SV *val;
I32 i;
array = newAV();
av_extend( array, <@ $obj->{_num} @>-1 );
for( i = 0; i < <@ $obj->{_num} @>; ++i ){
<@ perlCopy($type,'val',$data) @>;
av_store( array, i, val );
}
ret = newRV_noinc((SV *) array);
@> }else{
HV *hash;
SV *val;
hash = newHV();