ARSperl

 view release on metacpan or  search on metacpan

ARS.xs  view on Meta::CPAN

#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++;
#endif
	 /* if all went well, and user requested synchronous processing 
	  * then we push the returnStatus and returnString back out to them.
	  * if they requested async, then we just push a 1 to indicate that the
	  * command to the API was successfully handled (and foo || die constructs
	  * will work correctly).
	  */
	 if(!ARError( ret, status)) {
		if(runOption == 0) {
			XPUSHs(sv_2mortal(newSViv(returnStatus)));
			XPUSHs(sv_2mortal(newSVpv(returnString, 0)));
			if(returnString) AP_FREE(returnString);

CHANGES  view on Meta::CPAN

        return undef on failure.

(JCM)   buffer overflow in perl_BuildEntryList

(JCM)   malloc-on-windows patch by John Unsworth

 (TS)   fixed memory leak in ars_Get... functions (added "sv_2mortal( (SV*) RETVAL )")

 (TS)   bugfix in dup_Value (support.c) for API version <= 5.0.1

 (TS)   changed enum limits processing in perl_ARFieldLimitStruct for API version <= 5.0.1

 (TS)   updated MANIFEST file

 (TS)   replaced strdup() by arsperl_strdup() for win32 to fix problems with VisualStudio8

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

CHANGES  view on Meta::CPAN

 (TS)   fixed support.c:perl_ARByteList (Bug ID 1213180)
        (David Lindes {lindes at users.sourceforge.net})

 (TS)   added support for DATA_TYPE_CURRENCY to perl_ARFieldLimitStruct

 (TS)   added function perl_ARCurrencyDetailList

 (TS)   fixed support.c:my_strtok, perl_BuildEntryList
        (ars_GetEntry crashed when retrieving join form entries)

 (TS)   added preprocessor directives (ARS.xs, support.c, support-h.template)
        for conditional compilation depending on API version
        (compiles now against version 4.5.1 to 6.3.0)

(JCM)   added ars_encodeStatusHistory() routine 


Released: 06/24/2005 Version: 1.84


(JCM)   fixed 'autosplit' issue in Makefile.PL

RELNOTES  view on Meta::CPAN

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
API scripts.

In addition, a few new functions were added (GetFilter, GetCharMenu and
GetServerStatistics, ars_Export). The first two are used by the WhoUsesIt.pl 
utility. This utility (found in the "examples" directory) is handy for
locating which filter or menu is referencing a particular file, or 
seeing exactly what filters a particular schema uses.. etc. This 

StructDef.pl  view on Meta::CPAN

	_type => 'ARFilterActionStruct',
},
ARFilterActionStruct => {
	_switch  => 'p->action',
	_map => {
		AR_FILTER_ACTION_NONE           => 'none',
		AR_FILTER_ACTION_NOTIFY         => 'notify',
		AR_FILTER_ACTION_MESSAGE        => 'message',
		AR_FILTER_ACTION_LOG            => 'log',
		AR_FILTER_ACTION_FIELDS         => 'assign_fields',
		AR_FILTER_ACTION_PROCESS        => 'process',
		AR_FILTER_ACTION_FIELDP         => 'fieldp',
		AR_FILTER_ACTION_SQL            => 'sqlCommand',
		AR_FILTER_ACTION_GOTOACTION     => 'gotoAction',
		AR_FILTER_ACTION_CALLGUIDE      => 'callGuide',
		AR_FILTER_ACTION_EXITGUIDE      => 'exitGuide',
		AR_FILTER_ACTION_GOTOGUIDELABEL => 'gotoGuide',
	},
	_case    => {
		AR_FILTER_ACTION_NONE => {
			_default => 1,

StructDef.pl  view on Meta::CPAN

			},
		},
		'AR_FILTER_ACTION_FIELDS+' => {
			_max_version => '5.1.2',
			assign_fields => {
				_type => 'ARFieldAssignList',
				_data => 'p->u.fieldList',
			},
		},
		AR_FILTER_ACTION_PROCESS => {
			process => {
				_type => 'char*',
				_data => 'p->u.process',
			},
		},
		AR_FILTER_ACTION_FIELDP => {
			_min_version => '6.0.0',
			fieldp => {
				_type => 'ARPushFieldsActionStruct',
				_data => 'p->u.pushFields',
			},
		},
		'AR_FILTER_ACTION_FIELDP+' => {

changes.dat  view on Meta::CPAN

TS  fixed ars_GetAlertCount
MB  removed legacy ars_NT Notifier and ars_AdminExtension calls
!MB  added ars_VerifyUser implementation by Thilo Stapff
!MB  changed ars_APIVersion to use AR_CURRENT_API_VERSION rather than AR_EXPORT_VERSION
MB  fixed ars_GetActiveLink, ars_GetFilter, ars_GetEscalation, ars_GetField so they 
    return undef on failure.
JCM buffer overflow in perl_BuildEntryList
JCM malloc-on-windows patch by John Unsworth
TS  fixed memory leak in ars_Get... functions (added "sv_2mortal( (SV*) RETVAL )")
TS  bugfix in dup_Value (support.c) for API version <= 5.0.1
TS  changed enum limits processing in perl_ARFieldLimitStruct for API version <= 5.0.1
TS  updated MANIFEST file
TS  replaced strdup() by arsperl_strdup() for win32 to fix problems with VisualStudio8
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)

changes.dat  view on Meta::CPAN

    html/manual/toc.html;  new files: html/manual/ars_SetLogging.html, t/21setlogging.t)
TS  fixed pointer dereferencing error in supportrev.c:strmakHval
TS  fixed supportrev.c:strcasecmp, strncasecmp; failure to differentiate between 
    string and substring (e.g. "page_holder" and "page")
TS  fixed support.c:perl_ARByteList (Bug ID 1213180)
    (David Lindes {lindes at users.sourceforge.net})
TS  added support for DATA_TYPE_CURRENCY to perl_ARFieldLimitStruct
TS  added function perl_ARCurrencyDetailList
TS  fixed support.c:my_strtok, perl_BuildEntryList
    (ars_GetEntry crashed when retrieving join form entries)
TS  added preprocessor directives (ARS.xs, support.c, support-h.template)
    for conditional compilation depending on API version
    (compiles now against version 4.5.1 to 6.3.0)
JCM added ars_encodeStatusHistory() routine 

released=06/24/2005 version=1.84
JCM fixed 'autosplit' issue in Makefile.PL
IT  Updates by Ian Trimnell for ars_GetListContainer and ars_GetContainer

released=03/14/2005 version=1.83
JCM fixed "lang" compilation error for API 6.3

example/AddUsersToGroup.pl  view on Meta::CPAN

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' = \"$_\"" ) )
      || die "ars_LoadQualifier: $ars_errstr";

# Fetch the EID for this user; if there is no such user, say so and continue with next user

example/GetFilter.pl  view on Meta::CPAN

    my $a = shift;
    my $n;

    if(defined($a)) {
	printl 5, "Operation: $a->{oper}\n";
	$n = $a->{left};
	if(defined($n)) {
#	    printl 5, "(Left) ";
	    printl 5, "Value: \"$n->{value}\"\n" if defined($n->{value});
	    printl 5, "Field: \$$n->{field}->{fieldId}\$\n" if defined($n->{field});
	    printl 5, "Process: $n->{process}\n" if defined($n->{process});
	    ProcessArithStruct($n->{arith}) if defined($n->{arith});
	    printl 5, "Function: $n->{function}\n" if defined($n->{function});
	    printl 5, "DDE: DDE not supported in ARSperl\n" if defined($n->{dde});
	}
	$n = $a->{right};
	if(defined($n)) {
#	    printl 5, "(Right) ";
	    printl 5, "Value: \"$n->{value}\"\n" if defined($n->{value});
	    printl 5, "Field: \$$n->{field}->{fieldId}\$\n" if defined($n->{field});
	    printl 5, "Process: $n->{process}\n" if defined($n->{process});
	    ProcessArithStruct($n->{arith}) if defined($n->{arith});
	    printl 5, "Function: $n->{function}\n" if defined($n->{function});
	    printl 5, "DDE: DDE not supported in ARSperl\n" if defined($n->{dde});
	}
    }
}

