00001 /* 00002 * Copyright (c) 2001 EU DataGrid. 00003 * For license conditions see http://www.eu-datagrid.org/license.html 00004 * 00005 * Copyright (c) 2001, 2002 by 00006 * Martijn Steenbakkers <martijn@nikhef.nl>, 00007 * Oscar Koeroo <okoeroo@nikhef.nl>, 00008 * David Groep <davidg@nikhef.nl>, 00009 * NIKHEF Amsterdam, the Netherlands 00010 */ 00011 00027 #ifndef LCMAPS_ARGUMENTS_H 00028 #define LCMAPS_ARGUMENTS_H 00029 00030 /****************************************************************************** 00031 Type definitions 00032 ******************************************************************************/ 00033 00042 typedef struct lcmaps_argument_s 00043 { 00044 char *argName; 00045 char *argType; 00046 int argInOut; 00047 void *value; 00048 } lcmaps_argument_t; 00049 00050 00051 /****************************************************************************** 00052 * Module definition 00053 *****************************************************************************/ 00054 00055 /****************************************************************************** 00056 Function: lcmaps_setArgValue 00057 Description: 00058 Set the value of argType on the reserved place in values. 00059 The place within values is determined by the place where argName is found 00060 in the arguments list 00061 00062 Parameters: 00063 argName: name of argument 00064 argType: type of argument 00065 argcx: number of arguments 00066 argvx: array of arguments structures 00067 Returns: 00068 0: success 00069 -1: failure (could not find structure with name argName) 00070 ******************************************************************************/ 00071 extern int lcmaps_setArgValue(char *argName, char *argType, void *value, int argcx, lcmaps_argument_t **argvx); 00072 00073 /****************************************************************************** 00074 Function: lcmaps_getArgValue 00075 Description: 00076 Gets the value of argType from values. 00077 The place within the lcmaps_argument_t values is determined by the argName listed in 00078 lcmaps_argument_t *argvx. 00079 Returns a void pointer to the value. 00080 00081 Parameters: 00082 argName: name of argument 00083 argType: type of argument 00084 argcx: number of arguments 00085 argvx: array of arguments structures 00086 Returns: 00087 void pointer to the value or NULL 00088 ******************************************************************************/ 00089 extern void * lcmaps_getArgValue(char *argName, char *argType, int argcx, lcmaps_argument_t *argvx); 00090 00091 /****************************************************************************** 00092 Function: lcmaps_findArgName 00093 Description: 00094 Search for argName in the arguments list. 00095 Returns the index to lcmaps_argument_t element. 00096 00097 Parameters: 00098 argName: name of argument 00099 argcx: number of arguments 00100 argvx: array of arguments structures 00101 Returns: 00102 index to lcmaps_argument_t element 00103 ******************************************************************************/ 00104 extern int lcmaps_findArgName(char *argName, int argcx, lcmaps_argument_t *argvx); 00105 00106 /****************************************************************************** 00107 Function: lcmaps_findArgNameAndType 00108 Description: 00109 Search for argName and Type in the arguments list. 00110 Returns the index to lcmaps_argument_t element. 00111 00112 Parameters: 00113 argName: name of argument 00114 argType: type of argument 00115 argcx: number of arguments 00116 argvx: array of arguments structures 00117 Returns: 00118 index to lcmaps_argument_t element 00119 ******************************************************************************/ 00120 extern int lcmaps_findArgNameAndType(char *argName, char *argType, int argcx, lcmaps_argument_t *argvx); 00121 00122 /****************************************************************************** 00123 Function: lcmaps_cntArgs 00124 Description: 00125 Count the number of arguments that are defined in a plug-in 00126 Returns this number. 00127 00128 Parameters: 00129 argvx: array of arguments structures 00130 Returns: 00131 the number of arguments 00132 ******************************************************************************/ 00133 extern int lcmaps_cntArgs(lcmaps_argument_t *argvx); 00134 00135 #endif /* LCMAPS_ARGUMENTS_H */ 00136 00137 /****************************************************************************** 00138 CVS Information: 00139 $Source: /cvs/fabric_mgt/gridification/lcmaps/include/lcmaps_arguments.h,v $ 00140 $Date: 2003/07/10 16:33:22 $ 00141 $Revision: 1.7 $ 00142 $Author: martijn $ 00143 ******************************************************************************/