ARSperl

 view release on metacpan or  search on metacpan

ARS.xs  view on Meta::CPAN

		ctrl->password[sizeof(ctrl->password)-1] = 0;
#ifndef AR_MAX_LOCALE_SIZE
		/* 6.0.1 and 6.3 are AR_EXPORT_VERSION = 8L but 6.3 does not
	         * contain the language field
	         */
		ctrl->language[0] = 0;
		if ( CVLD(lang) ) {
			strncpy(ctrl->language, lang, AR_MAX_LANG_SIZE);
		}
#else 
		ctrl->localeInfo.locale[0] = 0;
		if ( CVLD(lang) ) {
			strncpy(ctrl->localeInfo.locale, lang, AR_MAX_LANG_SIZE);
		}

		if( items > staticParams ){
			int i;
			HV *h;

			if( (items - staticParams) % 2 ){
				(void) ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS);
#ifdef PROFILE
				AP_FREE(ctrl); /* invalid, cleanup */

ARS.xs  view on Meta::CPAN

#endif
				goto ar_login_end;
			}

			h = newHV();			
			for( i = staticParams; i < items; i+=2 ){
				hv_store_ent( h, newSVsv(ST(i)), newSVsv(ST(i+1)), 0 );
			}

			if( hv_exists(h,"charSet",7) ){
				strncpy( ctrl->localeInfo.charSet, SvPV_nolen( *(hv_fetch(h,"charSet",7,0)) ), AR_MAX_LANG_SIZE );
			}
			if( hv_exists(h,"timeZone",8) ){
				strncpy( ctrl->localeInfo.timeZone, SvPV_nolen( *(hv_fetch(h,"timeZone",8,0)) ), AR_MAX_LOCALE_SIZE );
			}
			if( hv_exists(h,"customDateFormat",16) ){
				strncpy( ctrl->localeInfo.customDateFormat, SvPV_nolen( *(hv_fetch(h,"customDateFormat",16,0)) ), AR_MAX_FORMAT_SIZE );
			}
			if( hv_exists(h,"customTimeFormat",16) ){
				strncpy( ctrl->localeInfo.customTimeFormat, SvPV_nolen( *(hv_fetch(h,"customTimeFormat",16,0)) ), AR_MAX_FORMAT_SIZE );
			}
			if( hv_exists(h,"separators",10) ){
				strncpy( ctrl->localeInfo.separators, SvPV_nolen( *(hv_fetch(h,"separators",10,0)) ), AR_MAX_LANG_SIZE );
			}

			hv_undef( h );
		}
#endif
#if AR_EXPORT_VERSION >= 7L
		ctrl->authString[0] = 0;
		if ( CVLD(authString) ) {
			strncpy(ctrl->authString, authString, AR_MAX_NAME_SIZE);
		}

ARS.xs  view on Meta::CPAN

			ARError(ret, status);
#ifdef PROFILE
			AP_FREE(ctrl);
#else
			safefree(ctrl);
#endif
			goto ar_login_end;
		}

		/*
		printf( "ctrl->localeInfo.customDateFormat <%s>\n", ctrl->localeInfo.customDateFormat );
		printf( "ctrl->localeInfo.separators <%s>\n",       ctrl->localeInfo.separators );
		*/
