Pages

Monday, February 14, 2011

Pharos Interfaces API for Plug-in Scripts

Recently I needed the Pharos Uniprint Plug-in Interfaces to write a few Scripts for our Pharos environment. Interfaces, API, Just something other than taking apart other scripts and guessing at the parameters.

After the trouble finding the normal interfaces that are callable in Pharos Scripts I put in a support call. They replied very promptly however I really find it disappointing that i would really need to use a service all to find it. Maybe you found it but i searched the CD, Chm files, and online with no luck.

Anyway Pharos support got back with and sent me this.
You may find the Pharos Scripting Language Primer by going into Pharos Administrator, and navigating to the Help column in the Menu bar, and go to Help Topics. Then search for Pharos Scripting Language Primer, or go to Pharos Administrator\Technical Information\Pharos Script Primer. You should find what you need there.
And sure enough that was exactally what i was looking for. Its found on the CD under "CD Root\help\Pharos.CHM" open that and then navigate to Technical Information. Look at both Plug-in Interfaces and Pharos Script Primer.

Note: Here is a copy of some of it in hopes that google will lead others here so they can find what I couldn't
Pharos Scripting Language primer and then Plug-in Interfaces below.

Pharos Scripting Language Primer and then Plugin Interfaces below that.




Pharos Scripting Language Primer From Pharos Uniprint 8.1 

Comments

  • Comments are annotations to script code that should help make it more readable
  • C and C++ style comments are supported
  • Comments are ignored by the script compiler, so they do not make the script run slower use them liberally
/* C style comments begin with a /* symbol, and can span multiple lines, ending with a */ symbol */
// C++ style comments begin with //, ending at the end of the line

Variables and Namespaces

  • A variable is a named entity that can contain a value
  • A namespace is a named entity that can contain variables and functions
  • Every variable exists in a namespace, which if not specified is the namespace local to the script
  • Notice that the following statements are terminated by a semicolon ;, as are most statements
new a; // creates a new uninitialized variable, called a, in the local namespace
a = PlugIn.Client; // sets a equal to the value of Client in namespace PlugIn

Types and Constants

  • A type describes the nature of a value, for example a bool type value can be only true or false
  • A constant is a value written in the source code, for example 1.0 is a constant of type float
  • The type of a variable is the type of its current value
  • A variable can be assigned a value of any type at any time
new b = true; // bool type (true or false)
new i = 1; // int type (32-bit signed integer)
new f = 1.0; // float type (64-bit floating point number)
new s = "1"; // string type (8-bit ASCII character with C escape codes e.g. "\r")
new l = [false, 0, 0.1, "0", []] // list type (may contain any type)
b = i; // now b has a value of type int
b = true; // now b has a bool again

Expressions and Operators

  • An expression is a fragment of source code involving variables, constants and/or operators
  • An operator is a symbol or word that operates on one expression, for a unary operator, or two expressions for a binary operator, e.g. =, + and and are binary operators, whereas not is a unary operator
  • For all assignment operators except simple assignment, the second expression is converted to the type of the first
b = false; // assignment expression (simple)
i += 1; // assignment expression (add)
i -= 1; // assignment expression (subtract)
i *= 2; // assignment expression (multiply)
i /= 2; // assignment expression (divide)
  • Expressions referred to below are the code fragments between the = and the ;
  • For binary operators the second expression is converted to the type of the first
s = "line\r\n"; // constant expression (string)
s = i; // identifier expression (yields value of i)
l = n.f(s); // function expression (in namespace n, passing parameter s)
i = l[0]; // subscript expression (yields first element in list l)
i = -i; // unary expression (minus)
b = not b; // unary expression (not)
f = f / i * 2; // multiplicative expression
i = 3 mod 2; // multiplicative expression (remainder)
i = i + (i 1); // additive expression (with parenthesized expression)
b = i < 1; // relational expression (less-than)
b = i <= 1; // relational expression (less-than-equal)
b = i > 1; // relational expression (greater-than)
b = i >= 1; // relational expression (greater-than-equal)
b = i != 1; // equality expression (not-equal-to)
b = i <> 1; // equality expression (not-equal-to)
b = i == 1; // equality expression (equal-to)
b = b and true; // logical expression (and)
b = b or true; // logical expression (or)

Type Conversions

  • Type conversion occurs when a binary operator is used with expressions of two different types
  • For binary operators (except simple assignment), the second expression is converted to the type of the first
The variables in the examples below have been assigned types as in the examples in the Types and Constants section above, i.e. b is a boolean value, i is an integer, f is a float, l is a list (of five values) and s is a string.
b = b or 0; // 0 converted to false
b = b and 2; // 2 (or any non-zero integer or float) converted to true
i = i + "2"; // "2" converted to 2
i = i + 2.6; // 2.6 converted to 2 by truncation
i = i + l; // l is converted to 5 (length of l)
f = f + true; // true converted to 1.0
f = f - "2.6"; // "2.6" converted to 2.6
s = "" + l; // l converted to "0, 0, 0.1, "0", []"

Statements

  • A script is made up of a sequence of any number of statements
  • A statement is a fragment of source code that is syntactically complete and correct, and which will therefore compile successfully, e.g. a = 1 is an expression, whereas a = 1; is a complete expression statement
  • All statements except if, else, while and compound statements are terminated by a semicolon ;
import "DB"; // import statement (makes DB namespace function calls available)
new a; // new statement uninitialized (creates a)
new b = false; // new statement with initializer (b is bool)
a = 2; // expression statement
f(a); // expression statement (value discarded)
if (a < i) // if statement
     ; // null statement (only do this if a < i)
else // else statement
     a = f(a); // (otherwise do this when not (a < i))
while (a < i) // while statement
{ // compound statement
     a = f(a); // (do this ...)
     b = f(b); // (and this while (a < i))
} // end compound statement
try // try statement
{ // try block compound statement
     a = f(a); // jump to catch block if error occurs
     throw // jump to catch block
} // end try block
catch // catch statement (required after a try block)
{ // catch block compound statement (for error handling)
     exit // terminates the script early without error
} // end catch block

Namespace Function Interfaces

  • Parameters to functions have a suffix which indicates the type expected, e.g. _int for an integer, _any for a value of any type
  • Unexpected types will be type converted to the expected types
  • Parameters with a suffix of _name expect a variable name of the type prefixed, eg string_name should be a string variable
  • Following the function description will be the return value type, which may also be (any) for any type, or (none) for no return value

Database (namespace "DB")

ColIndexFromName(column_string);
// returns results column index (int)
ColNameFromIndex(index_int);
// returns results column name (string)
ColumnByIndex(index_int);
// returns results column value (any)
ColumnByName(column_string);
/ returns results column value (any)
GetNumColumns( );
// returns number of results columns (int)
GetNumRows( );
// returns number of results rows (int)
GetRow( );
// returns whether we got next results row (bool)
Online();
// returns whether or not the database is online, i.e. reachable from the
// server running the script (int). 1 = online, 0 = offline.
ParametrizedSQL(sql_string{, parameter1{,parameter2...parameter n}});
// Creates a DB connection if none present, then executes
// SQL sql_string, using the supplied parameters, which
// replace @1, @2, etc in the SQL statement, e.g.
//
// DB.ParametrizedSQL("select * from users where id = @1", PlugIn.UserName);
//
// DB.ParametrizedSQL("exec pp_user_purse_balances @bill_name = @1, @pstation = @2", PlugIn.BillName, PlugIn.Client);
//
// Note: Using ParametrizedSQL() for passing parameters to stored procedures creates a need to use the SQL keyword "exec"
// in cases where it isn't necessary with SQL()
SQL(sql_string {,client_name_string});
// Creates a DB connection if none present, with a client name
// of client_name_string (or Anonymous if omitted), then
// executes SQL sql_string (call GetRow( ) etc for results) (none)
Pharos Systems recommends the use of DB.ParametrizedSQL() over DB.SQL(), to reduce the risk of SQL injection attacks.

Input/Output (namespace "IO")

