ARSperl

 view release on metacpan or  search on metacpan

ARS.pm  view on Meta::CPAN


sub ars_padEntryid {
	my($c) = shift;
	my($schema) = shift;
	my($entry_id) = shift;
	my($field);

	# entry id field is field id #1
	($field = ars_GetField($c, $schema, 1)) ||
	return undef;
	if( $field->{defaultVal} ){
		return $field->{defaultVal}.("0"x($field->{limit}{maxLength}-length($field->{defaultVal})-length($entry_id))).$entry_id;
	}else{
		return ("0"x($field->{limit}{maxLength}-length($entry_id))).$entry_id;
	}	
}

# ROUTINE
#   ars_decodeStatusHistory(field-value)
#
# DESCRIPTION
#   this routine, when given an encoded status history field

ARS.xs  view on Meta::CPAN

			loc.u.filename = strdup(locFile); /* strdup(locFile) ? i'm not completely sure
							which to use. will FreeARLocStruct call
							free(loc.locType)? i'm assuming it will.
							Purify doesnt complain, so i'm going 
							to leave this alone. */
			break;
		case AR_LOC_BUFFER:
			loc.locType       = AR_LOC_BUFFER;
			loc.u.buf.bufSize = 0;
			break;
		default:
			ARError_add(AR_RETURN_ERROR,
				AP_ERR_USAGE,
				"locType parameter is required.");
			goto get_entryblob_end;
			break;
		}
		ret = ARGetEntryBLOB(ctrl, schema, &entryList, field_id, 
				     &loc, &status);
		if(!ARError(ret, status)) {
			if(locType == AR_LOC_BUFFER)

ARS.xs  view on Meta::CPAN

	  ARIndexList          indexList;
	  char                *helpText = CPNULL;
	  ARTimestamp          timestamp;
	  ARAccessNameType           owner;
	  ARAccessNameType           lastChanged;
	  char                *changeDiary = CPNULL;
	  ARDiaryList          diaryList;
	  ARCompoundSchema     schema;
	  ARSortList           sortList;
	  ARPropList           objPropList;
	  ARNameType           defaultVui;

	  (void) ARError_reset();
	  Zero(&status, 1,  ARStatusList);
	  Zero(&assignedGroupList, 1, ARPermissionList);
	  Zero(&groupList, 1, ARPermissionList);
	  Zero(&adminGroupList, 1, ARInternalIdList);
	  Zero(&getListFields, 1, AREntryListFieldList);
	  Zero(&indexList, 1, ARIndexList);
	  Zero(&timestamp, 1, ARTimestamp);
	  Zero(owner, 1, ARAccessNameType);
	  Zero(lastChanged, 1, ARAccessNameType);
	  Zero(&diaryList, 1, ARDiaryList);
	  Zero(&schema, 1, ARCompoundSchema);
	  Zero(&sortList, 1, ARSortList);
	  Zero(&objPropList, 1, ARPropList);
	  Zero(&defaultVui, 1, ARNameType);
#if AR_EXPORT_VERSION >= 8L
	  Zero(&inheritanceList, 1, ARSchemaInheritanceList);
	  Zero(&infoStruct, 1, ARArchiveInfoStruct);
#endif
#if AR_EXPORT_VERSION >= 9L
	  Zero(&auditInfo, 1, ARAuditInfoStruct);
#endif
	  RETVAL = newHV();
	  sv_2mortal( (SV*) RETVAL );

ARS.xs  view on Meta::CPAN

			    &assignedGroupList,
#endif
			    &groupList, &adminGroupList, &getListFields, 
			    &sortList, &indexList, 
#if AR_EXPORT_VERSION >= 8L
                            &infoStruct,
#endif
#if AR_EXPORT_VERSION >= 9L
                            &auditInfo,
#endif
			    defaultVui,
			    &helpText, &timestamp, owner, 
			    lastChanged, &changeDiary, 
			    &objPropList,
			    &status);
#ifdef PROFILE
	  ((ars_ctrl *)ctrl)->queries++;
#endif
	  if (!ARError( ret,status)) {
#if AR_EXPORT_VERSION >= 5
		hv_store(RETVAL,  "objPropList", strlen("objPropList") ,
			 perl_ARPropList(ctrl, &objPropList), 0);
#endif
#if AR_EXPORT_VERSION >= 6
		hv_store(RETVAL, "defaultVui", strlen("defaultVui"),
			newSVpv(defaultVui, 0), 0);			
#endif
#if AR_CURRENT_API_VERSION >= 17
	    hv_store(RETVAL,  "assignedGroupList", strlen("assignedGroupList") ,
		     perl_ARPermissionList(ctrl, &assignedGroupList, PERMTYPE_SCHEMA), 0);
#endif
	    hv_store(RETVAL,  "groupList", strlen("groupList") ,
		     perl_ARPermissionList(ctrl, &groupList, PERMTYPE_SCHEMA), 0);
	    hv_store(RETVAL,  "adminList", strlen("adminList") ,
		     perl_ARList(ctrl, (ARList *)&adminGroupList, 
				 (ARS_fn)perl_ARInternalId,

ARS.xs  view on Meta::CPAN

	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;
	  char                 *helpText = CPNULL;
	  ARTimestamp           timestamp;
	  ARAccessNameType            owner;
	  ARAccessNameType            lastChanged;
	  char                 *changeDiary = CPNULL;
	  ARDiaryList           diaryList;
	  ARPropList            objPropList;

	  (void) ARError_reset();
	  Zero(&Status,      1, ARStatusList);
	  Zero(&defaultVal,  1, ARValueStruct);
	  Zero(&assignedGroupList, 1, ARPermissionList);
	  Zero(&permissions, 1, ARPermissionList);
	  Zero(&limit,       1, ARFieldLimitStruct);

	  Zero(fieldName,    1, ARNameType);
	  Zero(&fieldMap,    1, ARFieldMappingStruct);
	  Zero(&displayList, 1, ARDisplayInstanceList);

	  Zero(&timestamp,   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, &timestamp, 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, &timestamp, owner, lastChanged, &changeDiary, &Status);
#else
	  ret = ARGetFieldCached(ctrl, schema, id, fieldName, &fieldMap, &dataType, &option, &createMode, &defaultVal, &permissions, &limit, &displayList, &helpText, &timestamp, 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") , 
		     perl_ARFieldLimitStruct(ctrl, &limit), 0);
	    hv_store(RETVAL,  "fieldName", strlen("fieldName") , 

ARS.xs  view on Meta::CPAN

		AV *licenseTag         = newAV(),
		   *licenseType        = newAV(),
		   *currentLicenseType = newAV();

	        hv_store(userInfo,  "userName", strlen("userName") , 
			newSVpv(userList.userList[i].userName, 0), 0);
		hv_store(userInfo,  "connectTime", strlen("connectTime") ,
			newSViv(userList.userList[i].connectTime), 0);
		hv_store(userInfo,  "lastAccess", strlen("lastAccess") ,
			newSViv(userList.userList[i].lastAccess), 0);
		hv_store(userInfo,  "defaultNotifyMech", strlen("defaultNotifyMech") ,
			newSViv(userList.userList[i].defaultNotifyMech), 0);
		hv_store(userInfo,  "emailAddr", strlen("emailAddr") ,
			newSVpv(userList.userList[i].emailAddr, 0), 0);

		for(j = 0; j < userList.userList[i].licenseInfo.numItems; j++) {
		   av_push(licenseTag, newSViv(userList.userList[i].licenseInfo.licenseList[j].licenseTag));
		   av_push(licenseType, newSViv(userList.userList[i].licenseInfo.licenseList[j].licenseType));
		   av_push(currentLicenseType, newSViv(userList.userList[i].licenseInfo.licenseList[j].currentLicenseType));
		}
		hv_store(userInfo,  "licenseTag", strlen("licenseTag") , newRV_noinc((SV *)licenseTag), 0);
		hv_store(userInfo,  "licenseType", strlen("licenseType") , newRV_noinc((SV *)licenseType), 0);

ARS.xs  view on Meta::CPAN

				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);

ARS.xs  view on Meta::CPAN

	           case 332:
	           case 331:
	           case 330:
	           case 329:
	           case 328:
	           case 327:
	           case 326:
	           case 325:
#endif
	           break;
	        default:
	           rlist[count++] = i+1;
	        }
         }
	  }else if(items > AR_MAX_SERVER_INFO_USED + 1) {
	    ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS);
	  }else { /* user has asked for specific ones */
	     for(i = 1 ; i < items ; i++) {
	        rlist[count++] = SvIV(ST(i));
	     }
	  }

ARS.xs  view on Meta::CPAN

		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;
		ARAccessNameType owner;
		char *changeDiary = NULL;
		ARPropList *objPropList = NULL;
		ARStatusList status;
		HV *fieldDef = NULL;
		SV **pSvTemp;

ARS.xs  view on Meta::CPAN

			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 ); */

ARS.xs  view on Meta::CPAN

				&fieldId,
				reservedIdOK,
				fieldName,
				&fieldMap,
				dataType,
				option,
				createMode,
#if AR_EXPORT_VERSION >= 9L
				fieldOption,
#endif
				defaultVal,
				&permissions,
				limit,
				&dInstanceList,
				helpText,
				owner,
				changeDiary,