# SUBROUTINE
#   ProcessFunctionList
#
# DESCRIPTION
#   Parse and dump the function list structure. 

sub ProcessFunctionList {
    my $t = shift;   # how much indentation to use
    my @func = @_;
    my $i;

    printl $t, "Function Name: \"$func[0]\" .. Num of args: $#func\n";

    # we need to process all of the arguments listed.

    for($i=1;$i<=$#func;$i++) {
	printl $t+1, "Value: \"$func[$i]->{value}\"\n" if defined($func[$i]->{value});
	printl $t+1, "Field: \$$func[$i]->{field}->{fieldId}\$\n" if defined($func[$i]->{field});
	printl $t+1, "Process: $func[$i]->{process}\n" if defined($func[$i]->{process});

	PrintArith($func[$i]->{arith}) if defined($func[$i]->{arith});

	# if the arg is a pointer to another function, we need to process
	# it recursively.

	if(defined($func[$i]->{function})) {
	    ProcessFunctionList($t+1, @{$func[$i]->{function}});
	}
	printl $t+1, "DDE: DDE not supported in ARSperl\n" if defined($func[$i]->{dde});
    }
}

# SUBROUTINE

example/GetFilter.pl  view on Meta::CPAN


	my($dq) = ars_perl_qualifier($ctrl, $field->{field}->{qualifier});
	my($qt) = ars_Decode_QualHash($ctrl, $field->{field}->{schema}, $dq);
	
	printl 4, "Qualification:\n";
	printl 5, "schema= ".$field->{'field'}->{'schema'}."\n";
	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";
    }
}