DeleteFile(filename_string)
// Deletes the file named filename_string and
// returns whether the operation succeeded (bool)
LoadFile(string_name, filename_string{, length_int});
// loads up to length_int
// (or all, if omitted) characters from file filename_string into
// string variable string_name
// and returns whether the operation succeeded (bool)
PrintLine(line_string);
// prints each line_string on a separate line (none)
SaveFile(string_name, filename_string{, length_int});
// saves up to length_int (or all, if omitted) characters from
// string variable string_name to file filename_string
// and returns whether the operation succeeded (bool)

List (namespace "List")

Concat(list_name, 0_list{, 1_list ...});
// concatenates 0_list etc to list variable list_name (no return value)
Delete(list_name, pos_int);
// deletes element number pos_int from list variable list_name, where
// pos_int is zero-based (ie 0 is the first element) (no return value)
Insert(list_name, pos_int, value_any);
// inserts value_any into list variable list_name before element number
// pos_int, where pos_int is zero-based (ie 0 is the first element) (no return value)
Length(0_list{, 1_list ...});
// returns the combined length of 0_list etc (returns an int value)

Notify (namespace "Notify")

BalloonBox(client_string, title_string, message_string, timeout_int{, style_int})
// Displays a system tray balloon message at the user workstation specified by client_string
// The message will be titled title_string and has message_string as the content.
// It will display for up to timeout_int seconds unless it is dismissed by the user.
//
// The style is optional. If not supplied, the balloon will be an deemed an Informational message.
// 0 = No style specified
// 1 = Information message
// 2 = Warning message
// 3 = Error message
//
// Note: Under MS Windows the style indicator determines which icon is displayed with the message.
// Other operation systems may implement the style indicator differently.
MessageBox(client_string, message_string, timeout_int{, buttons_int})
// sends message_string (with buttons_int) to a user's notify application on machine client_string
// displaying it for up to timeout_int seconds
//
// buttons_int is optional. If not supplied, assumes OK button is wanted
// 0 = OK button only
// 1 = OK + Cancel buttons
// 2 = Abort + Retry + Ignore buttons
// 3 = Yes + No + Cancel
// 4 = Yes + No
// 5 = Retry + Cancel
//
// returns: button that is pressed, as int
// 0 for timeout, 1 for OK, 2 for cancel, 3 for abort, 4 for retry, 5 for ignore, 6 for yes, 7 for no
QuestionBoxFloat(client_string, prompt_string, description_string, timeout_int,
default_string, string_name, minimum_float, maximum_float, places_int);
// displays a question box with prompt prompt_string,
// description description_string and default
// default_string
// on machine (name or IP address) client_string
// for at most timeout_int seconds
//
// returns an int value of -1 for timeout, 0 for
// cancel and 1 for Ok, in which case the user
// selected result is stored in string_name
//
// any result must be between minimum_float and
// maximum_float (inclusive) and at most places_int
// decimal places
QuestionBoxInt(client_string, prompt_string, description_string, timeout_int,
default_string, string_name, minimum_int, maximum_int);
// displays a question box with prompt prompt_string,
// description description_string and default
// default_string
// on machine (name or IP address) client_string
// for at most timeout_int seconds
//
// returns an int value of -1 for timeout, 0 for
// cancel and 1 for Ok, in which case the user
// selected result is stored in string_name
//
// any result must be between minimum_int and
// maximum_int (inclusive)
QuestionBoxList(client_string, prompt_string, description_string, timeout_int,
default_string, string_name, option_list);
// displays a question box with prompt prompt_string,
// description description_string and default
// default_string
// on machine (name or IP address) client_string
// for at most timeout_int seconds
//
// returns an int value of -1 for timeout, 0 for
// cancel and 1 for Ok, in which case the user
// selected result is stored in string_name
//
// any result must be selected from option_list
// which is a list of values all of which will be
// converted to strings when sent to the notification
// function of the Popup Client
QuestionBoxMoney(client_string, prompt_string, description_string, timeout_int,
default_string, string_name, minimum_float, maximum_float);
// displays a question box with prompt prompt_string,
// description description_string and default
// default_string
// on machine (name or IP address) client_string
// for at most timeout_int seconds
//
// returns an int value of -1 for timeout, 0 for
// cancel and 1 for Ok, in which case the user
// selected result is stored in string_name
//
// any result must be between minimum_float and
// maximum_float (inclusive) and the clients local currency
// settings determine the number of decimal places
QuestionBoxString(client_string, prompt_string, description_string, timeout_int,
default_string, string_name, length_int);
// displays a question box with prompt prompt_string,
// description description_string and default
// default_string
// on machine (name or IP address) client_string
// for at most timeout_int seconds
//
// returns an int value of -1 for timeout, 0 for
// cancel and 1 for Ok, in which case the user
// selected result is stored in string_name
//
// any result must be of length length_int or less

Plug-ins (namespace "PlugIn")

See Plug-in Interfaces for information.

Print Jobs (namespace "PrintJob")

Copy(source_queue_string, job_id_int, dest_queue_string {,offset_int});
// Copies print job job_id_int in queue source_queue_string to queue
// dest_queue_string, optionally copying the portion of the spool file
// from offset_int onwards. If offset is omitted, the raw job data is
// copied without popup info. To copy popup info, supply an offset of 0.
// Returns the job id of the new job, or -1 on error (returns an int value)
GetPopupData(queue_string, id_int, key_string);
// returns the value of the key_string popup data field
// from the print job id_int in queue queue_string or
// an empty string if there was no job or popup data (returns a string value)
// key_string is normally the name of the Question you want the answer for,
// however, three "hidden" Questions are available:
// StaticNotifyIP - this is the IP address that the Popup Client's notification function is listening on (if it is present)
// StaticWorkStn - this is the network name of the client PC
// CC_Static - this is the Cost Center data attached to the print job

Script (namespace "Script");

Defined(namespace_string);
// Returns whether namespace_string is defined (returns a bool value)
GetChildren(namespace_string);
// Returns a list of the names of namespace children of namespace_string (returns a list value)
GetParent(namespace_string);
// Returns the name of the parent namespace of namespace_string (returns a string value)
GetType(namespace_string);
// Returns the type name of namespace_string (e.g. "bool", "string") (returns a string)
GetErrorMessage();
// Returns the error message of the most recent exception (returns a string value)
GetErrorType();
// Returns the error type of the most recent exception (e.g. "Script", "PSCom", "PS", "MFC", "General exception") (returns a string value)
GetLineNumber();
// Returns the current execution line number (returns an int value)
SetErrorMessage(error_message_string);
// Sets the exception error message to error_message_string (no return value)
SetErrorType(error_type_string);
// Sets the exception error type to error_type_string (no return value)

String (namespace "String")

Concat(string_name, 0_string{, 1_string ...});
// concatenates 0_string etc to string variable string_name (no return value)
Delete(string_name, pos_int{, length_int});
// deletes length_int (or all if omitted) characters from string
// variable string_name starting at and including index pos_int,
// which is zero-based (i.e. index 0 is the first character) (no return value)
Encrypt(string_name);
// encrypts a string using the same algorithm as the Database Server
// can be used to encrypt user passwords
Find(range_string, target_string);
// returns the zero-based index of the first occurrence of
// target_string in range_string, or -1 if not found (returns an int value)
FindLast(range_string, target_string);
// returns the zero-based index of the last occurrence of
// target_string in range_string, or -1 if not found (returns an int value)
Insert(string_name, pos_int, insert_string);
// inserts string insert_string into string variable string_name
// at (i.e. before the text at) zero-based index pos_int (no return value)
IsEmpty(test_string);
// returns true if test_string is empty (""), false otherwise (returns a bool value)
Left(string_name, num_int);
// truncates string variable string_name to leave only its leftmost
// num_int characters remaining (no return value)
Length(0_string{, 1_string ...});
// returns the combined length of 0_string etc (returns an int value)  
LowerCase(string_name);
// converts all characters in string variable string_name to lower
// case (no return value)
Mid(string_name, pos_int, num_int);
// truncates string variable string_name to leave only the num_int (or
// all if num_int omitted) characters starting at and including
// zero-based index pos_int (no return value)
Right(string_name, num_int);
// truncates string variable string_name to leave only its rightmost
// num_int characters remaining (no return value)  
TrimLeft(string_name);
// removes all whitespace (newline, space, tab) characters from the
// start of string variable string_name (no return value)
TrimRight(string_name);
// removes all whitespace (newline, space, tab) characters from the
// end of string variable string_name (no return value)
UpperCase(string_name);
// converts all characters in string variable string_name to uppercase (no return value)