#if AR_CURRENT_API_VERSION >= 17
				objPropList,
#endif
				&status );

ARS.xs  view on Meta::CPAN

			ARError_add( AR_RETURN_ERROR, AP_ERR_PREREVFAIL);
			RETVAL = 0;
		}

	    if( helpText != NULL ){
			AP_FREE( helpText );
		}
	    if( changeDiary != NULL ){
			AP_FREE( changeDiary );
		}
		if( defaultVal != NULL ){
			FreeARValueStruct( defaultVal, TRUE );
		}
		FreeARPermissionList( &permissions, FALSE );
		if( limit != NULL ){
			FreeARFieldLimitStruct( limit, TRUE );
		}
		FreeARDisplayInstanceList( &dInstanceList, FALSE );
		/*
		FreeARStatusList( &status, FALSE );
		printf( "-- FreeARStatusList -- OK\n" );  // _DEBUG_
		*/

ARS.xs  view on Meta::CPAN

#if AR_EXPORT_VERSION >= 6L
		int ret = 0, rv = 0;
		ARNameType fieldName;
		char *fieldNamePtr = NULL;
		ARFieldMappingStruct *fieldMap = NULL;
		unsigned int *option = NULL;
		unsigned int *createMode = NULL;
#if AR_EXPORT_VERSION >= 9L
		unsigned int *fieldOption = NULL;
#endif
		ARValueStruct *defaultVal = NULL;
		ARPermissionList *permissions = NULL;
		ARFieldLimitStruct *limit = NULL;
		ARDisplayInstanceList *dInstanceList = NULL;
		char *helpText = NULL;
		ARAccessNameType owner;
		char *ownerPtr = NULL;
#if AR_EXPORT_VERSION >= 9L
		unsigned int	setFieldOptions = 0;
#endif
		char *changeDiary = NULL;

ARS.xs  view on Meta::CPAN

						 strTemp ? strTemp : "n/a");
			}
		}
#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 ){

ARS.xs  view on Meta::CPAN

			ret = ARSetField( ctrl,
				schema,
				fieldId,
				fieldNamePtr,
				fieldMap,
				option,
				createMode,
#if AR_EXPORT_VERSION >= 9L
				fieldOption,
#endif
				defaultVal,
				permissions,
				limit,
				dInstanceList,
				helpText,
				ownerPtr,
				changeDiary,
#if AR_EXPORT_VERSION >= 9L
				setFieldOptions,
#endif
#if AR_CURRENT_API_VERSION >= 17

ARS.xs  view on Meta::CPAN

		}
	    if( option != NULL ){
			AP_FREE( option );
		}
	    if( helpText != NULL ){
			AP_FREE( helpText );
		}
	    if( changeDiary != NULL ){
			AP_FREE( changeDiary );
		}
		if( defaultVal != NULL ){
			FreeARValueStruct( defaultVal, TRUE );
		}
		if( permissions != NULL ){
			FreeARPermissionList( permissions, TRUE );
		}
		if( limit != NULL ){
			FreeARFieldLimitStruct( limit, TRUE );
		}
		if( dInstanceList != NULL ){
			FreeARDisplayInstanceList( dInstanceList, TRUE );
		}

ARS.xs  view on Meta::CPAN

		ARInternalIdList admingrpList;
		AREntryListFieldList getListFields;
		ARSortList sortList;
		ARIndexList indexList;
#if AR_EXPORT_VERSION >= 8L
		ARArchiveInfoStruct *archiveInfo = NULL;
#endif
#if AR_EXPORT_VERSION >= 9L
		ARAuditInfoStruct *auditInfo = NULL;
#endif
		ARNameType defaultVui;
		char *helpText = NULL;
		ARAccessNameType owner;
		char *changeDiary = NULL;
		ARPropList *objPropList = NULL;
		char *objectModificationLogLabel = NULL;
		ARStatusList status;
		HV *schemaDef = NULL;
		SV **pSvTemp;
		/* char strTemp[STR_TEMP_SIZE+1]; */

		RETVAL = 0; /* assume error */
		(void) ARError_reset();
		Zero(name, 1,ARNameType);
		Zero(&compoundSchema, 1,ARCompoundSchema);
		Zero(&groupList, 1,ARPermissionList);
		Zero(&admingrpList, 1,ARInternalIdList);
		Zero(&getListFields, 1,AREntryListFieldList);
		Zero(&sortList, 1,ARSortList);
		Zero(&indexList, 1,ARIndexList);
		Zero(defaultVui, 1,ARNameType);
		Zero(owner, 1,ARAccessNameType);
		Zero(&status, 1,ARStatusList);

		if( SvROK(schemaDefRef) && SvTYPE(SvRV(schemaDefRef)) == SVt_PVHV ){
			schemaDef = (HV*) SvRV(schemaDefRef);
		}else{
			croak("usage: ars_CreateSchema(...)");
		}

		rv += strcpyHVal( schemaDef, "name", name, AR_MAX_NAME_SIZE );

ARS.xs  view on Meta::CPAN

			rv += rev_ARArchiveInfoStruct( ctrl, schemaDef, "archiveInfo", archiveInfo );
		}
#endif
#if AR_EXPORT_VERSION >= 9L
		pSvTemp = hv_fetch( schemaDef, "auditInfo", strlen("auditInfo") , 0 );
		if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
			auditInfo = (ARAuditInfoStruct*) MALLOCNN( sizeof(ARAuditInfoStruct) );
			rv += rev_ARAuditInfoStruct( ctrl, schemaDef, "auditInfo", auditInfo );
		}
#endif
		rv += strcpyHVal( schemaDef, "defaultVui", defaultVui, AR_MAX_NAME_SIZE ); 

		if( hv_exists(schemaDef,"helpText",8) ){
			rv += strmakHVal( schemaDef, "helpText", &helpText ); 
		}
		if( hv_exists(schemaDef,"owner",5) ){
			rv += strcpyHVal( schemaDef, "owner", owner, AR_MAX_ACCESS_NAME_SIZE ); 
		}
		if( hv_exists(schemaDef,"changeDiary",11) ){
			rv += strmakHVal( schemaDef, "changeDiary", &changeDiary );
		}

ARS.xs  view on Meta::CPAN

				&admingrpList,
				&getListFields,
				&sortList,
				&indexList,
#if AR_EXPORT_VERSION >= 8L
				archiveInfo,
#endif
#if AR_EXPORT_VERSION >= 9L
				auditInfo,
#endif
				defaultVui,
				helpText,
				owner,
				changeDiary,
				objPropList,
#if AR_CURRENT_API_VERSION >= 17
			    objectModificationLogLabel,
#endif
				&status );

			RETVAL = ARError(ret,status) ? 0 : 1;

ARS.xs  view on Meta::CPAN

		ARInternalIdList *admingrpList = NULL;
		AREntryListFieldList *getListFields = NULL;
		ARSortList *sortList = NULL;
		ARIndexList *indexList = NULL;
#if AR_EXPORT_VERSION >= 8L
		ARArchiveInfoStruct *archiveInfo = NULL;
#endif
#if AR_EXPORT_VERSION >= 9L
		ARAuditInfoStruct *auditInfo = NULL;
#endif
		ARNameType defaultVui;
		char *defaultVuiPtr = NULL;
		char *helpText = NULL;
		ARAccessNameType owner;
		char *ownerPtr = NULL; 
		char *changeDiary = NULL;
		ARPropList *objPropList = NULL;
		char *objectModificationLogLabel = NULL;
		ARStatusList status;
		HV *schemaDef = NULL;
		SV **pSvTemp;
		/* char strTemp[STR_TEMP_SIZE+1]; */

		RETVAL = 0; /* assume error */
		(void) ARError_reset();
		Zero(newName, 1,ARNameType);
		Zero(defaultVui, 1,ARNameType);
		Zero(owner, 1,ARAccessNameType);
		Zero(&status, 1,ARStatusList);

		if( SvROK(schemaDefRef) && SvTYPE(SvRV(schemaDefRef)) == SVt_PVHV ){
			schemaDef = (HV*) SvRV(schemaDefRef);
		}else{
			croak("usage: ars_SetSchema(...)");
		}


ARS.xs  view on Meta::CPAN

			rv += rev_ARArchiveInfoStruct( ctrl, schemaDef, "archiveInfo", archiveInfo );
		}
#endif
#if AR_EXPORT_VERSION >= 9L
		pSvTemp = hv_fetch( schemaDef, "auditInfo", strlen("auditInfo") , 0 );
		if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
			auditInfo = (ARAuditInfoStruct*) MALLOCNN( sizeof(ARAuditInfoStruct) );
			rv += rev_ARAuditInfoStruct( ctrl, schemaDef, "auditInfo", auditInfo );
		}