#endif

		if (!server || !*server) {
			DBG( ("no server given. picking one.\n") );
#if AR_EXPORT_VERSION >= 4
	  		ret = ARGetListServer(ctrl, &serverList, &status);
#else
	  		ret = ARGetListServer(&serverList, &status);
#endif

ARS.xs  view on Meta::CPAN

	{
	   (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
	   XPUSHs(sv_2mortal(newSVpv(ctrl->server, 0)));
	   XPUSHs(sv_2mortal(newSViv(ctrl->sessionId)));
#if AR_EXPORT_VERSION >= 7
	   XPUSHs(sv_2mortal(newSVpv(ctrl->authString, 0)));
#endif
	}

SV *
ars_GetCurrentServer(ctrl)

ARS.xs  view on Meta::CPAN

	  char        *helpText = CPNULL;
	  ARTimestamp  timestamp;
	  ARAccessNameType   owner;
	  ARAccessNameType   lastChanged;
	  char        *changeDiary = CPNULL;
	  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,
# endif
			 &dPropList, &helpText, 
			 &timestamp, owner, lastChanged, &changeDiary,
#if AR_CURRENT_API_VERSION >= 17
			 &objPropList,
#endif
			 &status);
# ifdef PROFILE
	  ((ars_ctrl *)ctrl)->queries++;
# endif
	  if(!ARError( ret, status)) {
# if AR_EXPORT_VERSION >= 6
	     hv_store(RETVAL, "locale", strlen("locale"), newSVpv(locale, 0), 0);
	     hv_store(RETVAL, "vuiType", strlen("vuiType"), newSViv(vuiType), 0);
# endif
	     hv_store(RETVAL,  "schema", strlen("schema") , newSVpv(schema, 0), 0);
	     hv_store(RETVAL,  "vuiId", strlen("vuiId") , newSViv(vuiId), 0);
	     hv_store(RETVAL,  "vuiName", strlen("vuiName") , newSVpv(vuiName, 0), 0);
	     hv_store(RETVAL,  "owner", strlen("owner") , newSVpv(owner, 0), 0);
	     if(helpText)
	        hv_store(RETVAL,  "helpText", strlen("helpText") , newSVpv(helpText, 0), 0);
	     hv_store(RETVAL,  "lastChanged", strlen("lastChanged") , newSVpv(lastChanged, 0), 0);
	     if (changeDiary) {

ARS.xs  view on Meta::CPAN

	ARControlStruct *	ctrl
	ARNameType schemaName
	SV * vuiDefRef

	CODE:
	{
#if AR_EXPORT_VERSION >= 6L
		int ret = 0, rv = 0;
		ARInternalId vuiId = 0;
		ARNameType vuiName;
		ARLocaleType locale;
		unsigned int vuiType;
		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{
			croak("usage: ars_CreateVUI(...)");
		}


		rv += ulongcpyHVal( vuiDef, "vuiId", &vuiId ); 
		rv += strcpyHVal( vuiDef, "vuiName", vuiName, AR_MAX_NAME_SIZE ); 
#if AR_CURRENT_API_VERSION >= 11
		rv += strcpyHVal( vuiDef, "locale", locale, AR_MAX_LOCALE_SIZE ); 
#else
		rv += strcpyHVal( vuiDef, "locale", locale, AR_MAX_LANG_SIZE ); 
#endif
		rv += uintcpyHVal( vuiDef, "vuiType", &vuiType ); 

		dPropList.numItems = 0;
		dPropList.props = NULL;
		pSvTemp = hv_fetch( vuiDef, "props", strlen("props") , 0 );
		if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
			/* dPropList.props = (ARPropStruct*) MALLOCNN( sizeof(ARPropStruct) ); */
			rv += rev_ARPropList( ctrl, vuiDef, "props", &dPropList );
		}

ARS.xs  view on Meta::CPAN

		}
		if( hv_exists(vuiDef,"changeDiary",11) ){
			rv += strmakHVal( vuiDef, "changeDiary", &changeDiary );
		}

		if( rv == 0 ){
			ret = ARCreateVUI( ctrl,
				schemaName,
				&vuiId,
				vuiName,
				locale,
				vuiType,
				&dPropList,
				helpText,
				owner,
				changeDiary,
#if AR_CURRENT_API_VERSION >= 17
				&objPropList,
#endif
				&status );

ARS.xs  view on Meta::CPAN

	ARNameType schemaName
	ARInternalId vuiId
	SV * vuiDefRef

	CODE:
	{
#if AR_EXPORT_VERSION >= 6L
		int ret = 0, rv = 0;
		ARNameType vuiName;
		char *vuiNamePtr = NULL;
		ARLocaleType locale;
		char *localePtr = NULL;
		unsigned int vuiType;
		unsigned int *vuiTypePtr = NULL;
		ARPropList *dPropList = NULL;
		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(...)");
		}


		/* rv += ulongcpyHVal( vuiDef, "vuiId", &vuiId ); */

		
		if( hv_exists(vuiDef,"vuiName",7) ){
			rv += strcpyHVal( vuiDef, "vuiName", vuiName, AR_MAX_NAME_SIZE ); 
			vuiNamePtr = vuiName;
		}
		if( hv_exists(vuiDef,"locale",6) ){
#if AR_CURRENT_API_VERSION >= 11
			rv += strcpyHVal( vuiDef, "locale", locale, AR_MAX_LOCALE_SIZE );
#else
			rv += strcpyHVal( vuiDef, "locale", locale, AR_MAX_LANG_SIZE );
#endif
			localePtr = locale;
		}
		
		if( hv_exists(vuiDef,"vuiType",7) ){
			rv += uintcpyHVal( vuiDef, "vuiType", &vuiType ); 
			vuiTypePtr = &vuiType;
		}


		pSvTemp = hv_fetch( vuiDef, "props", strlen("props") , 0 );
		if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){

ARS.xs  view on Meta::CPAN

		}
		if( hv_exists(vuiDef,"changeDiary",11) ){
			rv += strmakHVal( vuiDef, "changeDiary", &changeDiary );
		}

		if( rv == 0 ){
			ret = ARSetVUI( ctrl,
				schemaName,
				vuiId,
				vuiNamePtr,
				localePtr,
				vuiTypePtr,
				dPropList,
				helpText,
				owner,
				changeDiary,
#if AR_CURRENT_API_VERSION >= 17
				objPropList,
#endif
				&status );

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

{
 "schema"             =&gt; string,
 "vuiId"              =&gt; integer,
 "vuiName"	      =&gt; string,
 "owner"              =&gt; string,
 "helpText"           =&gt; string,
 "lastChanged"        =&gt; string,
 "changeDiary" =&gt; <i>list</I> of references to <a href="ds_diaryentry_hash.html">Diary Entry Structures</a>,
 "timestamp"          =&gt; integer,
 "props"              =&gt; <B>reference</B> to an array of <A HREF="ds_prop_hash.html">props</A>,
 "locale"             =&gt; string, (5.x only)
 "vuiType"             =&gt; integer (5.x only)
}
</PRE>

See the <CODE>ar.h</CODE> file that accompanies the
ARSystem API for a lengthy and well commented list of properties and property
values.

<P>
<HR WIDTH="30%">

t/aptest50.def  view on Meta::CPAN

   default-vui    : Default Administrator View
   num-vuis       : 1
   export-version : 6
   schema-type    : 1
   next-field-id  : 536870915
vui  {
   id             : 536870912
   name           : Default Administrator View
   label          : Default Administrator View
   timestamp      : 1049205528
   vui-locale     : 
   vui-type       : 1
   owner          : jcmurphy
   last-changed   : jcmurphy
   display-prop   : 1\20\4\26\Default Administrator View\
}
field {
   id             : 1
   name           : Request ID
   datatype       : 4
   fieldtype      : 1

t/aptest50.def  view on Meta::CPAN

   default-vui    : Default Admin View
   num-vuis       : 1
   export-version : 6
   schema-type    : 1
   next-field-id  : 536870912
vui  {
   id             : 536870912
   name           : Default Admin View
   label          : Default Admin View
   timestamp      : 1049205536
   vui-locale     : 
   vui-type       : 1
   owner          : jcmurphy
   last-changed   : jcmurphy
   display-prop   : 1\20\4\18\Default Admin View\
}
field {
   id             : 1
   name           : Request ID
   datatype       : 4
   fieldtype      : 1

t/aptest50.def  view on Meta::CPAN

      primary     : ARSperl Test
      secondary   : ARSperl Test2
      join-option : 1
      join-query  : 4\1\99\1\1\1\
   next-field-id  : 536871018
vui  {
   id             : 536870912
   name           : Default Admin View
   label          : Default Admin View
   timestamp      : 1049205537
   vui-locale     : 
   vui-type       : 1
   owner          : jcmurphy
   last-changed   : jcmurphy
   display-prop   : 1\20\4\18\Default Admin View\
}
field {
   id             : 1
   name           : Request ID
   datatype       : 4
   fieldtype      : 2

t/aptest51.def  view on Meta::CPAN

   default-vui    : Default Administrator View
   num-vuis       : 1
   export-version : 6
   schema-type    : 1
   next-field-id  : 536870915
vui  {
   id             : 536870912
   name           : Default Administrator View
   label          : Default Administrator View
   timestamp      : 1049205528
   vui-locale     : 
   vui-type       : 1
   owner          : jcmurphy
   last-changed   : jcmurphy
   display-prop   : 1\20\4\26\Default Administrator View\
}
field {
   id             : 1
   name           : Request ID
   datatype       : 4
   fieldtype      : 1

t/aptest51.def  view on Meta::CPAN

   default-vui    : Default Admin View
   num-vuis       : 1
   export-version : 6
   schema-type    : 1
   next-field-id  : 536870912
vui  {
   id             : 536870912
   name           : Default Admin View
   label          : Default Admin View
   timestamp      : 1049205536
   vui-locale     : 
   vui-type       : 1
   owner          : jcmurphy
   last-changed   : jcmurphy
   display-prop   : 1\20\4\18\Default Admin View\
}
field {
   id             : 1
   name           : Request ID
   datatype       : 4
   fieldtype      : 1

t/aptest51.def  view on Meta::CPAN

      primary     : ARSperl Test
      secondary   : ARSperl Test2
      join-option : 1
      join-query  : 4\1\99\8\1\8\
   next-field-id  : 536871018
vui  {
   id             : 536870912
   name           : Default Admin View
   label          : Default Admin View
   timestamp      : 1049205537
   vui-locale     : 
   vui-type       : 1
   owner          : jcmurphy
   last-changed   : jcmurphy
   display-prop   : 1\20\4\18\Default Admin View\
}
field {
   id             : 1
   name           : Request ID
   datatype       : 4
   fieldtype      : 2

t/aptest51.def  view on Meta::CPAN

   sort-list      : 4\536870914\1\536870915\2\536870919\1\3\2
   object-prop    : 5\60006\4\0\\60008\40\0\60009\4\0\\60010\4\0\\60018\4\12\ARSperlTest3\
   archive        : 0\0\0
      arch-time   : 0\0\0\0
      arch-from   : 
vui  {
   id             : 536870912
   name           : Default Admin View
   label          : Default Admin View
   timestamp      : 1225458854
   vui-locale     : 
   vui-type       : 1
   owner          : Demo
   last-changed   : Demo
   display-prop   : 5\20\4\18\Default Admin View\264\6\0\60019\4\21\ViewWebAlias536870912\251\6\0\252\6\0\
}
vui  {
   id             : 536872074
   name           : TEST_StandardView
   label          : TEST_StandardView
   timestamp      : 1225458854
   vui-locale     : de_DE
   vui-type       : 1
   owner          : Demo
   last-changed   : Demo
   display-prop   : 8\20\4\17\TEST_StandardView\264\6\0\251\6\0\252\6\0\60019\4\16\TestStandardView\256\4\0\\260\4\0\\261\6\0\
}
vui  {
   id             : 536873337
   name           : TEST_FixedWebView
   label          : TEST_FixedWebView
   timestamp      : 1225458854
   vui-locale     : fr_FR
   vui-type       : 3
   owner          : Demo
   last-changed   : Demo
   display-prop   : 6\20\4\17\TEST_FixedWebView\264\6\0\251\6\0\252\6\0\60019\4\16\TestFixedWebView\83\4\1125\<HTML>
<HEAD>

<%@ page contentType="text/html; charset=win
   display-prop   : dows-1252"%><%@ taglib uri="remedy_arsys" prefix="arsys" %><arsys:preamble /></HEAD>
<BODY><!--METADATA TYPE="DesignerControl" startspan
		<OBJECT cla
   display-prop   : ssid="clsid:496A808B-407A-11D4-80DA-00B0D020044D" width=1600 height=20>
		<PARAM NAME="ARType" VALUE="26">
		<PARAM NAME="ViewID" VALUE="536873337">

   display-prop   : 	</OBJECT>-->
   <arsys:open_services>
      <arsys:form server="@@SERVER@@" name="@@FORM@@" vuiid="536873337"/>
   </arsys:open_services><!--METADAT
   display-prop   : A TYPE="DesignerControl" endspan--><!--METADATA TYPE="DesignerControl" startspan
	  <OBJECT classid="clsid:496A808B-407A-11D4-80DA-00B0D020044D" width=
   display-prop   : 900 height=50>
	  <PARAM NAME="ARType" VALUE="31">
	  <PARAM NAME="Form" VALUE="ARSperl Test3">
     </OBJECT>--><arsys:form_view/><!--METADATA TYPE=
   display-prop   : "DesignerControl" endspan--><!--METADATA TYPE="DesignerControl" startspan
	  <OBJECT classid="clsid:496A808B-407A-11D4-80DA-00B0D020044D" width=1600 he



( run in 0.868 second using v1.01-cache-2.11-cpan-5a3173703d6 )