User (namespace "User")

To use the User namespace, create a new user with the User.Insert() function, or load an existing one with any of the User.GetUser*() functions. If no exception is thrown, the corresponding user record will then be available for use. Once a user has been loaded, all subsequent function calls (e.g. User.GetBalance() or User.SetProperty()) will apply to the currently loaded user. The same user record remains loaded until another call is made to the User.Insert() function or one of the User.GetUser*() functions.
Credit(amount_money, cashier_string {, purse_int{, record_transaction_int}});
// credits the user's balance by the specified amount
//
// purse ID must be 1, 2 or 3 (optional - default is 3)
//
// record_transaction = 1 to record a transaction in the database, 0 to not
// record a transaction (default is 1)
//
// negative amounts are converted to positive, i.e. entering a negative
// value does *not* debit the account
Debit(amount_money, cashier_string {, purse_int{, record_transaction_int}});
// debits the user's balance by the specified amount
//
// purse ID must be 1, 2 or 3 (optional - default is 3)
//
// record_transaction = 1 to record a transaction in the database, 0 to not
// record a transaction (default is 1)
//
// Negative amounts are converted to positive, i.e. entering a negative
// value does *not* credit the account.
//
// The debit occurs even if it causes a negative balance for a user with
// "Advance" billing.
Insert(username_string);
// creates a User record with the specified username
GetBalance(purse_int);
// returns the current balance of the specified purse (1, 2 or 3)
GetProperty(property_string);
// returns the value of the specified property. Possible properties are:
//
// user_id - int (this is the internal ID number)
// user - string (this is the user name)
// active - int
// billing_option - string
// last_name - string
// first_names - string
// group_id - int
// access_level - string
// address - string
// phone - string
// comment - string
// rate_id - int
// card_id - string
// offline_limit - money
// offline_amount - money
// user_alias - string
// is_express - int
// is_vistor - int
// email - string
// custom1 - string
// custom2 - string
// group - string
// rate - string
GetUser(searchvalue_string {, column_string});
// loads a user record by the specified column from the users table
// if no column is specified, the default is "user_id"
GetUserByAlias(alias_string);
// loads a user record by their alias
// this is the same as GetUser(<user alias>, "alias")
GetUserByCardID(cardid_string);
// loads a user record by their card ID
// this is the same as GetUser(<user card ID>, "card_id")
GetUserByID(internalid_int);
// loads a user record by their internal ID number
// this is the same as GetUser(<user ID>, "user_id")
GetUserByLogon(name_string);
// loads a user record by their user name
// this is the same as GetUser(<user name>, "id")
SetProperty(property_string, value);
// sets the value of the specified property. The type of the value depends on the property.
// Possible properties are:
//
// user - string
// active - int
// billing_option - string
// last_name - string
// first_names - string
// access_level - string
// address - string
// phone - string
// comment - string
// card_id - string
// offline_limit - money
// user_alias - string
// email - string
// custom1 - string
// custom2 - string
// group - string
// rate - string

Windows (namespace "Win32")

ExecProcess(command_string {, timeout_int {, output_string}});
// execute command_string as another process, waiting for timeout_int
// (or 30000 if omitted) milliseconds for completion, and pipes the standard
// output of the process into output_string (if provided).
//
// returned is -1 on timeout or system error, otherwise the process
// result code (returns an int value)
GetJob(queue_string, id_int, data_list);
// gets system information on job id_int in queue queue_string (list)
//
// data_list is a list of int field IDs eg [1]
// returned is a list of [field_int, value_any] pairs
// eg [[1, "PrinterName"]]
//
// Field: Field ID: (type) attributes
//
// JobId 0 (int) read-only
// PrinterName 1 (string) read-only
// MachineName 2 (string) read-only
// UserName 3 - (string)
// Document 4 - (string)
// NotifyName 5 - (string)
// Datatype 6 - (string)
// PrintProcessor 7 - (string)
// Parameters 8 - (string)
// DriverName 9 - (string) read-only
// DevMode 10 - not supported
// Status 11 - (string)
// SecurityDescriptor 12 - not supported
// Status 13 (int)
// Priority 14 (int)
// Position 15 (int)
// StartTime 16 - not supported
// UntilTime 17 - not supported
// TotalPages 18 (int) read-only
// Size 19 (int) read-only
// Submitted 20 - not supported
// Time 21 - not supported
// PagesPrinted 22 - (returns an int value) read-only
GetTempFileName({prefix_string {,pathname_string}});
// Returns a temporary filename prefixed by prefix_string (or prefix "Pha" if omitted)
// and pathname_string (or the system pathname from Win32_GetTempPathName
// if omitted) - NOTE: the script is responsible for deleting this file after use (returns a string value)
GetTempPathName( );
// Returns the pathname of the Windows directory for temporary files (returns a string value)
NetSend(user_string, message_string);
// sends a network message message_string to user user_string (no return value)
RegQueryValue(subkey_string, value_name_string {,key_int {,access_int}})
// Opens registry key subkey_string under root key key_int (or HKEY_LOCAL_MACHINE
// if omitted, which is 1 - see Win32 SDK definition of HKEY_LOCAL_MACHINE
// for other root key values) and with access rights access_int (or KEY_ALL_ACCESS
// if omitted - see Win32 SDK definition for other access rights)
// and returns value of value_name_string if it exists, otherwise
// returns bool false (any)
SearchPath(filename_string);
// Searches for file filename_string and returns its 'short' path, without spaces
// or long filenames (returns a string value)
SetJob(queue_string, id_int, data_list);
// sets system information for job id_int in queue queue_string
// returning true on success and false on failure (returns a bool value)
//
// data_list is a list of [field_int, value_any] pairs
// e.g. [[1, "NewPrinterName"]]
// see GetJob( ) for valid field_int IDs (i.e. not read-only etc)
SetJobCommand(queue_string, id_int, command_int);
// Performs operation command_int (e.g. JOB_CONTROL_CANCEL, which is 3 - see
// Win32 SDK for other operation values) on print job id_int in queue queue_string
// and returnstrue if success, false otherwise (returns a bool value)
Sleep(milliseconds_int);
// Forces the script thread to sleep for milliseconds_int
// milliseconds before resuming execution (no return value)



Pharos Plug-in Interfaces from Pharos 8.1


Alert
BillingName
CopyEndJob
CostJob
DeleteJob
FaxEndJob
ForwardJob
GetFaxJobCost
JobInformation
MoveJob
PageCountJob
PrintStartJob
PrintEndJob
PrintJob
PrintJobArrive
ScanEndJob
SelectPrinter
ShutDown
StartUp
Banner
GetMfdStatus
SelectEnvironment
SessionEnd

Descriptions of each Pharos plug-in are detailed below, both executable and scripted versions. The conventions are:
  • quotes delimit the argument and must be included. There cannot be any quotes in the argument itself
  • where angle brackets are used, data replaces both the enclosed words and the angle brackets. For example, "<pathname>" is replaced by "\\comp\drv\dir\file.type"
  • assume arguments are case sensitive where relevant, for example, billing type verb
  • monetary arguments are floating point values to four decimal places.
  • <sheet_count> arguments replace the <page_count> argument in versions of Uniprint earlier than 2.1, and are the number of sheets of paper a print job uses.
  • <page_count> arguments now give the number of pages (sides of paper) a print job uses.
  • <result_pathname> is taken as a first argument. This specifies a file to which results are written.

Result File

On termination the file specified by <result_pathname> should contain the following lines if successful:
  • OK; Plug-in success
  • <extra_return0> ; extra returns, if any
  • <extra_return1> ; extra returns, if any
  • ... ; etc
For example, a Billing Balance plug-in would return the following if everything was OK:
  • OK
  • 20.0 (being the balance)
  • Arrears (being the billing type)
If the operation failed, the file should contain the following lines:
  • FAIL ; Plug-in failure
  • <error_message> ; extra returns, if any
For example, a plug-in might return the following for an error :
  • FAIL
  • Guru meditation error (being reason for failure)
Pharos Script plug-in interface members are INPUT by default i.e. they are inputs to the script. When labeled OUTPUT they are to be set to meaningful values by the script. When labeled INPUT/OUTPUT they have meaningful default values that may be changed by the script.