#endif
		if( hv_exists(schemaDef,"defaultVui",10) ){
			rv += strcpyHVal( schemaDef, "defaultVui", defaultVui, AR_MAX_NAME_SIZE ); 
			defaultVuiPtr = defaultVui;
		}

		if( hv_exists(schemaDef,"helpText",8) ){
			rv += strmakHVal( schemaDef, "helpText", &helpText ); 
		}
		if( hv_exists(schemaDef,"owner",5) ){
			rv += strcpyHVal( schemaDef, "owner", owner, AR_MAX_ACCESS_NAME_SIZE ); 
			ownerPtr = owner;
		}
		if( hv_exists(schemaDef,"changeDiary",11) ){

ARS.xs  view on Meta::CPAN

				admingrpList,
				getListFields,
				sortList,
				indexList,
#if AR_EXPORT_VERSION >= 8L
				archiveInfo,
#endif
#if AR_EXPORT_VERSION >= 9L
				auditInfo,
#endif
				defaultVuiPtr,
				helpText,
				ownerPtr,
				changeDiary,
				objPropList,
#if AR_EXPORT_VERSION >= 8L
				0,              /* setOption, reserved for future use */
#endif
#if AR_CURRENT_API_VERSION >= 17
			    objectModificationLogLabel,
#endif

ARS.xs  view on Meta::CPAN

		switch( escalationTm.escalationTmType ){
		case AR_ESCALATION_TYPE_INTERVAL:
			rv += longcpyHVal( objDef, "TmInterval", &(escalationTm.u.interval) );
			break;
		case AR_ESCALATION_TYPE_TIMEMARK:
			rv += longcpyHVal( objDef,  "TmMonthDayMask", &(escalationTm.u.date.monthday) );
			rv += longcpyHVal( objDef,  "TmWeekDayMask",  &(escalationTm.u.date.weekday) );
			rv += longcpyHVal( objDef,  "TmHourMask",     &(escalationTm.u.date.hourmask) );
			rv += uintcpyHVal( objDef, "TmMinute",       &(escalationTm.u.date.minute) );
			break;
		default:
			rv += (-1);	
		}

		if(hv_exists(objDef,  "owner", strlen("owner") ))
			rv += strcpyHVal( objDef, "owner", owner, AR_MAX_ACCESS_NAME_SIZE);
		else
			strncpy(owner, ctrl->user, sizeof(ARAccessNameType));

		/* these two are optional, so if the calls return warnings
		 * it probably indicates that the hash keys don't exist and

StructDef.pl  view on Meta::CPAN

		_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  => {

StructDef.pl  view on Meta::CPAN

	_typedef => 'char[AR_MAX_CURRENCY_CODE_SIZE+1]',
},

ARFieldMappingList => {
	_num  => 'p->numItems',
	_list => 'p->mappingList',
	_type => 'ARFieldMappingStruct',
},
ARFieldMappingStruct => {
	_switch  => 'p->fieldType',
#	_default =>	'AR_FIELD_REGULAR',
	_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 => {

StructDef.pl  view on Meta::CPAN

	_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',
			},

StructDef.pl  view on Meta::CPAN

},
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',
#	},
},

StructDef.pl  view on Meta::CPAN

		_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',

StructDef.pl  view on Meta::CPAN

		AR_FILTER_ACTION_PROCESS        => 'process',
		AR_FILTER_ACTION_FIELDP         => 'fieldp',
		AR_FILTER_ACTION_SQL            => 'sqlCommand',
		AR_FILTER_ACTION_GOTOACTION     => 'gotoAction',
		AR_FILTER_ACTION_CALLGUIDE      => 'callGuide',
		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',

StructDef.pl  view on Meta::CPAN

	},
	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',

StructDef.pl  view on Meta::CPAN

		_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 => {

StructDef.pl  view on Meta::CPAN

	_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',
			},

StructDef.pl  view on Meta::CPAN

	_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 => 'ARMultiSchemaFuncQualifierStruct*',
				_data => 'p->u.andor.operandLeft',
			},
			right => {
				_type => 'ARMultiSchemaFuncQualifierStruct*',
				_data => 'p->u.andor.operandRight',
			},

StructDef.pl  view on Meta::CPAN

#		_type => 'ARInternalId',
#		_data => 'p->fieldId',
#	},
#},



#ARArchiveInfoStruct => {
#	_min_version => '6.0.0',
#	_switch  => 'p->archiveType',
##	_default =>	'AR_FIELD_REGULAR',
#	_map => [ 'archiveType', {
#		AR_ARCHIVE_NONE     => 0,
#		AR_ARCHIVE_FORM     => 1,
#		AR_ARCHIVE_DELETE   => 2,
#		'AR_ARCHIVE_FORM | AR_ARCHIVE_DELETE' => 3,
#		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',

StructDef.pl  view on Meta::CPAN

#},
#ARWorkflowConnectList => {
#	_num  => 'p->numItems',
#	_list => 'p->workflowConnectList',
#	_type => 'ARWorkflowConnectStruct',
#},
#ARWorkflowConnectStruct => {
#	_switch => 'p->type',
#	_case    => {
#		AR_WORKFLOW_CONN_NONE => {
#			_default => 1,
#		},
#		AR_WORKFLOW_CONN_SCHEMA_LIST => {
#			schemaList => {
#				_type => 'ARNameList',
#				_data => 'p->u.schemaList',
#			},
#		},
#	},
#},
#ARReferenceStruct => {

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/ars_GetListUser.pl  view on Meta::CPAN

my @noteMech = ( "NONE", "NOTIFIER", "EMAIL",     "?" );
my @licType  = ( "NONE", "FIXED",    "FLOATING",  "FIXED2" );
my @licTag   = ( "",     "WRITE",    "FULL_TEXT", "RESERVED1" );

print "Calling GetListUser and asking for all connected users...\n";

# 0 = current user's info
# 1 = all users' info
# 2 = all connected users' info
#
# default = 0

( my @h = ars_GetListUser( $ctrl, 2 ) ) || die "ERR: $ars_errstr\n";

print "GetListUser returned the following:\n";

foreach (@h) {
    print "userName: $_->{userName}\n";
    print "\tconnectTime: " . localtime( $_->{connectTime} ) . "\n";
    print "\tlastAccess: " . localtime( $_->{lastAccess} ) . "\n";
    print "\tnotify mech: $_->{defaultNotifyMech} ("
      . $noteMech[ $_->{defaultNotifyMech} ] . ")\n";
    print "\temail addr: $_->{emailAddr}\n";

    for ( my $i = 0 ; $i <= $#{ $_->{licenseTag} } ; $i++ ) {
        print "\tlicense \#$i info:\n";

        print "\t\tlicenseTag: "
          . @{ $_->{licenseTag} }[$i] . " ("
          . $licTag[ @{ $_->{licenseTag} }[$i] ] . ")\n";
        print "\t\tlicenseType: "
          . @{ $_->{licenseType} }[$i] . " ("

html/debug.html  view on Meta::CPAN


Because the ARS extension gets loaded into perl dynamically, there
are a few extra steps needed to debug it.  You will need to build a separate
perl installation compiled with debugging turned on.

<H3> Steps </H3>
<OL>
<FONT SIZE="+1"> <LI> Configure perl </FONT> <P>
     When perl's Configure script prompts you : <BR>
     <I> What optimizer/debugger flag should be used? </I><BR>
     you should specify -g instead of the default -O. <BR>
     It is also usually a good idea to use perl's built in malloc.
     The will prevent ARSperl from crashing due to malloc/free bugs. <P>
<FONT SIZE="+1"> <LI> Install perl/Install ARSperl </FONT> <P>
     If you're perl install went correctly, ARSperl should automatically
     get compiled with the -g switch.<P>
<FONT SIZE="+1"> <LI> Try it out <BR> </FONT> <P>
     I use gdb (the gnu debugger) for debugging, but others (like dbx) 
     will probably work.  Debugging ARS involves switching between 
     gdb and the perl debugger.  When I'm in the perl debugger, I use
     control-c to send a SIGINT and return to gdb.  The function

html/manual/OO/form.html  view on Meta::CPAN

<H2> Methods </H2>

<DL>
<DT><A NAME="new"><B>constructor</B></A>
<PRE>
  $f = new ARS::form(-form =&gt; scalar string,
                     -vui  =&gt; scalar string,
                     -connection =&gt; ARS object);
</PRE>

    This is the default constructor. To make life easier, you should use
    the openForm() method available in the 
    <a href="connection.html">Connection Object</A>.

<P>
<DT><A NAME="DESTROY"><B>destructor</B></A>
	Currently, the form destructor does nothing.
<P>
<DT><A NAME="query"><B>query()</B></A>
<PRE>
  @matches =  $f->query(-query         =&gt; scalar string,

html/manual/OO/index.html  view on Meta::CPAN

      features.

<H2> Features </H2>

The following features are available as part of the OO layer.

<DL>
<DT> <B> Exception Handlers </B> <DD>

        The OO layer abstracts exception handling away a bit (optionally,
	ofcourse). By default, the layer installs three handlers that are
	called if an FATAL, ERROR, or WARNING return code is returned by
	the ARS C API. At first, these handlers map to the Perl "die" and
	"warn" functions. You can, however, disable or over-ride this
	feature and install your own handlers. <P>

	Have a look at the <A href="connection.html#new">Connection Object's   
        constructor method</A>. <P>

        Also examine the <code>t/entry.t</code> script available in the
        source distribution for an example of how to use this. <P>

html/manual/ars_Export.html  view on Meta::CPAN

<li>  "xml_vui" 
<li>  "xml_field" 

	</UL>
	<P>
        <code>displayTag</code> is the particular view to export. If you pass in 
	an empty string for this parameter, all views will be exported. <P>

	<code>vuiType</code> is one of:<P>
<PRE>
	&ARS::AR_VUI_TYPE_NONE (the default)
	&ARS::AR_VUI_TYPE_WINDOWS (fields in ARSystem Windows User Tool)
	&ARS::AR_VUI_TYPE_WEB (fields in view can be adjusted)
	&ARS::AR_VUI_TYPE_WEB_ABS_POS (fields in view are fixed)
	&ARS::AR_VUI_TYPE_WIRELESS (undocumented?)
</PRE><P>

	Note that note all of the above types are available in earlier 
	versions of ARSystem. The above list is valid as of ARSystem v4.5. <P>
	It's recommended that if you want to export schema definitions you
	should use "<code>schema</code>" and not use the other 

html/manual/ars_GetListEntry.html  view on Meta::CPAN

    </p>
    <p>
      The "..." in the above function can be one of two things:
    </p>
    <ol>
      <li>A Hash Reference that specifies what you want the query list to look like, followed by
      (optionally) a list of field ids and sorting types to indicate how you want the query list
      sorted.
      </li>
      <li>An optional list of field ids and sorting types to indicate how you want the schemas
      default results list to be sorted. If you do not specify the fields you want to have
      returned, the function returns the fields defined as the results list for this schema, which
      can be changed on the server side.
      </li>
    </ol>
    <p></p>
    <p>
      The sorting type can be 1 for ascending, or 2 for descending. Also, note that if you want to
      retain the order of the entry ids returned, then you must assign the list to an array, and
      not a hash.
    </p>
    <p>
      Setting <code>maxRetrieve = 0</code> will return as many matches as the server will allow.
      This is the default.
    </p>
    <p>
      <code>firstRetrieve</code> specifies which entry to start with. The default (zero) is to
      start with the first entry that matches the qualifier.
    </p>
    <p></p>
    <dl>
      <dt class="c1">
        On success
      </dt>
      <dd>
        Returns a list of <i>(entry_id, resultslist)</i> pairs.
      </dd>

html/manual/ars_GetListEntryWithFields.html  view on Meta::CPAN

      standard [ fieldID_list ], # OPTIONAL sortID1,sortdir1,sortID2,sortdir2,...) #
      OPTIONAL</code>
    </h2>
    <pre>

</pre>This function is used to query a specified schema and return actual field values - not
formatted strings as per <code>ars_GetListEntry</code> - from all matching entries.
    <p>
      <code>[ fieldID_list ]</code> is an optional array reference; the list is a list of FieldIDs.
      Because only the actual fieldIDs need to be passed, this is a list of scalar values, not a
      list of hash references a la <code>ars_GetListEntry</code>. If not specified, the default
      result list fields for the schema are returned.
    </p>
    <p>
      The other arguments are identical in function to <code><a href=
      "ars_GetListEntry.html">ars_GetListEntry</a></code>.
    </p>
    <p>
      The format of the returned list/hash is <i>(entry_id, {field_value_hash})</i> pairs. The
      returned list can be stored in an array or hash. Using an array preserves the sort order, if
      one was specified. Each referenced field_value_hash looks like the return of a single

html/manual/ars_GetListField.html  view on Meta::CPAN

  <title>ARSperl Manual - ars_GetListField</title>


</head>

<body style="background-color: rgb(255, 255, 255);">

<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).

html/manual/ars_GetListSchema.html  view on Meta::CPAN

<BODY BGCOLOR="#FFFFFF">

<H2><CODE>ars_GetListSchema(ctrl, changedSince, schemaType, name)</CODE></H2>

This function fetches a list of schemas available to the user.
<dl>

<dt><CODE>changedSince</CODE>
<dd> is an optional timestamp that will cause
only schemas newer than that time to be returned. 
The default value is 0.<P>

<dt><CODE>schemaType</CODE> - <B>3.x only</B>
<dd> is an optional code number that indicates the schema type(s) to list.
The default value is 0. Other values are:
  <ul><table width = "75%">
  <tr><td><B>Value</B></td><td><B>Meaning</B></td></tr>
  <tr><td>0</td><td>Retrieve all visible/accessible schemas.</td></tr>
  <tr><td>1</td><td>Retrieve only visible/accessible base schemas.</td></tr>
  <tr><td>2</td><td>Retrieve only visible/accessible join schemas.</td></tr>
  <tr><td>4</td><td>Retrieve only visible/accessible join schemas that
                    depend on the schema named in the ``name'' parameter.
                </td></tr>
  <tr><td>5</td><td>Retrieve only visible/accessible base schemas that
                    the schema named in the ``name'' parameter depends

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_Login.html  view on Meta::CPAN

<HTML>
<HEAD>
<TITLE>ARSperl Manual - ars_Login</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">

   <H2><CODE>ars_Login(server, username, password, lang, authString, tcpport, rpcnumber)</CODE></H2>

      Returns a control structure for the specified server, username,
      and password.  Specifying a null server will use whatever the default
      server is for your system. <P>
      <code>lang</code>, <code>authString</code>, <code>tcpport</code> and <code>rpcnumber</code>
	are optional. <P>"lang" is the language the user is using. If not
	specified, the default will be used.<P> 
	    "authString" has something to do with the Windows Domain. I
	    don't have any more information about this parameter. Pass
	    <code>undef</code> to be safe.
 
	
	If you want to use a private server, specify <code>tcpport</code> and
	<code>rpcnumber</code>. 
	If you pass an empty string as the "server" parameter,
	ars_Login will attempt to identify one.

html/manual/ds_container_info.html  view on Meta::CPAN

 "changeDiary"          =&gt; <i>list</i> of references to <a href="ds_diaryentry_hash.html">Diary Entry Structures</a>,
 "getListFields"        =&gt; <i>list</i> of references to <A href="ds_elfs.html">Entry List Field Structure</a>,
 "groupList"            =&gt; <B>see below</B>
 "helpText"             =&gt; string,
 "indexList"            =&gt; <i>list</i> of references to <A href="ds_is.html">Index Structure</a>
 "lastChanged"          =&gt; string,
 "owner"                =&gt; string,
 "schema"               =&gt; reference to <a href="ds_schematype.html">schemaType</a> hash, (<B>3.x and above</B>)
 "sortList"             =&gt; <i>list</i>,
 "timestamp"            =&gt; integer,
 "defaultVui"		=&gt; string (5.x only)
}
 </PRE>

<DL>
<DT><B>groupList</B><DD>
   When compiled against <B>3.x</B>, this will be a hash reference containing
   the groupId as the key to the hash and one of: <P> 
   <blockquote>
   <CODE>none</CODE>, <CODE>hidden</CODE>, or <CODE>visible</CODE>
   </blockquote>

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"   =&gt; <i>list</i> of references to <a href="ds_diaryentry_hash.html">Diary Entry Structures</a>,<br> "createMode"    =&gt; open <i>or</i> protected,<br> "dataType"      =&gt; string,<br> "defaultVal"    =&gt; string,<br> "d...
<hr width="30%">
<p>
<a href="toc.html"><img alt="&lt;--" 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_getlistuser_hash.html  view on Meta::CPAN


An array of references to this structure is returned by 
<A href="ars_GetListUser.html">ars_GetListUser</a>.
<p>

<PRE>
{
 "userName"           =&gt; string,
 "connectTime"        =&gt; integer,
 "lastAccess"         =&gt; integer,
 "defaultNotifyMech"  =&gt; integer,
 "emailAddr"          =&gt; string,
 "licenseTag"         =&gt; <B>reference</B> to an array,
 "licenseType"        =&gt; <B>reference</B> to an array,
 "currentLicenseType" =&gt; <B>reference</B> to an array
}
</PRE>

<B>Note:</B> We've never seen the server actually return values for
<CODE>emailAddr</CODE> or <CODE>defaultNotifyMech</CODE>.
<P>

See <CODE>ars_GetListUser.pl</CODE> in the <CODE>examples</CODE> directory.

<P>
<HR WIDTH="30%">
<P>
<A HREF="toc.html"><IMG ALT="&lt;--" SRC="arrow.gif" ALIGN=CENTER> Table of Contents </A>
<p>
<address>

html/manual/ds_schema.html  view on Meta::CPAN

 "changeDiary"          =&gt; <i>list</i> of references to <a href="ds_diaryentry_hash.html">Diary Entry Structures</a>,
 "getListFields"        =&gt; <i>list</i> of references to <A href="ds_elfs.html">Entry List Field Structure</a>,
 "groupList"            =&gt; <B>see below</B>
 "helpText"             =&gt; string,
 "indexList"            =&gt; <i>list</i> of references to <A href="ds_is.html">Index Structure</a>
 "lastChanged"          =&gt; string,
 "owner"                =&gt; string,
 "schema"               =&gt; reference to <a href="ds_schematype.html">schemaType</a> hash, (<B>3.x and above</B>)
 "sortList"             =&gt; <i>list</i>,
 "timestamp"            =&gt; integer,
 "defaultVui"		=&gt; string (5.x only)
}
 </PRE>

<DL>
<DT><B>groupList</B><DD>
   When compiled against <B>3.x</B>, this will be a hash reference containing
   the groupId as the key to the hash and one of: <P> 
   <blockquote>
   <CODE>none</CODE>, <CODE>hidden</CODE>, or <CODE>visible</CODE>
   </blockquote>

infra/h2ph  view on Meta::CPAN


If run with no arguments, filters standard input to standard output.

=head1 OPTIONS

=over 4

=item -d destination_dir

Put the resulting B<.ph> files beneath B<destination_dir>, instead of
beneath the default Perl library location (C<$Config{'installsitsearch'}>).

=item -r

Run recursively; if any of B<headerfiles> are directories, then run I<h2ph>
on all files in those directories (and their subdirectories, etc.).  B<-r>
and B<-a> are mutually exclusive.

=item -a

Run automagically; convert B<headerfiles>, as well as any B<.h> files

infra/mkchanges.pl  view on Meta::CPAN

use FileHandle;
use vars qw{$opt_t $opt_f};
use Getopt::Std;

getopts('tf:');

my ($html) = defined($opt_t)?0:1;

if((!defined($opt_f)) || (! -e "$opt_f")) {
	die "usage: mkchanges.pl [-t] -f changes.dat > outputfile
-t    text output (default = html)
-f    changes.dat input file
";
}

my($f) = new FileHandle($opt_f, "r");
die "open($opt_f) failed: $!" if !defined($f);

if($html) {
	headerHTML();
} else {

rev_AR_template.pl  view on Meta::CPAN

@>                     # 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}) @>
@>                 }
@>                 foreach my $key ( keyFilter($obj->{_case},'_default') ){
			}else if( 1 ){
			    <@ $obj->{_switch} @> = <@ $key @>;
@>                 }
			}else{
			    ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_<@ $class @>: map error" );
			}
@>             }
@>         }


rev_AR_template.pl  view on Meta::CPAN

@>             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]' );
	{

rev_AR_template.pl  view on Meta::CPAN

@>             my $key2 = $key;
@>             $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

	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;

support-h.template  view on Meta::CPAN

#include "arstruct.h"
#include "arfree.h"

#if AR_EXPORT_VERSION < 6
# include "nt.h"
# include "nterrno.h"
# include "ntfree.h"
# include "ntsextrn.h"
#endif

/* the following are defined because we use them as default values in ARS.xs */

#if AR_EXPORT_VERSION < 3
# define AR_FIELD_TYPE_ALL 0
# include "ntcextrn.h"
#endif
#if AR_EXPORT_VERSION < 5
# define AR_IMPORT_OPT_CREATE 0
# define AR_IMPORT_OPT_OVERWRITE 1
#endif

support.c  view on Meta::CPAN

	switch (type) {
	case ARSPERL_TRACEBACK:
	case AR_RETURN_OK:
	case AR_RETURN_WARNING:
		ret = 0;
		break;
	case AR_RETURN_ERROR:
	case AR_RETURN_FATAL:
		ret = -1;
		break;
	default:
		return -1;
	}

	if (!text || !*text)
		return -2;

	/*
	 * fetch base hash and numItems reference, it should already exist
	 * because you should call ARError_reset before using this routine.
	 * if you forgot.. no big deal.. we'll do it for you.

support.c  view on Meta::CPAN

				     (ARS_fn) perl_AREnumItemStruct,
				     sizeof(AREnumItemStruct)
				     )
			 ,0
			 );
		break;
	case AR_ENUM_STYLE_QUERY:
		hv_store(hash, "queryList", strlen("queryList"),
			 perl_AREnumQueryStruct(ctrl, &(in->u.queryList)), 0);
		break;
	default:
		hv_store(hash, "error", 5,
			 newSVpv("unknown listStyle", 0), 0);
		hv_store(hash, "listStyle", strlen("listStyle"),
			 newSViv(in->listStyle), 0);
		ARError_add(AR_RETURN_ERROR, AP_ERR_ENUM_LISTSTYLE);
	}
	return newRV_noinc((SV *) hash);
}
#endif

support.c  view on Meta::CPAN

		return newSVpv(in->u.charVal, 0);
#endif
#if AR_EXPORT_VERSION >= 4
	case AR_DATA_TYPE_ATTACH:
		return perl_ARAttach(ctrl, in->u.attachVal);
        case AR_DATA_TYPE_DECIMAL:
                return newSVpv(in->u.decimalVal, 0);
#endif
	case AR_DATA_TYPE_NULL:
		return newSVsv(&PL_sv_undef);
	default:
		{
			char dt[128];
			sprintf(dt, "%u (in function perl_ARValueStruct_Assign)", in->dataType);
			ARError_add(AR_RETURN_WARNING, AP_ERR_DATATYPE);
			ARError_add(AR_RETURN_WARNING, AP_ERR_CONTINUE, dt);
		}
		return newSVsv(&PL_sv_undef);	/* FIX */
	}
}

