ARSperl

 view release on metacpan or  search on metacpan

ARS.xs  view on Meta::CPAN

	ARControlStruct *	ctrl
	SV * in
	CODE:
	{
	  ARQualifierStruct *qual;
	  HV *h_dummy;
	  HV *h;
	  int rv = 0;	  

	  AMALLOCNN(qual, 1, ARQualifierStruct);
	  (void) ARError_reset();

	  if( SvTYPE(SvRV(in)) != SVt_PVHV ){
		  ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARQualifierStruct: not a hash value" );
		  RETVAL = NULL;
		  goto ars_qualifier_ptr_end;
	  }
	  h = (HV* ) SvRV((SV*) in);
	  if( ! SvTRUE(hv_scalar(h)) ){
		  RETVAL = qual;
		  goto ars_qualifier_ptr_end;

ARS.xs  view on Meta::CPAN

	char *			schema
	char *			qualstring
	char *			displayTag
	CODE:
	{
		int                ret = 0;
		ARStatusList       status;
		ARQualifierStruct *qual;
		AMALLOCNN(qual, 1, ARQualifierStruct);
		Zero(&status, 1, ARStatusList);
		(void) ARError_reset();
		ret = ARLoadARQualifierStruct(ctrl, schema, displayTag, qualstring, qual, &status);
#ifdef PROFILE
		((ars_ctrl *)ctrl)->queries++;
#endif
		if (! ARError( ret, status)) {
			RETVAL = qual;
		} else {
			RETVAL = NULL;
			FreeARQualifierStruct(qual, TRUE);
		}

ARS.xs  view on Meta::CPAN

void
__ars_Termination()
	CODE:
	{
#if AR_EXPORT_VERSION <= 3
	  int          ret;
#endif
	  ARStatusList status;
	  
	  Zero(&status, 1, ARStatusList);
	  (void) ARError_reset();
#if AR_EXPORT_VERSION <= 3
	  ret = ARTermination(&status);
	  if (ARError( ret, status)) {
	    warn("failed in ARTermination\n");
	  }
#else
	  (void) ARError_add(AR_RETURN_ERROR, AP_ERR_DEPRECATED, "__ars_Termination() is only available when compiled against ARS <= 3.2");
#endif
	}

void
__ars_init()
	CODE:
	{
#if AR_EXPORT_VERSION <= 3
	  int          ret;
#endif
	  ARStatusList status;
	
	  Zero(&status, 1, ARStatusList);
	  (void) ARError_reset();
#if AR_EXPORT_VERSION <= 3
	  ret = ARInitialization(&status);
	  if (ARError( ret, status)) {
	    croak("unable to initialize ARS module");
	  }
#else
	  (void) ARError_add(AR_RETURN_ERROR, AP_ERR_DEPRECATED, "__ars_init() is only available when compiled against ARS <= 3.2");
#endif
	}

ARS.xs  view on Meta::CPAN

	char *			name
	int			port
	int			progNum
	CODE:
	{
		int 		ret = 0;
		ARStatusList	status;

		RETVAL = 0;
		Zero(&status, 1, ARStatusList);
		(void) ARError_reset();
#if AR_EXPORT_VERSION >= 4
		ret = ARSetServerPort(ctrl, name, port, progNum, &status);
		if (! ARError(ret, status)) {
			RETVAL = 1;
		}
#else
		(void) ARError_add( AR_RETURN_ERROR, AP_ERR_DEPRECATED, 
		"ars_SetServerPort() is only available in ARS >= 4.x");
#endif
	}

ARS.xs  view on Meta::CPAN

			SAFEPRT(password),
			SAFEPRT(lang),
			SAFEPRT(authString),
			tcpport,
			rpcnumber) 
		    );

		RETVAL = NULL;
		Zero(&status, 1, ARStatusList);
		Zero(&serverList, 1, ARServerNameList);
		(void) ARError_reset();  
#ifdef PROFILE
	  /* XXX
	     This is something of a hack... a safemalloc will always
	     complain about differing structures.  However, it's 
	     pretty deep into the code.  Perhaps a static would be cleaner?
	  */
		ctrl = (ARControlStruct *)MALLOCNN(sizeof(ars_ctrl));
		Zero(ctrl, 1, ars_ctrl);
		((ars_ctrl *)ctrl)->queries = 0;
		((ars_ctrl *)ctrl)->startTime = 0;
		((ars_ctrl *)ctrl)->endTime = 0;
#else
		DBG( ("safemalloc ARControlStruct\n") );
		ctrl = (ARControlStruct *)safemalloc(sizeof(ARControlStruct));

ARS.xs  view on Meta::CPAN

ars_VerifyUser(ctrl)
	ARControlStruct *	ctrl
	CODE:
	{
		int ret = 0;
		ARBoolean	adminFlag  = 0,
				subAdminFlag = 0,
				customFlag   = 0; 
		ARStatusList status;

		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);

		ret = ARVerifyUser( ctrl, &adminFlag, &subAdminFlag, &customFlag, &status );

		/* printf( "ret = %d, adminFlag = %d, subAdminFlag = %d, customFlag = %d\n",
			ret, adminFlag, subAdminFlag, customFlag ); */

		if(! ARError(ret, status)) {
		    RETVAL = newHV();
		    sv_2mortal( (SV*) RETVAL );

ARS.xs  view on Meta::CPAN

		}
	}
	OUTPUT:
	RETVAL

void
ars_GetControlStructFields(ctrl)
	ARControlStruct *	ctrl
	PPCODE:
	{
	   (void) ARError_reset();
	   if(!ctrl) return;
	   XPUSHs(sv_2mortal(newSViv(ctrl->cacheId)));
	   XPUSHs(sv_2mortal(newSViv(ctrl->operationTime)));
	   XPUSHs(sv_2mortal(newSVpv(ctrl->user, 0)));
	   XPUSHs(sv_2mortal(newSVpv(ctrl->password, 0)));
#ifndef AR_MAX_LOCALE_SIZE
	   XPUSHs(sv_2mortal(newSVpv(ctrl->language, 0)));
#else
	   XPUSHs(sv_2mortal(newSVpv(ctrl->localeInfo.locale, 0)));
#endif

ARS.xs  view on Meta::CPAN

	   XPUSHs(sv_2mortal(newSVpv(ctrl->authString, 0)));
#endif
	}

SV *
ars_GetCurrentServer(ctrl)
	ARControlStruct *	ctrl
	CODE:
	{
	  RETVAL = NULL;
	  (void) ARError_reset();
	  if(ctrl && ctrl->server) {
	    RETVAL = newSVpv( ctrl->server, strlen(ctrl->server) );
	  } 
	}
	OUTPUT:
	RETVAL

HV *
ars_GetProfileInfo(ctrl)
	ARControlStruct *	ctrl
	CODE:
	{
	  RETVAL = newHV();
	  sv_2mortal( (SV*) RETVAL );
	  (void) ARError_reset();
#ifdef PROFILE
	  hv_store(RETVAL,  "queries", strlen("queries") , 
	  	   newSViv(((ars_ctrl *)ctrl)->queries), 0);
	  hv_store(RETVAL,  "startTime", strlen("startTime") , 
		   newSViv(((ars_ctrl *)ctrl)->startTime), 0);
#else /* profiling not compiled in */
	  (void) ARError_add( AR_RETURN_ERROR, AP_ERR_OPT_NA, 
			     "Optional profiling code not compiled into this build of ARSperl");
#endif
	}

ARS.xs  view on Meta::CPAN

	RETVAL

void
ars_Logoff(ctrl)
	ARControlStruct *	ctrl
	CODE:
	{
		int          ret = 0;
		ARStatusList status;
		Zero(&status, 1, ARStatusList);
		(void) ARError_reset();
		if (!ctrl) return;
#if AR_EXPORT_VERSION >= 4
		ret = ARTermination(ctrl, &status);
#else
		ret = ARTermination(&status);
#endif
		(void) ARError( ret, status);
		/*AP_FREE(ctrl); let DESTROY free it*/
	}