Alert Plug-in

The Alert plug-in is called every time an entry is placed in the Alerts table of the Pharos database, immediately after the event is posted.
The executable is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file.
  • "<severity>" - string; e.g. Terminal, Fatal, Warning, Information. The severity of the problem. Fatal means that the current operation will be abandoned.
  • "<message>" - string; alert message. A message describing the problem.
  • "<operation>" - string; operation. The operation that was underway at the time the problem surfaced.
  • "<client_name>" - string; e.g. the Pharos Station or User PC that requested the operation which failed.
  • "<username>" - string; current/last job billee (or owner). The user who requested the operation that failed.
  • "<job_name>" - string; current/last job title e.g. 'untitled.txt'. The name of the print job that failed.
There are no extra returns and the plug-in returning failure has no effect.
One or more of these arguments may be blank if they are not relevant. For example, a purge queue request does not have an associated job name.
The "<client_name>" argument gives information about what caused the event. Each computer that connects to Pharos via a piece of Pharos software such as the Pharos Station, is given its own thread to manage all transactions. Any Alerts that are raised in that thread are labeled as owned by that workstation.
An example of the use of this is to use net send to forward any errors directly to the Administrator. The following batch file performs this:
------------alert.bat----------------
net send administrator %3
------------alert.bat----------------

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("Alert")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if Plug-in fails)
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.Severity int ; severity level: Info=10 Warning=20 Error=30 Fatal=40
  • PlugIn.Message string ; alert error message that will be logged to database
  • PlugIn.Operation string ; the operation attempted when the alert was raised
  • PlugIn.UserName string ; the user who initiated the operation (if any)
  • PlugIn.Item string ; operation relevant information (e.g. print job name)

Billing Plug-in

Billing plug-in programs are launched for passing billing transactions (Balance, Credit, Debit) to some external system. This plug-in is shared by multiple plug-in calls (Billing Balance, Billing Credit and Billing Debit).
The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file.
  • <billing_type_verb> - the Billing plug-in event type: the options are Credit, Balance or Debit.
  • ... - more arguments depending on the billing_type_verb
The billing_type_verb is case sensitive.

In situations where a Billing plug-in is being used by a Bank that is attached to a SignUp Server, if the Billing plug-in returns multiple subaccounts, the SignUp Server will display only the total, not the individual details.

A sample Billing script, Billing - Pharos Accounts Plus Online Accounts.txt, is available on the Pharos CD at tools\plugins\scripts. This script works for Balance and Debit operations.

Billing Plug-in (Balance)

The Balance plug-in is called instead of internal database billing. The further arguments are:
  • Balance - string; billing transaction type verb.
  • "<username>" - string; the user whose balance is being checked.
  • "<client_desc>" - string; the External Name of the Pharos Station, e.g. its terminal ID code.
Extra returns:
  • <balance> - float; e.g. -0.0100.
  • <billing_option> - string; e.g. Arrears, Advance.
  • <balance_count> - int; e.g. 2 (optional)
If <balance_count> is greater than zero, then <balance_count> (e.g. 2) sections appears as below
  • <account_name_X> - string; e.g. Acct1 (optional)
  • <account_balance_X> - string; e.g. 0.0040 (optional)
  • <account_billing_option_X> - string; e.g. Arrears, Advance (optional)
If the plug-in returns failure the current operation may fail. The plug-in may facilitate an offline billing operation by returning:
  • FAIL
  • PHAROS_OFFLINE

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("Billing")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.ClientDesc string ; Pharos Station terminal ID code (i.e. its External Name)
  • PlugIn.EventType string ; billing event sub-type ("Balance")
  • PlugIn.Function string ; type of operation ("Any", "Print", "Computer", "Copy", "Custom", "Fax" or "Scan")
  • PlugIn.BillName string ; user account name
  • PlugIn.Balance float ; OUTPUT: set this to the account balance
  • PlugIn.BillingOption string ; OUTPUT: set this to "Arrears" (i.e. allow credit) or "Advance"
  • PlugIn.BalanceCount int; OUTPUT: the number of accounts in PlugIn.Accounts
  • PlugIn.Accounts string; OUTPUT: <name> <balance> <billing_option> fields occurring <PlugIn.BalanceCount> times (a newline is required between <name> and <balance>; <balance> and <billing_option> may be separated by a space)

Billing Plug-in (Credit)

The Credit plug-in is called instead of internal database billing. The further arguments are:
  • Credit - string; billing transaction type verb
  • "<username>" - string; the user whose account will be credited
  • <amount> - float; amount to credit e.g. 20.00
  • "<cashier_name>" - string; cashier doing transaction
  • "<datetime>" - string; either "NOW" or "YYYY/MM/DD-HH:MM:SS"
There are no extra returns and the current operation is aborted if plug-in returns failure. The plug-in may facilitate an offline billing operation by returning:
  • FAIL
  • PHAROS_OFFLINE

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("Billing")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.ClientDesc string ; Pharos Station terminal ID code (i.e. its External Name)
  • PlugIn.EventType string ; billing event sub-type ("Credit")
  • PlugIn.Function string ; type of operation ("Any", "Print", "Computer", "Copy", "Custom", "Fax" or "Scan")
  • PlugIn.BillName string ; user account name
  • PlugIn.Amount float ; amount to credit e.g. 20.00
  • PlugIn.StaffName string ; cashier etc doing credit
  • PlugIn.DateTime string ; either "NOW" (normal) or "YYYY/MM/DD-HH:MM:SS" (offline transaction)

Billing Plug-in (Debit)

The Debit plug-in is called instead of internal database billing and before internal print logging. The further arguments are:
  • Debit - string; billing transaction type verb
  • "<username>" - string; job billee if known, or null ("")
  • <amount> - float; amount to debit e.g. 0.1100
  • <usage_count_1> - int; PServer: job length in sheets; SServer: time in minutes
  • "<resource>" - string; PServer: destination printer; SServer: resource name
  • "<client_name>" - string; e.g. the Pharos Station, Pharos Remote Station or User PC that requested the operation
  • "<client_desc>" - string; the External Name of the Pharos Station, e.g. its terminal ID code.
  • <usage_count_2> - int; PServer: job length in pages; SServer: 0 (not used yet)
  • "<datetime>" - string; either "NOW" or "YYYY/MM/DD-HH:MM:SS"
There are no extra returns and the plug-in returning failure may fail the current operation. The plug-in may facilitate an offline billing operation by returning:
  • FAIL
  • PHAROS_OFFLINE

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("Billing")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.ClientDesc string ; Pharos Station terminal ID code (i.e. its External Name)
  • PlugIn.EventType string ; billing event sub-type ("Debit")
  • PlugIn.Function string ; type of operation ("Any", "Print", "Computer", "Copy", "Custom", "Fax" or "Scan")
  • PlugIn.Resource string ; PServer: destination printer; SServer: resource name
  • PlugIn.BillName string ; user account name
  • PlugIn.Usage1 int ; PServer: job length in sheets; SServer: time in minutes
  • PlugIn.Usage2 int ; PServer: job length in pages; SServer: 0 (not used yet)
  • PlugIn.Amount float ; amount to credit e.g. 20.0
  • PlugIn.DateTime string ; either "NOW" (normal) or "YYYY/MM/DD-HH:MM:SS" (offline transaction)

BillingName Plug-in

The BillingName plug-in is called before the CostJob plug-in to allow the setting of a preferred person to pay for a print job. This plug-in is called only if internal billing is being used. The arguments are:
  • <result_pathname> - string; the pathname of the result file
  • <job_id> - int; job identifier
  • <sheet_count> - int; job length in sheets
  • "<queue>" - string; job spool queue name
  • "<printer>" - string; job destination printer
  • "<username>" - string; job billee
  • "<job_hostname>" - string; job source machine hostname
  • " <atr0,atr1...> " - string; space, job attributes (comma separated), space
  • "<job_pathname>" - string; job pathname
  • <page_count> - int; job length in pages
Extra returns:
  • "<username>" - string; new job billee