support.c  view on Meta::CPAN

#endif
#if AR_EXPORT_VERSION >= 7L
	case AR_DATA_TYPE_TIME_OF_DAY:
		return newSViv(in->u.timeOfDayVal);
	case AR_DATA_TYPE_DATE:
		return newSViv(in->u.dateVal);
	case AR_DATA_TYPE_CURRENCY:
		return perl_ARCurrencyStruct(ctrl, in->u.currencyVal);
#endif
	case AR_DATA_TYPE_NULL:
	default:
		return newSVsv(&PL_sv_undef);	/* FIX */
	}
}

SV             *
perl_ARStatHistoryValue(ARControlStruct * ctrl, ARStatHistoryValue * in)
{
	HV             *hash = newHV();
	hv_store(hash,  "userOrTime", strlen("userOrTime") , newSViv(in->userOrTime), 0);
	hv_store(hash,  "enumVal", strlen("enumVal") , newSViv(in->enumVal), 0);

support.c  view on Meta::CPAN

		hv_store(hash,  "statHistory", strlen("statHistory") ,
		      perl_ARStatHistoryValue(ctrl, &in->u.statHistory), 0);
		break;
#if AR_EXPORT_VERSION >= 7L
	case AR_CURRENCY_FLD:
		in->u.currencyField = (ARCurrencyPartStruct*) MALLOCNN(sizeof(ARCurrencyPartStruct));
		hv_store(hash,  "currencyField", strlen("currencyField") ,
		      perl_ARCurrencyPartStruct(ctrl, in->u.currencyField), 0);
		break;
#endif
	default:
		break;
	}
	return newRV_noinc((SV *) hash);
}