# SUBROUTINE
#   ProcessActions
#
# DESCRIPTION
#   this routine processes the list of actions for this filter,
#   deciding what actions are defined and dumping the appropriate 
#   information.
# 
# AUTHOR
#   jeff murphy

sub ProcessActions {
    my @actions = @_;
    if(defined(@actions)) {
        $act_num = 1;

example/GetFilter.pl  view on Meta::CPAN

	      # messageNum messageType messageText

                $action->{message} =~ 
                    /Type\ ([0-9]+)\ Num\ ([0-9]+)\ Text \[(.*)\]/;
                printl 2, "Message: (raw=\"$action->{'message'}\")\n";
		#print "keys ", keys %{$action->{'message'}}, "\n";
                printl 3, "Type: ",$MessageTypes[$action->{'message'}->{'messageType'}],"\n";
                printl 3, "Num: $action->{'message'}->{'messageNum'}\n";
                printl 3, "Text: $action->{'message'}->{'messageText'}\n";
            }
            if(defined($action->{process})) {
                printl 2, "Process: ".$action->{process}."\n";
            }
            if(defined($action->{notify})) {
                printl 2, "Notify:\n";
		printl 3, "user: $action->{notify}{user}\n";
		printl 3, "notifyMechanism: ".
		    ("Notifier", "E-Mail", "User Default", "Cross Ref",
		     "Other")[$action->{notify}{notifyMechanism}-1]."\n";
		printl 3, "notifyMechanismXRef: $action->{notify}{notifyMechanismXRef}\n";
		printl 3, "subjectText: $action->{notify}{subjectText}\n";
		printl 3, "notifyText: $action->{notify}{notifyText}\n";

example/GetFilter.pl  view on Meta::CPAN

		    printl 4, "$fid\n";
		}
            }
            if(defined($action->{none})) {
                printl 2, "No actions specified.\n";
            }
            $act_num++;
        }
        print "\n";
    } else {
        print "No actions to process!\n";
    }
}

# SUBROUTINE
#   Decode_opSetMask (value)
#
# DESCRIPTION
#   Takes the numeric opSet field and returns a list (space separated)
#   of operation names that this filter will execute on.
# 

example/Show_ALink.pl  view on Meta::CPAN

    my $a = shift;
    my $n;

    if(defined($a)) {
	printl 5, "Operation: $a->{oper}\n";
	$n = $a->{left};
	if(defined($n)) {
#	    printl 5, "(Left) ";
	    printl 5, "Value: \"$n->{value}\"\n" if defined($n->{value});
	    printl 5, "Field: \$$n->{field}->{fieldId}\$\n" if defined($n->{field});
	    printl 5, "Process: $n->{process}\n" if defined($n->{process});
	    ProcessArithStruct($n->{arith}) if defined($n->{arith});
	    printl 5, "Function: $n->{function}\n" if defined($n->{function});
	    printl 5, "DDE: DDE not supported in ARSperl\n" if defined($n->{dde});
	}
	$n = $a->{right};
	if(defined($n)) {
#	    printl 5, "(Right) ";
	    printl 5, "Value: \"$n->{value}\"\n" if defined($n->{value});
	    printl 5, "Field: \$$n->{field}->{fieldId}\$\n" if defined($n->{field});
	    printl 5, "Process: $n->{process}\n" if defined($n->{process});
	    ProcessArithStruct($n->{arith}) if defined($n->{arith});
	    printl 5, "Function: $n->{function}\n" if defined($n->{function});
	    printl 5, "DDE: DDE not supported in ARSperl\n" if defined($n->{dde});
	}
    }
}

# SUBROUTINE
#   ProcessFunctionList
#
# DESCRIPTION
#   Parse and dump the function list structure. 

sub ProcessFunctionList {
    my $t = shift;   # how much indentation to use
    my @func = @_;
    my $i;

    printl $t, "Function Name: \"$func[0]\" .. Num of args: $#func\n";

    # we need to process all of the arguments listed.

    for($i=1;$i<=$#func;$i++) {
	printl $t+1, "Value: \"$func[$i]->{value}\"\n" if defined($func[$i]->{value});
	printl $t+1, "Field: \$$func[$i]->{field}->{fieldId}\$\n" if defined($func[$i]->{field});
	printl $t+1, "Process: $func[$i]->{process}\n" if defined($func[$i]->{process});

	PrintArith($func[$i]->{arith}) if defined($func[$i]->{arith});

	# if the arg is a pointer to another function, we need to process
	# it recursively.

	if(defined($func[$i]->{function})) {
	    ProcessFunctionList($t+1, @{$func[$i]->{function}});
	}
	printl $t+1, "DDE: DDE not supported in ARSperl\n" if defined($func[$i]->{dde});
    }
}

# SUBROUTINE