The print job is aborted if the plug-in returns failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("BillingName")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.Queue string ; job source queue
  • PlugIn.Printer string ; job destination printer
  • PlugIn.BillName string ; INPUT/OUTPUT: job billee - reset to change
  • PlugIn.JobID int ; job identifier
  • PlugIn.JobPath string ; job spool file pathname
  • PlugIn.JobPages int ; job length in pages
  • PlugIn.JobSectionCount ; int, the number of different sections in the job
  • PlugIn.JobSections ; list, the details of the sections in the format [Pagecount, Type, [Attribute1, Attribute2...]],... Type is either "page" or sheet". Example: [2, "page", ["A5", "Mono"]], [2, "page", ["B5", "Mono"]], [1, "page", ["Letter", "Blank"]]
  • PlugIn.JobSheets int ; job length in sheets
  • PlugIn.JobAttrs list ; list of job attribute strings e.g. ["A4", "PCL"]
In order to use PlugIn.JobSections and PlugIn.JobSectionCount, you must create and configure the Page Stats registry value on the Page Counter.

A sample BillingName script, Billing Name - AddUser.txt, is available on the Pharos CD at tools\plugins\scripts.

ChangePassword Plug-in

ChangePassword plug-in programs can be launched for changing passwords instead of using internal password changing. The ChangePassword plug-in allows an Administrator to configure their Pharos system to use external authentication such as Kerberos, UNIX or NT.
The ChangePassword plug-in is used to alter a User's password from within Pharos. It is called in two ways, depending on whether a User is changing their own password, or a Proctor is setting a User's password.

User Changing Own Password

When a User changes their own password (as can be done at a Pharos Station), the plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • "<username>" - string; account to change - the logon name of the user
  • "<old_password>" - string; old user password to check
  • "<new_password>" - string; new user password to set
There are no extra returns and the plug-in returning failure may affect the current operation.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("ChangePassword")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.EventType string ; change password sub-type ("User")
  • PlugIn.UserName string ; user account to change the password of
  • PlugIn.OldPassword string ; user's old password to verify
  • PlugIn.NewPassword string ; user's new password to set

Proctor Changing Users Password

When a user forgets their password, the Proctor (local Laboratory Administrator) can modify it on request. if the Pharos Administrator has allowed this type of operation.
The Proctor enters their own password (to ensure they have Proctor privileges) as well as the User's new password. If a plug-in is defined, it is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • proctor - string; password transaction type verb - case sensitive
  • "<staff_name>" - string; staff account
  • "<staff_password>" - string; staff account password to verify
  • "<username>" - string; account to change - logon name of user whose password is being set
  • "<new_password>" - string; new user password to set
There are no extra returns and the plug-in returning failure may affect the current operation.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("ChangePassword")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.EventType string ; change password event sub-type ("Staff")
  • PlugIn.UserName string ; user account to change the password of
  • PlugIn.NewPassword string ; user's new password to set
  • PlugIn.StaffName string ; staff account
  • PlugIn.StaffPassword string ; staff account password to verify

CopyEndJob Plug-in

CopyEndJob
CopyEndJob plug-in programs are launched when the debit transaction has been executed. The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • "<error_message>" - string; message. A message describing the problem if an error occurred, " "
  • "<copier>" - string; Source of copied documents
  • "<username>" - string; job billee (or owner) - the owner of the job
  • <job_cost> - float; the job cost, calculated internally or by the CostJob plug-in, e.g. -0.2500
  • "<prints>" - int; job length in pages
  • "<jobtime>" - string ; time that the copy took place
There are no extra returns and an error is returned if the plug-in returns failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("CopyEndJob")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; INPUT/OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.ClientDesc string ; client description e.g. Pharos Station terminal ID code
  • PlugIn.Failed bool ; true if PrintJob failed (with error message in PlugIn.Error)
  • PlugIn.Direct bool ; true if job source queue is a direct queue
  • PlugIn.Copier string ; Source of copied documents
  • PlugIn.UserName string ; job billee (or owner)
  • PlugIn.JobID int ; job identifier (always 0)
  • PlugIn.JobName string ; job title (always blank)
  • PlugIn.JobPages int ; job length in pages
  • PlugIn.JobSectionCount ; int, the number of different sections in the job
  • PlugIn.JobSections ; list, the details of the sections in the format [Pagecount, Type, [Attribute1, Attribute2...]],... Type is either "page" or sheet". Example: [2, "page", ["A5", "Mono"]], [2, "page", ["B5", "Mono"]], [1, "page", ["Letter", "Blank"]]
  • PlugIn.JobSheets int ; job length in sheets
  • PlugIn.JobCost float ; cost of job
  • PlugIn.JobTime string ; time that the copy took place

CostJob Plug-in

This plug-in is called instead of the internal job costing scheme, before checking the User can afford the job, and before the PrintJob plug-in for a print job. The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • <job_id> - int; job identifier
  • <sheet_count> - int; job length in sheets
  • "<queue>" - string; job spool queue
  • "<username>" - string; job billee (or owner)
  • " <atr0,atr1...> " - string; space, job attributes (comma separated), space
  • "<job_name>" - string; job title e.g. untitled.txt
  • "<client_name>" - string; e.g. the Pharos Station, Pharos Remote Station or User PC that requested the operation
  • <page_count> - int; job length in pages
  • <cost> - float; default job cost (only needed when using an executable plug-in)
Extra returns:
  • <job_cost> - float; e.g. -0.1100 (must be negative)
The print job is aborted if the plug-in returns failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("CostJob")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.Queue string ; job source queue
  • PlugIn.UserName string ; job billee (or owner)
  • PlugIn.JobID int ; job identifier
  • PlugIn.JobName string ; job title e.g. "untitled.txt"
  • PlugIn.JobPath string ; job spool file pathname
  • PlugIn.JobPages int ; job length in pages
  • PlugIn.JobSectionCount ; int, the number of different sections in the job
  • PlugIn.JobSections ; list, the details of the sections in the format [Pagecount, Type, [Attribute1, Attribute2...]],... Type is either "page" or sheet". Example: [2, "page", ["A5", "Mono"]], [2, "page", ["B5", "Mono"]], [1, "page", ["Letter", "Blank"]]
  • PlugIn.JobSheets int ; job length in sheets
  • PlugIn.JobAttrs list ; list of job attribute strings e.g. ["A4", "PCL"]
  • PlugIn.JobCost float ; INPUT/OUTPUT: default job cost, as calculated by the Print Server
In order to use PlugIn.JobSections and PlugIn.JobSectionCount, you must create and configure the Page Stats registry value on the Page Counter.

DeleteJob Plug-in

DeleteJob plug-in programs are launched just before a job is deleted. The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • <job_id> - int; job identifier
  • "<pathname>" - string; job pathname
  • "<queue>" - string; job spool queue
There are no extra returns and the delete is aborted if the plug-in returns failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("DeleteJob")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.Queue string ; job queue
  • PlugIn.JobID int ; job identifier
  • PlugIn.JobPath string ; job spool file pathname

FaxEndJob

FaxEndJob plug-in programs are launched when the transaction has been recorded. The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • "<error_message>" - string; message. A message describing the problem if an error occurred, " "
  • "<terminalname>" - string; source of fax request
  • "<devicename>" - string; name of device
  • "<username>" - string; job billee (or owner) - the owner of the job
  • <job_cost> - float; the job cost, calculated internally or by the CostJob plug-in, e.g. -0.2500
  • "<pages>" - int; job length in pages
  • "<phonenumber>" - string;
  • "<receiver>" - string;
  • "<duration>" - int; time taken to send fax
  • "<jobtime>" - string ; time of copy took place
There are no extra returns and an error is returned if the plug-in returns failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("FaxEndJob")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; INPUT/OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.ClientDesc string ; client description e.g. Pharos Station terminal ID code
  • PlugIn.Failed bool ; true if PrintJob failed (with error message in PlugIn.Error)
  • PlugIn.TerminalName string ;
  • PlugIn.DeviceName string ;
  • PlugIn.UserName string ; job billee (or owner)
  • PlugIn.FaxCost float ; cost of job
  • PlugIn.Pages int ; job length in pages
  • PlugIn.FaxNumber string ;
  • PlugIn.Receiver string ;
  • PlugIn.Duration int ;
  • PlugIn.JobTime string ; time that the fax job took place

ForwardJob Plug-in