SV             *
perl_ARFieldAssignStruct(ARControlStruct * ctrl, ARFieldAssignStruct * in)
{
	HV             *hash = newHV();

support.c  view on Meta::CPAN

		hv_store(hash,  "item", strlen("item") , &PL_sv_undef, 0);
		break;
	case AR_DDE_POKE:
		hv_store(hash,  "item", strlen("item") , newSVpv(in->item, 0), 0);
		hv_store(hash,  "command", strlen("command") , newSVpv(in->command, 0), 0);
		break;
	case AR_DDE_REQUEST:
		hv_store(hash,  "item", strlen("item") , newSVpv(in->item, 0), 0);
		hv_store(hash,  "command", strlen("command") , &PL_sv_undef, 0);
		break;
	default:
		hv_store(hash,  "item", strlen("item") , &PL_sv_undef, 0);
		hv_store(hash,  "command", strlen("command") , &PL_sv_undef, 0);
		break;
	}

	return newRV_noinc((SV *) hash);
}

SV             *
perl_ARActiveLinkActionStruct(ARControlStruct * ctrl, ARActiveLinkActionStruct * in)

support.c  view on Meta::CPAN

#endif
#if AR_CURRENT_API_VERSION >= 13
        case AR_ACTIVE_LINK_ACTION_SERVICE:
		hv_store(hash,  "service", strlen("service") ,
			 perl_ARActiveLinkSvcActionStruct(ctrl, &in->u.service), 0);
        break;
#endif
        case AR_ACTIVE_LINK_ACTION_NONE:
		hv_store(hash,  "none", strlen("none") , &PL_sv_undef, 0);
		break;
	default:
		hv_store(hash,  "[unknown]", strlen("[unknown]") , &PL_sv_undef, 0);
		break;
	}
	return newRV_noinc((SV *) hash);
}

SV             *
perl_ARFilterActionNotify(ARControlStruct * ctrl, ARFilterActionNotify * in)
{
	HV             *hash = newHV();

support.c  view on Meta::CPAN

			 perl_ARExitGuideStruct(ctrl, &in->u.exitGuide), 0);
                break;
        case AR_FILTER_ACTION_GOTOGUIDELABEL:
                /*ARGotoGuideLabelStruct;*/
		hv_store(hash,  "gotoGuide", strlen("gotoGuide") ,
			 newSVpv(in->u.gotoGuide.label, 0), 0);
                break;
# endif 
#endif
	case AR_FILTER_ACTION_NONE:
	default:
		hv_store(hash,  "none", strlen("none") , &PL_sv_undef, 0);
		break;
	}

	DBG( ("leave\n") );

	return newRV_noinc((SV *) hash);
}

SV             *

support.c  view on Meta::CPAN

		case AR_MENU_TYPE_MENU:
			sub = perl_expandARCharMenuStruct(ctrl,
			     which->u.menuList.charMenuList[i].u.childMenu);
			if (!sub) {
				FreeARCharMenuStruct(&menu, FALSE);
				return &PL_sv_undef;
			}
			av_push(array, sub);
			break;
		case AR_MENU_TYPE_NONE:
		default:
			av_push(array, &PL_sv_undef);
			break;
		}
	}

	FreeARCharMenuStruct(&menu, FALSE);
	return newRV_noinc((SV *) array);
}