example/Show_ALink.pl  view on Meta::CPAN


    if(defined($field->{none})) {
	printl 3, "No set fields instructions found.\n";
    }
    if(defined($field->{value})) {
	printl 3, "Value: \$$field->{value}\$\n";
    }
    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}});

example/Show_ALink.pl  view on Meta::CPAN


	printl $t, "Macro Text  :\n**START**\n$m->{macroText}\n**END**\n";
    }
}


# SUBROUTINE
#   ProcessActions
#
# DESCRIPTION
#   this routine processes the list of actions for this active link,
#   deciding what actions are defined and dumping the appropriate 
#   information.

sub ProcessActions {
    my @actions = @_;
    if(defined(@actions)) {
	$act_num = 1;
	foreach $action (@actions) {
	    printl 1, "Action $act_num:\n";
	    if(defined($action->{macro})) {

example/Show_ALink.pl  view on Meta::CPAN

		    printl 3, "fieldId: $setFields->{fieldId}\n";
		    ProcessSetFields($setFields->{assignment});
		}
	    }
	    if(defined($action->{message})) {
		printl 2, "Message: \n";
		foreach my $k (keys %{$action->{message}}) {
			printl 3, "$k: $action->{'message'}->{$k}\n";
		}
	    }
	    if(defined($action->{process})) {
		printl 2, "Process: ".$action->{process}."\n";
	    }
	    if(defined($action->{characteristics})) {
		printl 2, "Change Field: ".$action->{characteristics}."\n";
	    }
	    if(defined($action->{dde})) {
		printl 2, "DDE is not implemented in ARSperl.\n";
	    }
	    if(defined($action->{none})) {
		printl 2, "No actions specified.\n";
	    }
	    $act_num++;
	}
	print "\n";
    } else {
	print "No actions to process!\n";
    }
}
# Log onto the ars server specified

($ctrl = ars_Login($server, $username, $password)) || 
    die "can't login to the server";

# Retrieve info about active link.

($a = ars_GetActiveLink($ctrl, $alink_name)) ||

example/WhoUsesIt.pl  view on Meta::CPAN

#
# DESCRIPTION
#   Search all schemas and determine who uses the specified active link,
#   filter, menu or escalation. 
#
#   -a   list all schemas that use this active link
#   -f   .. this filter
#   -m   .. this menu
#   -e   .. this escalation
#   -M   list all menus that use this file
#   -p   list all filters that call this process
#   -s   specify a specific schema to search
#   -v   verbose output
#
# AUTHOR
#   jeff murphy
#   jcmurphy@acsu.buffalo.edu
#
# $Log: WhoUsesIt.pl,v $
# Revision 1.4  2005/04/06 19:13:57  jeffmurphy
# WhoUsesIt mod