ARS.xs  view on Meta::CPAN

	ARControlStruct *	control
	char *			schema
	unsigned long		changedsince
	unsigned long		fieldType
	PPCODE:
	{
	  ARInternalIdList idlist;
	  ARStatusList     status;
	  int              ret = 0;
	  unsigned int     i = 0;
	  (void) ARError_reset();
	  Zero(&idlist, 1, ARInternalIdList);
	  Zero(&status, 1, ARStatusList);
#if AR_EXPORT_VERSION >= 3
	  ret = ARGetListField(control,schema,
	  			fieldType,
	  			changedsince,
#if AR_CURRENT_API_VERSION >= 17
				NULL,   /* &objPropList (undocumented by BMC) */
#endif
	  			&idlist,

ARS.xs  view on Meta::CPAN

	ARControlStruct *	control
	char *			schema
	char *			field_name
	PPCODE:
	{
	  int              ret = 0;
	  unsigned int     loop = 0;
	  ARInternalIdList idList;
	  ARStatusList     status;
	  ARNameType       fieldName;
	  (void) ARError_reset();
	  Zero(&idList, 1, ARInternalIdList);
	  Zero(&status, 1, ARStatusList);
	  ret = ARGetListField(control, schema,
	  			AR_FIELD_TYPE_ALL, 
	  			(ARTimestamp)0,
#if AR_CURRENT_API_VERSION >= 17
				NULL,   /* &objPropList (undocumented by BMC) */
#endif
	  			&idList,
	  			&status);

ARS.xs  view on Meta::CPAN

	char *			schema
	PPCODE:
	{
	  int              ret = 0;
	  unsigned int     loop = 0;
	  HV   *fields, *h;
	  char *hkey;
	  SV   *hval, **hvalName;
	  I32  klen;

	  (void) ARError_reset();

	  fields = fieldcache_get_schema_fields( ctrl, schema, TRUE );
	  if( ! fields ){
		goto get_fieldtable_end;
	  }

	  hv_iterinit( fields );
	  while( (hval = hv_iternextsv(fields,&hkey,&klen)) ){
		if( strcmp(hkey,"0") == 0 )  continue;
		h = (HV* ) SvRV(hval);

ARS.xs  view on Meta::CPAN

			    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);
	  } else {

	    cacheFields = fieldcache_get_schema_fields( ctrl, schema, FALSE );
	    if( ! cacheFields ){

ARS.xs  view on Meta::CPAN


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

ARS.xs  view on Meta::CPAN

	char *			schema
	char *			entry_id
	CODE:
	{
	  int            ret = 0;
	  ARStatusList   status;
#if AR_EXPORT_VERSION >= 3
	  AREntryIdList  entryList;

	  RETVAL = 0; /* assume error */
	  (void) ARError_reset();
	  Zero(&status, 1, ARStatusList);
	  if(perl_BuildEntryList(ctrl, &entryList, entry_id) != 0)
		goto delete_fail;
	  ret = ARDeleteEntry(ctrl, schema, &entryList, 0, &status);
	  if (entryList.entryIdList) AP_FREE(entryList.entryIdList);
#else /* ARS 2 */
	  RETVAL = 0; /* assume error */
	  if(!entry_id || !*entry_id) {
		ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_EID);
		goto delete_fail;

ARS.xs  view on Meta::CPAN

	char *			locFile
	PPCODE:
	{
		ARStatusList    status;
		AREntryIdList   entryList;
#if AR_EXPORT_VERSION >= 4
		ARLocStruct     loc;
#endif
		int		ret = 0;

		(void) ARError_reset();
		Zero(&entryList, 1, AREntryIdList);
		Zero(&status, 1, ARStatusList);
#if AR_EXPORT_VERSION >= 4
		/* build entryList */
	 	ret = perl_BuildEntryList(ctrl, &entryList, entry_id);
		if(ret)
			goto get_entryblob_end;
		switch(locType) {
		case AR_LOC_FILENAME:
			if(locFile == NULL) {

ARS.xs  view on Meta::CPAN

	{
	  int               ret = 0;
	  unsigned int      c = items - 3, i;
	  ARInternalIdList  idList;
	  ARFieldValueList  fieldList;
	  ARStatusList      status;
#if AR_EXPORT_VERSION >= 3
	  AREntryIdList     entryList;
#endif

	  (void) ARError_reset();
	  Zero(&idList, 1, ARInternalIdList);
	  Zero(&fieldList, 1, ARFieldValueList);
	  Zero(&status, 1, ARStatusList);
	  if (c < 1) {
	    idList.numItems = 0; /* get all fields */
	  } else {
	    idList.numItems = c;
	    idList.internalIdList = MALLOCNN(sizeof(ARInternalId) * c);
	    if (!idList.internalIdList)
	      goto get_entry_end;

ARS.xs  view on Meta::CPAN

	  int              field_off    = 5;
	  int              staticParams = field_off;
	  ARSortList       sortList;
	  AREntryListList  entryList;
	  ARStatusList     status;
	  int              ret = 0;
#if AR_EXPORT_VERSION >= 3
	  AREntryListFieldList getListFields, *getList = NULL;
	  AV              *getListFields_array;
	
	  (void) ARError_reset();
	  Zero(&status, 1, ARStatusList);
	  Zero(&entryList, 1, AREntryListList);
	  Zero(&sortList, 1, ARSortList);

	  if ((items - staticParams) % 2) {
		/* odd number of arguments, so argument after maxRetrieve is
		optional getListFields (an array of hash refs) */
	
		if (SvROK(ST(field_off)) &&
			(getListFields_array = (AV *)SvRV(ST(field_off))) &&

ARS.xs  view on Meta::CPAN

			}
		} else {
			(void) ARError_add( AR_RETURN_ERROR, AP_ERR_LFLDS_TYPE);
			goto getlistentry_end;
		}
		/* increase the offset of the first sortList field by one */
		field_off ++;
	  }
#else  /* ARS 2 */
	  Zero(&status, 1,ARStatusList);
	  (void) ARError_reset();
	  if ((items - staticParms) % 2) {
		(void) ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS);
		goto getlistentry_end;
	  }
#endif /* if ARS >= 3 */
	
	  /* build sortList */
	  Zero(&sortList, 1, ARSortList);
	  if (c) {
	  	sortList.numItems = c;

ARS.xs  view on Meta::CPAN

	  ARPropList propList;
#endif
#if AR_EXPORT_VERSION >= 6
	  ARInternalIdList idList;

	  Zero(&idList, 1, ARInternalIdList);	  
#endif
#if AR_EXPORT_VERSION >= 8L
	  Zero(&propList, 1, ARPropList);
#endif
	  (void) ARError_reset();
	  Zero(&status, 1, ARStatusList);
#if AR_EXPORT_VERSION >= 6
	  if (fieldIdList && (SvTYPE(fieldIdList) == SVt_PVAV)) {
		idList.numItems = av_len(fieldIdList) + 1;
		AMALLOCNN(idList.internalIdList, idList.numItems, ARInternalId);
		for (i = 0 ; i < idList.numItems ; i++ ) {
			SV **array_entry;
			if ((array_entry = av_fetch(fieldIdList, i, 0)) &&
			    SvROK(*array_entry)                         &&
		 	    (SvTYPE(*array_entry) == SVt_PVIV) ) {

ARS.xs  view on Meta::CPAN

void
ars_GetListContainer(ctrl,changedSince=0,attributes=0,...)
	ARControlStruct *	ctrl
	ARTimestamp		changedSince
	unsigned int		attributes
	PPCODE:
	{
	  ARStatusList 		status;
	  int          		i, ret, rv = 0;

	  (void) ARError_reset();	  
	  Zero(&status, 1, ARStatusList);

	  if(items < 1 || items > 200){  /* don't overflow clist[] */
		(void) ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS);
	  }else{
	  	ARContainerTypeList	containerTypes;
		int			count;
		int clist[256];
		ARContainerOwnerObjList ownerObjList;
# if AR_EXPORT_VERSION >= 8L

ARS.xs  view on Meta::CPAN

	  char                   *helpText = CPNULL;
	  ARAccessNameType        owner;
	  ARTimestamp             timestamp;
	  ARAccessNameType        lastChanged;
	  char                   *changeDiary = CPNULL;
	  ARPropList              objPropList;
	  int            tlist[] = {ARREF_ALL};
	  /* int                     i; */
	  ARDiaryList             diaryList;

	  (void) ARError_reset();
	  Zero(&status, 1, ARStatusList);
	  Zero(&refTypes, 1, ARReferenceTypeList);
	  Zero(&assignedGroupList, 1, ARPermissionList);
	  Zero(&groupList, 1, ARPermissionList);
	  Zero(&adminGroupList, 1, ARInternalIdList);
	  Zero(&ownerObjList, 1, ARContainerOwnerObjList);
	  Zero(&references, 1, ARReferenceList);
	  Zero(owner, 1, ARAccessNameType);
	  Zero(&timestamp, 1, ARTimestamp);
	  Zero(&objPropList, 1, ARPropList);

ARS.xs  view on Meta::CPAN

void
ars_GetListServer()
	PPCODE:
	{
	  ARServerNameList serverList;
	  ARStatusList     status;
	  int              ret = 0;
          unsigned int     i = 0;
	  ARControlStruct  ctrl;

	  (void) ARError_reset();  
	  Zero(&serverList, 1, ARServerNameList);
	  Zero(&status, 1, ARStatusList);
	  Zero(&ctrl, 1, ARControlStruct);
#if AR_EXPORT_VERSION >= 4
	  /* this function can be called without a control struct 
	   * (or even before a control struct is available).
	   * we will create a bogus control struct, initialize it
	   * and execute the function. this seems to work fine.
	   */
	  ARInitialization(&ctrl, &status);

ARS.xs  view on Meta::CPAN

	  ARAccessNameType    owner;
	  ARAccessNameType    lastChanged;
	  char            *changeDiary = CPNULL;
	  ARStatusList     status;
	  SV              *ref;
	  ARQualifierStruct *query;
	  ARDiaryList      diaryList;

	  AMALLOCNN(query,1,ARQualifierStruct);

	  (void) ARError_reset();
	  Zero(&assignedGroupList, 1, ARInternalIdList);
	  Zero(&groupList, 1, ARInternalIdList);
	  Zero(&timestamp, 1, ARTimestamp);
	  Zero(owner, 1, ARAccessNameType);
	  Zero(lastChanged, 1, ARAccessNameType);
	  Zero(&diaryList, 1, ARDiaryList);
	  Zero(&status, 1, ARStatusList);
	  Zero(&actionList, 1, ARActiveLinkActionList);
	  Zero(&elseList, 1, ARActiveLinkActionList);
	  Zero(&schemaList, 1, ARWorkflowConnectStruct);

ARS.xs  view on Meta::CPAN

				&schemaList,  /* new in 4.5 */
#if AR_CURRENT_API_VERSION >= 17
				&assignedGroupList,
#endif
				&groupList,
				&executeMask, &controlField, &focusField,
				&enable, query, &actionList, &elseList, &helpText,
				&timestamp, owner, lastChanged, &changeDiary, 
				&objPropList, /* new in 4.5 */
#if AR_CURRENT_API_VERSION >= 14
				NULL,         /* errorActlinkOptions, reserved for future use */
				NULL,         /* errorActlinkName,    reserved for future use */
#endif
				&status);
#ifdef PROFILE
	  ((ars_ctrl *)ctrl)->queries++;
#endif

	  if (!ARError( ret,status)) {
	  RETVAL = newHV();
	  sv_2mortal( (SV*) RETVAL );	  	  
		hv_store(RETVAL,  "name", strlen("name") , newSVpv(name, 0), 0);

ARS.xs  view on Meta::CPAN

	  ARDiaryList      diaryList;
	  ARWorkflowConnectStruct  schemaList;
	  ARPropList       objPropList;
#if AR_CURRENT_API_VERSION >= 13
	  unsigned int errorFilterOptions;
	  ARNameType   errorFilterName;
#endif

	  AMALLOCNN(query,1,ARQualifierStruct);

	  (void) ARError_reset();
	  Zero(&actionList, 1, ARFilterActionList);
	  Zero(&elseList, 1, ARFilterActionList);
	  Zero(&timestamp, 1, ARTimestamp);
	  Zero(owner, 1, ARAccessNameType);
	  Zero(lastChanged, 1, ARAccessNameType);
	  Zero(&diaryList, 1, ARDiaryList);
	  Zero(&status, 1,ARStatusList);
	  Zero(&schemaList, 1, ARWorkflowConnectStruct);
	  Zero(&objPropList, 1, ARPropList);
#if AR_CURRENT_API_VERSION >= 13

ARS.xs  view on Meta::CPAN

ars_GetServerStatistics(ctrl,...)
	ARControlStruct *	ctrl
	PPCODE:
	{
	  ARServerInfoRequestList requestList;
	  ARServerInfoList        serverInfo;
	  int                     i = 0, ret = 0;
          unsigned int            ui = 0;
	  ARStatusList            status;

	  (void) ARError_reset();
	  Zero(&requestList, 1, ARServerInfoRequestList);
	  Zero(&serverInfo, 1, ARServerInfoList);
	  Zero(&status, 1, ARStatusList);
	  if(items < 1) {
		(void) ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS);
	  } else {
		requestList.numItems = items - 1;
		AMALLOCNN(requestList.requestList,(items-1),unsigned int);
		if(requestList.requestList) {
			for(i=1; i<items; i++) {

ARS.xs  view on Meta::CPAN

	  }
	}


HV *
ars_GetCharMenu(ctrl,name)
	ARControlStruct *	ctrl
	char *			name
	CODE:
	{
	  unsigned int       refreshCode = 0;
	  ARCharMenuStruct   menuDefn;
	  char	            *helpText = CPNULL;
	  ARTimestamp	     timestamp;
	  ARAccessNameType	     owner;
	  ARAccessNameType	     lastChanged;
	  char		    *changeDiary = CPNULL;
	  ARStatusList	     status;
	  int                ret = 0, i = 0;
	  HV		    *menuDef = newHV();
	  /* SV		    *ref; */
	  ARDiaryList        diaryList;
	  ARPropList         objPropList;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(&objPropList, 1, ARPropList);
	  Zero(&menuDefn, 1, ARCharMenuStruct);
	  Zero(&timestamp, 1, ARTimestamp);
	  Zero(owner, 1, ARAccessNameType);
	  Zero(lastChanged, 1, ARAccessNameType);
	  Zero(&diaryList, 1, ARDiaryList);
	  RETVAL = newHV();
	  sv_2mortal( (SV*) RETVAL );
	  ret = ARGetCharMenu(ctrl, name, &refreshCode, &menuDefn, &helpText, 
			      &timestamp, owner, lastChanged, &changeDiary, 
			      &objPropList,
			      &status);
#ifdef PROFILE
	  ((ars_ctrl *)ctrl)->queries++;
#endif
	  if(!ARError( ret, status)) {
		hv_store(RETVAL,  "name", strlen("name") , newSVpv(name, 0), 0);
		if(helpText)
			hv_store(RETVAL,  "helpText", strlen("helpText") , newSVpv(helpText,0), 0);

ARS.xs  view on Meta::CPAN

			}
	        }
		for(i = 0; CharMenuTypeMap[i].number != TYPEMAP_LAST; i++) {
			if (CharMenuTypeMap[i].number == menuDefn.menuType)
				break;
		}
		hv_store(RETVAL,  "menuType", strlen("menuType") , 
			   /* PRE-1.68: newSViv(menuDefn.menuType) */
			newSVpv( CharMenuTypeMap[i].name, strlen(CharMenuTypeMap[i].name) )
			, 0);
		hv_store(RETVAL,  "refreshCode", strlen("refreshCode") , 
			perl_MenuRefreshCode2Str(ctrl, refreshCode), 0);
		switch(menuDefn.menuType) {
		case AR_CHAR_MENU_LIST:
			/* hv_store(menuDef,  "charMenuList", strlen("charMenuList") , 
				perl_ARCharMenuList(ctrl,&(menuDefn.u.menuList)), 0 );
			hv_store(RETVAL,  "menuList", strlen("menuList") , 
				newRV_noinc((SV *)menuDef), 0); */

			hv_store(RETVAL,  "menuList", strlen("menuList") , 
				perl_ARCharMenuList(ctrl,&(menuDefn.u.menuList)), 0);
			break;

ARS.xs  view on Meta::CPAN

	ARControlStruct *	ctrl
	char *			name
	ARQualifierStruct *     qual
	CODE:
	{
		ARCharMenuStruct menuDefn;
		ARStatusList     status;
		int              ret;

		RETVAL = &PL_sv_undef;
		(void) ARError_reset();
		Zero(&menuDefn, 1, ARCharMenuStruct);
		Zero(&status, 1,ARStatusList);
		DBG( ("-> ARGetCharMenu\n") );
		ret = ARGetCharMenu(ctrl, name, NULL, &menuDefn, 
					NULL, NULL, NULL, NULL, NULL, 
#if AR_EXPORT_VERSION >= 5
			      		NULL,
#endif
			     		&status);
		DBG( ("<- ARGetCharMenu\n") );

ARS.xs  view on Meta::CPAN

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

ARS.xs  view on Meta::CPAN

	char *			schema
	int			changedSince
	PPCODE:
	{
	  ARNameList   nameList;
	  ARStatusList status;
          ARPropList   propList;
	  int          ret = 0;
          unsigned int i = 0;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(&nameList, 1, ARNameList);
	  Zero(&propList, 1, ARPropList);
#if AR_EXPORT_VERSION >= 8L
	  Zero(&propList, 1, ARPropList);
#endif
	  ret=ARGetListActiveLink(ctrl,schema,changedSince,
#if AR_EXPORT_VERSION >= 8L
                     &propList,
#endif

ARS.xs  view on Meta::CPAN

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

ARS.xs  view on Meta::CPAN

	  char                *checkSum = CPNULL;
	  char                *description = CPNULL;
	  char                *helpText    = CPNULL;
	  ARAccessNameType     owner;
	  ARAccessNameType     lastChanged;
      char                *changeDiary = CPNULL;
	  ARPropList           objPropList;
	  ARDiaryList           diaryList;
	  int                  ret;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(&content, 1, ARImageDataStruct);
	  Zero(&timestamp, 1, ARTimestamp);
	  Zero(owner, 1, ARAccessNameType);
	  Zero(&objPropList, 1, ARPropList);
	  Zero(&diaryList,   1, ARDiaryList);

	  ret = ARGetImage(ctrl, name, 
		 		&content,
		 		&imageType,

ARS.xs  view on Meta::CPAN

	    if(changeDiary) {  AP_FREE(changeDiary);  }
	    if(imageType)   {  AP_FREE(imageType);  }
	    if(checkSum)    { 	AP_FREE(checkSum);  }
	    if(description) {  AP_FREE(description);  }
	    FreeARImageDataStruct(&content, FALSE);
	    FreeARPropList(&objPropList, FALSE);
	  }else{
	    XSRETURN_UNDEF;
	  }
#else	/* prior to ARS 7.5 */
	  (void) ARError_reset();
	  Zero(&status, 1, ARStatusList);
	  (void) ARError_add( AR_RETURN_ERROR, AP_ERR_DEPRECATED,
	  "ars_GetImage() is only available in ARS >= 7.5");
	  XSRETURN_UNDEF;
#endif
	}
	OUTPUT:
	RETVAL


ARS.xs  view on Meta::CPAN

	  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 */
	  if ((items - 4) % 2) {
	    option = SvIV(ST(offset));
	    offset ++;
	  }
	  if (c < 1) {

ARS.xs  view on Meta::CPAN


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

ARS.xs  view on Meta::CPAN

		ARStructItemList structItems;
		char            *buf = CPNULL;
		ARStatusList     status;
#if AR_CURRENT_API_VERSION >= 17
		unsigned int     exportOption = AR_EXPORT_DEFAULT;   /* TODO: support this as ars_Export() argument */
#endif
#if AR_EXPORT_VERSION >= 8L
		ARWorkflowLockStruct workflowLockStruct;
#endif
	  
		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);
		Zero(&structItems, 1, ARStructItemList);
#if AR_EXPORT_VERSION >= 8L
		Zero(&workflowLockStruct, 1, ARWorkflowLockStruct);
#endif
		RETVAL = &PL_sv_undef;
		if ( (items % 2 == 0) || (c < 1) ) {
			(void) ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS);
			ok = 0;
		} else {

ARS.xs  view on Meta::CPAN

	ARControlStruct *	ctrl
	char *			importBuf
	unsigned int            importOption
	CODE:
	{
		int               ret = 1, i = 0, a = 0, c = (items - 2) / 2, ok = 1;
		ARStructItemList *structItems = NULL;
		char             *objectModificationLogLabel = NULL;
		ARStatusList      status;

		(void) ARError_reset();	  
		Zero(&status, 1,ARStatusList);
		RETVAL = 0;
		if ((items-3) % 2) {
			(void) ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS);
			ok = 0;
		} else {
			if (c > 0) {
				AMALLOCNN(structItems, c, ARStructItemList);
				structItems->numItems = c;
				AMALLOCNN(structItems->structItemList, c,

ARS.xs  view on Meta::CPAN

	PPCODE:
	{
	  ARNameList   nameList;
	  ARStatusList status;
#if AR_EXPORT_VERSION >= 8L
	  ARPropList   propList;
#endif
	  int          ret = 0;
	  unsigned int i = 0;

	  (void) ARError_reset();
#if AR_EXPORT_VERSION >= 8L
	  Zero(&propList, 1, ARPropList);
#endif
	  Zero(&nameList, 1, ARNameList);
	  Zero(&status, 1,ARStatusList);
	  ret = ARGetListFilter(control,schema,changedsince,
#if AR_EXPORT_VERSION >= 8L
                               &propList,
#endif
                               &nameList,&status);

ARS.xs  view on Meta::CPAN

	char *			schema
	unsigned long		changedsince
	PPCODE:
	{
	  ARNameList   nameList;
	  ARStatusList status;
	  ARPropList   propList;
	  int          ret = 0;
	  unsigned int i = 0;

	  (void) ARError_reset();
#if AR_EXPORT_VERSION >= 8L
	  Zero(&propList, 1,ARPropList);
#endif
	  Zero(&nameList, 1, ARNameList);
	  Zero(&status, 1,ARStatusList);
	  ret = ARGetListEscalation(control,schema,changedsince,
#if AR_EXPORT_VERSION >= 8L
                                    &propList,
#endif
                                    &nameList,&status);

ARS.xs  view on Meta::CPAN

	  ARNameList   nameList;
	  ARStatusList status;
#if AR_EXPORT_VERSION >= 8L
          ARPropList   propList;
#endif
          ARNameList   schemaNameList;
          ARNameList   actLinkNameList;
	  int          ret = 0;
          unsigned int i = 0;

	  (void) ARError_reset();
#if AR_EXPORT_VERSION >= 8L
	  Zero(&propList, 1, ARPropList);
#endif
	  Zero(&status, 1, ARStatusList);
	  Zero(&schemaNameList, 1, ARNameList);
	  Zero(&actLinkNameList, 1, ARNameList);
	  Zero(&nameList, 1, ARNameList);
	  ret = ARGetListCharMenu(control,changedsince,
#if AR_EXPORT_VERSION >= 8L
                                  &schemaNameList, &actLinkNameList, &propList,

ARS.xs  view on Meta::CPAN

	{
	  ARStatusList     status;
#if AR_CURRENT_API_VERSION >= 14
	  ARNameList       schemaList;
	  ARNameList      *schemaListPtr = NULL;
	  ARNameList       nameList;
	  ARPropList       propList;
	  int              ret = 0, rv = 0;
	  unsigned int     i = 0;

	  (void) ARError_reset();
	  Zero(&propList, 1, ARPropList);
	  Zero(&schemaList, 1, ARNameList);
	  Zero(&nameList, 1, ARNameList);
	  Zero(&status, 1,ARStatusList);

	  if( schema == NULL ){
	    /* do nothing */
	  }else if( SvROK(schema) && SvTYPE(SvRV(schema)) == SVt_PVAV ){
	    HV *h_dummy = newHV();
	    SvREFCNT_inc( schema );

ARS.xs  view on Meta::CPAN

	  }

	  if (rv == 0 && !ARError( ret,status)) {
	    for (i=0; i < nameList.numItems; i++){
	      XPUSHs(sv_2mortal(newSVpv(nameList.nameList[i], 0)));
	    }
	    FreeARNameList(&nameList,FALSE);
	  }
	  FreeARNameList(&schemaList,FALSE);
#else	/* prior to ARS 7.5 */
	  (void) ARError_reset();
	  Zero(&status, 1, ARStatusList);
	  (void) ARError_add( AR_RETURN_ERROR, AP_ERR_DEPRECATED,
	  "ars_GetListImage() is only available in ARS >= 7.5");
#endif
	}





ARS.xs  view on Meta::CPAN

int
ars_DeleteActiveLink(ctrl, name)
	ARControlStruct *	ctrl
	char *			name
	CODE:
	{
	  char        *objectModificationLogLabel = NULL;
	  ARStatusList status;
	  int          ret = 0;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  RETVAL = 0;
	  if(ctrl && CVLD(name)) {
		ret = ARDeleteActiveLink(ctrl, name, 
#if AR_EXPORT_VERSION >= 8L
                                         0,
#endif
#if AR_CURRENT_API_VERSION >= 17
                                         objectModificationLogLabel,
#endif

ARS.xs  view on Meta::CPAN

int
ars_DeleteVUI(ctrl, schema, vuiId)
	ARControlStruct *	ctrl
	char *			schema
	ARInternalId		vuiId
	CODE:
	{
	  ARStatusList status;
	  int          ret = 0;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  RETVAL = 0;
#if AR_EXPORT_VERSION >= 3
	  if(ctrl && CVLD(schema)) {
		ret = ARDeleteVUI(ctrl, schema,
		        vuiId,
		        &status);
#ifdef PROFILE
	        ((ars_ctrl *)ctrl)->queries++;
#endif

ARS.xs  view on Meta::CPAN

int
ars_DeleteCharMenu(ctrl, name)
	ARControlStruct *	ctrl
	char *			name
	CODE:
	{
	  char        *objectModificationLogLabel = NULL;
	  ARStatusList status;
	  int          ret = 0;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  RETVAL = 0;
	  if(ctrl && name && *name) {
		ret = ARDeleteCharMenu(ctrl, name, 
#if AR_EXPORT_VERSION >= 8L
                                       0,
#endif
#if AR_CURRENT_API_VERSION >= 17
                                       objectModificationLogLabel,
#endif

ARS.xs  view on Meta::CPAN

int
ars_DeleteEscalation(ctrl, name)
	ARControlStruct *	ctrl
	char *			name
	CODE:
	{
	  char        *objectModificationLogLabel = NULL;
	  ARStatusList status;
	  int          ret = 0;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  RETVAL = 0;
	  if(ctrl && name && *name) {
		ret = ARDeleteEscalation(ctrl, name, 
#if AR_EXPORT_VERSION >= 8L
                                         0,
#endif
#if AR_CURRENT_API_VERSION >= 17
                                         objectModificationLogLabel,
#endif

ARS.xs  view on Meta::CPAN

ars_DeleteField(ctrl, schema, fieldId, deleteOption=0)
	ARControlStruct *	ctrl
	char * 			schema
	ARInternalId		fieldId
	unsigned int		deleteOption
	CODE:
	{
	  ARStatusList status;
	  int          ret = 0;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  RETVAL = 0;
	  if(ctrl && CVLD(schema) && IVLD(deleteOption, 0, 2)) {
		ret = ARDeleteField(ctrl, schema,
		        fieldId,
		        deleteOption,
		        &status);
#ifdef PROFILE
	        ((ars_ctrl *)ctrl)->queries++;
#endif

ARS.xs  view on Meta::CPAN

int
ars_DeleteFilter(ctrl, name)
	ARControlStruct *	ctrl
	char *			name
	CODE:
	{
	  char        *objectModificationLogLabel = NULL;
	  ARStatusList status;
	  int          ret = 0;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  RETVAL = 0;
	  if(ctrl && name && *name) {
		ret = ARDeleteFilter(ctrl, name, 
#if AR_EXPORT_VERSION >= 8L
                                     0,
#endif
#if AR_CURRENT_API_VERSION >= 17
                                     objectModificationLogLabel,
#endif

ARS.xs  view on Meta::CPAN

int
ars_DeleteContainer(ctrl, name)
	ARControlStruct *	ctrl
	char *			name
	CODE:
	{
	  char        *objectModificationLogLabel = NULL;
	  ARStatusList status;
	  int          ret = 0;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  RETVAL = 0;
	  if(ctrl && name && *name) {
		ret = ARDeleteContainer( ctrl, name, 
#if AR_EXPORT_VERSION >= 8L
                                     0,
#endif
#if AR_CURRENT_API_VERSION >= 17
                                     objectModificationLogLabel,
#endif

ARS.xs  view on Meta::CPAN

ars_DeleteSchema(ctrl, name, deleteOption)
	ARControlStruct *	ctrl
	char *			name
	unsigned int 		deleteOption
	CODE:
	{
	  char        *objectModificationLogLabel = NULL;
	  ARStatusList status;
	  int          ret = 0;

	  (void) ARError_reset();
	  Zero(&status, 1, ARStatusList);
	  RETVAL = 0;
	  if(ctrl && CVLD(name)) {
		ret = ARDeleteSchema(ctrl, name,
		        deleteOption,
#if AR_CURRENT_API_VERSION >= 17
			    objectModificationLogLabel,
#endif
		        &status);
#ifdef PROFILE

ARS.xs  view on Meta::CPAN

	unsigned int		deleteOption
	CODE:
	{
	  int              i = 0, ret = 0, c = (items - 3);
	  ARStatusList     status;
	  ARInternalIdList fieldList;

	  RETVAL = 0; /* assume error */
	  Zero(&status, 1,ARStatusList);
	  Zero(&fieldList, 1, ARInternalIdList);
	  (void) ARError_reset();
#if AR_EXPORT_VERSION >= 3
	  if(items < 4)
	     (void) ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS);
	  else {
	     /* slurp in each fieldId and put it in a list */
	     fieldList.numItems = c;
	     fieldList.internalIdList = MALLOCNN(sizeof(ARInternalId) * c);
	     for(i = 0; i < c; i++) {
		fieldList.internalIdList[i] = SvIV(ST(i + 3));
	     }

ARS.xs  view on Meta::CPAN

	ARControlStruct *       ctrl
    char *                  name
    ARBoolean               updateRef
	CODE:
	{
	  char        *objectModificationLogLabel = NULL;
	  ARStatusList status;
#if AR_CURRENT_API_VERSION >= 14
	  int          ret = 0;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  RETVAL = 0;

	  if(ctrl && name && *name) {
		ret = ARDeleteImage(ctrl, name,
		        updateRef,
#if AR_CURRENT_API_VERSION >= 17
			    objectModificationLogLabel,
#endif
		        &status);
		if( !ARError( ret, status) ){
			RETVAL = 1;
		}
	  }else{
		(void) ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS);
	  }
#else	/* prior to ARS 7.5 */
	  (void) ARError_reset();
	  Zero(&status, 1, ARStatusList);
	  (void) ARError_add( AR_RETURN_ERROR, AP_ERR_DEPRECATED,
	  "ars_DeleteImage() is only available in ARS >= 7.5");
	  XSRETURN_UNDEF;
#endif
	}
	OUTPUT:
	RETVAL


ARS.xs  view on Meta::CPAN

	ARControlStruct *	ctrl
	char *			command
	int			runOption
	PPCODE:
	{
	 ARStatusList status;
	 int          returnStatus = 0;
	 char        *returnString;
	 int          ret = 0;

	 (void) ARError_reset();
	 Zero(&status, 1,ARStatusList);
#if AR_EXPORT_VERSION >= 3
	 if(ctrl && CVLD(command)) {
		if(runOption == 0)
			ret = ARExecuteProcess(ctrl, command, &returnStatus, &returnString, &status);
		else
			ret = ARExecuteProcess(ctrl, command, NULL, NULL, &status);
	 }
#ifdef PROFILE
	 ((ars_ctrl *)ctrl)->queries++;

ARS.xs  view on Meta::CPAN

	  ARAccessNameType     lastChanged;
      char                *changeDiary = CPNULL;
	  SV                  *ref;
	  int                  ret;
	  ARQualifierStruct   *query = MALLOCNN(sizeof(ARQualifierStruct));
	  ARDiaryList          diaryList;
	  ARWorkflowConnectStruct schemaList;
	  ARPropList              objPropList;


	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(&escalationTm, 1, AREscalationTmStruct);
	  Zero(&actionList, 1,ARFilterActionList);
	  Zero(&timestamp, 1, ARTimestamp);
	  Zero(owner, 1, ARAccessNameType);
	  Zero(lastChanged, 1, ARAccessNameType);
	  Zero(&diaryList, 1, ARDiaryList);
	  Zero(&elseList, 1,ARFilterActionList);
	  Zero(&schemaList, 1, ARWorkflowConnectStruct);
	  Zero(&objPropList, 1, ARPropList);

ARS.xs  view on Meta::CPAN

	  ARFullTextInfoRequestList requestList;
	  ARFullTextInfoList        fullTextInfo;
	  ARStatusList              status;
	  int                       ret = 0;
	  unsigned int rlist[] = {AR_FULLTEXTINFO_COLLECTION_DIR,
			 	  AR_FULLTEXTINFO_STOPWORD,
				  AR_FULLTEXTINFO_CASE_SENSITIVE_SRCH,
			 	  AR_FULLTEXTINFO_STATE,
			 	  AR_FULLTEXTINFO_FTS_MATCH_OP };

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(&requestList, 1, ARFullTextInfoRequestList);
	  Zero(&fullTextInfo, 1, ARFullTextInfoList);
	  RETVAL = newHV();
	  sv_2mortal( (SV*) RETVAL );
	  requestList.numItems = 5;
	  requestList.requestList = rlist;
	  ret = ARGetFullTextInfo(ctrl, &requestList, &fullTextInfo, &status);
#ifdef PROFILE
	  ((ars_ctrl *)ctrl)->queries++;

ARS.xs  view on Meta::CPAN

	ARControlStruct *	ctrl
	char *			userName
	char *			password
	CODE:
	{
	  ARStatusList    status;
	  ARGroupInfoList groupList;
	  int             ret = 0;
          unsigned int    i = 0, v = 0;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(&groupList, 1, ARGroupInfoList);
	  RETVAL = newHV();
	  sv_2mortal( (SV*) RETVAL );
	  ret = ARGetListGroup(ctrl, userName, 
#if AR_EXPORT_VERSION >= 6
			       password,
#endif
			       &groupList, &status);
#ifdef PROFILE

ARS.xs  view on Meta::CPAN

ars_GetListGroup(ctrl, userName=NULL,password=NULL)
	ARControlStruct  *	ctrl
	char *			       userName
	char *			       password
	PPCODE:
	{
	  ARStatusList    status;
	  ARGroupInfoList groupList;
	  int             ret = 0;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(&groupList, 1, ARGroupInfoList);

	  ret = ARGetListGroup(ctrl, userName, 
#if AR_EXPORT_VERSION >= 6
			       password,
#endif
			       &groupList, &status);
#ifdef PROFILE
	  ((ars_ctrl *)ctrl)->queries++;

ARS.xs  view on Meta::CPAN

    ARNameType        applicationName
    char *            userName
    char *            password
    PPCODE:
    {
#if AR_EXPORT_VERSION >= 8L
      ARStatusList    status;
      ARRoleInfoList  roleList;
      int             ret = 0;

      (void) ARError_reset();
      Zero(&status, 1,ARStatusList);
      Zero(&roleList, 1, ARRoleInfoList);

      ret = ARGetListRole(ctrl,
                   applicationName, 
                   userName, 
                   password,
                   &roleList, &status);

      if(!ARError( ret, status)) {

ARS.xs  view on Meta::CPAN

ars_GetListLicense(ctrl, licenseType=NULL)
    ARControlStruct *  ctrl
    char *             licenseType
    PPCODE:
    {
#if AR_EXPORT_VERSION >= 6L
      ARStatusList       status;
      ARLicenseInfoList  licList;
      int                ret = 0;

      (void) ARError_reset();
      Zero(&status, 1,ARStatusList);
      Zero(&licList, 1, ARLicenseInfoList);

      ret = ARGetListLicense(ctrl,
                   licenseType, 
                   &licList, &status);

      if(!ARError( ret, status)) {
        unsigned int i;
	    for(i = 0; i < licList.numItems; i++) {

ARS.xs  view on Meta::CPAN

	ARControlStruct *	ctrl
	char *			sqlCommand
	unsigned int		maxRetrieve
	PPCODE:
	{
	  ARStatusList    status;
	  ARValueListList valueListList;
	  unsigned int    numMatches = 0;
	  int             ret = 0;

	  (void) ARError_reset();
	  RETVAL = NULL;
	  Zero(&status, 1, ARStatusList);
	  Zero(&valueListList, 1, ARValueListList);
#ifndef ARS20
	  ret = ARGetListSQL(ctrl, sqlCommand, maxRetrieve, &valueListList, 
			     &numMatches, &status);
#ifdef PROFILE
	  ((ars_ctrl *)ctrl)->queries++;
#endif
	  if(!ARError( ret, status)) {

ARS.xs  view on Meta::CPAN

ars_GetListUser(ctrl, userListType=AR_USER_LIST_MYSELF,changedSince=0)
	ARControlStruct *	ctrl
	unsigned int		userListType
	ARTimestamp		changedSince
	PPCODE:
	{
	  ARStatusList   status;
	  ARUserInfoList userList;
	  int            ret = 0;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(&userList, 1, ARUserInfoList);
	  ret = ARGetListUser(ctrl, userListType, 
#if AR_EXPORT_VERSION >= 6
				changedSince,
#endif
				&userList, &status);
#ifdef PROFILE
	  ((ars_ctrl *)ctrl)->queries++;
#endif

ARS.xs  view on Meta::CPAN

	char *			schema
	unsigned int		changedSince
	PPCODE:
	{
#if AR_EXPORT_VERSION >= 3
	  ARStatusList     status;
	  ARInternalIdList idList;
	  int              ret = 0;
      unsigned int     i = 0;

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(&idList, 1, ARInternalIdList);

	  ret = ARGetListVUI(ctrl, schema, 
				changedSince,
#if AR_CURRENT_API_VERSION >= 17
				NULL,     /* &objPropList (undocumented by BMC) */
#endif
				&idList,
				&status);
#ifdef PROFILE
	  ((ars_ctrl *)ctrl)->queries++;
#endif
	  if(!ARError( ret, status)) {
	    for(i = 0 ; i < idList.numItems ; i++) {
		XPUSHs(sv_2mortal(newSViv(idList.internalIdList[i])));
	    }
	  }
	  FreeARInternalIdList(&idList, FALSE);
#else /* ars 2.x */
	  (void) ARError_reset();
	  (void) ARError_add( AR_RETURN_ERROR, AP_ERR_DEPRECATED, "Not available in 2.x");
#endif
	}

void
ars_SetServerInfo(ctrl, ...)
	ARControlStruct *	ctrl
	PPCODE:
	{
		ARStatusList     status;
		ARServerInfoList serverInfo;
		int		 ret = 0, i = 0, count = 0;

		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);
		Zero(&serverInfo, 1, ARServerInfoList);

		if((items == 1) || ((items % 2) == 0)) { 
			(void) ARError_add(AR_RETURN_ERROR, 
					   AP_ERR_BAD_ARGS);
		} else {
			unsigned int infoType, j = 0;
			char         buf[256];

ARS.xs  view on Meta::CPAN

	PPCODE:
	{
	  ARStatusList            status;
	  ARServerInfoRequestList requestList;
	  ARServerInfoList        serverInfo;
	  int                     ret = 0;
          int                     i  = 0;
          unsigned int            ui = 0, count = 0;
	  unsigned int            rlist[AR_MAX_SERVER_INFO_USED];

	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(&requestList, 1, ARServerInfoRequestList);
	  Zero(&serverInfo, 1, ARServerInfoList);
	  count = 0;
	  if(items == 1) { /* none specified.. fetch all */
	     for(i = 0; i < AR_MAX_SERVER_INFO_USED ; i++) {
	        /* we'll exclude ones that can't be retrieved to avoid errors */
	        switch(i+1) {
	           case AR_SERVER_INFO_DB_PASSWORD:
#if AR_CURRENT_API_VERSION < 17

ARS.xs  view on Meta::CPAN

	  int          ret = 0;
	  ARDiaryList  diaryList;
	  ARPropList   objPropList;
# if AR_EXPORT_VERSION >= 6
	  unsigned int vuiType = 0;
	  ARLocaleType locale;
	  Zero(locale, 1, ARLocaleType);
# endif
	  RETVAL = newHV();
	  sv_2mortal( (SV*) RETVAL );
	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(vuiName, 1, ARNameType);
	  Zero(&dPropList, 1, ARPropList);
	  Zero(&objPropList, 1, ARPropList);
	  Zero(&timestamp, 1, ARTimestamp);
	  Zero(owner, 1, ARAccessNameType);
	  Zero(lastChanged, 1, ARAccessNameType);
	  ret = ARGetVUI(ctrl, schema, vuiId, vuiName,
# if AR_EXPORT_VERSION >= 6
			 locale, &vuiType,

ARS.xs  view on Meta::CPAN

	  }
	  FreeARPropList(&dPropList, FALSE);
	  FreeARPropList(&objPropList, FALSE);
	  if(helpText) {
	    	AP_FREE(helpText);
	  }
	  if(changeDiary) {
	    	AP_FREE(changeDiary);
	  }
#else /* ars 2.x */
	  (void) ARError_reset();
	  (void) ARError_add( AR_RETURN_ERROR, AP_ERR_DEPRECATED, "Not available in 2.x");
	  RETVAL = newHV();
#endif

	}
	OUTPUT:
	RETVAL



ARS.xs  view on Meta::CPAN

ars_CreateCharMenu( ctrl, menuDefRef, removeFlag=TRUE )
	ARControlStruct *	ctrl
	SV * menuDefRef
	ARBoolean removeFlag;

	CODE:
	{
#if AR_EXPORT_VERSION >= 6L
		ARNameType name;
		int ret = 0, rv = 0;
		unsigned int refreshCode;
		char *refreshCodeStr = NULL;
		char *menuTypeStr = NULL;
		ARCharMenuStruct arMenuDef;
		char *helpText = NULL;
		ARAccessNameType owner;
		char *changeDiary = NULL;
		ARPropList objPropList;
	    char *objectModificationLogLabel = NULL;
		ARStatusList status;
		HV *menuDef = NULL;
		SV **pSvTemp;

		RETVAL = 0; /* assume error */
		(void) ARError_reset();
		Zero(&arMenuDef, 1,ARCharMenuStruct);
		Zero(owner, 1,ARAccessNameType);
		Zero(&objPropList, 1,ARPropList);
		Zero(&status, 1,ARStatusList);

		if( SvROK(menuDefRef) && SvTYPE(SvRV(menuDefRef)) == SVt_PVHV ){
			menuDef = (HV*) SvRV(menuDefRef);
		}else{
			croak("usage: ars_CreateCharMenu(...)");
		}

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

		/* rv += uintcpyHVal( menuDef, "refreshCode", &type ); */
		rv += strmakHVal( menuDef, "refreshCode", &refreshCodeStr );
		refreshCode = revTypeName( (TypeMapStruct*)CharMenuRefreshCodeTypeMap, refreshCodeStr );
		if( refreshCode == TYPEMAP_LAST ){
			ARError_add(AR_RETURN_ERROR, AP_ERR_GENERAL,
					"ars_CreateCharMenu: refreshCode key invalid. key follows:");
			ARError_add(AR_RETURN_WARNING, AP_ERR_CONTINUE,
					refreshCodeStr ? refreshCodeStr : "[key null]" );
		}
		if( refreshCodeStr != NULL ){  AP_FREE(refreshCodeStr);  }

		rv += strmakHVal( menuDef, "menuType", &menuTypeStr );
		arMenuDef.menuType = revTypeName( (TypeMapStruct*)CharMenuTypeMap, menuTypeStr );
		if( arMenuDef.menuType == TYPEMAP_LAST ){
			ARError_add(AR_RETURN_ERROR, AP_ERR_GENERAL,
					"ars_CreateCharMenu: menuType key invalid. key follows:");
			ARError_add(AR_RETURN_WARNING, AP_ERR_CONTINUE,
					menuTypeStr ? menuTypeStr : "[key null]" );
		}
		if( menuTypeStr != NULL ){  AP_FREE(menuTypeStr);  }

ARS.xs  view on Meta::CPAN

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

		if( rv == 0 ){
			ret = ARCreateCharMenu( ctrl,
				name,
				refreshCode,
				&arMenuDef,
				helpText,
				owner,
				changeDiary,
				&objPropList,
#if AR_CURRENT_API_VERSION >= 17
			    objectModificationLogLabel,
#endif
				&status );

ARS.xs  view on Meta::CPAN

	ARNameType name
	SV * menuDefRef
	ARBoolean removeFlag;

	CODE:
	{
#if AR_EXPORT_VERSION >= 6L
		int ret = 0, rv = 0;
		ARNameType newName;
		char *newNamePtr = NULL;
		unsigned int refreshCode;
		unsigned int *refreshCodePtr = NULL;
		char *refreshCodeStr = NULL;
		char *menuTypeStr = NULL;
		ARCharMenuStruct *arMenuDef = NULL;
		char *helpText = NULL;
		ARAccessNameType owner;
		char *changeDiary = NULL;
		ARPropList *objPropList = NULL;
		char *objectModificationLogLabel = NULL;
		ARStatusList status;
		HV *menuDef = NULL;
		SV **pSvTemp;

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

		if( SvROK(menuDefRef) && SvTYPE(SvRV(menuDefRef)) == SVt_PVHV ){
			menuDef = (HV*) SvRV(menuDefRef);
		}else{
			croak("usage: ars_SetCharMenu(...)");
		}

		if( hv_exists(menuDef,"name",4) ){
			rv += strcpyHVal( menuDef, "name", newName, AR_MAX_NAME_SIZE ); 
			newNamePtr = newName;
		}
		
		if( hv_exists(menuDef,"refreshCode",4) ){
			/* rv += uintcpyHVal( menuDef, "refreshCode", &refreshCode ); */

			rv += strmakHVal( menuDef, "refreshCode", &refreshCodeStr );
			refreshCode = revTypeName( (TypeMapStruct*)CharMenuRefreshCodeTypeMap, refreshCodeStr );
			if( refreshCode == TYPEMAP_LAST ){
				ARError_add(AR_RETURN_ERROR, AP_ERR_GENERAL,
						"ars_CreateCharMenu: refreshCode key invalid. key follows:");
				ARError_add(AR_RETURN_WARNING, AP_ERR_CONTINUE,
						refreshCodeStr ? refreshCodeStr : "[key null]" );
			}
			if( refreshCodeStr != NULL ){  AP_FREE(refreshCodeStr);  }

			refreshCodePtr = &refreshCode;
		}

		if( hv_exists(menuDef,"menuType",4) ){
			/* rv += uintcpyHVal( menuDef, "menuType", &menuType ); */
			arMenuDef = (ARCharMenuStruct*) MALLOCNN( sizeof(ARCharMenuStruct) );

			rv += strmakHVal( menuDef, "menuType", &menuTypeStr );
			arMenuDef->menuType = revTypeName( (TypeMapStruct*)CharMenuTypeMap, menuTypeStr );
			if( arMenuDef->menuType == TYPEMAP_LAST ){
				ARError_add(AR_RETURN_ERROR, AP_ERR_GENERAL,

ARS.xs  view on Meta::CPAN

			rv += strcpyHVal( menuDef, "owner", owner, AR_MAX_ACCESS_NAME_SIZE ); 
		}
		if( hv_exists(menuDef,"changeDiary",11) ){
			rv += strmakHVal( menuDef, "changeDiary", &changeDiary );
		}

		if( rv == 0 ){
			ret = ARSetCharMenu( ctrl,
				name,
				newNamePtr,
				refreshCodePtr,
				arMenuDef,
				helpText,
				owner,
				changeDiary,
				objPropList,
#if AR_CURRENT_API_VERSION >= 17
			    objectModificationLogLabel,
#endif
				&status );

ARS.xs  view on Meta::CPAN

      RETVAL = AR_RETURN_ERROR;
#endif
	}
	OUTPUT:
	RETVAL


#define STR_TEMP_SIZE  30

int
ars_CreateField( ctrl, schema, fieldDefRef, reservedIdOK=0 )
	ARControlStruct *	ctrl
	ARNameType schema
	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;

ARS.xs  view on Meta::CPAN

		char *helpText = NULL;
		ARAccessNameType owner;
		char *changeDiary = NULL;
		ARPropList *objPropList = NULL;
		ARStatusList status;
		HV *fieldDef = NULL;
		SV **pSvTemp;
		char strTemp[STR_TEMP_SIZE+1];

		RETVAL = 0; /* assume error */
		(void) ARError_reset();
		Zero(owner, 1,ARAccessNameType);
		Zero(fieldName, 1,ARNameType);
		Zero(&status, 1,ARStatusList);
		Zero(&fieldMap, 1,ARFieldMappingStruct);
		Zero(&permissions, 1,ARPermissionList);
		Zero(&dInstanceList, 1, ARDisplayInstanceList);

		if( SvROK(fieldDefRef) && SvTYPE(SvRV(fieldDefRef)) == SVt_PVHV ){
			fieldDef = (HV*) SvRV(fieldDefRef);
		}else{

ARS.xs  view on Meta::CPAN

		}

		if( hv_exists(fieldDef,"changeDiary",11) ){
			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,

ARS.xs  view on Meta::CPAN

		unsigned int	setFieldOptions = 0;
#endif
		char *changeDiary = NULL;
		ARPropList *objPropList = NULL;
		ARStatusList status;
		HV *fieldDef = NULL;
		SV **pSvTemp;
		char strTemp[STR_TEMP_SIZE+1];

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

		if( SvROK(fieldDefRef) && SvTYPE(SvRV(fieldDefRef)) == SVt_PVHV ){
			fieldDef = (HV*) SvRV(fieldDefRef);
		}else{
			croak("usage: ars_SetField(...)");
		}

ARS.xs  view on Meta::CPAN

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

ARS.xs  view on Meta::CPAN

		if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
			objPropList = (ARPropList*) MALLOCNN( sizeof(ARPropList) );
			rv += rev_ARPropList( ctrl, schemaDef, "objPropList", objPropList );
		}

		if( rv == 0 ){
			ret = ARCreateSchema( ctrl,
				name,
				&compoundSchema,
#if AR_EXPORT_VERSION >= 8L
				NULL,           /* schemaInheritanceList, reserved for future use */
#endif
				&groupList,
				&admingrpList,
				&getListFields,
				&sortList,
				&indexList,
#if AR_EXPORT_VERSION >= 8L
				archiveInfo,
#endif
#if AR_EXPORT_VERSION >= 9L

ARS.xs  view on Meta::CPAN

		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_ARPropList( ctrl, schemaDef, "objPropList", objPropList );
		}


		if( rv == 0 ){
			ret = ARSetSchema( ctrl,
				name,
				newNamePtr,
				compoundSchema,
#if AR_EXPORT_VERSION >= 8L
				NULL,           /* schemaInheritanceList, reserved for future use */
#endif
				groupList,
				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
				&status );

			RETVAL = ARError(ret,status) ? 0 : 1;
		}else{ 
			ARError_add( AR_RETURN_ERROR, AP_ERR_PREREVFAIL);
			RETVAL = 0;

ARS.xs  view on Meta::CPAN

		ARPropList dPropList;
		char *helpText = NULL;
		ARAccessNameType owner;
		char *changeDiary = NULL;
		ARPropList objPropList;
		ARStatusList status;
		HV *vuiDef = NULL;
		SV **pSvTemp;

		RETVAL = 0; /* assume error */
		(void) ARError_reset();
		Zero(vuiName, 1,ARNameType);
		Zero(locale, 1,ARLocaleType);
		Zero(&dPropList, 1,ARPropList);
		Zero(&objPropList, 1,ARPropList);
		Zero(owner, 1,ARAccessNameType);
		Zero(&status, 1,ARStatusList);

		if( SvROK(vuiDefRef) && SvTYPE(SvRV(vuiDefRef)) == SVt_PVHV ){
			vuiDef = (HV*) SvRV(vuiDefRef);
		}else{

ARS.xs  view on Meta::CPAN

		char *helpText = NULL;
		ARAccessNameType owner;
		char *ownerPtr = NULL;
		char *changeDiary = NULL;
		ARPropList *objPropList = NULL;
		ARStatusList status;
		HV *vuiDef = NULL;
		SV **pSvTemp;

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


		if( SvROK(vuiDefRef) && SvTYPE(SvRV(vuiDefRef)) == SVt_PVHV ){
			vuiDef = (HV*) SvRV(vuiDefRef);
		}else{
			croak("usage: ars_SetVUI(...)");

ARS.xs  view on Meta::CPAN

		ARAccessNameType owner;
		char *changeDiary = NULL;
		ARPropList objPropList;
		char *objectModificationLogLabel = NULL;
		ARStatusList status;
		HV *containerDef = NULL;
		SV **pSvTemp;


		RETVAL = 0; /* assume error */
		(void) ARError_reset();
		Zero(name, 1,ARNameType);
		Zero(&groupList, 1,ARPermissionList);
		Zero(&admingrpList, 1,ARInternalIdList);
		Zero(&ownerObjList, 1,ARContainerOwnerObjList);
		Zero(&references, 1,ARReferenceList);
		Zero(owner, 1,ARAccessNameType);
		Zero(&objPropList, 1,ARPropList);
		Zero(&status, 1,ARStatusList);

		if( SvROK(containerDefRef) && SvTYPE(SvRV(containerDefRef)) == SVt_PVHV ){

ARS.xs  view on Meta::CPAN

		ARAccessNameType owner;
		char *changeDiary = NULL;
		ARPropList *objPropList = NULL;
		char *objectModificationLogLabel = NULL;
		ARStatusList status;
		HV *containerDef = NULL;
		SV **pSvTemp;


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

		if( SvROK(containerDefRef) && SvTYPE(SvRV(containerDefRef)) == SVt_PVHV ){
			containerDef = (HV*) SvRV(containerDefRef);
		}else{
			croak("usage: ars_SetContainer(...)");
		}

ARS.xs  view on Meta::CPAN

	  char                  *changeDiary = CPNULL;
	  char                  *objectModificationLogLabel = NULL;
	  ARStatusList           status;
#if AR_EXPORT_VERSION >= 5
	  ARNameList              schemaNameList;
	  ARWorkflowConnectStruct schemaList;
	  ARPropList              objPropList;
#endif
	  
	  RETVAL = 0; /* assume error */
	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(schema, 1, ARNameType);
	  Zero(name, 1, ARNameType);
	  Zero(&groupList, 1,ARInternalIdList);
	  Zero(&actionList, 1,ARActiveLinkActionList);
	  Zero(owner, 1, ARAccessNameType);
#if AR_EXPORT_VERSION >= 3
	  Zero(&elseList, 1,ARActiveLinkActionList);
#else
	  Zero(&displayList, 1,ARDisplayList);

ARS.xs  view on Meta::CPAN

			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, 
					    helpText, owner, changeDiary, 
					    &objPropList,
#if AR_CURRENT_API_VERSION >= 14
						0,            /* errorActlinkOptions, reserved for future use */
						NULL,         /* errorActlinkName,    reserved for future use */
#endif
#if AR_CURRENT_API_VERSION >= 17
					    objectModificationLogLabel,
#endif
					    &status);
#elif AR_EXPORT_VERSION >= 3
		   ret = ARCreateActiveLink(ctrl, name, order, schema, 
					    &groupList, executeMask,
					    &controlField, &focusField, 
					    enable, query,

ARS.xs  view on Meta::CPAN

	  char                    *helpText = CPNULL;
	  ARAccessNameType         owner;
	  char                    *ownerPtr = NULL;
	  char                    *changeDiary = CPNULL;
	  char                    *objectModificationLogLabel = NULL;
	  ARStatusList             status;
	  ARWorkflowConnectStruct  *schemaList = NULL;
	  ARPropList               *objPropList = NULL;
	  
	  RETVAL = 0; /* assume error */
	  (void) ARError_reset();
	  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);
		SV **qhv = hv_fetch(objDef,  "query", strlen("query") , 0);

ARS.xs  view on Meta::CPAN

			   (*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,
#if AR_CURRENT_API_VERSION >= 14
						NULL,         /* errorActlinkOptions, reserved for future use */
						NULL,         /* errorActlinkName,    reserved for future use */
#endif
#if AR_CURRENT_API_VERSION >= 17
					    objectModificationLogLabel,
#endif
					    &status);
		   if(!ARError( ret, status))
			   RETVAL = 1;
		} else 
		   ARError_add( AR_RETURN_ERROR, AP_ERR_PREREVFAIL);
	  }

ARS.xs  view on Meta::CPAN

	  ARStatusList           status;
	  ARNameList              schemaNameList;
	  ARWorkflowConnectStruct schemaList;
	  ARPropList              objPropList;
#if AR_CURRENT_API_VERSION >= 13
	  unsigned int           errorFilterOptions = 0;
	  ARNameType             errorFilterName;
#endif
	  
	  RETVAL = 0; /* assume error */
	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(schema, 1, ARNameType);
	  Zero(name, 1, ARNameType);
	  Zero(&actionList, 1,ARFilterActionList);
	  Zero(&elseList, 1,ARFilterActionList);
	  Zero(owner, 1, ARAccessNameType);
	  Zero(&objPropList, 1, ARPropList);
	  Zero(&schemaList, 1, ARWorkflowConnectStruct);
	  Zero(&schemaNameList, 1, ARNameList);
#if AR_CURRENT_API_VERSION >= 13

ARS.xs  view on Meta::CPAN

			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,

ARS.xs  view on Meta::CPAN

	  ARStatusList             status;
	  ARWorkflowConnectStruct  *schemaList = NULL;
	  ARPropList               *objPropList = NULL;
#if AR_CURRENT_API_VERSION >= 13
	  unsigned int           *errorFilterOptions = NULL;
	  ARNameType              errorFilterName;
	  char                   *errorFilterNamePtr = NULL;
#endif
	  
	  RETVAL = 0; /* assume error */
	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(newName, 1, ARNameType);
	  Zero(owner, 1, ARAccessNameType);
#if AR_CURRENT_API_VERSION >= 13
	  Zero(errorFilterName, 1, ARNameType);
#endif

	  if(SvTYPE((SV *)SvRV(objDefRef)) != SVt_PVHV) {
		ARError_add( AR_RETURN_ERROR, AP_ERR_EXPECT_PVHV);
	  } else {

ARS.xs  view on Meta::CPAN

			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

ARS.xs  view on Meta::CPAN

	  char                  *helpText = CPNULL;
	  ARAccessNameType       owner;
	  char                  *changeDiary = CPNULL;
	  char                  *objectModificationLogLabel = NULL;
	  ARStatusList           status;
	  ARNameList              schemaNameList;
	  ARWorkflowConnectStruct schemaList;
	  ARPropList              objPropList;
	  
	  RETVAL = 0; /* assume error */
	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(name, 1, ARNameType);
	  Zero(&actionList, 1,ARFilterActionList);
	  Zero(&elseList, 1,ARFilterActionList);
	  Zero(owner, 1, ARAccessNameType);
	  Zero(&objPropList, 1, ARPropList);
	  Zero(&schemaList, 1, ARWorkflowConnectStruct);
	  Zero(&schemaNameList, 1, ARNameList);
	  Zero(&escalationTm, 1, AREscalationTmStruct);
	  schemaList.type = AR_WORKFLOW_CONN_SCHEMA_LIST;

ARS.xs  view on Meta::CPAN

		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, 

ARS.xs  view on Meta::CPAN

	  char                    *helpText = CPNULL;
	  ARAccessNameType         owner;
	  char                    *ownerPtr = NULL;
	  char                    *changeDiary = CPNULL;
	  char                    *objectModificationLogLabel = NULL;
	  ARStatusList             status;
	  ARWorkflowConnectStruct  *schemaList = NULL;
	  ARPropList               *objPropList = NULL;
	  
	  RETVAL = 0; /* assume error */
	  (void) ARError_reset();
	  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);
		SV **qhv = hv_fetch(objDef,  "query", strlen("query") , 0);

ARS.xs  view on Meta::CPAN

		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,

ARS.xs  view on Meta::CPAN

	  ARImageDataStruct      imageBuf;
	  char                  *imageType   = CPNULL;
	  char                  *description = CPNULL;
	  char                  *helpText    = CPNULL;
	  ARAccessNameType       owner;
	  char                  *changeDiary = CPNULL;
	  ARPropList             objPropList;
	  char                  *objectModificationLogLabel = NULL;
  
	  RETVAL = 0; /* assume error */
	  (void) ARError_reset();
	  Zero(&status, 1,ARStatusList);
	  Zero(name, 1, ARNameType);
	  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);

ARS.xs  view on Meta::CPAN


		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,

ARS.xs  view on Meta::CPAN

	  }
	  if (description) {
	    	AP_FREE(description);
	  }
	  if (imageType) {
	    	AP_FREE(description);
	  }
	  FreeARImageDataStruct(&imageBuf, FALSE);
	  FreeARPropList(&objPropList, FALSE);
#else	/* prior to ARS 7.5 */
	  (void) ARError_reset();
	  Zero(&status, 1, ARStatusList);
	  (void) ARError_add( AR_RETURN_ERROR, AP_ERR_DEPRECATED,
	  "ars_CreateImage() is only available in ARS >= 7.5");
	  XSRETURN_UNDEF;
#endif
	}
	OUTPUT:
	RETVAL

int

ARS.xs  view on Meta::CPAN

	  char                  *imageType   = CPNULL;
	  char                  *description = CPNULL;
	  char                  *helpText    = CPNULL;
	  ARAccessNameType       owner;
	  char                  *ownerPtr    = NULL;
	  char                  *changeDiary = CPNULL;
	  ARPropList            *objPropList = NULL;
	  char                  *objectModificationLogLabel = NULL;
	  
	  RETVAL = 0; /* assume error */
	  (void) ARError_reset();
	  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

ARS.xs  view on Meta::CPAN

		}

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

	  }
	  if (description) {
	    	AP_FREE(description);
	  }
	  if (imageType) {
	    	AP_FREE(description);
	  }
	  if( imageBuf != NULL )     { FreeARImageDataStruct(imageBuf, TRUE); }
	  if( objPropList != NULL )  { FreeARPropList(objPropList, TRUE);     }
#else	/* prior to ARS 7.5 */
	  (void) ARError_reset();
	  Zero(&status, 1, ARStatusList);
	  (void) ARError_add( AR_RETURN_ERROR, AP_ERR_DEPRECATED,
	  "ars_SetImage() is only available in ARS >= 7.5");
	  XSRETURN_UNDEF;
#endif
	}
	OUTPUT:
	RETVAL


ARS.xs  view on Meta::CPAN

	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);
	  	goto merge_entry_exit;
	  }

ARS.xs  view on Meta::CPAN

	ARInternalIdList  idList;
	ARFieldValueListList  fieldList;
	ARBooleanList     existList;
	ARStatusList      status;
	AV               *entryList_array;

	entryList.entryIdList = NULL;
	idList.internalIdList = NULL;
	fieldList.valueListList = NULL;
	existList.booleanList = NULL;
	(void) ARError_reset();
	Zero(&status, 1, ARStatusList);
	Zero(&entryList, 1, AREntryIdListList);
	Zero(&idList, 1, ARInternalIdList);
	Zero(&fieldList, 1, ARFieldValueListList);
	Zero(&existList, 1, ARBooleanList);
	/*
	 * build list of field Id's
	 */
	if (c < 1) {
		idList.numItems = 0; /* get all fields */

ARS.xs  view on Meta::CPAN

	{
	  ARStatusList     status;
	  unsigned int              c = (items - 5) / 2, i;
	  int              field_off = 5;
	  ARSortList       sortList;
	  AREntryListFieldValueList  entryFieldValueList;
	  int              ret = 0;
	  AREntryListFieldList getListFields, *getList = NULL;
	  AV              *getListFields_array;

	  (void) ARError_reset();
	  Zero(&status, 1, ARStatusList);
	  Zero(&sortList, 1, ARSortList);
	  Zero(&entryFieldValueList, 1, AREntryListFieldValueList);
	  Zero(&getListFields, 1, AREntryListFieldList);

	  sortList.sortList = NULL;
	  getListFields.fieldsList = NULL;
	  entryFieldValueList.entryList = NULL;
	  if ((items - 5) % 2) {
	    /* odd number of arguments, so argument after maxRetrieve is

ARS.xs  view on Meta::CPAN

#endif
	ARMultiSchemaQualifierStruct     qualifierStruct;
	ARMultiSchemaSortList            sortList;
	unsigned int                     i;
	int                              i2, field_off = 6;
	int                              ret = 0, rv = 0;
	HV                               *hDummy;

	/* printf( "\n\n!!!! ars_GetListEntryWithMultiSchemaFields(): experimental implementation, not really working yet !!!!\n\n" ); */

	(void) ARError_reset();
#if AR_CURRENT_API_VERSION >= 17
	Zero( &queryFromList, 1, ARMultiSchemaFuncQueryFromList );
	Zero( &getListFields, 1, ARMultiSchemaFieldFuncList );
	Zero( &entryFieldValueList, 1, ARMultiSchemaFieldFuncValueListList );
#else
	Zero( &queryFromList, 1, ARMultiSchemaQueryFromList );
	Zero( &getListFields, 1, ARMultiSchemaFieldIdList );
	Zero( &entryFieldValueList, 1, ARMultiSchemaFieldValueListList );
#endif
	Zero( &qualifierStruct, 1, ARMultiSchemaQualifierStruct );

ARS.xs  view on Meta::CPAN

	hv_undef( hDummy );
#if AR_CURRENT_API_VERSION >= 17
	FreeARMultiSchemaFieldFuncList( &getListFields, FALSE );
	FreeARMultiSchemaFieldFuncValueListList( &entryFieldValueList, FALSE );
#else
	FreeARMultiSchemaFieldIdList( &getListFields, FALSE );
	FreeARMultiSchemaFieldValueListList( &entryFieldValueList, FALSE );
#endif
	FreeARMultiSchemaSortList( &sortList, FALSE );
#else	/* prior to ARS 7.5 */
	(void) ARError_reset();
	Zero(&status, 1, ARStatusList);
	(void) ARError_add( AR_RETURN_ERROR, AP_ERR_DEPRECATED,
	"ars_GetListEntryWithMultiSchemaFields() is only available in ARS >= 7.5");
#endif
	}



void
ars_SetLogging( ctrl, logTypeMask_arg, ...)

ARS.xs  view on Meta::CPAN

#if AR_CURRENT_API_VERSION >= 14
		ARULong32        whereToWriteMask = AR_WRITE_TO_STATUS_LIST;
		ARULong32        logTypeMask      = logTypeMask_arg;
#else
		unsigned long    whereToWriteMask = AR_WRITE_TO_STATUS_LIST;
		unsigned long    logTypeMask      = logTypeMask_arg;
#endif
		int	             ret;
		FILE             *logFilePtr = NULL;

		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);

		logFilePtr = get_logging_file_ptr();
		/* printf( "GET logging_file_ptr = %p\n", logFilePtr ); */

		if( items > 2 && logTypeMask != 0 ){
			char *fileName;
			STRLEN len;
			fileName = SvPV(ST(2),len);

ARS.xs  view on Meta::CPAN

	unsigned int      variableId
	long              value
	PPCODE:
	{
#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;

ARS.xs  view on Meta::CPAN

void
ars_SetImpersonatedUser( ctrl, impersonatedUser )
	ARControlStruct *	ctrl
	ARAccessNameType  impersonatedUser
	PPCODE:
	{
#if AR_EXPORT_VERSION >= 9
		ARStatusList     status;
		int	             ret;

		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);

		if( strcmp("",impersonatedUser) == 0 ){
			ret = ARSetImpersonatedUser( ctrl, NULL, &status );
		}else{
			ret = ARSetImpersonatedUser( ctrl, impersonatedUser, &status );
		}

		if(ARError(ret, status)) {
			XPUSHs(sv_2mortal(newSViv(0))); /* ERR */

ARS.xs  view on Meta::CPAN


void
ars_BeginBulkEntryTransaction( ctrl )
	ARControlStruct *	ctrl
	PPCODE:
	{
#if AR_CURRENT_API_VERSION >= 11
		ARStatusList     status;
		int	             ret;

		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);

		ret = ARBeginBulkEntryTransaction( ctrl, &status );

		if( ARError(ret, status) ){
			XPUSHs(sv_2mortal(newSViv(0))); /* ERR */
		}else{
			XPUSHs(sv_2mortal(newSViv(1))); /* OK */
		}
#else /* < 6.3 */

ARS.xs  view on Meta::CPAN

	ARControlStruct *	ctrl
	unsigned int      actionType
	PPCODE:
	{
#if AR_CURRENT_API_VERSION >= 11
		int	             ret;
		ARStatusList     status;
		ARBulkEntryReturnList returnList;
		unsigned int i;

		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);
		Zero(&returnList, 1, ARBulkEntryReturnList);

		ret = AREndBulkEntryTransaction( ctrl, actionType, &returnList, &status );

		ARError( ret, status );

		for( i = 0; i < returnList.numItems; i++ ){
			XPUSHs( sv_2mortal( perl_ARBulkEntryReturn(ctrl,&(returnList.entryReturnList[i])) ) );
		}

ARS.xs  view on Meta::CPAN

ars_Signal( ctrl, ...)
	ARControlStruct *	ctrl
	PPCODE:
	{
#if AR_CURRENT_API_VERSION >= 9
		int	             ret;
		ARSignalList     signalList;
		ARStatusList     status;
		unsigned int     c = (items - 1) / 2, i = 0, a = 0, ok = 1;

		(void) ARError_reset();
		Zero(&signalList, 1, ARSignalList);
		Zero(&status, 1, ARStatusList);

		if( ((items - 1) % 2) || c < 1 ){
			(void) ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS);
		}else{
			signalList.numItems = c;
			AMALLOCNN(signalList.signalList,c,ARSignalStruct);
			for( i = 0; i < c; ++i ){
				int st;

ARS.xs  view on Meta::CPAN

#endif
	}


SV *
ars_GetTextForErrorMessage(msgId)
	int  msgId
	CODE:
	{
		char *msgTxt = NULL;
		(void) ARError_reset();

		msgTxt = ARGetTextForErrorMessage( msgId );
		if( msgTxt != NULL ){
			RETVAL = newSVpv( msgTxt, 0 );
			free( msgTxt );
		}else{
			XSRETURN_UNDEF;
		}
	}
	OUTPUT:

ARS.xs  view on Meta::CPAN

	ARControlStruct *	ctrl
	PPCODE:
	{
		ARStatusList            status;
		ARLicenseNameList       licNameList;
		ARLicenseValidList      licValidList;
		int                     ret = 0;
		unsigned int            ui = 0, count = 0;
		unsigned int            c = items - 1, i = 0, a = 0, ok = 1;

		(void) ARError_reset();
		Zero(&status, 1,ARStatusList);
		Zero(&licNameList, 1, ARLicenseNameList);
		Zero(&licValidList, 1, ARLicenseValidList);
		if( items > 1){
			licNameList.numItems = c;
			AMALLOCNN(licNameList.nameList,c,ARLicenseNameType);
			for( i = 0; i < c; ++i ){
				a = i + 1;
				strncpy( licNameList.nameList[i], SvPV(ST(a),PL_na), AR_MAX_LICENSE_NAME_SIZE );
			}

ARS.xs  view on Meta::CPAN

	int         month;
	int         day;
	CODE:
	{
#if AR_CURRENT_API_VERSION >= 9
		int     ret = 0;
		int     jd  = 0;
		ARDateStruct  date;
		ARStatusList  status;

		(void) ARError_reset();
		Zero(&date, 1, ARDateStruct);
		Zero(&status, 1, ARStatusList);

		date.year  = year;
		date.month = month;
		date.day   = day;

		ret = ARDateToJulianDate(ctrl, &date, &jd, &status);
		if (! ARError( ret, status)) {
			RETVAL = jd;

ARS.xs  view on Meta::CPAN

SV *
ars_GetServerCharSet( ctrl )
	ARControlStruct *	ctrl
	CODE:
	{
#if AR_CURRENT_API_VERSION >= 12
		char          charSet[AR_MAX_LANG_SIZE+1];
		ARStatusList  status;
		int           ret = 0;

		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);
		RETVAL = NULL;

		ret = ARGetServerCharSet( ctrl, charSet, &status );
		if( ! ARError(ret,status) ){
			RETVAL = newSVpv( charSet, 0 );
		}
#else /* < 7.0 */
		RETVAL = NULL; /* ERR */
		(void) ARError_add( AR_RETURN_ERROR, AP_ERR_DEPRECATED, 

ARS.xs  view on Meta::CPAN

SV *
ars_GetClientCharSet( ctrl )
	ARControlStruct *	ctrl
	CODE:
	{
#if AR_CURRENT_API_VERSION >= 12
		char          charSet[AR_MAX_LANG_SIZE+1];
		ARStatusList  status;
		int           ret = 0;

		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);
		RETVAL = NULL;

		ret = ARGetClientCharSet( ctrl, charSet, &status );
		if( ! ARError(ret,status) ){
			RETVAL = newSVpv( charSet, 0 );
		}
#else /* < 7.0 */
		RETVAL = NULL; /* ERR */
		(void) ARError_add( AR_RETURN_ERROR, AP_ERR_DEPRECATED, 

ARS.xs  view on Meta::CPAN

int
ars_RegisterForAlerts(ctrl, clientPort, registrationFlags=0)
	ARControlStruct *	ctrl
	int			clientPort
	unsigned int		registrationFlags
	CODE:
	{
		ARStatusList status;
		int          ret = 0;

		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);
		RETVAL = 0;
#if AR_EXPORT_VERSION >= 6
		ret = ARRegisterForAlerts(ctrl, clientPort, 
				registrationFlags, &status);
		if( !ARError(ret, status) ) {
			RETVAL = 1;
		}
#else
	  (void) ARError_add(AR_RETURN_ERROR, AP_ERR_DEPRECATED, 

ARS.xs  view on Meta::CPAN


int
ars_DeregisterForAlerts(ctrl,clientPort)
	ARControlStruct *	ctrl
	int			clientPort
	CODE:
	{
		ARStatusList status;
		int          ret = 0;

		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);
		RETVAL = 0;
#if AR_EXPORT_VERSION >= 6
		ret = ARDeregisterForAlerts(ctrl, clientPort, 
					    &status);
		if( !ARError(ret, status) ) {
			RETVAL = 1;
		}
#else
	  (void) ARError_add(AR_RETURN_ERROR, AP_ERR_DEPRECATED, 

ARS.xs  view on Meta::CPAN

void
ars_GetListAlertUser(ctrl)
	ARControlStruct *	ctrl
	PPCODE:
	{
#if AR_EXPORT_VERSION >= 6
		ARStatusList     status;
		ARAccessNameList userList;
		int              ret = 0;

		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);
	 	Zero(&userList, 1, ARAccessNameList);
		ret = ARGetListAlertUser(ctrl, &userList,
					 &status);
		if( !ARError(ret, status) ) {
			if (userList.numItems > 0) {
				unsigned int i = 0;
				while(i < userList.numItems) {
					XPUSHs(sv_2mortal(newSVpvn(userList.nameList[i++], 
							AR_MAX_NAME_SIZE)));

ARS.xs  view on Meta::CPAN

	ARControlStruct *	ctrl
	ARQualifierStruct *	qualifier
	CODE:
	{
		ARStatusList     status;
		int              ret = 0;
		unsigned int	 count = 0;

		RETVAL=newSVsv(&PL_sv_undef);
#if AR_EXPORT_VERSION >= 6
		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);
		ret = ARGetAlertCount(ctrl, qualifier, &count,
				      &status);
		if( !ARError(ret, status) ) {
			/* RETVAL=sv_2mortal(newSViv(count)); */
			RETVAL = newSViv(count);
		}
#else
	  (void) ARError_add(AR_RETURN_ERROR, AP_ERR_DEPRECATED, 
			"GetAlertCount() is only available in ARSystem >= 5.0");

ARS.xs  view on Meta::CPAN

		unsigned int	 sourceType = 0;
		unsigned int	 priority = 0;
		char 		*alertText  = CPNULL;
		char		*sourceTag  = CPNULL;
		char		*serverName = CPNULL;
		char		*serverAddr = CPNULL;
		char		*formName   = CPNULL;
		char 		*objId      = CPNULL;

		RETVAL=newHV();
		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);
		Zero(&timestamp, 1, ARTimestamp);
#if AR_EXPORT_VERSION >= 6
		ret = ARDecodeAlertMessage(ctrl, message, messageLen,
					&timestamp,
					&sourceType,
					&priority,
					&alertText,
					&sourceTag,
					&serverName,

ARS.xs  view on Meta::CPAN

	ARServerNameType	serverName
	ARNameType		formName
	char *			objectId
	CODE:
	{
		ARStatusList     status;
		int              ret = 0;
		AREntryIdType	 entryId;

		RETVAL=newSVsv(&PL_sv_undef);
		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);
		Zero(&entryId, 1, AREntryIdType);
#if AR_EXPORT_VERSION >= 6
		ret = ARCreateAlertEvent(ctrl, 
					user,
					alertText,
					priority,
					sourceTag,
					serverName,
					formName,

ARS.xs  view on Meta::CPAN

#else /* < 5.0 */
	  XPUSHs(sv_2mortal(newSViv(0))); /* ERR */
	  (void) ARError_add( AR_RETURN_ERROR, AP_ERR_DEPRECATED, 
			"GetSessionConfiguration() is only available in ARSystem >= 5.0");
#endif
	}
	OUTPUT:
	RETVAL

#
# Destructors for Blessed C structures
#

MODULE = ARS		PACKAGE = ARControlStructPtr

void
DESTROY(ctrl)
	ARControlStruct *	ctrl
	CODE:
	{
		ARStatusList status;
		int rv = 0;

		(void) ARError_reset();
		Zero(&status, 1, ARStatusList);
		DBG( ("control struct destructor\n") );
# if AR_EXPORT_VERSION >= 4
		rv = ARTermination(ctrl, &status);
# else
		rv = ARTermination(&status);
# endif /* AR_EXPORT_VERSION */
		(void) ARError(rv, status);
#ifdef PROFILE
		AP_FREE(ctrl);

ARS/OOsup.pm  view on Meta::CPAN

  return $blessed;
}

sub DESTROY {
	my ($self) = shift;
	print "destroying connection object: " if $self->{'.debug'};
	if(defined($self->{'.nologoff'}) && $self->{'.nologoff'} == 0) {
		print "ars_Logoff called.\n" if $self->{'.debug'};
		ars_Logoff($self->{'ctrl'}) if defined($self->{'ctrl'});
	} else {
		print "ars_Logoff suppressed.\n" if $self->{'.debug'};
	}
}

sub ctrl {
	my $this = shift;
	return $this->{'ctrl'};
}

sub print {
  my $this = shift;

ARS/nparm.pm  view on Meta::CPAN

#    Mailing List (must be subscribed to post):
#    See URL above.
#

# the following two routines 
#            make_attributes()
#            rearrange()
# were borrowed from the CGI module. these routines implement
# named parameters.
# (http://stein.cshl.org/WWW/software/CGI/cgi_docs.html) 
# Copyright 1995-1997 Lincoln D. Stein.  All rights reserved.

sub make_attributes {
    my($attr) = @_;
    return () unless $attr && ref($attr) && ref($attr) eq 'HASH';
    my(@att);
    foreach (keys %{$attr}) {
        #print "attr=$_\n";
        my($key) = $_;
        $key=~s/^\-//;     # get rid of initial - if present
        $key=~tr/a-z_/A-Z-/; # parameters are upper case, use dashes
        push(@att,$attr->{$_} ne '' ? qq/$key="$attr->{$_}"/ : qq/$key/);
    }
    return @att;
}

# rearrange(order, params)
#  order will be an array reference (might contain other array refs)
#  that lists the order we want the params returned in.
# 

ARS/nparm.pm  view on Meta::CPAN

    return @param unless (defined($param[0]) && substr($param[0],0,1) eq '-');
    $param = {@param};                # convert into associative array
  } else {
    $param = $param[0];
  }

  my($key)='';
  
  foreach (keys %{$param}) {
    my $old = $_;
    s/^\-//;     # get rid of initial - if present
    tr/a-z/A-Z/; # parameters are upper case
    next if $_ eq $old;
    $param->{$_} = $param->{$old};
    delete $param->{$old};
  }

  # scan the keys in param and make sure they are valid. 

  foreach my $key (keys %$param) {
    #print "validating: $key\n";

Artistic  view on Meta::CPAN

	and so on.  (You will not be required to justify it to the
	Copyright Holder, but only to the computing community at large
	as a market that must bear the fee.)

	"Freely Available" means that no fee is charged for the item
	itself, though there may be fees involved in handling the item.
	It also means that recipients of the item may redistribute it
	under the same conditions they received it.

1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.

2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder.  A Package
modified in such a way shall still be considered the Standard Version.

3. You may otherwise modify your copy of this Package in any way, provided
that you insert a prominent notice in each changed file stating how and
when you changed that file, and provided that you do at least ONE of the
following:

Artistic  view on Meta::CPAN

interpreter is so embedded.

6. The scripts and library files supplied as input to or produced as
output from the programs of this Package do not automatically fall
under the copyright of this Package, but belong to whoever generated
them, and may be sold commercially, and may be aggregated with this
Package.  If such scripts or library files are aggregated with this
Package via the so-called "undump" or "unexec" methods of producing a
binary executable image, then distribution of such an image shall
neither be construed as a distribution of this Package nor shall it
fall under the restrictions of Paragraphs 3 and 4, provided that you do
not represent such an executable image as a Standard Version of this
Package.

7. C subroutines (or comparably compiled subroutines in other
languages) supplied by you and linked into this Package in order to
emulate subroutines and variables of the language defined by this
Package shall not be considered part of this Package, but are the
equivalent of input as in Paragraph 6, provided these subroutines do
not change the language in any way that would cause it to fail the
regression tests for the language.

8. Aggregation of this Package with a commercial distribution is always
permitted provided that the use of this Package is embedded; that is,
when no overt attempt is made to make this Package's interfaces visible
to the end user of the commercial distribution.  Such use shall not be
construed as a distribution of this Package.

9. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.

CHANGES  view on Meta::CPAN

 (TS)   fixed wrong operand evaluation for AR_ARITH_OP_NEGATE in perl_ARArithOpStruct

 (TS)   fixed ars_SetServerInfo() memory violation in case of more than one key/value pair

 (TS)   ars_GetFieldTable performance improvement by using ARGetMultipleFields

 (TS)   removed unnecessary second invocation of ARGetField in ars_GetField

 (TS)   code cleanup (#ifdef statements) in ARGetFieldCached, ars_GetField, ars_GetFieldByName

 (TS) ! appended ARControlStruct pointer address to server key in %ARS::field_cache
        (affects only scripts which make explicit use of the internal field_cache structure)

 (CL) ! enhanced ARS OO interface to handle custom enum fields

 (TS)   fixed return value of ars_Import

 (TS)   fixed memory violation in ars_GetListContainer

 (TS)   implemented ars_qualifier_ptr function (inverse of ars_perl_qualifier)

CHANGES  view on Meta::CPAN

 (TS)   added "name" value to schemaHash returned by ars_GetSchema

 (TS)   fixed rev_ARArchiveInfo Struct, moved function from supportrev_generated.c to supportrev.c

 (TS)   changed $ARS_LIBS variable for 7.0 Unix API in Makefile.pl (-licuuc -> -licuucbmc)


Released: 03/12/2007 Version: 1.90


 (TS)   added missing ARError_reset() to ars_GetListVUI

 (TS)   added ars_CreateCharMenu, ars_SetCharMenu

 (TS)   added handling of case AR_CHAR_MENU_LIST in ars_GetCharMenu

 (TS)   changed handling of qualifier struct in ars_GetCharMenu, case AR_CHAR_MENU_QUERY

 (TS)   corrected function signature for ars_SetField, ars_CreateContainer

 (TS)   bugfix in ars_GetCharMenu (incorrect array length for "labelFields", "labelIndex")

CHANGES  view on Meta::CPAN


 (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,

CHANGES  view on Meta::CPAN


(JCM)   documenation update (ars_Import)


Released: 7/4/2000 Version: 1.68


(JCM)   modifications to example/ars_GetListEntry.pl to make
        it function with different revisions of the User form.

(JCM)   arsperl now requires at minimum perl 5.004.

(JCM)   converted "na" "sv_unref" to PL_ namespace. 
        added perl-version checking so it will still compile
        against 5.004.

(JCM) ! ars4.5 compatibility changes. the following functions
        have altered return values which will break scripts that
        use them _if you compile against 4.5 or later libraries_
   		
   		ars_GetActiveLink 

CHANGES  view on Meta::CPAN

        
        see the documentation on the return values of these functions
        for details on what has changed.

(JCM) ! changed ars_GetCharMenu so that {'menuType'} is returned
        as a string (decoded) instead of an integer.

(JCM) ! added a parameter to ars_Import which will require that existing
        scripts be updated. see documentation for details.

(JCM)   added patch submitted by Geoff Endresen which enabled decoding
        of push fields actions in GetFilter()

(JCM)   enhanced Makefile.PL to be more intelligent when h2ph fails or
        doesnt exist

(JCM)   added/decoded schemaType (within GetSchema()/CompoundSchema structure)

(JCM)   documentation updates


CHANGES  view on Meta::CPAN

(JCM)   added bug fix to NTRegisterServer from  G David Frye {gdf at uiuc.edu}

(JCM) ! ars4.0 integration (see RELNOTES for important compatibility
        information)

(JCM) ! perl_qualifier() now takes a control struct 

(JCM)   if compiled against API >= 4.0 then __ars_init __ars_term
        no longer do anything (but are still there). the functionality
        of each of these have been rolled into ars_Login and ars_Logoff
        respectively.

(JCM)   added ars_APIVersion() 

(JCM)   GetActiveLink, when compiled against 4.0 returns ARMessageStruct

(JCM)   applied some changes contributed by Murray Nesbitt 
        {murray at ActiveState.com} so that it will compile against the
        active state version of perl more easily. 

(JCM)   changed licensing to match that of perl itself.

CHANGES  view on Meta::CPAN


 (BM)   removed most of the PPERLC and AWP stuff that was intended
        to help the port to ActiveState perl.  Use the One True Perl.

 (BM)   Changed many of the allocations to use perl's memory manager,
        except where the structure or element is grown further internally
        by ARS, or where the structure is non-trivial to free().  I still
        have concerns about some of the un-freed allocations in 
        supportrev.c, but at least ALL of the demo scripts, 
        including ARSDoc-1.11 (with small patch submitted to list) now 
        run, and produce the right results.

 (BM)   Removed all references to ZEROMEM in favor of perl's Zero, which
        is guaranteed to work everywhere, and doesn't need additional logic.

 (BM)   fixed a couple of small typos, including one in a elliptical 
        declaration (...) which didn't have a comma separator.

 (BM)   Changed the logic of CVLD in one place that was attempting to free()
        null pointers.

CHANGES  view on Meta::CPAN

Released: 03/30/98 Version: 1.55


(JCM)   added ars_GetListEntry.pl example to show how to use
        custom query-list fields.

(JCM)   numerous documentation updates by {D.J.Adams at soton.ac.uk}

(JCM)   fixed bug in macroParm decoding. {D.J.Adams at soton.ac.uk}

(JCM)   fixed bug when decoding results of GetFilter/GetActiveLink
        in regards to set fields actions: values assigned to
        diary fields were not being interpretted correctly.
        {D.J.Adams at soton.ac.uk}

(JCM)   patched perl_BuildEntryIdList to make it more robust
        (Ulrich Pfeifer {pfeifer at wait.de})

(JCM)   patched ars_GetCharMenu for bug "GetCharMenu doesn't
        return a qualifier for query menus" {D.J.Adams at soton.ac.uk}

CHANGES  view on Meta::CPAN



(JCM)   fixed some minor errors in doc


Released: 11/19/97 Version: 1.5206


(JCM)   added ars_GetVUI to the ARS.pm exports line.

(JCM)   added refreshCode to GetCharMenu hash

(JCM)   fixed bug in groupList value change in 1.5205


Released: 11/04/97 Version: 1.5205


(JCM)   updated the groupList value returned by GetSchema()
        so that it contains the correct key words.

CHANGES  view on Meta::CPAN


(JCM)   Profiling code added to keep track of number of
        queries made.

(JWM)   Field caching code added to make some of the functions
        more efficient.

(JCM)   New functions: ars_GetFilter(), ars_GetCharMenu(), 
        ars_GetServerStatistics

(JWM)   Internal GetField call now caches results to minimize
        number of queries made.

(JCM)   Examples of new functions. 

(JCM)   "WhoUsesIt.pl" utility


Released: 01/12/96 Version: 1.0beta


INSTALLATION  view on Meta::CPAN


   o  ARS 5.x, 6.x, 7.x, or 8.x API libraries and includes (header files).
   o  Perl 5.x with the dynamic loading option compiled in.

Please see:  https://rrr.se/cgi/index?pg=arapi   
for a pre-packaged archive of API libraries
(it is also possible to pull all of this together on your own if you have access
to /opt/bmc/ARSystem on your ARS server)

Note for Linux 64-bit:
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

INSTALLATION  view on Meta::CPAN

This extension has been successfully built and used under the following
OS versions:

   o  Solaris 2.4 - 8
   o  Irix 6.2
   o  HPUX*
   o  WindowsNT, 2000, XP (But NOT win95)
   o  Linux (RHEL through v7)

Users of other OS's might encounted problems with compiling. We'd be
interested in hearing about your experiences and if you got it working
under a new OS.


BUILDING

To build the extension, change into the root directory of the distribution
and edit the Makefile.PL file. Change the following lines in it to point to
the location of your ARS API directory (e.g. /u/remedy/api/lib)

$ARSAPI = "/opt/remedy/api764sp5linux";
$ARCHITECTURE = "lx64";     # Linux 64-bit

Under Sunos 4.1.x, you will also need to add -lntc to $ARS_LIBS.
Under Irix 6.2, you will need to remove the -lnsl option from $ARS_LIBS.
Under HP-UX, you will need to build it statically into Perl.
Under WindowsNT you will need to insert the appropriate libraries
(arapi.lib and nts.lib) from the API kit included with NT Server,
and the path to the include files, into Makefile.pl (or the resulting
Makfile).

then execute the following comands:

> perl Makefile.PL
> make
> make install

The first command will construct a Makefile.
The second comand will compile the source files.

META.json  view on Meta::CPAN

   },
   "name" : "ARSperl",
   "no_index" : {
      "directory" : [
         "t",
         "inc"
      ]
   },
   "prereqs" : {
      "build" : {
         "requires" : {
            "ExtUtils::MakeMaker" : "0"
         }
      },
      "configure" : {
         "requires" : {
            "ExtUtils::MakeMaker" : "0"
         }
      },
      "runtime" : {
         "requires" : {}
      }
   },
   "release_status" : "stable",
   "resources" : {
      "bugtracker" : {
         "web" : "https://github.com/jeffmurphy/ARSperl/issues"
      },
      "repository" : {
         "url" : "https://github.com/jeffmurphy/ARSperl"
      }
   },
   "version" : "1.93"
}

META.yml  view on Meta::CPAN

---
abstract: 'ARSperl is an integration kit for Perl5 and the Remedy Action Request System.'
author:
  - 'ARSPerl Dev Group <arsperl-devel@arsperl.org>'
build_requires:
  ExtUtils::MakeMaker: '0'
configure_requires:
  ExtUtils::MakeMaker: '0'
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.150001'
license: artistic
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'
name: ARSperl
no_index:
  directory:
    - t
    - inc
requires: {}
resources:
  bugtracker: https://github.com/jeffmurphy/ARSperl/issues
  repository: https://github.com/jeffmurphy/ARSperl
version: '1.93'

Makefile.PL  view on Meta::CPAN


print "Building against perl $]\n";

$AUTODEFINES .= " -DPERL_PATCHLEVEL_IS=$Config{'PATCHLEVEL'} -DPERL_SUBVERSION_IS=$Config{'SUBVERSION'} -DPERL_BASEREV_IS=".($Config{'baserev'}*10)." ";

if($Config{'baserev'} == 5 &&
   $Config{'PATCHLEVEL'} == 4 &&
   $Config{'SUBVERSION'} == 3) {
	print "\n\nWARNING: Perl-5.004_03 contained a buggy 'h2ph' application.\nYou should examine line 100 of perl's 'h2ph' script and be sure that it\n
produces correct syntax (it's missing a close-parenthesis)\n";
	print "\nsleeping for 5 seconds. press control-c to abort.\n\n";
	sleep 5;
}

if ($LARCH =~ /64/) {
	if ($Config{'cc'} =~ /cc/) {
		$REDUCE_SYMBOL_SCOPE = 1;
	}
	else {
		print "\n\nWARNING: Because of symbol name collisions (both -- perl and arapi -- use the xdr-functions),\n" .
		      "         it is necessary to reduce the symbol scope to symbols declared within the DSO.\n" .

Makefile.PL  view on Meta::CPAN


die "FATAL: couldn't detect a supported api version!" if ($ARAPIVERSION eq "");
#$PM->{'ARS/_h2ph_pre.ph'} = '$(INST_LIBDIR)/ARS/_h2ph_pre.ph';

WriteMakefile(
	      'NAME'	=> 'ARS',
	      'VERSION_FROM' => 'ARS.pm',
	      'DISTNAME' => 'ARSperl',
	      'LICENSE'  => 'artistic_1',
	      'META_MERGE' => {
	        resources => {
	          repository => 'https://github.com/jeffmurphy/ARSperl',
	          bugtracker => 'https://github.com/jeffmurphy/ARSperl/issues',
	        },
	      },
	      'LIBS'	=> $GNU_WIN ? [""] : ["${ARS_LDPATH} ${ARS_LIBS}"],
	      'MYEXTLIB' => $WINDOWS ? ($GNU_WIN ? $ARS_LIBS : '') : $ARS_STATIC_LIB,
	      'OBJECT' => q[ARS$(OBJ_EXT) support$(OBJ_EXT) supportrev$(OBJ_EXT) supportrev_generated$(OBJ_EXT) ],
	      'INC'	=> "${INCLUDES}",
	
	      'PM' => $PM,

Makefile.PL  view on Meta::CPAN

#    -DSKIP_SV_ISA  (not automatically set)
#
#       If you get errors during compilation/runtime similar to 
#       "undefined symbol: sv_isa" then add this define.

	      'DEFINE'	=> ${AUTODEFINES},
#             'DEFINE'  => '-D_WIN32 ', # note: win32 -> no -DPROFILE


# if you have trouble under solaris when linking (bfd assertion 
# failures) try uncommenting the following:
#
#	      'LD' => "/usr/ccs/bin/ld",

# don't fiddle with this

              'realclean' => {
		 'FILES' => 'support.h ARS/ar-h.pm ARS/arerrno-h.pm ARS/_h2ph_pre.ph  t/config.cache serverTypeInfoHints.h *~ .purify ' 
	      } 
);

Makefile.PL  view on Meta::CPAN


#
# given an API version from above, return the minimum server version
#  that supports it.
# That is, if an API version is supported by multiple releases of the
#  AR System Server, we return the chronologically first version
#  since compiling against that version will have been the first
#  time we have arsperl will have to change to support the API change.
#
# this whole strategy of deriving the server version from the api version
#  presumes that we won't have to distinguish between releases of the
#  same api version, which may or may not be correct.
#
# the api version can be the main variable arsperl uses to adjust
#  itself however.
#

sub serverReleaseFromAPIVersion {
  my $api_version = shift;

  # keys are server releases converted to floating point numbers;

RELNOTES  view on Meta::CPAN

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

RELNOTES  view on Meta::CPAN

re-worked the source code and merged it into Gurusamy Sarathy's 
version of perl for windows. 

1.5 Notes
---------

This release contains serveral bug fixes and minor feature additions.
An effort was made to implement the remaining ARS functions, however,
it proved to be very time consuming to implement and test them. Therefore,
in this release most of the remaining functions have been implemented. 
The rest will likely be implemented in a future release. See TODO for
a list of remaining functions.

1.4 Notes 
---------

The notifier functions have been added to the main package. This allows
a script to connect and register itself as a user and then receive 
notifications (examples are included).  You can also send notifications from 
a script.

RELNOTES  view on Meta::CPAN

Everything basically remains the same so you don't need to modify your
scripts. The only things that change are the NT (notification) routines 
to a certain extent. However, since NT (notification) support is new to
this release, this shouldn't be a problem.

The doc has been reorganized as well.

1.3 Notes
---------

We've added some features for performance analysis. In particular, 
we've added the "profiling" feature to ARSperl. Now, when you call
ars_Login() it initializes a profiling variable that will track
the number of queries your script makes against the server. You
can then access this information using the ars_GetProfileInfo() call.

We send this information to syslog() automatically at the end of
each script and then process the syslog file later on to keep stats
on our API scripts. In this fashion, we can quickly determine which
scripts are triggered the most, and which make the most queries. We
can then concentrate out optimization efforts on those particular

StructDef.pl  view on Meta::CPAN

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

StructDef.pl  view on Meta::CPAN

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

StructDef.pl  view on Meta::CPAN

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

changes.dat  view on Meta::CPAN

TS  fixed SignalTypeMap problem
TS  package directory reorganization/cleanup
TS  additional ars_Login parameters by Conny Martin
TS  implemented ars_GetList/Get/Create/Set/DeleteImage
TS  fixed incorrect AR_ARITH_OP_NEGATE handling in rev_ARArithOpStruct
TS  fixed wrong operand evaluation for AR_ARITH_OP_NEGATE in perl_ARArithOpStruct
TS  fixed ars_SetServerInfo() memory violation in case of more than one key/value pair
TS  ars_GetFieldTable performance improvement by using ARGetMultipleFields
TS  removed unnecessary second invocation of ARGetField in ars_GetField
TS  code cleanup (#ifdef statements) in ARGetFieldCached, ars_GetField, ars_GetFieldByName
!TS  appended ARControlStruct pointer address to server key in %ARS::field_cache
    (affects only scripts which make explicit use of the internal field_cache structure)
!CL  enhanced ARS OO interface to handle custom enum fields
TS  fixed return value of ars_Import
TS  fixed memory violation in ars_GetListContainer
TS  implemented ars_qualifier_ptr function (inverse of ars_perl_qualifier)
TS  added ownerObjList parameter to ars_GetListContainer
TS  fixed AR_SERVER_INFO type identification in infra/exsi.pl
TS  updated version numbers in INSTALLATION
TS  added ars_DateToJulianDate, ars_GetListLicense, ars_ValidateMultipleLicenses,
    ars_GetServerCharSet, ars_GetClientCharSet

changes.dat  view on Meta::CPAN

TS  changed type of "owner" attribute: ARNameType -> ARAccessNameType
TS  corrected function signature for ars_SetVUI, ars_CreateSchema
TS  fixed memory leak in sv_to_ARValue (support.c)
TS  fixed memory leak in ars_GetMultipleEntries, ars_GetListEntryWithFields
      XPUSHs(newRV_noinc(...)) -> XPUSHs(sv_2mortal(newRV_noinc(...)))
TS  added "name" value to schemaHash returned by ars_GetSchema
TS  fixed rev_ARArchiveInfo Struct, moved function from supportrev_generated.c to supportrev.c
TS  changed $ARS_LIBS variable for 7.0 Unix API in Makefile.pl (-licuuc -> -licuucbmc)

released=03/12/2007 version=1.90
TS  added missing ARError_reset() to ars_GetListVUI
TS  added ars_CreateCharMenu, ars_SetCharMenu
TS  added handling of case AR_CHAR_MENU_LIST in ars_GetCharMenu
TS  changed handling of qualifier struct in ars_GetCharMenu, case AR_CHAR_MENU_QUERY
TS  corrected function signature for ars_SetField, ars_CreateContainer
TS  bugfix in ars_GetCharMenu (incorrect array length for "labelFields", "labelIndex")
TS  added ars_SetImpersonatedUser
TS  bugfix in ARError (support.c, memory violation if appendedText == NULL)
TS  ars_SetLogging: changed declaration "int len" to "STRLEN len" because of 
    compilation problems on Solaris
TS  added ars_BeginBulkEntryTransaction, ars_EndBulkEntryTransaction

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

changes.dat  view on Meta::CPAN

JCM enhanced ars_Export to handle all possible export types
    in whatever api we're compiled against
JCM enhanced ars_Import to handle all possible import types
    in whatever api we're compiled against
JCM typo fix in ARS.xs for perl5.6 compatibility
JCM documenation update (ars_Import)

released=7/4/2000 version=1.68
JCM modifications to example/ars_GetListEntry.pl to make
    it function with different revisions of the User form.
JCM arsperl now requires at minimum perl 5.004.
JCM converted "na" "sv_unref" to PL_ namespace. 
    added perl-version checking so it will still compile
    against 5.004.
!JCM ars4.5 compatibility changes. the following functions
      have altered return values which will break scripts that
      use them <U>if you compile against 4.5 or later libraries</U>
           <blockquote>
                ars_GetActiveLink<BR>
                ars_GetFilter<BR>
                ars_GetEscalation<BR>
                ars_CreateActiveLink<BR>
           </blockquote>
      see the documentation on the return values of these functions
      for details on what has changed.
!JCM changed ars_GetCharMenu so that {'menuType'} is returned
      as a string (decoded) instead of an integer.
!JCM added a parameter to ars_Import which will require that existing
     scripts be updated. see documentation for details.
JCM added patch submitted by Geoff Endresen which enabled decoding
    of push fields actions in GetFilter()
JCM enhanced Makefile.PL to be more intelligent when h2ph fails or
    doesnt exist
JCM added/decoded schemaType (within GetSchema()/CompoundSchema structure)
JCM documentation updates

released=2/17/00 version=1.67
JCM  ars_SetServerPort() added
JCM  fixed bug in ars_GetListSQL()

changes.dat  view on Meta::CPAN

released=12/28/98 version=1.62
JCM  added extra decoding code to GetFilter.pl example script
JCM  syntax errors fixed in some example scripts
JCM  added bug fix to NTRegisterServer from  G David Frye {gdf at uiuc.edu}
!JCM  ars4.0 integration (see RELNOTES for important compatibility
           information)
!JCM  perl_qualifier() now takes a control struct 
JCM  if compiled against API &gt;= 4.0 then __ars_init __ars_term
           no longer do anything (but are still there). the functionality
           of each of these have been rolled into ars_Login and ars_Logoff
           respectively.
JCM  added ars_APIVersion() 
JCM  GetActiveLink, when compiled against 4.0 returns ARMessageStruct
JCM  applied some changes contributed by Murray Nesbitt 
           {murray at ActiveState.com} so that it will compile against the
           active state version of perl more easily. 
JCM  changed licensing to match that of perl itself.

released=09/16/98 version=1.61
JCM  new utility: example/AddUsersToGroup.pl - bulk add a bunch
		of users to a specified group 

changes.dat  view on Meta::CPAN


released=03/31/98 version=1.6000 BETA
BM   removed most of the PPERLC and AWP stuff that was intended
	   to help the port to ActiveState perl.  Use the One True Perl.
BM   Changed many of the allocations to use perl's memory manager,
 	   except where the structure or element is grown further internally
	   by ARS, or where the structure is non-trivial to free().  I still
	   have concerns about some of the un-freed allocations in 
	   supportrev.c, but at least ALL of the demo scripts, 
	   including ARSDoc-1.11 (with small patch submitted to list) now 
	   run, and produce the right results.
BM   Removed all references to ZEROMEM in favor of perl's Zero, which
	   is guaranteed to work everywhere, and doesn't need additional logic.
BM   fixed a couple of small typos, including one in a elliptical 
	   declaration (...) which didn't have a comma separator.
BM   Changed the logic of CVLD in one place that was attempting to free()
	   null pointers.

released=03/31/98 version=1.56
JCM  fixed a problem caused by some debugging code that
           was left in 1.55 accidentally.

released=03/30/98 version=1.55
JCM  added ars_GetListEntry.pl example to show how to use
           custom query-list fields.
JCM  numerous documentation updates by {D.J.Adams at soton.ac.uk}
JCM  fixed bug in macroParm decoding. {D.J.Adams at soton.ac.uk}
JCM  fixed bug when decoding results of GetFilter/GetActiveLink
           in regards to set fields actions: values assigned to
           diary fields were not being interpretted correctly.
           {D.J.Adams at soton.ac.uk}
JCM  patched perl_BuildEntryIdList to make it more robust
           (Ulrich Pfeifer {pfeifer at wait.de})
JCM  patched ars_GetCharMenu for bug "GetCharMenu doesn't
          return a qualifier for query menus" {D.J.Adams at soton.ac.uk}
JCM  fixed dup_FieldValueOrArith to support decoding of
           query style menus. 

released=02/09/98 version=1.54
JCM  fixed bug in ars_EncodeDiary()
JCM  added ars_MergeEntry.pl example script

released=12/15/97        version=1.53
JCM  fixed some minor errors in doc

released=11/19/97      version=1.5206
JCM  added ars_GetVUI to the ARS.pm exports line.
JCM  added refreshCode to GetCharMenu hash
JCM  fixed bug in groupList value change in 1.5205

released=11/04/97	version=1.5205
JCM  updated the groupList value returned by GetSchema()
           so that it contains the correct key words.

released=10/29/97  version=1.5204
JCM  added ars_GetControlStructFields()

released=10/20/97   version=1.5203

changes.dat  view on Meta::CPAN


released=11/11/96	version=1.3
JWM undef works in setEntry now.
JWM added ars_Import to complement ars_Export
JCM Profiling code added to keep track of number of
	    queries made.
JWM Field caching code added to make some of the functions
	    more efficient.
JCM New functions: ars_GetFilter(), ars_GetCharMenu(), 
		ars_GetServerStatistics
JWM Internal GetField call now caches results to minimize
		number of queries made.
JCM Examples of new functions. 
JCM "WhoUsesIt.pl" utility

released=01/12/96	version=1.0beta
JWM First release 
JCM Installation, history, and Gnu documentation added.
            Removed -lars from makefile (internal C library that wasn't
            released), not needed for arsperl.
JCM Added example scripts and html documentation.

example/AddUsersToGroup.pl  view on Meta::CPAN

  || die "ars_LoadQualifier(Group): $ars_errstr";

# fetch the Entry ID for this group by using GetListEntry with the group we just specified, if there is none, die.
my @groupentry = ars_GetListEntry( $ctrl, "Group", $groupqualifier, 0, 0 )
  || die "No such group \"$group\" ($ars_errstr)\n";

# Fetch the values for this record:
( my %groupvalues = ars_GetEntry( $ctrl, "Group", $groupentry[0] ) )
  || die "ars_GetEntry(Group): $ars_errstr";

# We are only interested in the field marked Group ID:
my $group_id = $groupvalues{ $groupfields{'Group ID'} };

# This loop will process all users one by one, see if they are already a member of the group specified,
# if neccesary we add them to the group by changing the Group List and writing it back.
foreach (@users) {
    print "Adding $_ to $group .. \n";

    # Create a qualifier to retrieve the Entry ID for this user
    ( my $userqualifier =
          ars_LoadQualifier( $ctrl, "User", "'Login Name' = \"$_\"" ) )

example/GetCharMenu.pl  view on Meta::CPAN

# Revision 1.5  1998/10/14 13:55:34  jcmurphy
# fixed syntax error
#
# Revision 1.4  1998/09/16 14:38:31  jcmurphy
# updated changeDiary code
#
# Revision 1.3  1998/02/25 19:21:32  jcmurphy
# updated to printout query if query style menu
#
# Revision 1.2  1997/11/10 23:36:52  jcmurphy
# added refreshCode to the output
#
# Revision 1.1  1996/11/21 20:13:51  jcmurphy
# Initial revision
#
#

use ARS;
require 'ars_QualDecode.pl';

# SUBROUTINE

example/GetCharMenu.pl  view on Meta::CPAN

print "owner       : ".$finfo->{"owner"}."\n";
print "lastChanged : ".$finfo->{"lastChanged"}."\n";
print "changeDiary : ".$finfo->{"changeDiary"}."\n";

foreach (@{$finfo->{"changeDiary"}}) {
    print "\tTIME: ".localtime($_->{"timestamp"})."\n";
    print "\tUSER: $_->{'user'}\n";
    print "\tWHAT: $_->{'value'}\n";
}

print "refreshCode : ".$finfo->{"refreshCode"}."\n";
print "menuType    : ".$finfo->{"menuType"}."\n";

if($finfo->{menuType} eq "query") {

	ARS::insertValueForCurrentTransaction($ctrl, 
					 $finfo->{'menuQuery'}{'schema'},
					 $finfo->{'menuQuery'}{'qualifier'});


    print "menuQuery definitions:\n";

example/GetField.pl  view on Meta::CPAN

#    jeff murphy
#
# 02/19/97
#
# $Log: GetField.pl,v $
# Revision 1.5  2009/03/31 13:34:32  mbeijen
# Verified and updated examples.
# Removed ars_GetFullTextInfo.pl because ars_GetFullTextInfo is obsolete since ARS > 6.01
#
# Revision 1.4  1998/09/11 14:46:18  jcmurphy
# altered script logic so that it figures out whether it
# should decode a hash or array on the fly.
# fixed typo that was causing arrays not to be printed.
#
# Revision 1.3  1997/11/26 20:05:54  jcmurphy
# nada
#
# Revision 1.2  1997/05/07 15:38:19  jcmurphy
# fixed incorrect hash usage
#
# Revision 1.1  1997/02/19 22:41:16  jcmurphy

example/GetFilter.pl  view on Meta::CPAN

ars_Logoff($ctrl);

exit 0;

# Most of these subroutines were taken directly from Show_ALink.pl

# SUBROUTINE
#   PrintArith
#
# DESCRIPTION
#   Attempt to "pretty print" the arith expression (just for
#   the hell of it)
#
# NOTES
#   Notic that parenthesis are printed, although they are not
#   explicitly part of the node information. They are derived
#   from the ordering of the tree, instead. If you want to actually
#   *evaluate* the expression, you will have to derive the 
#   parenthetical encoding from the tree ordering.
#
#   Here is an example equation and how it is encoded:
#
#   ((10 + 2) / 3)
#
#          "/"
#         /   \
#       "+"    3
#      /  \

example/GetFilter.pl  view on Meta::CPAN

#   mathematical precedence) so you should evaluate the tree from 
#   the bottom up. 
#
#   ars_web.cgi has an evaluation routine for computing the value
#   of a arith structure. we will probably break it out into a
#   perl module.
#
# THOUGHTS
#   I don't know if this routine will work for all cases.. but
#   i did some tests and it looked good. Ah.. i just wrote it
#   for the fun of it.. so who cares? :)

sub PrintArith {
    my $a = shift;

    PrintArith_Recurs($a, 0);
    print "\n";
}

sub PrintArith_Recurs {
    my $a = shift;

example/GetFilter.pl  view on Meta::CPAN

	printl 5, "query = $qt\n";
    }


    if(defined($field->{process})) {
        printl 3, "Process: $field->{process}\n";
    }
    if(defined($field->{arith})) {
        printl 3, "Arithmetic:\n";
#       ProcessArithStruct($field->{arith});
        printl 4, "Expression: ";
        PrintArith($field->{arith});
    }
    if(defined($field->{function})) {
        printl 3, "Function:\n";
        ProcessFunctionList(4, @{$field->{function}});
    }
    if(defined($field->{dde})) {
        printl 3, "DDE not implemented in ARSperl.\n";
    }
}

example/PrintQual.pl  view on Meta::CPAN

#    in your own scripts by requiring 'ars_QualDecode.pl';
# 
# TODO
#    TR. and DB. references need to be implemented in ARS.xs
#    as of now, we don't get that information, so we can't
#    decode it.
#
#    ArithStruct is not handled. See the GetFilter.pl example
#    for routines that will handle this. This probably doesnt
#    matter since i dont think ARS allows you to use arith
#    expression in a qualification.
#
# AUTHOR
#    jeff murphy
#
# 02/20/97
#
# $Log: PrintQual.pl,v $
# Revision 1.2  1999/10/03 04:09:08  jcmurphy
# various
#

example/Show_ALink.pl  view on Meta::CPAN

#    Show_ALink.pl
#
# DESCRIPTION
#    Use ars_GetActiveLink to obtain information about an active link.
#
# NOTES
#    This is a fairly large and involved example, however it illustrates
#    many points about how to decode the more complex information that
#    can be passed back from the API.
#
#    All structures demonstrated herein are documented in the usage.html
#    documentation.
#
#    This example file parse most (but not all) of the active links 
#    fields. 
#
# AUTHOR
#    jeff murphy
#
# 01/12/96
# 

example/Show_ALink.pl  view on Meta::CPAN

	    print "\t";
	}
	print @s;
    }
}

# SUBROUTINE
#   DecodeExecMask
#
# DESCRIPTION
#   Simple routine to return a string representing (in english)
#   the execution mask value(s).

$AR_EXECUTE_ON_NONE          = 0;
$AR_EXECUTE_ON_BUTTON        = 1;
$AR_EXECUTE_ON_RETURN        = 2;
$AR_EXECUTE_ON_SUBMIT        = 4;
$AR_EXECUTE_ON_MODIFY        = 8;
$AR_EXECUTE_ON_DISPLAY       = 16;
$AR_EXECUTE_ON_MODIFY_ALL    = 32;
$AR_EXECUTE_ON_MENU          = 64;

example/Show_ALink.pl  view on Meta::CPAN

	    }
	}
    }
    return($s);
}

# SUBROUTINE
#   PrintArith
#
# DESCRIPTION
#   Attempt to "pretty print" the arith expression (just for
#   the hell of it)
#
# NOTES
#   Notic that parenthesis are printed, although they are not
#   explicitly part of the node information. They are derived
#   from the ordering of the tree, instead. If you want to actually
#   *evaluate* the expression, you will have to derive the 
#   parenthetical encoding from the tree ordering.
#
#   Here is an example equation and how it is encoded:
#
#   ((10 + 2) / 3)
#
#          "/"
#         /   \
#       "+"    3
#      /  \

example/Show_ALink.pl  view on Meta::CPAN

#   mathematical precedence) so you should evaluate the tree from 
#   the bottom up. 
#
#   ars_web.cgi has an evaluation routine for computing the value
#   of a arith structure. we will probably break it out into a
#   perl module.
#
# THOUGHTS
#   I don't know if this routine will work for all cases.. but
#   i did some tests and it looked good. Ah.. i just wrote it
#   for the fun of it.. so who cares? :)

sub PrintArith {
    my $a = shift;

    PrintArith_Recurs($a, 0);
    print "\n";
}

sub PrintArith_Recurs {
    my $a = shift;

example/Show_ALink.pl  view on Meta::CPAN

    }
    if(defined($field->{field})) {
	printl 3, "Field: $field->{field}\n";
    }
    if(defined($field->{process})) {
	printl 3, "Process: $field->{process}\n";
    }
    if(defined($field->{arith})) {
	printl 3, "Arithmetic:\n";
#	ProcessArithStruct($field->{arith});
	printl 4, "Expression: ";
	PrintArith($field->{arith});
    }
    if(defined($field->{function})) {
	printl 3, "Function:\n";
	ProcessFunctionList(4, @{$field->{function}});
    }
    if(defined($field->{dde})) {
	printl 3, "DDE not implemented in ARSperl.\n";
    }
}

example/ars_ExecuteProcess.pl  view on Meta::CPAN

#   ars_ExecuteProcess.pl [server] [username] [password] ["process"]
#    if you need to use a specified TCP port, export the ARTCPPORT environment variable
#    with the TCP Port number
#
# EXAMPLE
#   ars_ExecuteProcess.pl arserver user password "ls -l /" (if the server is on Unix)
#  ars_ExecuteProcess.pl arserver user password " cmd /c dir" (if the server is on Win32)
#  ars_ExecuteProcess.pl arserver user password Application-Generate-GUID
#
# DESCRIPTION
#   Execute given command on remote arserver. Requires admin account to work.
#
# AUTHOR
#   Jeff Murphy
#
# $Log: ars_ExecuteProcess.pl,v $
# Revision 1.3  2009/03/31 13:34:32  mbeijen
# Verified and updated examples.
# Removed ars_GetFullTextInfo.pl because ars_GetFullTextInfo is obsolete since ARS > 6.01
#
# Revision 1.2  2007/08/02 14:48:21  mbeijen

example/ars_GetListSQL.pl  view on Meta::CPAN

#
# USAGE
#   ars_GetListSQL.pl [server] [username] [password]
#
# DESCRIPTIONS
#   Log into the ARServer with the given username and password and
#   request that the SQL command (hardcoded below) be executed. Dump
#   output to stdout.
#
# NOTES
#   Requires Administrator privs to work.
#
# AUTHOR
#   Jeff Murphy
#
# $Log: ars_GetListSQL.pl,v $
# Revision 1.3  2009/03/31 13:34:32  mbeijen
# Verified and updated examples.
# Removed ars_GetFullTextInfo.pl because ars_GetFullTextInfo is obsolete since ARS > 6.01
#
# Revision 1.2  2000/02/03 21:29:03  jcmurphy

example/ars_QualDecode.pl  view on Meta::CPAN

# ROUTINE
#   Decode_QualHash($ctrl, $schema, $qualhash)
#
# DESCRIPTION
#   Takes that hash that is returned by
#   ars_perl_qualifier() and converts it
#   into something (more or less) readable
#
# NOTES
#   This routine over parenthesises, but should
#   yield correct results nonetheless.
#
#   We need the ctrl struct and schema name so
#   we can reverse map from fieldId's to field names.
#
# RETURNS
#   a scalar on success
#   undef on failure
#
# AUTHOR
#   jeff murphy

example/ars_QualDecode.pl  view on Meta::CPAN

	} 
	else {
	    
	    # this is a number
	    
	    $e = "$h->{value}";
	    
	}
    }

    # an arithmetic expression
    # not implemented. see code in GetField.pl for
    # example of decoding. i dont think ARS allows
    # arith in the qualification (i think aradmin will
    # give an error) so this is irrelevant to this
    # demo.

    elsif(defined($h->{arith})) {
	# addition by "David Adams" <D.J.Adams@soton.ac.uk>
	local($ar) = $h->{arith};
	$e .= "(".Decode_FVoAS($ar->{left}, $fids)." ".$ar->{oper}." ".Decode_FVoAS($ar->{right}, $fids).")";

example/ars_SetServerInfo.pl  view on Meta::CPAN

#
# $Header: /cvsroot/arsperl/ARSperl/example/ars_SetServerInfo.pl,v 1.1 2000/08/31 05:18:41 jcmurphy Exp $
#
# NAME
#   ars_SetServerInfo.pl
#
# USAGE
#   ars_SetServerInfo.pl [server] [username] [password] [emailAdd]
#
# DESCRIPTION
#   sets the "email from" address for the server. 
#

use ARS;

my $c = ars_Login(shift, shift, shift);
die "ars_Login: $ars_errstr\n" unless defined($c);

print "Fetching current EMAIL_FROM setting..\n";
my %il = ars_GetServerInfo($c,
			   &ARS::AR_SERVER_INFO_EMAIL_FROM);

example/ars_decodeStatusHistory.pl  view on Meta::CPAN


die "usage: ars_decodeStatusHistory.pl [server] [username] [password] [form] [entry]\n" unless ($#ARGV == 4);

# Log in to the server
(my $ctrl = ars_Login(shift, shift, shift)) ||
    die "login: $ars_errstr";

(my $form, my $entry) = (shift, shift);

# get the information for this entry. ars_GetEntry returns a hash of field ID's and its values.
# in fact, we only are interested in this example in field 15 which contains the Status History.
(my %entry = ars_GetEntry($ctrl, $form, $entry, 15)) ||
    die "GetEntry: $ars_errstr (no entry $entry in form $form ?)";

# load the field information for field 7 (Status) so we can determine what the names are for 
# the different statuses.
(my $field_info = ars_GetField($ctrl, $form, 7)) ||
    die "GetField: $ars_errstr ";

# retrieving all status values for enumerated field Status
my @enum_vals = @{$field_info->{limit}{enumLimits}{regularList}};

html/changes.html  view on Meta::CPAN

<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed wrong operand evaluation for AR_ARITH_OP_NEGATE in perl_ARArithOpStruct 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed ars_SetServerInfo() memory violation in case of more than one key/value pair 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>ars_GetFieldTable performance improvement by using ARGetMultipleFields 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>removed unnecessary second invocation of ARGetField in ars_GetField 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>code cleanup (#ifdef statements) in ARGetFieldCached, ars_GetField, ars_GetFieldByName 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='red'>appended ARControlStruct pointer address to server key in %ARS::field_cache 
(affects only scripts which make explicit use of the internal field_cache structure) </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(CL)</td><td width='90%'><font color='red'>enhanced ARS OO interface to handle custom enum fields 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed return value of ars_Import 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed memory violation in ars_GetListContainer 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>implemented ars_qualifier_ptr function (inverse of ars_perl_qualifier) 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added ownerObjList parameter to ars_GetListContainer 

html/changes.html  view on Meta::CPAN

      BGCOLOR='black'>
      <TR>
	<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>03/12/2007</B></td>
              <td width='50%'>Version: <B>1.90
</B></td>
  </tr></table></td>
            </tr><tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added missing ARError_reset() to ars_GetListVUI 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added ars_CreateCharMenu, ars_SetCharMenu 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added handling of case AR_CHAR_MENU_LIST in ars_GetCharMenu 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>changed handling of qualifier struct in ars_GetCharMenu, case AR_CHAR_MENU_QUERY 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>corrected function signature for ars_SetField, ars_CreateContainer 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>bugfix in ars_GetCharMenu (incorrect array length for "labelFields", "labelIndex") 

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>

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>7/4/2000</B></td>
              <td width='50%'>Version: <B>1.68
</B></td>
  </tr></table></td>
            </tr><tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>modifications to example/ars_GetListEntry.pl to make 
it function with different revisions of the User form. </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>arsperl now requires at minimum perl 5.004. 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>converted "na" "sv_unref" to PL_ namespace.  
added perl-version checking so it will still compile against 5.004. </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='red'>ars4.5 compatibility changes. the following functions 
have altered return values which will break scripts that use them <U>if you compile against 4.5 or later libraries</U> <blockquote> ars_GetActiveLink<BR> ars_GetFilter<BR> ars_GetEscalation<BR> ars_CreateActiveLink<BR> </blockquote> see the documenta...
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='red'>changed ars_GetCharMenu so that {'menuType'} is returned 
as a string (decoded) instead of an integer. </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='red'>added a parameter to ars_Import which will require that existing 
scripts be updated. see documentation for details. </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added patch submitted by Geoff Endresen which enabled decoding 
of push fields actions in GetFilter() </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>enhanced Makefile.PL to be more intelligent when h2ph fails or 
doesnt exist </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added/decoded schemaType (within GetSchema()/CompoundSchema structure) 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>documentation updates 
</table></td></tr></table>

<P>

html/changes.html  view on Meta::CPAN

</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>syntax errors fixed in some example scripts 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added bug fix to NTRegisterServer from  G David Frye {gdf at uiuc.edu} 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='red'>ars4.0 integration (see RELNOTES for important compatibility 
information) </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='red'>perl_qualifier() now takes a control struct  
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>if compiled against API &gt;= 4.0 then __ars_init __ars_term 
no longer do anything (but are still there). the functionality of each of these have been rolled into ars_Login and ars_Logoff respectively. </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added ars_APIVersion()  
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>GetActiveLink, when compiled against 4.0 returns ARMessageStruct 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>applied some changes contributed by Murray Nesbitt  
{murray at ActiveState.com} so that it will compile against the active state version of perl more easily.  </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>changed licensing to match that of perl itself. 
</table></td></tr></table>

<P>

html/changes.html  view on Meta::CPAN

	  <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>03/31/98</B></td>
              <td width='50%'>Version: <B>1.6000 BETA
</B></td>
  </tr></table></td>
            </tr><tr bgcolor='#eeeeee'><td width='10%'>(BM)</td><td width='90%'><font color='black'>removed most of the PPERLC and AWP stuff that was intended 
to help the port to ActiveState perl.  Use the One True Perl. </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(BM)</td><td width='90%'><font color='black'>Changed many of the allocations to use perl's memory manager, 
except where the structure or element is grown further internally by ARS, or where the structure is non-trivial to free().  I still have concerns about some of the un-freed allocations in  supportrev.c, but at least ALL of the demo scripts,  includin...
<tr bgcolor='#eeeeee'><td width='10%'>(BM)</td><td width='90%'><font color='black'>Removed all references to ZEROMEM in favor of perl's Zero, which 
is guaranteed to work everywhere, and doesn't need additional logic. </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(BM)</td><td width='90%'><font color='black'>fixed a couple of small typos, including one in a elliptical  
declaration (...) which didn't have a comma separator. </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(BM)</td><td width='90%'><font color='black'>Changed the logic of CVLD in one place that was attempting to free() 
null pointers. </table></td></tr></table>

<P>


html/changes.html  view on Meta::CPAN

  <table width='100%' border='0'><tr>
	      <td width='50%'>Released: <B>03/30/98</B></td>
              <td width='50%'>Version: <B>1.55
</B></td>
  </tr></table></td>
            </tr><tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added ars_GetListEntry.pl example to show how to use 
custom query-list fields. </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>numerous documentation updates by {D.J.Adams at soton.ac.uk} 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>fixed bug in macroParm decoding. {D.J.Adams at soton.ac.uk} 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>fixed bug when decoding results of GetFilter/GetActiveLink 
in regards to set fields actions: values assigned to diary fields were not being interpretted correctly. {D.J.Adams at soton.ac.uk} </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>patched perl_BuildEntryIdList to make it more robust 
(Ulrich Pfeifer {pfeifer at wait.de}) </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>patched ars_GetCharMenu for bug "GetCharMenu doesn't 
return a qualifier for query menus" {D.J.Adams at soton.ac.uk} </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>fixed dup_FieldValueOrArith to support decoding of 
query style menus.  </table></td></tr></table>

<P>

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/19/97</B></td>
              <td width='50%'>Version: <B>1.5206
</B></td>
  </tr></table></td>
            </tr><tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added ars_GetVUI to the ARS.pm exports line. 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added refreshCode to GetCharMenu hash 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>fixed bug in groupList value change in 1.5205 
</table></td></tr></table>

<P>


    <TABLE CELLSPACING='0'
      CELLPADDING='2'
      WIDTH='100%'

html/changes.html  view on Meta::CPAN

            </tr><tr bgcolor='#eeeeee'><td width='10%'>(JWM)</td><td width='90%'><font color='black'>undef works in setEntry now. 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JWM)</td><td width='90%'><font color='black'>added ars_Import to complement ars_Export 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>Profiling code added to keep track of number of 
queries made. </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JWM)</td><td width='90%'><font color='black'>Field caching code added to make some of the functions 
more efficient. </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>New functions: ars_GetFilter(), ars_GetCharMenu(),  
ars_GetServerStatistics </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JWM)</td><td width='90%'><font color='black'>Internal GetField call now caches results to minimize 
number of queries made. </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>Examples of new functions.  
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>"WhoUsesIt.pl" utility 
</table></td></tr></table>

<P>


    <TABLE CELLSPACING='0'

html/copying.html  view on Meta::CPAN

the GNU Library General Public License instead.)  You can apply it to
your programs, too.<p>

When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.<p>

To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.<p>

For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.<p>

We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,

html/copying.html  view on Meta::CPAN

<dl compact>
<dt>0. 
<dd>This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".<p>

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.<p>

<dt>1. 
<dd>You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;

html/copying.html  view on Meta::CPAN

a storage or distribution medium does not bring the other work under
the scope of this License.<p>

<dt>3. 
<dd>You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:<p>

<dl compact>
<dt>a) 
<dd>Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,<p>

<dt>b) 
<dd>Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,<p>

<dt>c) 
<dd>Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)<p>
</dl>

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a

html/copying.html  view on Meta::CPAN

itself accompanies the executable.<p>

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.<p>

<dt>4. 
<dd>You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.<p>

<dt>5. 
<dd>You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are

html/copying.html  view on Meta::CPAN

modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.<p>

<dt>6. 
<dd>Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.<p>

<dt>7. 
<dd>If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you

html/copying.html  view on Meta::CPAN

such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.<p>

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.<p>

<dt>8. 
<dd>If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.<p>

<dt>9. 
<dd>The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.<p>

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.<p>

<dt>10. 
<dd>If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.<p>

<center><h2 align=center>NO WARRANTY</h2></center>

<dt>11. 
<dd>BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

html/copying.html  view on Meta::CPAN

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.<p>

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:<p>

<dl>
<dd>Yoyodyne, Inc., hereby disclaims all copyright interest in the program
    `Gnomovision' (which makes passes at compilers) written by James Hacker.<p>

<dd>&lt;signature of Ty Coon>, 1 April 1989<br>
    Ty Coon, President of Vice<p>
</dl>

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.<p>
</body>
</html>

html/install.html  view on Meta::CPAN

 <HEAD>
  <TITLE> ARSperl: Installation Notes </TITLE>
 </HEAD>

 <BODY BGCOLOR="#FFFFFF">
 <H2> Installation of ARSperl </H2>

 <OL>
   <LI> <A HREF="http://sourceforge.net/project/showfiles.php?group_id=116013&package_id=125945">Download the distribution</A><P>It's also available via <a href="http://www.cpan.org/">CPAN</a>. T
There are pre-compiled binaries for Windows (see below) available too.
   <LI> Unpack (requires gzip and tar on Unix or 
        <a href="http://www.winzip.com">WinZip</A> under Windows)
   <LI> Edit the Makefile.PL and follow the brief instructions contained in 
	it.
   <LI> Type "perl Makefile.PL"
   <LI> Type "make"
   <LI> Type "make install" (may require special permission). This will
        install the perl extension into the perl lib directory.
   <LI> Try one of the example scripts.
 </OL>

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

	}
      </PRE>

<I>ARS::AR_DAY was introduced in version 1.5 of ARSperl</I>

<P>
<HR WIDTH="30%">
<P>
<A HREF="toc.html"><IMG ALT="&lt;--" SRC="arrow.gif" ALIGN=CENTER> Table of Contents </A>
<p>
<address>
Last changes to this page 21st July 1997 by jcmurphy@arsperl.org<BR>
&#169; J.C.Murphy, J.W.Murphy 1997 arsperl@arsperl.org
</address>
</BODY>
</HTML>

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

	}
      </PRE>

<I>ARS::AR_HOUR was introduced in version 1.5 of ARSperl</I>

<P>
<HR WIDTH="30%">
<P>
<A HREF="toc.html"><IMG ALT="&lt;--" SRC="arrow.gif" ALIGN=CENTER> Table of Contents </A>
<p>
<address>
Last changes to this page 21st July 1997 by jcmurphy@arsperl.org<BR>
&#169; J.C.Murphy, J.W.Murphy 1997 arsperl@arsperl.org
</address>
</BODY>
</HTML>

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

  $id = $f->create(-values =&gt; { 
               "Attachment Field Name" =&gt; { file =&gt; scalar filename, 
                                            OR
                                            buffer =&gt; scalar,
                                            AND
                                            size =&gt; scalar
                                          }
                              });
</PRE>

    Note that the size field must correspond to either the length of the
    in-core buffer or the size of the file you wish to attach. Specifying
    and incorrect length will result in a truncated attachment. See the
    <code>t/entry.t</code> file in the source distribution for an example
    of adding attachments to records.

<P>
<DT><A NAME="delete"><B>delete()</B></A>
<PRE>
   $f->delete(-entry =&gt; scalar string);
</PRE>

    This method will delete a given entry from the form. It does not "pad

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

<BODY BGCOLOR="#FFFFFF">
<CENTER>
<H1>ARSperl Programmer's Manual - OO Layer Overview</H1>
</CENTER>

<H2> Objective </H2>

Since there are several (at least 3) separate OO layers out there, some of
      which work on top of ARSperl and some of which don't, I decided to
      implement a layer ontop of ARSperl so that you get all of the
      features of ARSperl as well as an OO layer for a subset of those
      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>



( run in 0.975 second using v1.01-cache-2.11-cpan-49f99fa48dc )