SV             *

support.c  view on Meta::CPAN

		case AR_LENGTH_UNIT_BYTE:
			hv_store(hash,  "lengthUnits", strlen("lengthUnits") , newSVpv("byte", 0), 0);
			break;
		case AR_LENGTH_UNIT_CHAR:
			hv_store(hash,  "lengthUnits", strlen("lengthUnits") , newSVpv("char", 0), 0);
			break;
		}

		switch (in->u.charLimits.storageOptionForCLOB) {
		case AR_STORE_OPT_DEF:
			hv_store(hash,  "storageOptionForCLOB", strlen("storageOptionForCLOB") , newSVpv("default", 0), 0);
			break;
		case AR_STORE_OPT_INROW:
			hv_store(hash,  "storageOptionForCLOB", strlen("storageOptionForCLOB") , newSVpv("inrow", 0), 0);
			break;
		case AR_STORE_OPT_OUTROW:
			hv_store(hash,  "storageOptionForCLOB", strlen("storageOptionForCLOB") , newSVpv("outrow", 0), 0);
			break;
		}
#endif

support.c  view on Meta::CPAN

		case AR_LENGTH_UNIT_CHAR:
			hv_store(hash,  "lengthUnits", strlen("lengthUnits") , newSVpv("char", 0), 0);
			break;
		}
#endif

		return newRV_noinc((SV *) hash);
#endif

	case AR_DATA_TYPE_NULL:
	default:
		/* no meaningful limits */
		return &PL_sv_undef;
	}
}

SV             *
perl_ARAssignStruct(ARControlStruct * ctrl, ARAssignStruct * in)
{
	HV             *hash = newHV();

support.c  view on Meta::CPAN

#if AR_EXPORT_VERSION >= 3
	case AR_ASSIGN_TYPE_SQL:
		hv_store(hash,  "sql", strlen("sql") , perl_ARAssignSQLStruct(ctrl, in->u.sql), 0);
		break;
#endif
#if AR_EXPORT_VERSION >= 6L
	case AR_ASSIGN_TYPE_FILTER_API:
		hv_store(hash,  "filterApi", strlen("filterApi") , perl_ARAssignFilterApiStruct(ctrl, in->u.filterApi), 0);
		break;
#endif				/* ARS 3.x */
	default:
		hv_store(hash,  "none", strlen("none") , &PL_sv_undef, 0);
		break;
	}
	return newRV_noinc((SV *) hash);
}

#if AR_EXPORT_VERSION >= 4
SV             *
perl_ARSQLStruct(ARControlStruct * ctrl, ARSQLStruct * in)
{

support.c  view on Meta::CPAN

	char            groupid[20];
	int             j;
        unsigned int    i;
	TypeMapStruct  *tmap;

	switch (permType) {
	case PERMTYPE_SCHEMA:
		tmap = (TypeMapStruct *) SchemaPermissionTypeMap;
		break;
	case PERMTYPE_FIELD:
	default:
		tmap = (TypeMapStruct *) FieldPermissionTypeMap;
	}

	/* printf("numItems = %d\n", in->numItems); */
	for (i = 0; i < in->numItems; i++) {
		/* printf("[%d] %i\n", i, (int) in->permissionList[i].groupId); */
		sprintf(groupid, "%i", (int) in->permissionList[i].groupId);
		for (j = 0; tmap[j].number != TYPEMAP_LAST; j++) {
			if (tmap[j].number == in->permissionList[i].permissions)
				break;

support.c  view on Meta::CPAN

		break;
	case AR_ARITH_OP_DIVIDE:
		oper = "/";
		break;
	case AR_ARITH_OP_MODULO:
		oper = "%";
		break;
	case AR_ARITH_OP_NEGATE:
		oper = "-";
		break;
	default:
		{
			char _em[80];
			(void) sprintf(_em,
			 "Unknown arith operation in ARArithOpStruct: %8.8i\n",
			               in->operation);
                        (void) ARError_add(AR_RETURN_ERROR, AP_ERR_INV_ARITH, 
					   _em);
		}
		break;
	}

support.c  view on Meta::CPAN

}

int
ARGetFieldCached(ARControlStruct * ctrl, ARNameType schema, ARInternalId id,
		 ARNameType fieldName, ARFieldMappingStruct * fieldMap,
		 unsigned int *dataType, unsigned int *option,
		 unsigned int *createMode, 
#if AR_CURRENT_API_VERSION >= 12
		 unsigned int *fieldOption,
#endif
		 ARValueStruct * defaultVal,
#if AR_CURRENT_API_VERSION >= 17
		 ARPermissionList * assignedGroupList,
#endif
		 ARPermissionList * perm, ARFieldLimitStruct * limit,
		 ARDisplayInstanceList * display,
		 char **help, ARTimestamp * timestamp,
	       ARNameType owner, ARNameType lastChanged, char **changeDiary,
#if AR_CURRENT_API_VERSION >= 17
		 ARPropList   * objPropList,
#endif

support.c  view on Meta::CPAN

{
	int             ret;
	HV             *fields, *base;
	SV            **field, **val;
	unsigned int    my_dataType;
	ARNameType      my_fieldName;
	char            field_string[20];

#if AR_CURRENT_API_VERSION >= 17
	/* cache fieldName and dataType */
	if (fieldMap || option || createMode || fieldOption || defaultVal || assignedGroupList || perm || limit ||
	    display || help || timestamp || owner || lastChanged || changeDiary || objPropList) {
		(void) ARError_add(ARSPERL_TRACEBACK, 1,
			 "ARGetFieldCached: uncached parameter requested.");
		goto cache_fail;
	}
#elif AR_CURRENT_API_VERSION >= 12
	/* cache fieldName and dataType */
	if (fieldMap || option || createMode || fieldOption || defaultVal || perm || limit ||
	    display || help || timestamp || owner || lastChanged || changeDiary) {
		(void) ARError_add(ARSPERL_TRACEBACK, 1,
			 "ARGetFieldCached: uncached parameter requested.");
		goto cache_fail;
	}
#else
	/* cache fieldName and dataType */
	if (fieldMap || option || createMode || defaultVal || perm || limit ||
	    display || help || timestamp || owner || lastChanged || changeDiary) {
		(void) ARError_add(ARSPERL_TRACEBACK, 1,
			 "ARGetFieldCached: uncached parameter requested.");
		goto cache_fail;
	}
#endif


	fields = fieldcache_get_schema_fields( ctrl, schema, FALSE );
	if( ! fields )		goto cache_fail;

support.c  view on Meta::CPAN

	/*
	 * if we don't cache one of the arguments or we couldn't find field
	 * in cache.. then we need to do a query to find the data.
	 */

cache_fail:;


#if AR_CURRENT_API_VERSION >= 17
	ret = ARGetField(ctrl, schema, id, my_fieldName, fieldMap, &my_dataType,
			 option, createMode, fieldOption, defaultVal, assignedGroupList, perm, limit,
			 display, help, timestamp, owner, lastChanged,
			 changeDiary, objPropList, Status);
#elif AR_CURRENT_API_VERSION >= 12
	ret = ARGetField(ctrl, schema, id, my_fieldName, fieldMap, &my_dataType,
			 option, createMode, fieldOption, defaultVal, perm, limit,
			 display, help, timestamp, owner, lastChanged,
			 changeDiary, Status);
#else
	ret = ARGetField(ctrl, schema, id, my_fieldName, fieldMap, &my_dataType,
			 option, createMode, defaultVal, perm, limit,
			 display, help, timestamp, owner, lastChanged,
			 changeDiary, Status);
#endif

#ifdef PROFILE
	((ars_ctrl *) ctrl)->queries++;
#endif

	if (dataType)  *dataType = my_dataType;
	if (fieldName)  strcpy(fieldName, my_fieldName);

support.c  view on Meta::CPAN

		&existList,
		&idList,
		&nameList,
		NULL,        /* fieldMappingList */
		&dataTypeList,
		NULL,        /* option */
		NULL,        /* createMode */
#if AR_CURRENT_API_VERSION >= 12
		NULL,        /* fieldOption */
#endif
		NULL,        /* defaultVal */
#if AR_CURRENT_API_VERSION >= 17
		NULL,        /* assginedGrouList */
#endif
		NULL,        /* permissions */
		NULL,        /* limit */
		NULL,        /* dInstanceList */
		NULL,        /* helptext */
		NULL,        /* timestamp */
		NULL,        /* owner */
		NULL,        /* lastChanged */

support.c  view on Meta::CPAN

					long            size = 0;
					SV             *name = NULL;

					/*
					 * the hash should contain keys: 
					 * file (a filename) or 
					 * buffer (a buffer)
					 * and all of: 
					 * size (length of file or buffer)
					 * name (the name to give the attachment)
					 * name defaults to the filename or "Anonymous Incore Buffer"
					 */

					/* first: decode the size key */

					fetch = hv_fetch(hash,  "size", strlen("size") , FALSE);
					if (!fetch) {
						AP_FREE(attachp);
						ARError_add(AR_RETURN_ERROR, AP_ERR_ATTACH,
						"Must specify 'size' key.");
						return -1;

support.c  view on Meta::CPAN

						AP_FREE(out->u.coordListVal);
						ARError_add(AR_RETURN_ERROR, AP_ERR_COORD_STRUCT);
						return -1;
					}
				}
				return 0;
			}
			ARError_add(AR_RETURN_ERROR, AP_ERR_COORD_LIST);
			return -1;
#endif
		default:
			ARError_add(AR_RETURN_ERROR, AP_ERR_FIELD_TYPE);
			return -1;
		}
	}
	return 0;
}