example/WhoUsesIt.pl  view on Meta::CPAN

	if(grep(/^$opt_e$/, @escalations)) {
	    $users{$schema} = 1;
	}
    }

    foreach (sort keys %users) {
	print "\t$_\n";
    }

} elsif($opt_p) {
    # find any *filters* that call the named process

    print "Searching for filters that call \"$opt_p\"...\n";

    @filters = ars_GetListFilter($ctrl);
    if($#filters != -1) {
	foreach $filter (@filters) {
	    $finfo = ars_GetFilter($ctrl, $filter);
	    foreach $action (@{$finfo->{actionList}}) {
		if(defined($action->{process})) {
		    print "filter $filter process ".$action->{process}."\n" if $debug;
		    if($action->{process} =~ /$opt_p/) {
			$users{$filter} = $action->{process};
		    }
		}
	    }
	}
	foreach $f (sort keys %users) {
	    if(!$opt_v) {
		print "\t$f\n";
	    } else {
		print "\t$f\n\t\t$users{$f}\n";
	    }

example/ars_ExecuteProcess.pl  view on Meta::CPAN

#!/usr/local/bin/perl
#
# $Header: /cvsroot/arsperl/ARSperl/example/ars_ExecuteProcess.pl,v 1.3 2009/03/31 13:34:32 mbeijen Exp $
#
# NAME
#   ars_ExecuteProcess.pl
#
# USAGE
#   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.

html/WhoUsesIt.html  view on Meta::CPAN

<HTML>
 <HEAD> 
  <TITLE>ARSperl Utilities: WhoUsesIt</TITLE>
 </HEAD> 
 <BODY BGCOLOR="#FFFFFF">
 <H2>WhoUsesIt</H2>

 <H3> Purpose </H3>
 This utility helps you figure out what schemas use a particular filter, active
 link, menu, etc. It also will tell you what filters call a particular external
 process or tell you what menus reference a particular file.
 <P> This is fairly useful if you come across a file and are unsure whether
 or not a filter or menu depends on it. 

 <H3> Author </H3>
 Jeff Murphy<BR>
 <A HREF="mailto:jcmurphy@arsperl.org">jcmurphy@arsperl.org</A>

 <H3> Usage </H3>

 <PRE>

html/WhoUsesIt.html  view on Meta::CPAN


 DESCRIPTION
   Search all schemas and determine who uses the specified active link,
   filter, menu or escalation. 

   -a   list all schemas that use this active link
   -f   .. this filter
   -m   .. this menu
   -e   .. this escalation
   -M   list all menus that use this file
   -p   list all filters that call this process
   -s   specify a specific schema to search
   -v   verbose output
   -h   get help on usage
 </PRE>

 <H3> Examples </H3>

<B> First we'll see who is calling a particular external process. This is a 
 substring match, so the file name of the process need only <I>contain</I>
 the characters "mail_ip" to match. </B>

<PRE>
% ./WhoUsesIt.pl -p mail_ip
Username: jcmurphy
Password: 
Searching for filters that call "mail_ip"...
        PT-Mail IP List
        SM-Mail IP List
        TS-PTA-Mail_IP_List

html/changes.html  view on Meta::CPAN

<tr bgcolor='#eeeeee'><td width='10%'>(MB)</td><td width='90%'><font color='black'>fixed ars_GetActiveLink, ars_GetFilter, ars_GetEscalation, ars_GetField so they  
return undef on failure. </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>buffer overflow in perl_BuildEntryList 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>malloc-on-windows patch by John Unsworth 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed memory leak in ars_Get... functions (added "sv_2mortal( (SV*) RETVAL )") 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>bugfix in dup_Value (support.c) for API version <= 5.0.1 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>changed enum limits processing in perl_ARFieldLimitStruct for API version <= 5.0.1 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>updated MANIFEST file 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>replaced strdup() by arsperl_strdup() for win32 to fix problems with VisualStudio8 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>changed type of "owner" attribute: ARNameType -> ARAccessNameType 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>corrected function signature for ars_SetVUI, ars_CreateSchema 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed memory leak in sv_to_ARValue (support.c) 

html/changes.html  view on Meta::CPAN

<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed supportrev.c:strcasecmp, strncasecmp; failure to differentiate between  
string and substring (e.g. "page_holder" and "page") </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed support.c:perl_ARByteList (Bug ID 1213180) 
(David Lindes {lindes at users.sourceforge.net}) </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added support for DATA_TYPE_CURRENCY to perl_ARFieldLimitStruct 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added function perl_ARCurrencyDetailList 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed support.c:my_strtok, perl_BuildEntryList 
(ars_GetEntry crashed when retrieving join form entries) </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added preprocessor directives (ARS.xs, support.c, support-h.template) 
for conditional compilation depending on API version (compiles now against version 4.5.1 to 6.3.0) </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added ars_encodeStatusHistory() routine  
</table></td></tr></table>

<P>


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

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

    background-color: #FFFFFF;
    }
    dt.c1 {font-weight: bold}
    p.c1 {font-style: italic}
    /*]]>*/
    </style>
  </head>
  <body>
    <h2>
      <code>ars_ExecuteProcess(ctrl, command, runOption=0)</code>
    </h2>Execute the given command on the server host as the user-id that the server process is
    running as. Requires Administrator privs to use.
    <table border="1" width="50%">
      <tr>
        <td>
          <code>runOption</code>
        </td>
        <td>
          Explanation
        </td>
      </tr>
      <tr>
        <td align="center">
          0
        </td>
        <td>
          Wait for process to complete and then returned the process' returnStatus and any output
          that the process had.
        </td>
      </tr>
      <tr>
        <td align="center">
          1
        </td>
        <td>
          Don't wait for process to complete.
        </td>
      </tr>
    </table><br />
    <dl>
      <dt class="c1">
        On success
      </dt>
      <dd>
        Depending upon the runOption specified returns a list of <code>returnStatus</code> and
        <code>returnString</code> or <b>1</b>

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

		<TD>5</TD><TD>Generate a new entry id for all entries</TD>
	</TR>
	<TR>
		<TD>1024+num above</TD><TD>Allow NULL in required fields (not applicable for Submitter,
		Status or Short-Description)</TD>
	</TR>
	<TR>
		<TD>2048+num above</TD><TD>Skip field pattern checking</TD>
	</TR>	
	<TR>
		<TD>4096+num above</TD><TD>Ignore filter processing</TD>
	</TR>	
	</TABLE>
	<P>
	Refer to the Remedy Programmers Manual for further details.
		      <P>
        <a href="OO/form.html#merge">The Object Oriented ARSperl layer
			  tries to be a little easier to use.</a>
<P>
<I>ars_MergeEntry was introduced in version 1.46 of ARSperl</I>

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

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

   <H2><CODE>ars_perl_qualifier($ctrl, $qual)</CODE></H2>

      This function returns a Hash that contains a processed
      version of the qualifier structer (i.e. what is retured
      by ars_LoadQualifier or what is encoded in the qualifier structure
      that appears when you examine Filters and Active links via
      the Perl extension). You can then walk the various
      segments of the Hash and interpret the Qualifier.  <P>
      Note that this is a fairly complex Hash and if all you want
      to do is <I>see</I> the qualifier in a readable form (and
      not interpret it) you might just want to call 
      <A HREF="ars_Export.html">ars_Export</A> and extract the
      readable qualifier from the return value of that routine.

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

 userOrTime     = integer (1 = user, 2 = time)
 enumVal        = integer

ArithOpStruct is (a binary tree basically):

 arith          = operation ("+", "-", etc)
 left           = ArithOpStruct
 right          = ArithOpStruct
 value          = scalar value
 field          = 
 process        = scalar value
 function       = function
 dde            = not supported
</PRE>

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

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

<BODY BGCOLOR="#FFFFFF">

<H2>Active Link Action Structure</H2>

<PRE>
{
 "macro"            =&gt; reference to <A HREF="ds_alms.html">Active Link Macro Structure</A>,
      <I>or</I> 
 "assign_fields"    =&gt; reference to <A HREF="ds_fas.html">Field Assign Structure</A>,
      <I>or</I> 
 "process"          =&gt; string,
      <I>or</I> 
 "message"          =&gt; <A HREF="ds_statstruct_hash.html">Status Structure</A>, <B>(2.x - 3.x)</B>
 "message"          =&gt; <A HREF="ds_msgstruct_hash.html">Message Structure</A>, <B>(4.x)</B>
      <I>or</I> 
 "characteristics"  =&gt; <A HREF="ds_fc.html">Field Characteristics</A>,
      <I>or</I> 
 "dde"              =&gt; not implemented,
      <I>or</I> 
 "none"             =&gt; undef
}

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


<PRE>
{
 "none"          =&gt; undef,
     <I>or</I> 
 "value"         =&gt; reference to <A HREF="ds_vs.html">Value Structure</A>,
 "valueType"     =&gt; string,
     <I>or</I> 
 "field"         =&gt; reference to <A HREF="ds_afs.html">Assign Field Structure</A>,
     <I>or</I> 
 "process"       =&gt; string,
     <I>or</I> 
 "arith"         =&gt; reference to <A HREF="ds_aoas.html">Arith Op Assign Structure</A>,
     <I>or</I> 
 "function"      =&gt; reference to <A HREF="ds_fncas.html">Function Assign Structure</A>,
     <I>or</I> 
 "dde"           =&gt; not implemented
}
</PRE>

<B>Notes</B>: All of the above keys are mutually exclusive except for the 

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

</HEAD>
<BODY BGCOLOR="#FFFFFF">

<H2>GetFilter Action Hash Values</H2>

<PRE>
{
"notify"	=&gt; reference to <A HREF="ds_getfilter_acthash_notifyhash.html">Notify Hash</A>
"assign_fields"	=&gt; reference to <A HREF="ds_fas.html">Field Assign Structure</A>
"message"	=&gt; string of form "<CODE>Type # Num # Text [X..]</CODE>",
"process"	=&gt; string
}
</PRE>

<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 26th June 1997 by d.j.adams@soton.ac.uk<br>

infra/h2ph  view on Meta::CPAN

    my ($in, $out);
    my $pre_sub_tri_graphs = 1;

    READ: while (not eof IN) {
        $in  .= <IN>;
        chomp $in;
        next unless length $in;

        while (length $in) {
            if ($pre_sub_tri_graphs) {
                # Preprocess all tri-graphs 
                # including things stuck in quoted string constants.
                $in =~ s/\?\?=/#/g;                         # | ??=|  #|
                $in =~ s/\?\?\!/|/g;                        # | ??!|  ||
                $in =~ s/\?\?'/^/g;                         # | ??'|  ^|
                $in =~ s/\?\?\(/[/g;                        # | ??(|  [|
                $in =~ s/\?\?\)/]/g;                        # | ??)|  ]|
                $in =~ s/\?\?\-/~/g;                        # | ??-|  ~|
                $in =~ s/\?\?\//\\/g;                       # | ??/|  \|
                $in =~ s/\?\?</{/g;                         # | ??<|  {|
                $in =~ s/\?\?>/}/g;                         # | ??>|  }|

infra/h2ph  view on Meta::CPAN

            return $file;
        } else {
            print STDERR "Skipping `$file':  not a file or directory\n";
        }
    }

    return undef;
}


# Put all the files in $directory into @ARGV for processing.
sub expand_glob
{
    my ($directory)  = @_;

    $directory =~ s:/$::;

    opendir DIR, $directory;
        foreach (readdir DIR) {
            next if ($_ eq '.' or $_ eq '..');

infra/h2ph  view on Meta::CPAN

                    print STDERR "Could not create $Dest_dir/$target/\n";
            }
        } else {
            print STDERR "Could not symlink $target -> $Dest_dir/$dirlink:  $!\n";
        }
    }
}


