irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

irods_re_structs.hpp
Go to the documentation of this file.
1 #ifndef IRODS_RE_STRUCTS_HPP
2 #define IRODS_RE_STRUCTS_HPP
3 
4 #include "rodsUser.h"
5 #include "rods.h"
6 #include "msParam.h"
7 #include "reDefines.h"
8 #include "reconstants.hpp"
9 #include "boost/any.hpp"
10 
11 #include <list>
12 
13 #define MAX_NUM_OF_ARGS_IN_ACTION 20
14 
15 #define FREE_MS_PARAM 0x1
16 #define FREE_DOINP 0x2
17 
18 typedef struct RuleExecInfo {
19  int status;
21  char ruleName[NAME_LEN]; /* name of rule */
26  int l1descInx;
27  dataObjInp_t *doinp; /* data object type input */
29  char rescName[NAME_LEN]; // replaces rgi above
30  userInfo_t *uoic; /* client XXXX should get this from rsComm->clientUser */
31  userInfo_t *uoip; /* proxy XXXX should get this from rsComm->proxyUser */
33  userInfo_t *uoio; /* other user info */
35 
38  struct RuleExecInfo *next;
40 
41 typedef struct ReArg {
42  int myArgc;
43  char **myArgv;
45 
46 typedef struct RuleExecInfoAndArg {
50 
51 int applyRule(
52  char *inAction,
53  msParamArray_t *inMsParamArray,
54  ruleExecInfo_t *rei,
55  int reiSaveFlag );
56 
58  const char* _action,
59  std::list<boost::any>& _params,
60  ruleExecInfo_t* _rei );
61 
62 void freeCmdExecOut( execCmdOut_t *ruleExecOut );
63 
64 int applyRule( char *inAction, msParamArray_t *inMsParamArray,
65  ruleExecInfo_t *rei, int reiSaveFlag );
66 int applyRuleForPostProcForRead( rsComm_t *rsComm, bytesBuf_t *dataObjReadOutBBuf, char *objPath );
67 int applyRuleForPostProcForWrite( rsComm_t *rsComm, bytesBuf_t *dataObjWriteOutBBuf, char *objPath );
68 int applyRuleArg( const char *action, const char *args[MAX_NUM_OF_ARGS_IN_ACTION], int argc,
69  ruleExecInfo_t *rei, int reiSaveFlag );
70 
72  dataObjInp_t *dataObjIn );
73 int initReiWithCollInp( ruleExecInfo_t *rei, rsComm_t *rsComm,
74  collInp_t *collCreateInp, collInfo_t *collInfo );
75 
76 
77 int _writeString( char *writeId, char *writeStr, ruleExecInfo_t *rei );
78 int writeString( msParam_t* where, msParam_t* inString, ruleExecInfo_t *rei );
79 
80 int
81 unpackRei( rsComm_t *rsComm, ruleExecInfo_t **rei,
82  bytesBuf_t *packedReiBBuf );
83 int
84 packReiAndArg( ruleExecInfo_t *rei, char *myArgv[],
85  int myArgc, bytesBuf_t **packedReiAndArgBBuf );
86 int
87 unpackReiAndArg( rsComm_t *rsComm, ruleExecInfoAndArg_t **reiAndArg,
88  bytesBuf_t *packedReiAndArgBBuf );
89 
91 
92 int freeRuleExecInfoStruct( ruleExecInfo_t *rs, int freeSpecialStructFlag );
93 
94 int freeRuleExecInfoInternals( ruleExecInfo_t *rs, int freeSpecialStructFlag );
95 
97 
98 int copyCollInfo( collInfo_t *from, collInfo_t *to );
99 
100 int freeCollInfo( collInfo_t *rs );
101 
102 int copyUserInfo( userInfo_t *from, userInfo_t *to );
103 
104 int freeUserInfo( userInfo_t *rs );
105 
107 
109 
110 void *mallocAndZero( int s );
111 
112 #endif // IRODS_RE_STRUCTS_HPP
RuleExecInfoAndArg::rei
ruleExecInfo_t * rei
Definition: irods_re_structs.hpp:47
rsComm_t
Definition: rcConnect.h:145
freeRuleExecInfoInternals
int freeRuleExecInfoInternals(ruleExecInfo_t *rs, int freeSpecialStructFlag)
Definition: reStruct.cpp:106
ruleExecInfo_t
struct RuleExecInfo ruleExecInfo_t
CollInp
Definition: dataObjInpOut.h:157
ExecCmdOut
Definition: execCmd.h:20
msParam.h
userInfo_t
Definition: rodsUser.h:65
_writeString
int _writeString(char *writeId, char *writeStr, ruleExecInfo_t *rei)
Definition: irods_re_structs.cpp:278
ruleExecInfoAndArg_t
struct RuleExecInfoAndArg ruleExecInfoAndArg_t
rodsUser.h
RuleExecInfo::status
int status
Definition: irods_re_structs.hpp:19
unpackReiAndArg
int unpackReiAndArg(rsComm_t *rsComm, ruleExecInfoAndArg_t **reiAndArg, bytesBuf_t *packedReiAndArgBBuf)
Definition: irods_re_structs.cpp:434
RuleExecInfo::coi
collInfo_t * coi
Definition: irods_re_structs.hpp:32
freeUserInfo
int freeUserInfo(userInfo_t *rs)
Definition: reStruct.cpp:217
reArg_t
struct ReArg reArg_t
ReArg
Definition: irods_re_structs.hpp:41
reDefines.h
RuleExecInfo::doi
dataObjInfo_t * doi
Definition: irods_re_structs.hpp:28
RuleExecInfo::doinp
dataObjInp_t * doinp
Definition: irods_re_structs.hpp:27
ReArg::myArgc
int myArgc
Definition: irods_re_structs.hpp:42
run_tests.action
action
Definition: run_tests.py:114
writeString
int writeString(msParam_t *where, msParam_t *inString, ruleExecInfo_t *rei)
Definition: irods_re_structs.cpp:311
copyRuleExecInfo
int copyRuleExecInfo(ruleExecInfo_t *from, ruleExecInfo_t *to)
Definition: reStruct.cpp:21
CollInfo
Definition: objInfo.h:177
mallocAndZero
void * mallocAndZero(int s)
Definition: reStruct.cpp:13
freeKeyValPairStruct
int freeKeyValPairStruct(keyValPair_t *rs)
Definition: reStruct.cpp:246
RuleExecInfo::rsComm
rsComm_t * rsComm
Definition: irods_re_structs.hpp:22
freeRuleExecInfoStruct
int freeRuleExecInfoStruct(ruleExecInfo_t *rs, int freeSpecialStructFlag)
Definition: reStruct.cpp:100
initReiWithDataObjInp
int initReiWithDataObjInp(ruleExecInfo_t *rei, rsComm_t *rsComm, dataObjInp_t *dataObjIn)
Definition: irods_re_structs.cpp:164
ReArg::myArgv
char ** myArgv
Definition: irods_re_structs.hpp:43
RuleExecInfo::condInputData
keyValPair_t * condInputData
Definition: irods_re_structs.hpp:34
RuleExecInfoAndArg::reArg
reArg_t reArg
Definition: irods_re_structs.hpp:48
copyUserInfo
int copyUserInfo(userInfo_t *from, userInfo_t *to)
Definition: reStruct.cpp:208
RuleExecInfo::uoip
userInfo_t * uoip
Definition: irods_re_structs.hpp:31
freeCollInfo
int freeCollInfo(collInfo_t *rs)
Definition: reStruct.cpp:198
unpackRei
int unpackRei(rsComm_t *rsComm, ruleExecInfo_t **rei, bytesBuf_t *packedReiBBuf)
Definition: irods_re_structs.cpp:362
RuleExecInfo::statusStr
char statusStr[(1024+64)]
Definition: irods_re_structs.hpp:20
copyCollInfo
int copyCollInfo(collInfo_t *from, collInfo_t *to)
Definition: reStruct.cpp:156
applyRuleForPostProcForRead
int applyRuleForPostProcForRead(rsComm_t *rsComm, bytesBuf_t *dataObjReadOutBBuf, char *objPath)
Definition: rsDataObjRead.cpp:21
applyRuleArg
int applyRuleArg(const char *action, const char *args[20], int argc, ruleExecInfo_t *rei, int reiSaveFlag)
Definition: irods_re_structs.cpp:95
DataObjInp
Definition: dataObjInpOut.h:65
applyRuleWithInOutVars
int applyRuleWithInOutVars(const char *_action, std::list< boost::any > &_params, ruleExecInfo_t *_rei)
Definition: irods_re_structs.cpp:124
MAX_NAME_LEN
#define MAX_NAME_LEN
Definition: rodsDef.h:61
MAX_NUM_OF_ARGS_IN_ACTION
#define MAX_NUM_OF_ARGS_IN_ACTION
Definition: irods_re_structs.hpp:13
MsParam
Definition: msParam.h:76
RuleExecInfoAndArg
Definition: irods_re_structs.hpp:46
applyRuleForPostProcForWrite
int applyRuleForPostProcForWrite(rsComm_t *rsComm, bytesBuf_t *dataObjWriteOutBBuf, char *objPath)
Definition: rsDataObjWrite.cpp:26
RULE_SET_DEF_LENGTH
#define RULE_SET_DEF_LENGTH
Definition: reDefines.h:26
copyKeyValPairStruct
int copyKeyValPairStruct(keyValPair_t *from, keyValPair_t *to)
Definition: reStruct.cpp:240
RuleExecInfo::uoio
userInfo_t * uoio
Definition: irods_re_structs.hpp:33
BytesBuf
Definition: rodsDef.h:197
RuleExecInfo::ruleName
char ruleName[64]
Definition: irods_re_structs.hpp:21
RuleExecInfo::l1descInx
int l1descInx
Definition: irods_re_structs.hpp:26
reconstants.hpp
RuleExecInfo::pluginInstanceName
char pluginInstanceName[(1024+64)]
Definition: irods_re_structs.hpp:23
RuleExecInfo::uoic
userInfo_t * uoic
Definition: irods_re_structs.hpp:30
RuleExecInfo::msParamArray
msParamArray_t * msParamArray
Definition: irods_re_structs.hpp:24
RuleExecInfo::rescName
char rescName[64]
Definition: irods_re_structs.hpp:29
RuleExecInfo
Definition: irods_re_structs.hpp:18
applyRule
int applyRule(char *inAction, msParamArray_t *inMsParamArray, ruleExecInfo_t *rei, int reiSaveFlag)
Definition: irods_re_structs.cpp:65
MsParamArray
Definition: msParam.h:84
NAME_LEN
#define NAME_LEN
Definition: rodsDef.h:55
KeyValPair
Definition: objInfo.h:120
packReiAndArg
int packReiAndArg(ruleExecInfo_t *rei, char *myArgv[], int myArgc, bytesBuf_t **packedReiAndArgBBuf)
Definition: irods_re_structs.cpp:390
DataObjInfo
Definition: objInfo.h:129
RuleExecInfo::next
struct RuleExecInfo * next
Definition: irods_re_structs.hpp:38
initReiWithCollInp
int initReiWithCollInp(ruleExecInfo_t *rei, rsComm_t *rsComm, collInp_t *collCreateInp, collInfo_t *collInfo)
Definition: irods_re_structs.cpp:182
RuleExecInfo::inOutMsParamArray
msParamArray_t inOutMsParamArray
Definition: irods_re_structs.hpp:25
freeCmdExecOut
void freeCmdExecOut(execCmdOut_t *ruleExecOut)
Definition: irods_re_structs.cpp:150
rods.h
copyDataObjInfo
int copyDataObjInfo(dataObjInfo_t *from, dataObjInfo_t *to)
Definition: reStruct.cpp:142
ruleSet
Definition: restructs.hpp:282