ForwardJob plug-in programs are launched after the best printer has been selected for the job, and after Billing Debit is run but before PrintEndJob. The ForwardJob plug-in makes sure the header and the print job arrive at the printer together and sequentially, and no other print jobs arrive in between.
The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • "<client_name>" - string; e.g. the Pharos Station, Pharos Remote Station or User PC that requested the operation
  • "<queue>" - string; job spool queue
  • "<printer>" - string; destination printer - the printer selected to print the job
  • "<username>" - string; job billee (or owner) - the owner of the job
  • <job_id> - int; job identifier
  • "<pathname>" - string; job pathname
  • <banner_job_id> - int; banner job identifier (or '0' if none)
  • "<banner_pathname>" - string; banner job pathname (or " " if none)
  • "<job_name>" - string; job title e.g. 'untitled.txt'
  • <sheet_count> - int; job length in sheets
  • <page_count> - int; job length in pages
  • " <atr0,atr1...> " - string; space, job attributes (comma separated), space
  • <job_cost> - float; the job cost, calculated internally or by the CostJob plug-in, e.g. -0.2500
There are no extra returns and the print job is aborted if the plug-in returns failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("ForwardJob")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.ClientDesc string ; client description e.g. Pharos Station terminal ID code
  • PlugIn.Direct bool ; true if job source queue is a direct queue
  • PlugIn.Queue string ; job source queue
  • PlugIn.Printer string ; job destination printer
  • PlugIn.UserName string ; job billee (or owner)
  • PlugIn.JobID int ; job identifier
  • PlugIn.JobName string ; job title e.g. "untitled.txt"
  • PlugIn.JobPath string ; job spool file pathname
  • PlugIn.JobPages int ; job length in pages
  • PlugIn.JobSectionCount ; int, the number of different sections in the job
  • PlugIn.JobSections ; list, the details of the sections in the format [Pagecount, Type, [Attribute1, Attribute2...]],... Type is either "page" or sheet". Example: [2, "page", ["A5", "Mono"]], [2, "page", ["B5", "Mono"]], [1, "page", ["Letter", "Blank"]]
  • PlugIn.JobSheets int ; job length in sheets
  • PlugIn.JobAttrs list ; list of job attribute strings e.g. ["A4", "PCL"]
  • PlugIn.JobCost float ; job cost
  • PlugIn.BannerID int ; banner job identifier (in queue PlugIn.Printer)
  • PlugIn.BannerPath string ; banner job spool file pathname
In order to use PlugIn.JobSections and PlugIn.JobSectionCount, you must create and configure the Page Stats registry value on the Page Counter.

GetFaxJobCost Plug-in

The GetFaxJobCost Plug-in is currently only used by the Pharos EDI, when interfacing with external systems that count fax jobs. The Plug-in is called with the following arguments:
  • <terminal_name> - string; name of the device the fax is sent through
  • <user_id> - string; owner of the fax job
  • <code> - string; pipe-delimited list of cost center(s) to charge the job to
  • <pages> - int; number of pages in the fax job
  • <phone_number> - string; number of the fax machine sending the fax
  • <receiver> - string; identifier of the machine receiving the fax (usually a phone number)
  • <duration> - int; duration of the fax job in seconds
Extra returns:
  • <cost> - double; the cost of the fax job

Pharos Script Plug-in Interface

  • PlugIn.TerminalName string; name of the device the fax is sent through
  • PlugIn.UserName string; owner of the fax job
  • PlugIn.Code string; pipe-delimited list of cost center(s) to charge the job to
  • PlugIn.JobPages int; number of pages in the fax job
  • PlugIn.PhoneNumber string; number of the fax machine sending the fax
  • PlugIn.Receiver string; identifier of the machine receiving the fax
  • PlugIn.Duration int; duration of the fax job in seconds
  • PlugIn.JobCost double; OUTPUT: cost of job

GetMfdStatus Plug-in

GetMfdStatus plug-in programs are launched to detect the status of an MFD, specifically whether it is printing. This plug-in is attached to individual MFDs at Devices > MFD tab. Pharos provides a default GetMfdStatus scripted plug-in, GetMfdStatusUsingLPD. This script works for most MFDs; however, if the script is inadequate for MFDs on the site, it can be edited at System > Scripts. See MFD Troubleshooting for information on how to edit this script.
The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • <mfd> - string; the name of the MFD whose status is required
  • <mfd_ip> - string; the IP address (or hostname) of the MFD whose status is required
Extra returns:
  • "<mfd_status_num>" - int; the status of the MFD, for example, -1 (error), 0 (idle), 1 (printing)
The MFD will be considered in an error state if the plug-in returns failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("GetMfdStatus")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.Mfd string ; the name of the MFD whose status is required
  • PlugIn.MfdIp string ; the IP address (or hostname) of the MFD whose status is required
  • PlugIn.Status int ; INPUT/OUTPUT: the status of the MFD, for example, -1 (error), 0 (idle), 1 (printing) (default is -1, i.e. error)

JobInformation Plug-in

JobInformation programs are launched to display information about a job to the user. The JobInformation plug-in allows you to customize the operation of the Informed Print feature. If a JobInformation plug-in is in use, the Informed Print settings configured on the Uniprint Global Settings dialog will be ignored.
The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • <job_id> - int; job identifier
  • <job_name> - string; job title, e.g. untitled.txt
  • <job_cost> - float; job cost
  • <queue> - string; job Spool Queue
  • <printer> - string; destination printer - the printer selected to print the job
  • <username> - string; job billee (or owner)
  • <user_group> - string; user group of the job billee
  • <user_balance> - float; current balance of the job billee
  • <sheet_count> - int; job length in sheets
  • <page_count> - int; job length in pages
  • <page_count_color> - int; number of color pages in job
  • <application_name> - string; name of application that printed the job, e.g. Word
  • <atr0, atr1, ...> - string; space, job attributes (comma separated), space
There are no extra returns and the print job is cancelled if the plug-in returns failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name (JobInformation)
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.JobID int ; job identifier
  • PlugIn.JobName string ; job title, e.g. untitled.txt
  • PlugIn.JobPath string ; job spool file pathname
  • PlugIn.JobCost float ; job cost
  • PlugIn.Queue string ; job source queue
  • PlugIn.Printer string ; destination printer the printer selected to print the job
  • PlugIn.UserName string ; job billee (or owner)
  • PlugIn.UserGroup string ; user group of the job billee
  • PlugIn.UserBalance float ; current balance of the job billee
  • PlugIn.JobSheets int ; job length in sheets
  • PlugIn.JobPages int ; job length in pages
  • PlugIn.JobColorPages int ; number of color pages in job
  • PlugIn.ApplicationName string ; name of application that printed the job, e.g. Word
  • PlugIn.JobSectionCount int ; the number of different sections in the job
  • PlugIn.JobSections list ; the details of the sections in the format [Pagecount, Type, [Attribute1, Attribute2, ...]], ... Type is either page or sheet. Example: [2, page, [A5, Mono]], [2, page, [B5, Mono]], [1, page, [Letter, Blank]]
  • PlugIn.JobAttrs list ; list of job attribute strings, e.g. [A4, PCL]
A sample JobInformation script, JobInformation - Notify User of Job Cost.txt, is available on the Pharos CD at tools\plugins\scripts.

Logon Plug-in

Logon plug-in programs are launched to validate passwords, and replace internal database logon validation. The Logon plug-in allows an Administrator to configure their Pharos system to use external authentication such as Kerberos, UNIX or NT.

When using a Logon plug-in, the active/inactive account feature in the Users context of Pharos Administrator and Pharos Remote will not work. To lock a user out of the Pharos system, the account that the plug-in checks will need to be disabled, e.g. If the NT Logon plug-in is being used, the user's NT account must be disabled to stop them from using Pharos.

Four sample Logon scripts, Logon - Authenticate and Translate Users.txt, Logon - Generic Innovative.txt , Logon - Generic SIP2.txt , and Logon - SIRSI SIP2.txt are available on the Pharos CD at tools\plugins\scripts.
The Logon plug-in program is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • "<level>" - string; access level to check e.g. User, Proctor, Cashier
  • "<username>" - string; account to check - logon name of the User
  • "<password>" - string; password to check
Extra returns:
  • "<new_username>" - string ; new account name for billing purposes