# Push all #included files in $file onto our stack, except for STDIN
# and files we've already processed.
sub queue_includes_from
{
    my ($file)    = @_;
    my $line;

    return if ($file eq "-");

    open HEADER, $file or return;
        while (defined($line = <HEADER>)) {
            while (/\\$/) { # Handle continuation lines

support.c  view on Meta::CPAN

	t2 = newSVpv(text, strlen(text));
	(void) av_push(a, t2);

	return ret;
}

/* ROUTINE
 *   ARError(returnCode, statusList)
 *
 * DESCRIPTION
 *   This routine processes the given status list
 *   and pushes any data it contains into the err_hash.
 *
 * RETURNS
 *   0 -> returnCode indicates no problems
 *   1 -> returnCode indicates failure/warning
 */

/* GetListSQL cores for 4.0 in this routine */

int

support.c  view on Meta::CPAN

            fieldList = (ARList *) & in->u.fieldList;
            hv_store(hash,  "assign_fields", strlen("assign_fields") ,
                     perl_ARList(ctrl,
                                 fieldList,
                                 (ARS_fn) perl_ARFieldAssignStruct,
                                 sizeof(ARFieldAssignStruct)), 0);
#endif
          }
          break;
	case AR_ACTIVE_LINK_ACTION_PROCESS:
		hv_store(hash,  "process", strlen("process") , newSVpv(in->u.process, 0), 0);
		break;
	case AR_ACTIVE_LINK_ACTION_MESSAGE:
#if AR_EXPORT_VERSION >= 4
		hv_store(hash,  "message", strlen("message") ,
			 perl_ARMessageStruct(ctrl, &(in->u.message)), 0);
#else
		hv_store(hash,  "message", strlen("message") ,
			 perl_ARStatusStruct(ctrl, &(in->u.message)), 0);
#endif
		break;

support.c  view on Meta::CPAN

            setFields = (ARList *) & in->u.fieldList;
            hv_store(hash,  "assign_fields", strlen("assign_fields") ,
                     perl_ARList(ctrl,
                                 setFields,
                                 (ARS_fn) perl_ARFieldAssignStruct,
                                 sizeof(ARFieldAssignStruct)), 0);
#endif
          }
          break;
	case AR_FILTER_ACTION_PROCESS:
		hv_store(hash,  "process", strlen("process") , newSVpv(in->u.process, 0), 0);
		break;