support.c  view on Meta::CPAN

			{
				SV *val;
				val = perl_AREntryReturn( ctrl, &(p->u.createEntryReturn) );
				ret = val;
			}
			hv_store( hash, "createEntryReturn", 17, ret, 0 );
		
			ret = newRV_noinc((SV *) hash);
		}
			break;
		default:
			ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, ": Invalid case" );
			ret = &PL_sv_undef;
			break;
		}
	
//		ret = val;
	}
	return ret;
}

support.c  view on Meta::CPAN


	hv_store( hash, "menuLabel", 9, newSVpv(p->menuLabel,0), 0 );

	switch( p->menuType ){
	case AR_MENU_TYPE_VALUE:
		hv_store( hash, "menuValue", 9, newSVpv(p->u.menuValue,0), 0 );
		break;
	case AR_MENU_TYPE_MENU:
		hv_store( hash, "childMenu", 9, perl_ARCharMenuStruct(ctrl, p->u.childMenu), 0 );
		break;
	default:
		ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, ": Invalid case" );
		break;
	}

	ret = newRV_noinc((SV *) hash);
	return ret;
}

SV *
perl_ARCharMenuStruct( ARControlStruct *ctrl, ARCharMenuStruct *p ){

support.c  view on Meta::CPAN

			}
			break;
		case AR_CHAR_MENU_SQL:
		case AR_CHAR_MENU_SS:
		case AR_CHAR_MENU_FILE:
		case AR_CHAR_MENU_DATA_DICTIONARY:
		case AR_CHAR_MENU_QUERY:
			ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, ": Unsupported case" );
			ret = &PL_sv_undef;
			break;
		default:
			ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, ": Invalid case" );
			ret = &PL_sv_undef;
			break;
		}
	}
	return ret;
}

#if AR_CURRENT_API_VERSION >= 13
SV *

supportrev.c  view on Meta::CPAN

	rv += strcpyHVal(h, "displayTag", d->displayTag, AR_MAX_NAME_SIZE);
	rv += strcpyHVal(h, "label", d->label, AR_MAX_NAME_SIZE);
	rv += intcpyHVal(h, "x", &(d->x));
	rv += intcpyHVal(h, "y", &(d->y));
	rv += uintcpyHVal(h, "length", &(d->length));
	rv += uintcpyHVal(h, "numRows", &(d->numRows));

	/* variables that need some decoding before we store them */

	/*
	 * "option" will be either "VISIBLE" or "HIDDEN" default: Visible
	 */

	if ((rv2 = strcpyHVal(h, "option", buf, sizeof(buf)-1)) == 0) {
		if (strncasecmp(buf, "HIDDEN", sizeof(buf)) == 0)
			d->option = AR_DISPLAY_OPT_HIDDEN;
		else
			d->option = AR_DISPLAY_OPT_VISIBLE;
	} else
		rv += rv2;

	/*
	 * "labelLocation" will be either "Left" or "Top" default: Left
	 */

	if ((rv2 = strcpyHVal(h, "labelLocation", buf, sizeof(buf)-1)) == 0) {
		if (strncasecmp(buf, "Top", sizeof(buf)) == 0)
			d->labelLocation = AR_DISPLAY_LABEL_TOP;
		else
			d->labelLocation = AR_DISPLAY_LABEL_LEFT;
	} else
		rv += rv2;

	/*
	 * "type" will be one of: NONE, TEXT, NUMTEXT, CHECKBOX, CHOICE,
	 * BUTTON default: NONE
	 */

	if ((rv2 = strcpyHVal(h, "type", buf, sizeof(buf)-1)) == 0) {
		if (strncasecmp(buf, "TEXT", sizeof(buf)) == 0)
			d->type = AR_DISPLAY_TYPE_TEXT;
		else if (strncasecmp(buf, "NUMTEXT", sizeof(buf)) == 0)
			d->type = AR_DISPLAY_TYPE_NUMTEXT;
		else if (strncasecmp(buf, "CHECKBOX", sizeof(buf)) == 0)
			d->type = AR_DISPLAY_TYPE_CHECKBOX;
		else if (strncasecmp(buf, "CHOICE", sizeof(buf)) == 0)

supportrev.c  view on Meta::CPAN

			m->u.currencyVal = (ARCurrencyStruct*) MALLOCNN(sizeof(ARCurrencyStruct));
			if( sv_to_ARCurrencyStruct(ctrl,*val,m->u.currencyVal) == -1 )
				return -1;
			break;
		case AR_DATA_TYPE_VIEW:
		case AR_DATA_TYPE_DISPLAY:
			if (strmakHVal(h, k, &(m->u.charVal)) == -1)
				return -1;
			break;
#endif
		default:
			ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL,
				    "rev_ARValueStruct: unknown data type:");
			ARError_add(AR_RETURN_WARNING, AP_ERR_CONTINUE,
				    tp);
			return -2;
		}
		return 0;
	}
	ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL,
		 "rev_ARValueStruct: hash value(s) were invalid for keys:");

supportrev.c  view on Meta::CPAN

								
									}else{
										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARReferenceStruct: hash value is not a hash reference" );
										return -1;
									}
								
								
								}
								break;
				
							default:
								sprintf( errText, "rev_ARReferenceStruct: invalid switch value %d", p->reference.dataType );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				
				
					if( SvTYPE(SvRV(*val)) == SVt_PVHV ){
						int i = 0, num = 0;

supportrev.c  view on Meta::CPAN

								
									}else{
										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARCharMenuItemStruct: hash value is not a hash reference" );
										return -1;
									}
								
								
								}
								break;
				
							default:
								sprintf( errText, "rev_ARCharMenuItemStruct: invalid switch value %d", p->menuType );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				
				
					if( SvTYPE(SvRV(*val)) == SVt_PVHV ){
						int i = 0, num = 0;

supportrev_generated.c  view on Meta::CPAN

								
									}else{
										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARBulkEntryReturn: hash value is not a hash reference" );
										return -1;
									}
								
								
								}
								break;
				
							default:
								sprintf( errText, "rev_ARBulkEntryReturn: invalid switch value %d", p->entryCallType );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				}
			}else{
				ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, "rev_ARBulkEntryReturn: hv_fetch returned null");
				return -2;

supportrev_generated.c  view on Meta::CPAN

										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARCOMValueStruct: hash value is not a hash reference" );
										return -1;
									}
								
								
								}
								break;
				
							case AR_COM_PARM_NULL:
								break;
							default:
								sprintf( errText, "rev_ARCOMValueStruct: invalid switch value %d", p->valueType );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				
				
					if( SvTYPE(SvRV(*val)) == SVt_PVHV ){
						int i = 0, num = 0;

supportrev_generated.c  view on Meta::CPAN

						SV **val;
						strncpy( k, "storageOptionForCLOB", 255 );
						val = hv_fetch( h, "storageOptionForCLOB", 20, 0 );
						if( val && *val && SvOK(*val) ){
							{
								int flag = 0;
								if( !strcmp(SvPV_nolen(*val),"inrow") ){
									p->storageOptionForCLOB = AR_STORE_OPT_INROW;
									flag = 1;
								}
								if( !strcmp(SvPV_nolen(*val),"default") ){
									p->storageOptionForCLOB = AR_STORE_OPT_DEF;
									flag = 1;
								}
								if( !strcmp(SvPV_nolen(*val),"outrow") ){
									p->storageOptionForCLOB = AR_STORE_OPT_OUTROW;
									flag = 1;
								}
								if( flag == 0 ){
									ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL,  "rev_ARCharLimitsStruct: invalid key value" );
									ARError_add( AR_RETURN_ERROR, AP_ERR_CONTINUE, SvPV_nolen(*val) );

supportrev_generated.c  view on Meta::CPAN

								}
								break;
				
				
							case AR_CHAR_MENU_DD_FORM:
								{
									rev_ARCharMenuDDFormStruct( ctrl, h, k, &(p->u.formDefn) );
								}
								break;
				
							default:
								sprintf( errText, "rev_ARCharMenuDDStruct: invalid switch value %d", p->structType );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				
				
					if( SvTYPE(SvRV(*val)) == SVt_PVHV ){
						int i = 0, num = 0;

supportrev_generated.c  view on Meta::CPAN

									}
								
								
								}
								break;
				
							case AR_SCHEMA_REGULAR:
								break;
							case AR_SCHEMA_DIALOG:
								break;
							default:
								sprintf( errText, "rev_ARCompoundSchema: invalid switch value %d", p->schemaType );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				}
			}else{
				ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, "rev_ARCompoundSchema: hv_fetch returned null");
				return -2;

supportrev_generated.c  view on Meta::CPAN

											
												}else{
													ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_AREnumLimitsStruct: hash value is not a hash reference" );
													return -1;
												}
											
											
											}
											break;
							
										default:
											sprintf( errText, "rev_AREnumLimitsStruct: invalid switch value %d", p->listStyle );
											ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
										}
							
								}
							
							}
						}else{
							ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "hv_fetch error: key \"enumLimits\"" );
							return -1;