The extra return is optional, and if omitted the username does not change.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("Logon")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.UserName string ; INPUT/OUTPUT: user account to check (replacement account name, if changed)
  • PlugIn.Password string ; user's password to check
  • PlugIn.Level string ; e.g. "User", "Cashier", "Proctor" or "Administrator"

MoveJob Plug-in

The MoveJob plug-in is called before a print job is moved. It is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • <job_id> - int; job identifier
  • <sheet_count> - int; job length in sheets
  • "<job_pathname>" - string; job pathname
  • "<source_queue>" - string; job spool queue
  • "<dest_queue>" - string; destination spool queue
  • "<staff_name>" - string; staff doing move
  • "<username>" - string; job owner
  • " <atr0,atr1...> " - string; space, job attributes (comma separated), space
  • <page_count> - int; job length in pages
  • {<dest_hostname>} - string; only present if the move is to another machine
There are no extra returns and the MoveJob is aborted if the plug-in returns failure.
The sheet_count and <page_count> arguments will be 0 when moving a job to a queue that has no attributes (i.e. takes all jobs) because no page count occurs.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("MoveJob")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server (source)
  • PlugIn.ServerTo string ; the name of the server (dest or "" if same server)
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.QueueFrom string ; job source queue
  • PlugIn.QueueTo string ; job dest queue
  • PlugIn.StaffName string ; staff doing move
  • PlugIn.UserName string ; job billee (or owner)
  • PlugIn.JobID int ; job identifier
  • PlugIn.JobName string ; job title e.g. "untitled.txt"
  • PlugIn.JobPath string ; job spool file pathname
  • PlugIn.JobPages int ; job length in pages
  • PlugIn.JobSectionCount ; int, the number of different sections in the job
  • PlugIn.JobSections ; list, the details of the sections in the format [Pagecount, Type, [Attribute1, Attribute2...]],... Type is either "page" or sheet". Example: [2, "page", ["A5", "Mono"]], [2, "page", ["B5", "Mono"]], [1, "page", ["Letter", "Blank"]]
  • PlugIn.JobSheets int ; job length in sheets
  • PlugIn.JobAttrs list ; list of job attribute strings e.g. ["A4", "PCL"]
In order to use PlugIn.JobSections and PlugIn.JobSectionCount, you must create and configure the Page Stats registry value on the Page Counter.

PageCountJob Plug-in

To bill users for the amount of printing they perform, Pharos has built in a page counter, which supports
  • PostScript LanguageLevel 1, 2 and 3
  • PCL 3, PCL 5Ce and PCL XL (PCL 6)
  • PDF 1.3
  • HP-GL/2 and HP RTL
  • ESC/P2
  • Text
This plug-in does not normally need to be changed.
PageCountJob plug-in programs can be launched for counting the number of pages in a document. The detail for this plug-in may be released on application to Pharos Systems International.
Registry entries are available to control the operation of the page counter.

PrintStartJob

PrintStartJob programs are launched at the start of a print operation before any other plug-in. The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • <job_id> - int; job identifier
  • "<pathname>" - string; job pathname
  • "<queue>" - string; job spool queue
  • "<username>" - string; job billee (or owner) - the owner of the job
There are no extra returns and the print job is aborted if the plug-in returns failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("PrintStartJob")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.Cancel bool ; INPUT/OUTPUT: true to silently abort print (default is false)
  • PlugIn.Direct bool ; true if job source queue is a direct queue
  • PlugIn.Queue string ; job source queue
  • PlugIn.UserName string ; job billee (or owner)
  • PlugIn.JobID int ; job identifier
  • PlugIn.JobName string ; job title e.g. "untitled.txt"
  • PlugIn.JobPath string ; job spool file pathname

PrintEndJob

PrintEndJob plug-in programs are launched after the ForwardJob plug-in. This is the last event of a print job. The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • <direct> - int; '1' if a direct queue, '0' otherwise
  • "<error_message>" - string; message. A message describing the problem if an error occurred, " "
  • "<source_ip>" - string; IP Address of job source machine, or " "
  • "<queue>" - string; job spool queue
  • "<printer>" - string; destination printer - the printer selected to print the job
  • "<username>" - string; job billee (or owner) - the owner of the job
  • "<job_name>" - string; job title e.g. 'untitled.txt'
  • <job_cost> - float; the job cost, calculated internally or by the CostJob plug-in, e.g. -0.2500
There are no extra returns and an error is returned if the plug-in returns failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("PrintEndJob")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; INPUT/OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.ClientDesc string ; client description e.g. Pharos Station terminal ID code
  • PlugIn.Failed bool ; true if PrintJob failed (with error message in PlugIn.Error)
  • PlugIn.Direct bool ; true if job source queue is a direct queue
  • PlugIn.Queue string ; job source queue
  • PlugIn.Printer string ; job destination printer (if any)
  • PlugIn.UserName string ; job billee (or owner)
  • PlugIn.JobID int ; job identifier
  • PlugIn.JobName string ; job title e.g. "untitled.txt"
  • PlugIn.JobPath string ; job spool file pathname
  • PlugIn.JobPages int ; job length in pages
  • PlugIn.JobSectionCount ; int, the number of different sections in the job
  • PlugIn.JobSections ; list, the details of the sections in the format [Pagecount, Type, [Attribute1, Attribute2...]],... Type is either "page" or sheet". Example: [2, "page", ["A5", "Mono"]], [2, "page", ["B5", "Mono"]], [1, "page", ["Letter", "Blank"]]
  • PlugIn.JobSheets int ; job length in sheets
  • PlugIn.JobAttrs list ; list of job attribute strings e.g. ["A4", "PCL"]
  • PlugIn.JobCost float ; cost of job
A sample PrintEndJob script, PrintEndJob - Notify Users.txt, is available on the Pharos CD at tools\plugins\scripts.

PrintJob Plug-in

PrintJob plug-in programs are launched just before a job prints and before the banner is printed. The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • <job_id> - int; job identifier
  • <sheet_count> - int; job length in sheets
  • <job_cost> - float; the job cost, calculated internally or by the CostJob plug-in, e.g. -0.2500
  • "<pathname>" - string; job pathname
  • "<queue>" - string; job spool queue
  • "<printer>" - string; destination printer - the printer selected to print the job
  • "<username>" - string; job billee (or owner) - the owner of the job
  • " <atr0,atr1...> " - string; space, job attributes (comma separated), space
  • <page_count> - int; job length in pages
There are no extra returns and the print job is aborted if the plug-in returns failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("PrintJob")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.ClientDesc string ; client description e.g. Pharos Station terminal ID code
  • PlugIn.Direct bool ; true if job source queue is a direct queue
  • PlugIn.Queue string ; job source queue
  • PlugIn.Printer string ; job destination printer (if any)
  • PlugIn.UserName string ; job billee (or owner)
  • PlugIn.JobID int ; job identifier
  • PlugIn.JobName string ; job title e.g. "untitled.txt"
  • PlugIn.JobPath string ; job spool file pathname
  • PlugIn.JobPages int ; job length in pages
  • PlugIn.JobSectionCount ; int, the number of different sections in the job
  • PlugIn.JobSections ; list, the details of the sections in the format [Pagecount, Type, [Attribute1, Attribute2...]],... Type is either "page" or sheet". Example: [2, "page", ["A5", "Mono"]], [2, "page", ["B5", "Mono"]], [1, "page", ["Letter", "Blank"]]
  • PlugIn.JobSheets int ; job length in sheets
  • PlugIn.JobAttrs list ; list of job attribute strings e.g. ["A4", "PCL"]
  • PlugIn.JobCost float ; cost of job
In order to use PlugIn.JobSections and PlugIn.JobSectionCount, you must create and configure the Page Stats registry value on the Page Counter.

A sample PrintJob script, PrintJob - Fail Large Jobs.txt , is available on the Pharos CD at tools\plugins\scripts.

PrintJobArrive Plug-in

PrintJobArrive plug-ins are launched when a Spooled print job arrives at a Spool Queue. The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • <job_id> - int; job identifier
  • "<pathname>" - string; job pathname
  • "<queue>" - string; job spool queue
  • "<username>" - string; job billee (or owner) - the owner of the job