#if AR_EXPORT_VERSION >= 4
 /* added cases for new ACTIONS in ARS v4.0 API, Geoff Endresen, 6/28/2000
    copied from AR_ACTIVE_LINK_ACTION_FIELP */
        case AR_FILTER_ACTION_FIELDP:
          {
            ARList *pushFields = NULL;
#if AR_EXPORT_VERSION >= 8L
            hv_store(hash, "fieldp", strlen("fieldp") ,
                perl_ARPushFieldsActionStruct(ctrl,&(in->u.pushFields)), 0 );

support.c  view on Meta::CPAN

		hv_store(hash,  "value", strlen("value") ,
			 perl_ARValueStruct_Assign(ctrl, &in->u.value), 0);
		hv_store(hash,  "valueType", strlen("valueType") ,
		      perl_ARValueStructType_Assign(ctrl, &in->u.value), 0);
		break;
	case AR_ASSIGN_TYPE_FIELD:
		hv_store(hash,  "field", strlen("field") ,
			 perl_ARAssignFieldStruct(ctrl, in->u.field), 0);
		break;
	case AR_ASSIGN_TYPE_PROCESS:
		hv_store(hash,  "process", strlen("process") , newSVpv(in->u.process, 0), 0);
		break;
	case AR_ASSIGN_TYPE_ARITH:
		hv_store(hash,  "arith", strlen("arith") ,
			 perl_ARArithOpAssignStruct(ctrl, in->u.arithOp), 0);
		break;
	case AR_ASSIGN_TYPE_FUNCTION:
		hv_store(hash,  "function", strlen("function") ,
		      perl_ARFunctionAssignStruct(ctrl, in->u.function), 0);
		break;
	case AR_ASSIGN_TYPE_DDE:

support.c  view on Meta::CPAN

/* ROUTINE
 *   my_strtok(string, token-buffer, token-buffer-length, separator)
 *
 * DESCRIPTION
 *   since strtok doesn't handle things like:
 *     "a||b" -> "a" "" "b"
 *   well, i wrote this tokenizer which behaves more like
 *   the perl "split" command.
 *
 * RETURNS
 *   non-NULL char pointer on success (more string to process)
 *   NULL char ptr on end-of-string
 *
 * AUTHOR
 *   jeff murphy
 */

static char    *
my_strtok(char *str, char *tok, int tlen, char sep)
{
	char           *p = str;

supportrev.c  view on Meta::CPAN

static int
rev_ARActiveLinkActionList_helper(ARControlStruct * ctrl, HV * h, ARActiveLinkActionList * al, int idx)
{
	int             rv = 0;

	/*
	 * test each has value in turn, first one that is defined, copy in
	 * and return. DDE: not implemented.
	 */

	if (hv_exists(h,  "process", strlen("process") )) {
		al->actionList[idx].action = AR_ACTIVE_LINK_ACTION_PROCESS;
		rv += strmakHVal(h, "process", &(al->actionList[idx].u.process));
	} else if (hv_exists(h,  "macro", strlen("macro") )) {
		al->actionList[idx].action = AR_ACTIVE_LINK_ACTION_MACRO;
		rv += rev_ARActiveLinkMacroStruct(ctrl, h, "macro",
					    &(al->actionList[idx].u.macro));
	} else if (hv_exists(h,  "assign_fields", strlen("assign_fields") )) {
		al->actionList[idx].action = AR_ACTIVE_LINK_ACTION_FIELDS;
#if AR_EXPORT_VERSION >= 8L
		rv += rev_ARSetFieldsActionStruct(ctrl, h, "assign_fields",
					&(al->actionList[idx].u.setFields));
#else

supportrev.c  view on Meta::CPAN

static int
rev_ARAssignStruct_helper(ARControlStruct * ctrl, HV * h, ARAssignStruct * m)
{
	int             rv = 0;

	/*
	 * test each key in turn, first one that is defined, copy in and
	 * return. DDE: not implemented.
	 */

	if (hv_exists(h,  "process", strlen("process") )) {
		m->assignType = AR_ASSIGN_TYPE_PROCESS;
		rv += strmakHVal(h, "process", &(m->u.process));
	} else if (hv_exists(h,  "value", strlen("value") )) {
		m->assignType = AR_ASSIGN_TYPE_VALUE;
		rv += rev_ARValueStruct(ctrl, h, "value", "valueType", &(m->u.value));
	}
	/*
	 * note. the below union members are pointers. so we will allocate
	 * space for them and then call the subroutine to populate them with
	 * data. (with the exception of 'process' whose subroutine will do
	 * the allocating for us)
	 */

	else if (hv_exists(h,  "field", strlen("field") )) {
		m->assignType = AR_ASSIGN_TYPE_FIELD;
		m->u.field = MALLOCNN(sizeof(ARAssignFieldStruct));
		rv += rev_ARAssignFieldStruct(ctrl, h, "field", m->u.field);
	} else if (hv_exists(h,  "arith", strlen("arith") )) {
		m->assignType = AR_ASSIGN_TYPE_ARITH;
		m->u.arithOp = MALLOCNN(sizeof(ARArithOpAssignStruct));

supportrev_generated.c  view on Meta::CPAN

							}else if( hv_exists(h,"fieldp",6) ){
								p->action = AR_FILTER_ACTION_FIELDP;
								k = "fieldp";
				#endif
				
							}else if( hv_exists(h,"exitGuide",9) ){
								p->action = AR_FILTER_ACTION_EXITGUIDE;
								k = "exitGuide";
				
				
							}else if( hv_exists(h,"process",7) ){
								p->action = AR_FILTER_ACTION_PROCESS;
								k = "process";
				
				
							}else if( hv_exists(h,"callGuide",9) ){
								p->action = AR_FILTER_ACTION_CALLGUIDE;
								k = "callGuide";
				
				#if AR_CURRENT_API_VERSION >= 10
							}else if( hv_exists(h,"assign_fields",13) ){
								p->action = AR_FILTER_ACTION_FIELDS;
								k = "assign_fields";

supportrev_generated.c  view on Meta::CPAN

								
									if( SvTYPE(SvRV(*val)) == SVt_PVHV ){
										int i = 0, num = 0;
										HV *h = (HV* ) SvRV((SV*) *val);
										char k[256];
										k[255] = '\0';
								
								
									{
										SV **val;
										strncpy( k, "process", 255 );
										val = hv_fetch( h, "process", 7, 0 );
										if( val && *val && SvOK(*val) ){
											{
												p->u.process = strdup( SvPV_nolen(*val) );
											}
										}else{
											ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "hv_fetch error: key \"process\"" );
											return -1;
										}
									}
								
								
									}else{
										ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARFilterActionStruct: hash value is not a hash reference" );
										return -1;
									}
								

t/00connect.t  view on Meta::CPAN

	       -debug => undef);

if($c->hasErrors() || $c->hasFatals() || $c->hasWarnings()) {
  print "not ok [3 $ars_errstr]\n";
#  print "messages: ", $c->messages(), "\n";
} else {
  print "ok [3]\n";
}

# exitting will cause $c to destruct, calling ars_Logoff() in the
# process.

exit 0;

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

#!./perl

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


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

# notice the use of a custom error handler.

sub mycatch {
  my ($type, $msg) = (shift, shift);
  die "not ok ($msg)\n";



( run in 0.840 second using v1.01-cache-2.11-cpan-8d75d55dd25 )