supportrev_generated.c  view on Meta::CPAN

								
									}else{
										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_AREscalationTmStruct: hash value is not a hash reference" );
										return -1;
									}
								
								
								}
								break;
				
							default:
								sprintf( errText, "rev_AREscalationTmStruct: invalid switch value %d", p->escalationTmType );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				}
			}else{
				ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, "rev_AREscalationTmStruct: hv_fetch returned null");
				return -2;

supportrev_generated.c  view on Meta::CPAN

								}
								break;
				
				
							case AR_DATA_TYPE_REAL:
								{
									rev_ARRealLimitsStruct( ctrl, h, k, &(p->u.realLimits) );
								}
								break;
				
							default:
								sprintf( errText, "rev_ARFieldLimitStruct: invalid switch value %d", p->dataType );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				}
			}else{
				ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, "rev_ARFieldLimitStruct: hv_fetch returned null");
				return -2;

supportrev_generated.c  view on Meta::CPAN

									}
								
								
								}
								break;
				
							case AR_FIELD_REGULAR:
								break;
							case AR_FIELD_NONE:
								break;
							default:
								sprintf( errText, "rev_ARFieldMappingStruct: invalid switch value %d", p->fieldType );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				}
			}else{
				ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, "rev_ARFieldMappingStruct: hv_fetch returned null");
				return -2;

supportrev_generated.c  view on Meta::CPAN

								
									}else{
										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARFieldValueOrArithStruct: hash value is not a hash reference" );
										return -1;
									}
								
								
								}
								break;
				
							default:
								sprintf( errText, "rev_ARFieldValueOrArithStruct: invalid switch value %d", p->tag );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				}
			}else{
				ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, "rev_ARFieldValueOrArithStruct: hv_fetch returned null");
				return -2;

supportrev_generated.c  view on Meta::CPAN

										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARFilterActionStruct: hash value is not a hash reference" );
										return -1;
									}
								
								
								}
								break;
				#endif
							case AR_FILTER_ACTION_NONE:
								break;
							default:
								sprintf( errText, "rev_ARFilterActionStruct: invalid switch value %d", p->action );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				}
			}else{
				ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, "rev_ARFilterActionStruct: hv_fetch returned null");
				return -2;

supportrev_generated.c  view on Meta::CPAN

								
									}else{
										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARMultiSchemaFieldFuncValueOrArithStruct: hash value is not a hash reference" );
										return -1;
									}
								
								
								}
								break;
				
							default:
								sprintf( errText, "rev_ARMultiSchemaFieldFuncValueOrArithStruct: invalid switch value %d", p->tag );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				}
			}else{
				ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, "rev_ARMultiSchemaFieldFuncValueOrArithStruct: hv_fetch returned null");
				return -2;

supportrev_generated.c  view on Meta::CPAN

								
									}else{
										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARMultiSchemaFieldValueOrArithStruct: hash value is not a hash reference" );
										return -1;
									}
								
								
								}
								break;
				#endif
							default:
								sprintf( errText, "rev_ARMultiSchemaFieldValueOrArithStruct: invalid switch value %d", p->tag );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				}
			}else{
				ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, "rev_ARMultiSchemaFieldValueOrArithStruct: hv_fetch returned null");
				return -2;

supportrev_generated.c  view on Meta::CPAN

										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARMultiSchemaFuncQualifierStruct: hash value is not a hash reference" );
										return -1;
									}
								
								
								}
								break;
				
							case AR_COND_OP_NONE:
								break;
							default:
								sprintf( errText, "rev_ARMultiSchemaFuncQualifierStruct: invalid switch value %d", p->operation );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				}
			}else{
				ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, "rev_ARMultiSchemaFuncQualifierStruct: hv_fetch returned null");
				return -2;

supportrev_generated.c  view on Meta::CPAN

								
									}else{
										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARMultiSchemaFuncQueryFromStruct: hash value is not a hash reference" );
										return -1;
									}
								
								
								}
								break;
				
							default:
								sprintf( errText, "rev_ARMultiSchemaFuncQueryFromStruct: invalid switch value %d", p->type );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				
				
					if( SvTYPE(SvRV(*val)) == SVt_PVHV ){
						int i = 0, num = 0;

supportrev_generated.c  view on Meta::CPAN

										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARMultiSchemaQualifierStruct: hash value is not a hash reference" );
										return -1;
									}
								
								
								}
								break;
				
							case AR_COND_OP_NONE:
								break;
							default:
								sprintf( errText, "rev_ARMultiSchemaQualifierStruct: invalid switch value %d", p->operation );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				}
			}else{
				ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, "rev_ARMultiSchemaQualifierStruct: hv_fetch returned null");
				return -2;

supportrev_generated.c  view on Meta::CPAN

								
									}else{
										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARMultiSchemaQueryFromStruct: hash value is not a hash reference" );
										return -1;
									}
								
								
								}
								break;
				
							default:
								sprintf( errText, "rev_ARMultiSchemaQueryFromStruct: invalid switch value %d", p->type );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				
				
					if( SvTYPE(SvRV(*val)) == SVt_PVHV ){
						int i = 0, num = 0;

supportrev_generated.c  view on Meta::CPAN

										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARQualifierStruct: hash value is not a hash reference" );
										return -1;
									}
								
								
								}
								break;
				
							case AR_COND_OP_NONE:
								break;
							default:
								sprintf( errText, "rev_ARQualifierStruct: invalid switch value %d", p->operation );
								ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
							}
				
					}
				
				}
			}else{
				ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL, "rev_ARQualifierStruct: hv_fetch returned null");
				return -2;

t/11entry.t  view on Meta::CPAN

#!./perl

# 
# test out creating/retrieving lots of entries 
# to test for memory leaks. by default, we bypass this test
# because it takes a long time and the user needs to do
# extra work to watch process-size, etc.


use ARS;
require './t/config.cache';

# notice the use of a custom error handler.

sub mycatch {

t/aptest.def  view on Meta::CPAN

   create-mode    : 2
   option         : 1
   timestamp      : 921172917
   owner          : jcmurphy
   last-changed   : jcmurphy
   enum-value     : New
   enum-value     : Assigned
   enum-value     : Fixed
   enum-value     : Rejected
   enum-value     : Closed
   default        : 0
   permission     : 3\1
   permission     : 4\2
 display-instance : 536870912\10\20\4\6\Status\64\6\1\61\40\0\60\40\1\3\41\1\1000\17500\4\6\1\28\6\4\29\6\1\27\6\16\7\40\2147483646\
}
field {
   id             : 8
   name           : Short Description
   datatype       : 4
   fieldtype      : 1
   create-mode    : 1

t/aptest40.def  view on Meta::CPAN

   create-mode    : 2
   option         : 1
   timestamp      : 921173121
   owner          : jcmurphy
   last-changed   : jcmurphy
   enum-value     : New
   enum-value     : Assigned
   enum-value     : Fixed
   enum-value     : Rejected
   enum-value     : Closed
   default        : 0
   permission     : 3\1
   permission     : 4\2
 display-instance : 536870912\16\20\4\6\Status\64\6\1\61\40\0\60\40\1\3\41\2\990\17468\34200\19093\4\6\1\28\6\4\29\6\1\27\8\16\7\40\2147483646\143\40\4294967295\170\40\0\21\41\2&
 display-instance : \0\325\3960\1625\151\41\2\4410\325\33210\1625\65\41\2\0\0\0\0\66\41\2\0\0\0\0\
}
field {
   id             : 8
   name           : Short Description
   datatype       : 4
   fieldtype      : 1

t/aptest45.def  view on Meta::CPAN

#  File exported Wed Oct 24 13:38:14 2001
#
begin schema
   name           : ARSperl Test
   core-version   : 2
   upgrade-version: 0
   num-fields     : 10
   timestamp      : 1003943015
   owner          : jcmurphy
   last-changed   : jcmurphy
   default-vui    : Default Administrator View
   num-vuis       : 1
   export-version : 5
   schema-type    : 1
   next-field-id  : 536870915
vui  {
   id             : 536870912
   name           : Default Administrator View
   label          : Default Administrator View
   timestamp      : 0
   owner          : jcmurphy

t/aptest45.def  view on Meta::CPAN

   create-mode    : 2
   option         : 1
   timestamp      : 1003943015
   owner          : jcmurphy
   last-changed   : jcmurphy
   enum-value     : New
   enum-value     : Assigned
   enum-value     : Fixed
   enum-value     : Rejected
   enum-value     : Closed
   default        : 0
   permission     : 3\1
   permission     : 4\2
 display-instance : 536870912\16\20\4\6\Status\64\6\1\61\40\0\60\40\1\3\41\2\990\17468\34200\19093\4\6\1\28\6\4\29\6\1\27\8\16\7\40\2147483646\143\40\4294967295\170\40\0\21\41\2&
 display-instance : \0\325\3960\1625\151\41\2\4410\325\33210\1625\65\41\2\0\0\0\0\66\41\2\0\0\0\0\
}
field {
   id             : 8
   name           : Short Description
   datatype       : 4
   fieldtype      : 1



( run in 1.832 second using v1.01-cache-2.11-cpan-0a6323c29d9 )