There are no extra returns and the print job is aborted if the plug-in returns failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("PrintJobArrive")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Cancel bool ; OUTPUT: if true then cancel the print job
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Computer string ; the computer name of the print job
  • PlugIn.Queue string ; job source queue
  • PlugIn.UserName string ; job billee (or owner)
  • PlugIn.JobID int ; job identifier
  • PlugIn.JobName string ; job title e.g. "untitled.txt"
  • PlugIn.JobPath string ; job spool file pathname

ScanEndJob

ScanEndJob plug-in programs are launched when the transaction has been recorded. The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • "<error_message>" - string; message. A message describing the problem if an error occurred, " "
  • "<terminalname>" - string; source of fax request
  • "<devicename>" - string; name of device
  • "<username>" - string; job billee (or owner) - the owner of the job
  • <job_cost> - float; the job cost, calculated internally or by the CostJob plug-in, e.g. -0.2500
  • "<pages>" - int; job length in pages
  • "<pagesize>" - string;
  • "<scantype>" - string;
  • "<jobtime>" - string ; time of copy took place
There are no extra returns and an error is returned if the plug-in returns failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("ScanEndJob")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; INPUT/OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.ClientDesc string ; client description e.g. Pharos Station terminal ID code
  • PlugIn.Failed bool ; true if PrintJob failed (with error message in PlugIn.Error)
  • PlugIn.TerminalName string ;
  • PlugIn.DeviceName string ;
  • PlugIn.UserName string ; job billee (or owner)
  • PlugIn.ScanCost float ; cost of job
  • PlugIn.Pages int ; job length in pages
  • PlugIn.PageSize string ;
  • PlugIn.ScanType string ;
  • PlugIn.JobTime string ; time that the scan job took place

SelectEnvironment Plug-in

The SelectEnvironment plug-in is called before a patron is logged on to a SignUp Client, to determine the Environment that will be used to log the Patron on to the network. The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • <pc_name> - string; the network name of the SignUp Client the Patron is logging on to
  • "<logon_id>" - string; the Patron who is trying to log on to the SignUp Client
Extra returns:
  • "<environment>" - string; the name of the Environment to use
If the plug-in returns failure, or if it returns an Environment that does not exist, the Client will go into standalone mode, and the user will be logged on with the default Environment.

If you are using this plug-in, make sure that a default Environment that will work on all machines is available in case of failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("SelectEnvironment")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Client string ; the network name of the SignUp Client the Patron is logging on to
  • PlugIn.UserName string ; the Patron who is trying to log on to the SignUp Client
  • PlugIn.Environment string ; OUTPUT: the name of the Environment to use

SelectPrinter Plug-in

SelectPrinter plug-in programs are launched after the best printer has been internally selected for the job, and after PageCountJob is run but before BillingName. The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • <job_id> - int; job identifier
  • "<pathname>" - string; job pathname
  • <sheet_count> - int; job length in sheets
  • <page_count> - int; job length in pages
  • " <atr0,atr1...> " - string; space, job attributes (comma separated), space
  • "<client_name>" - string; e.g. the Pharos Station, Pharos Remote Station or User PC that requested the operation
  • "<queue>" - string; job spool queue
  • " <ptr0,ptr1...> " - string; space, comma separated printer list, space
  • "<best_printer>" - string; best internally selected printer, for example, 'p1'
Extra returns:
  • "<new_best_printer>" - string; replacement best printer, for example, 'p1'
The print job is aborted if the plug-in returns failure.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("SelectPrinter")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Operation string ; the operation attempted when the plug-in was executed
  • PlugIn.Server string ; the name of the server
  • PlugIn.Client string ; the name of the client (if any, e.g. Pharos Station)
  • PlugIn.ClientDesc string ; client description e.g. Pharos Station terminal ID code
  • PlugIn.Direct bool ; true if job source queue is a direct queue
  • PlugIn.Queue string ; job source queue
  • PlugIn.LoadOption string ; "Fast" (choose fastest printer) or "Even"
  • PlugIn.Printer string ; INPUT/OUTPUT: job destination printer (if any) - reset to change
  • PlugIn.Printers list ; list of valid printers e.g. ["P1", "P2"]
  • PlugIn.UserName string ; job billee (or owner)
  • PlugIn.JobID int ; job identifier
  • PlugIn.JobName string ; job title e.g. "untitled.txt"
  • PlugIn.JobPath string ; job spool file pathname
  • PlugIn.JobPages int ; job length in pages
  • PlugIn.JobSectionCount ; int, the number of different sections in the job
  • PlugIn.JobSections ; list, the details of the sections in the format [Pagecount, Type, [Attribute1, Attribute2...]],... Type is either "page" or sheet". Example: [2, "page", ["A5", "Mono"]], [2, "page", ["B5", "Mono"]], [1, "page", ["Letter", "Blank"]]
  • PlugIn.JobSheets int ; job length in sheets
  • PlugIn.JobAttrs list ; list of job attribute strings e.g. ["A4", "PCL"]
In order to use PlugIn.JobSections and PlugIn.JobSectionCount, you must create and configure the Page Stats registry value on the Page Counter.
Two sample SelectPrinter scripts, SelectPrinter - Redirect Large Job.txt and SelectPrinter - Allow user to select a printer.txt, are available on the Pharos CD at tools\plugins\scripts.

SessionEnd Plug-in

SessionEnd plug-ins are launched when a session ends on a SignUp Client PC. The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
  • <pc_name> -string; the network name of the SignUp client machine
  • "<logon_id>" - string; the user 's logon ID
  • "<userverified>" - int; 1- user successfully authenticated
  • "<reservation_id>" - int; the ID of the reservation
  • "<start_time>" - string; the start time of the session in the format of  "%Y/%m/%d-%H:%M:%S"
  • "<duration>" -int; the duration in minutes of the reservation
  • "<reservation_type>" - int; the type of the reservation: ImmediateReservation = 1, QueuedReservation = 2, ScheduledReservation = 4, BlockReservation = 8
  • "<sessionend_type>" -int; the end type of the session; 0- the sesion is normally ended, 1- the session is timed out, 2- the session is hijacked by administrator, 3- the session is hijacked by librarian
  • "<is_express>" -int; 1- express session
  • "<is_stored>" -int; 1- a stored session
There are no extra returns.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("SessionEnd")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.PcName string; the network name of the SignUp client machine
  • PlugIn.LogonId string; the user 's logon ID
  • PlugIn.UserVerified bool; true - user successfully authenticated
  • PlugIn.ReservationId int; the ID of the reservation
  • PlugIn.StartTime string; the start time of the session in the format of  "%Y/%m/%d-%H:%M:%S"
  • PlugIn.Duration int; the duration in minutes of the reservation
  • PlugIn.ReservationType int; the type of the reservation; ImmediateReservation = 1,  QueuedReservation    = 2,  ScheduledReservation  = 4, BlockReservation  = 8
  • PlugIn.SessionEndType int; the end type of the session; 0- the sesion is normally ended, 1- the session is timed out, 2- the session is hijacked by administrator, 3- the session is hijacked by librarian
  • PlugIn.IsExpress bool ; true - express session
  • PlugIn.IsStored bool ; true - a stored session

ShutDown Plug-in

ShutDown plug-in programs are launched during the shutdown of Pharos services. The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
If the plug-in returns a failure it has no effect i.e. shutdown proceeds.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("ShutDown")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Server string ; the name of the server

StartUp Plug-in

StartUp plug-in programs are launched during the startup of Pharos services. The plug-in is called with the following arguments:
  • <result_pathname> - string; the pathname of the result file
Startup is aborted if the plug-in returns failure i.e. shutdown occurs.

Pharos Script Plug-in Interface

  • PlugIn.Event string ; Plug-in event name ("StartUp")
  • PlugIn.Result bool ; INPUT/OUTPUT: Plug-in result (default is true, i.e. success)
  • PlugIn.Error string ; OUTPUT: Plug-in error message (if plug-in fails)
  • PlugIn.Server string ; the name of the server

Transfer Plug-in

Transfer plug-in programs are launched when a funds transfer is requested. The plug-in is called with the same arguments as the Billing Plug-in.

Links
http://pharos.custhelp.com/app/answers/detail/a_id/1334/kw/interfaces/related/1
Pharos Script - Example of "User" Namespace



No comments:

Post a Comment

Please leave a comment; someone, anyone!