view release on metacpan or search on metacpan
XSRETURN_UNDEF;
#endif
}
OUTPUT:
RETVAL
void
ars_ExecuteProcess(ctrl, command, runOption=0)
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++;
#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);
} else {
XPUSHs(sv_2mortal(newSViv(1)));
}
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.
INSTALLATION view on Meta::CPAN
(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.
The third command might require special (i.e. root) access if your
perl distribution is not owned by your userid.
BUILDING ON WINDOWS WITH STRAWBERRY PERL
(Note to Windows Developers: While this is the correct procedure, it will not
yet provide a stable 64-bit module)
1) Download ARSPerl source and unpack
2) Download and install 32 or 64-bit Strawberry perl from strawberryperl.com
StructDef.pl view on Meta::CPAN
_data => 'p->topic',
},
action => {
_type => 'unsigned int',
_data => 'p->action',
},
pathToProgram => {
_type => 'char *',
_data => 'p->pathToProgram',
},
command => {
_type => 'char *',
_data => 'p->command',
},
item => {
_type => 'char *',
_data => 'p->item',
},
},
ARAutomationStruct => {
autoServerName => {
_type => 'char *',
_data => 'p->autoServerName',
StructDef.pl view on Meta::CPAN
sampleSchema => {
_type => 'ARNameType',
_data => 'p->sampleSchema',
},
},
ARSQLStruct => {
server => {
_type => 'char[AR_MAX_SERVER_SIZE+1]',
_data => 'p->server',
},
command => {
_type => 'char *',
_data => 'p->command',
},
},
ARFilterActionNotifyAdvanced => {
_min_version => '5.1.0',
from => {
_type => 'char *',
_data => 'p->from',
},
replyTo => {
_type => 'char *',
changes.dat view on Meta::CPAN
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.
example/Dump_Users.pl view on Meta::CPAN
# Revision 1.1 1996/11/21 20:13:51 jcmurphy
# Initial revision
#
#
use ARS;
use strict;
my $SCHEMA = "User";
# Parse command line parameters
my ( $server, $username, $password ) = @ARGV;
if ( !defined($password) ) {
print "usage: $0 [server] [username] [password]\n";
exit 1;
}
# Log onto the ars server specified
( my $ctrl = ars_Login( $server, $username, $password ) )
example/GetField.pl view on Meta::CPAN
#
# Revision 1.1 1997/02/19 22:41:16 jcmurphy
# Initial revision
#
#
#
use ARS;
use strict;
# Parse command line parameters
my ( $server, $username, $password, $schema, $fieldname ) = @ARGV;
if ( !defined($fieldname) ) {
print "usage: $0 [server] [username] [password] [schema] [fieldname]\n";
exit 1;
}
# Log onto the ars server specified
print "Logging in ..\n";
example/Get_Diary.pl view on Meta::CPAN
# nada
#
# Revision 1.1 1996/11/21 20:13:54 jcmurphy
# Initial revision
#
#
use ARS;
use strict;
# Parse command line parameters
my ( $server, $username, $password, $schema, $qualifier, $diaryfield ) = @ARGV;
if ( !defined($diaryfield) ) {
print "usage: $0 [server] [username] [password] [schema] [qualifier]\n";
print " [diaryfieldname]\n";
exit 1;
}
# Log onto the ars server specified
example/List_Entries.pl view on Meta::CPAN
# Updated to work with version 5 and newer servers
#
# Revision 1.1 1996/11/21 20:13:54 jcmurphy
# Initial revision
#
#
use ARS;
use strict;
# Parse command line parameters
my ( $server, $username, $password, $schema ) = @ARGV;
if ( !defined($schema) ) {
print "usage: $0 [server] [username] [password] [schema]\n";
exit 1;
}
# Log onto the ars server specified
( my $ctrl = ars_Login( $server, $username, $password ) )
example/PrintQual.pl view on Meta::CPAN
#
#
#
use ARS;
require 'ars_QualDecode.pl';
$debug = 0;
# Parse command line parameters
($server, $username, $password, $schema, $qual) = @ARGV;
if(!defined($password)) {
print "usage: $0 [server] [username] [password] [schema] [qualification]\n";
exit 1;
}
# Log onto the ars server specified
($ctrl = ars_Login($server, $username, $password)) ||
example/Show_ALink.pl view on Meta::CPAN
#
#
use ARS;
$debug = 0;
require 'ars_QualDecode.pl';
@MessageTypes = ( "Note", "Warn", "Error" );
# Parse command line parameters
($server, $username, $password, $alink_name) = @ARGV;
if(!defined($alink_name)) {
print "usage: $0 [server] [username] [password] [alink name]\n";
exit 1;
}
$level = 0;
# SUBROUTINE
example/Show_Menu.pl view on Meta::CPAN
# 01/12/96
#
# $Log: Show_Menu.pl,v $
# Revision 1.1 1996/11/21 20:13:56 jcmurphy
# Initial revision
#
#
use ARS;
# Parse command line parameters
($server, $username, $password, $menu_name) = @ARGV;
if(!defined($menu_name)) {
print "usage: $0 [server] [username] [password] [menu name]\n";
exit 1;
}
# Log onto the ars server specified
($ctrl = ars_Login($server, $username, $password)) ||
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_ExecuteProcess.pl view on Meta::CPAN
#
#
#
use ARS;
use strict;
die "usage: ars_ExecuteProcess.pl server username \"string to execute\"\n"
if ( $#ARGV < 3 );
my ( $server, $user, $pass, $command ) = ( shift, shift, shift, shift );
#Logging in to the server
( my $ctrl = ars_Login( $server, $user, $pass ) )
|| die "ars_Login: $ars_errstr";
( my ( $num, $str ) = ars_ExecuteProcess( $ctrl, $command ) )
|| print "ERR: $ars_errstr\n";
print "gotit: $ars_errstr\n";
print "returnCode=<$num> returnString=<$str>\n";
ars_Logoff($ctrl);
example/ars_GetListSQL.pl view on Meta::CPAN
# $Header: /cvsroot/arsperl/ARSperl/example/ars_GetListSQL.pl,v 1.3 2009/03/31 13:34:32 mbeijen Exp $
#
# NAME
# ars_GetListSQL.pl
#
# 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
html/changes.html view on Meta::CPAN
<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>
<TABLE CELLSPACING='0'
CELLPADDING='2'
WIDTH='100%'
BORDER='0'
html/copying.html view on Meta::CPAN
<dd>You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.<p>
<dt>b)
<dd>You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.<p>
<dt>c)
<dd>If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)<p>
</dl>
html/copying.html view on Meta::CPAN
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:<p>
<dl>
<dd><tt>Gnomovision version 69, Copyright (C) 19yy name of author<br>
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.<br>
This is free software, and you are welcome to redistribute it<br>
under certain conditions; type `show c' for details.<p></tt>
</dl>
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>
html/manual/ars_BeginBulkEntryTransaction.html view on Meta::CPAN
<HTML>
<HEAD>
<TITLE>ARSperl Manual - ars_BeginBulkEntryTransaction</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2><CODE>ars_BeginBulkEntryTransaction(ctrl)</CODE></H2>
This command can be used to group several create, set, delete and merge
entry operations together into a single transaction. The actual execution
of these functions is deferred until
<a href="ars_EndBulkEntryTransaction.html">ars_EndBulkEntryTransaction</a> is called.
<DL>
<DT><B>On success</B><DD>
Returns 1
<DT><B>On failure</B><DD>
Returns 0
</DL>
html/manual/ars_ExecuteProcess.html view on Meta::CPAN
body {
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>
html/manual/ars_GetListEntryWithFields.html view on Meta::CPAN
[ $class_title, $class_location, $enrollee_login ],
)
) || die("GLEWF Failed: $ars_errstr");
foreach my $entry_id (keys %entries) {
print
"$entry_id\t $entries{$entry_id}{$class_title}\t $entries{$entry_id}{$class_location}\t $entries{$entry_id}{$enrollee_login}\n";
}
</pre>
<p>
<b>Notes:</b> This is a high-performance command that returns a lot of data with one API
call. Care should be taken to delete the returned data structure (e.g., with "<code>undef
%entries</code>") when it is no longer needed, to avoid memory problems.
</p>
<p>
See Also: <a href="ars_GetListEntry.html">ars_GetListEntry</a>, <a href=
"ars_GetMultipleEntries.html">ars_GetMultipleEntries</a>
</p>
<p>
<a href="toc.html">Back to Table of Contents</a>
</p>
html/manual/ars_SetServerInfo.html view on Meta::CPAN
<P>Example:
<PRE>
ars_SetServerInfo($ctrl,
&ARS::AR_SERVER_INFO_EMAIL_FROM,
'froboz@thewizard.com') ||
die "$ars_errstr";
</PRE>
This command is useful for turning log files on and off, adjust
fast/list servers, re-indexing FTS, etc. See the ARSystem Programmer's
Guide for a full description of everything you can tweak with this
command.
<P>
<I>ars_SetServerInfo was introduced in version 1.69 of ARSperl</I>
<P>
<HR WIDTH="30%">
<P>
<A HREF="toc.html"><IMG ALT="<--" SRC="arrow.gif" ALIGN=CENTER> Table of Contents </A>
<p>
<address>
Last changes to this page 30th August 2000 by jcmurphy@arsperl.org<BR>
hv_store(hash, "serviceName", strlen("serviceName") , newSVpv(in->serviceName, 0), 0);
hv_store(hash, "topic", strlen("topic") , newSVpv(in->topic, 0), 0);
hv_store(hash, "pathToProgram", strlen("pathToProgram") , newSVpv(in->pathToProgram, 0), 0);
hv_store(hash, "action", strlen("action") , newSViv(in->action), 0);
action = in->action;
hv_store(hash, "actionName", strlen("actionName") ,
newSVpv(DDEActionMap[action].name, strlen(DDEActionMap[action].name)), 0);
switch (action) {
case AR_DDE_EXECUTE:
hv_store(hash, "command", strlen("command") , newSVpv(in->command, 0), 0);
hv_store(hash, "item", strlen("item") , &PL_sv_undef, 0);
break;
case AR_DDE_POKE:
hv_store(hash, "item", strlen("item") , newSVpv(in->item, 0), 0);
hv_store(hash, "command", strlen("command") , newSVpv(in->command, 0), 0);
break;
case AR_DDE_REQUEST:
hv_store(hash, "item", strlen("item") , newSVpv(in->item, 0), 0);
hv_store(hash, "command", strlen("command") , &PL_sv_undef, 0);
break;
default:
hv_store(hash, "item", strlen("item") , &PL_sv_undef, 0);
hv_store(hash, "command", strlen("command") , &PL_sv_undef, 0);
break;
}
return newRV_noinc((SV *) hash);
}
SV *
perl_ARActiveLinkActionStruct(ARControlStruct * ctrl, ARActiveLinkActionStruct * in)
{
HV *hash = newHV();
}
return newRV_noinc((SV *) hash);
}
#if AR_EXPORT_VERSION >= 4
SV *
perl_ARSQLStruct(ARControlStruct * ctrl, ARSQLStruct * in)
{
HV *hash = newHV();
hv_store(hash, "server", strlen("server") , newSVpv(in->server, 0), 0);
hv_store(hash, "command", strlen("command") , newSVpv(in->command, 0), 0);
return newRV_noinc((SV *) hash);
}
#endif
#if AR_EXPORT_VERSION >= 3
SV *
perl_ARAssignSQLStruct(ARControlStruct * ctrl, ARAssignSQLStruct * in)
{
HV *hash = newHV();
int i;
#if AR_EXPORT_VERSION >= 3
/* 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 *
supportrev_generated.c view on Meta::CPAN
}
}else{
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "hv_fetch error: key \"serviceName\"" );
return -1;
}
}
{
SV **val;
strncpy( k, "command", 255 );
val = hv_fetch( h, "command", 7, 0 );
if( val && *val && SvOK(*val) ){
{
p->command = strdup( SvPV_nolen(*val) );
}
}else{
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "hv_fetch error: key \"command\"" );
return -1;
}
}
{
SV **val;
strncpy( k, "pathToProgram", 255 );
val = hv_fetch( h, "pathToProgram", 13, 0 );
if( val && *val && SvOK(*val) ){
supportrev_generated.c view on Meta::CPAN
}
}else{
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "hv_fetch error: key \"server\"" );
return -1;
}
}
{
SV **val;
strncpy( k, "command", 255 );
val = hv_fetch( h, "command", 7, 0 );
if( val && *val && SvOK(*val) ){
{
p->command = strdup( SvPV_nolen(*val) );
}
}else{
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "hv_fetch error: key \"command\"" );
return -1;
}
}
}else{
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARSQLStruct: hash value is not a hash reference" );
return -1;
}
t/aptest50.def view on Meta::CPAN
notify-behvr: 0
notify-perm : 0
notify-text : notifytext
notify-subj : emailsubjectline
notify-field: 4 3 536870918 536870929 536870930 536870931
}
else {
set-field : 0\4\101\4\8\jefftest\
}
else {
command : @@:fooscript
}
help-text : some help text
change-diary : 1049214347jcmurphysome change history
end
begin escalation
name : ARSperl Test-escalation1
timestamp : 1049228201
owner : jcmurphy
last-changed : jcmurphy
enable : 1
t/aptest50.def view on Meta::CPAN
notify-text : notifytext2
notify-subj :
}
action {
push-field : 0\1\@\12\ARSperl Test\1\4\4\1\2\2\1\2\2\1\1\6\101\4\10\really-not\
}
action {
set-field : 0\4\101\4\7\nono-no\
}
else {
command : @@:/a/command.pl
}
help-text : some helptext.
change-diary : 1049228201jcmurphya change history
note.
end
begin char menu
name : ARSperl Test-menu-search1
timestamp : 1048801700
owner : jcmurphy
last-changed : jcmurphy
refresh-code : 2
t/aptest51.def view on Meta::CPAN
notify-behvr: 0
notify-perm : 0
notify-text : notifytext
notify-subj : emailsubjectline
notify-field: 4 3 536870918 536870929 536870930 536870931
}
else {
set-field : 0\4\101\4\8\jefftest\
}
else {
command : @@:fooscript
}
help-text : some help text
change-diary : 1049214347jcmurphysome change history
end
begin escalation
name : ARSperl Test-escalation1
timestamp : 1049228201
owner : jcmurphy
last-changed : jcmurphy
enable : 1
t/aptest51.def view on Meta::CPAN
notify-text : notifytext2
notify-subj :
}
action {
push-field : 0\1\@\12\ARSperl Test\1\4\4\1\2\2\1\2\2\1\1\6\101\4\10\really-not\
}
action {
set-field : 0\4\101\4\7\nono-no\
}
else {
command : @@:/a/command.pl
}
help-text : some helptext.
change-diary : 1049228201jcmurphya change history
note.
end
begin char menu
name : ARSperl Test-menu-search1
timestamp : 1048801700
owner : jcmurphy
last-changed : jcmurphy
refresh-code : 2