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 File Reference
#include "rodsUser.h"
#include "rods.h"
#include "msParam.h"
#include "reDefines.h"
#include "reconstants.hpp"
#include "boost/any.hpp"
#include <list>
Include dependency graph for irods_re_structs.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  RuleExecInfo
 
struct  ReArg
 
struct  RuleExecInfoAndArg
 

Macros

#define MAX_NUM_OF_ARGS_IN_ACTION   20
 
#define FREE_MS_PARAM   0x1
 
#define FREE_DOINP   0x2
 

Typedefs

typedef struct RuleExecInfo ruleExecInfo_t
 
typedef struct ReArg reArg_t
 
typedef struct RuleExecInfoAndArg ruleExecInfoAndArg_t
 

Functions

int applyRule (char *inAction, msParamArray_t *inMsParamArray, ruleExecInfo_t *rei, int reiSaveFlag)
 
int applyRuleWithInOutVars (const char *_action, std::list< boost::any > &_params, ruleExecInfo_t *_rei)
 
void freeCmdExecOut (execCmdOut_t *ruleExecOut)
 
int applyRuleForPostProcForRead (rsComm_t *rsComm, bytesBuf_t *dataObjReadOutBBuf, char *objPath)
 
int applyRuleForPostProcForWrite (rsComm_t *rsComm, bytesBuf_t *dataObjWriteOutBBuf, char *objPath)
 
int applyRuleArg (const char *action, const char *args[20], int argc, ruleExecInfo_t *rei, int reiSaveFlag)
 
int initReiWithDataObjInp (ruleExecInfo_t *rei, rsComm_t *rsComm, dataObjInp_t *dataObjIn)
 
int initReiWithCollInp (ruleExecInfo_t *rei, rsComm_t *rsComm, collInp_t *collCreateInp, collInfo_t *collInfo)
 
int _writeString (char *writeId, char *writeStr, ruleExecInfo_t *rei)
 
int writeString (msParam_t *where, msParam_t *inString, ruleExecInfo_t *rei)
 
int unpackRei (rsComm_t *rsComm, ruleExecInfo_t **rei, bytesBuf_t *packedReiBBuf)
 
int packReiAndArg (ruleExecInfo_t *rei, char *myArgv[], int myArgc, bytesBuf_t **packedReiAndArgBBuf)
 
int unpackReiAndArg (rsComm_t *rsComm, ruleExecInfoAndArg_t **reiAndArg, bytesBuf_t *packedReiAndArgBBuf)
 
int copyRuleExecInfo (ruleExecInfo_t *from, ruleExecInfo_t *to)
 
int freeRuleExecInfoStruct (ruleExecInfo_t *rs, int freeSpecialStructFlag)
 
int freeRuleExecInfoInternals (ruleExecInfo_t *rs, int freeSpecialStructFlag)
 
int copyDataObjInfo (dataObjInfo_t *from, dataObjInfo_t *to)
 
int copyCollInfo (collInfo_t *from, collInfo_t *to)
 
int freeCollInfo (collInfo_t *rs)
 
int copyUserInfo (userInfo_t *from, userInfo_t *to)
 
int freeUserInfo (userInfo_t *rs)
 
int copyKeyValPairStruct (keyValPair_t *from, keyValPair_t *to)
 
int freeKeyValPairStruct (keyValPair_t *rs)
 
void * mallocAndZero (int s)
 

Macro Definition Documentation

◆ FREE_DOINP

#define FREE_DOINP   0x2

Definition at line 17 of file irods_re_structs.hpp.

◆ FREE_MS_PARAM

#define FREE_MS_PARAM   0x1

Definition at line 16 of file irods_re_structs.hpp.

◆ MAX_NUM_OF_ARGS_IN_ACTION

#define MAX_NUM_OF_ARGS_IN_ACTION   20

Definition at line 14 of file irods_re_structs.hpp.

Typedef Documentation

◆ reArg_t

typedef struct ReArg reArg_t

◆ ruleExecInfo_t

typedef struct RuleExecInfo ruleExecInfo_t

◆ ruleExecInfoAndArg_t

Function Documentation

◆ _writeString()

int _writeString ( char *  writeId,
char *  writeStr,
ruleExecInfo_t rei 
)

Definition at line 278 of file irods_re_structs.cpp.

References irods::experimental::filesystem::client::is_data_object(), LOG_ERROR, LOG_NOTICE, rodsLog(), and RuleExecInfo::rsComm.

Referenced by _admShowDVM(), _admShowFNM(), msiAdmShowDVM(), msiAdmShowFNM(), msiPrintGenQueryInp(), print_hello(), smsi_writeLine(), smsi_writeString(), writeBytesBuf(), writeKeyValPairs(), writePosInt(), and writeString().

Here is the call graph for this function:

◆ applyRule()

◆ applyRuleArg()

int applyRuleArg ( const char *  action,
const char *  args[20],
int  argc,
ruleExecInfo_t rei,
int  reiSaveFlag 
)

◆ applyRuleForPostProcForRead()

int applyRuleForPostProcForRead ( rsComm_t rsComm,
bytesBuf_t dataObjReadOutBBuf,
char *  objPath 
)

Definition at line 21 of file rsDataObjRead.cpp.

References addMsParamToArray(), applyRule(), BUF_LEN_MS_T, clearMsParamArray(), rsComm_t::clientUser, BytesBuf::len, LOG_ERROR, NO_SAVE_REI, NULL, ON_STATE, rsComm_t::proxyUser, ReadWriteRuleState, rodsLog(), and irods.pypyodbc::status.

Referenced by _rsDataObjGet(), and rsDataObjRead().

Here is the call graph for this function:

◆ applyRuleForPostProcForWrite()

int applyRuleForPostProcForWrite ( rsComm_t rsComm,
bytesBuf_t dataObjWriteOutBBuf,
char *  objPath 
)

Definition at line 26 of file rsDataObjWrite.cpp.

References addMsParamToArray(), applyRule(), BUF_LEN_MS_T, clearMsParamArray(), rsComm_t::clientUser, BytesBuf::len, LOG_ERROR, NO_SAVE_REI, NULL, ON_STATE, rsComm_t::proxyUser, ReadWriteRuleState, rodsLog(), and irods.pypyodbc::status.

Referenced by _rsDataObjPut(), rsDataObjPut(), and rsDataObjWrite().

Here is the call graph for this function:

◆ applyRuleWithInOutVars()

int applyRuleWithInOutVars ( const char *  _action,
std::list< boost::any > &  _params,
ruleExecInfo_t _rei 
)

Definition at line 124 of file irods_re_structs.cpp.

References irods::AUDIT_RULE, irods::error::code(), RuleExistsHelper::Instance(), LOG_ERROR, irods::error::ok(), irods::re_plugin_globals, irods::error::result(), rodsLog(), and SUCCESS.

Referenced by irods::client_server_negotiation_for_server().

Here is the call graph for this function:

◆ copyCollInfo()

int copyCollInfo ( collInfo_t from,
collInfo_t to 
)

Definition at line 156 of file reStruct.cpp.

References mallocAndZero(), CollInfo::next, and NULL.

Referenced by copyRuleExecInfo().

Here is the call graph for this function:

◆ copyDataObjInfo()

int copyDataObjInfo ( dataObjInfo_t from,
dataObjInfo_t to 
)

Definition at line 142 of file reStruct.cpp.

References mallocAndZero(), DataObjInfo::next, and NULL.

Referenced by copyRuleExecInfo().

Here is the call graph for this function:

◆ copyKeyValPairStruct()

int copyKeyValPairStruct ( keyValPair_t from,
keyValPair_t to 
)

Definition at line 240 of file reStruct.cpp.

Referenced by copyRuleExecInfo().

◆ copyRuleExecInfo()

int copyRuleExecInfo ( ruleExecInfo_t from,
ruleExecInfo_t to 
)

The following structures are not copied and just the pointer is copied.

dataObjInp_t *doinp; dataOprInp_t *dinp; fileOpenInp_t *finp; dataObjInp_t *doinpo; dataOprInp_t *dinpo; fileOpenInp_t *finpo;

Definition at line 21 of file reStruct.cpp.

References RuleExecInfo::coi, RuleExecInfo::condInputData, copyCollInfo(), copyDataObjInfo(), copyKeyValPairStruct(), copyUserInfo(), RuleExecInfo::doi, mallocAndZero(), MAX_NAME_LEN, RuleExecInfo::next, NULL, RuleExecInfo::pluginInstanceName, rstrcpy(), RuleExecInfo::uoic, RuleExecInfo::uoio, and RuleExecInfo::uoip.

Referenced by execRule().

Here is the call graph for this function:

◆ copyUserInfo()

int copyUserInfo ( userInfo_t from,
userInfo_t to 
)

Definition at line 208 of file reStruct.cpp.

References userInfo_t::authInfo, and userInfo_t::userOtherInfo.

Referenced by copyRuleExecInfo().

◆ freeCmdExecOut()

void freeCmdExecOut ( execCmdOut_t ruleExecOut)

◆ freeCollInfo()

int freeCollInfo ( collInfo_t rs)

Definition at line 198 of file reStruct.cpp.

References CollInfo::next, and NULL.

Referenced by freeRuleExecInfoInternals().

◆ freeKeyValPairStruct()

int freeKeyValPairStruct ( keyValPair_t rs)

Definition at line 246 of file reStruct.cpp.

Referenced by freeRuleExecInfoInternals().

◆ freeRuleExecInfoInternals()

int freeRuleExecInfoInternals ( ruleExecInfo_t rs,
int  freeSpecialStructFlag 
)

◆ freeRuleExecInfoStruct()

int freeRuleExecInfoStruct ( ruleExecInfo_t rs,
int  freeSpecialStructFlag 
)

Definition at line 100 of file reStruct.cpp.

References freeRuleExecInfoInternals().

Referenced by execRule(), and freeRuleExecInfoInternals().

Here is the call graph for this function:

◆ freeUserInfo()

int freeUserInfo ( userInfo_t rs)

Definition at line 217 of file reStruct.cpp.

Referenced by freeRuleExecInfoInternals().

◆ initReiWithCollInp()

int initReiWithCollInp ( ruleExecInfo_t rei,
rsComm_t rsComm,
collInp_t collCreateInp,
collInfo_t collInfo 
)

Definition at line 182 of file irods_re_structs.cpp.

References rsComm_t::clientUser, RuleExecInfo::coi, CollInp::collName, CollInfo::collName, CollInfo::collParentName, LOG_ERROR, MAX_NAME_LEN, NULL, rsComm_t::proxyUser, rodsLog(), RuleExecInfo::rsComm, rstrcpy(), splitPathByKey(), irods.pypyodbc::status, RuleExecInfo::uoic, and RuleExecInfo::uoip.

Referenced by _rsPhyRmColl(), rsCollCreate(), and rsRmColl().

Here is the call graph for this function:

◆ initReiWithDataObjInp()

◆ mallocAndZero()

void* mallocAndZero ( int  s)

Definition at line 13 of file reStruct.cpp.

Referenced by copyCollInfo(), copyDataObjInfo(), copyRuleExecInfo(), execRule(), and performAction().

◆ packReiAndArg()

int packReiAndArg ( ruleExecInfo_t rei,
char *  myArgv[],
int  myArgc,
bytesBuf_t **  packedReiAndArgBBuf 
)

Definition at line 390 of file irods_re_structs.cpp.

References LOG_ERROR, NATIVE_PROT, NULL, packStruct(), RuleExecInfoAndArg::rei, rodsLog(), RodsPackTable, irods.pypyodbc::status, and SYS_INTERNAL_NULL_INPUT_ERR.

Here is the call graph for this function:

◆ unpackRei()

int unpackRei ( rsComm_t rsComm,
ruleExecInfo_t **  rei,
bytesBuf_t packedReiBBuf 
)

Definition at line 362 of file irods_re_structs.cpp.

References BytesBuf::buf, LOG_ERROR, NATIVE_PROT, NULL, rodsLog(), RodsPackTable, irods.pypyodbc::status, SYS_INTERNAL_NULL_INPUT_ERR, touchupPackedRei(), and unpackStruct().

Here is the call graph for this function:

◆ unpackReiAndArg()

int unpackReiAndArg ( rsComm_t rsComm,
ruleExecInfoAndArg_t **  reiAndArg,
bytesBuf_t packedReiAndArgBBuf 
)

Definition at line 434 of file irods_re_structs.cpp.

References BytesBuf::buf, LOG_ERROR, NATIVE_PROT, NULL, rodsLog(), RodsPackTable, irods.pypyodbc::status, SYS_INTERNAL_NULL_INPUT_ERR, touchupPackedRei(), and unpackStruct().

Here is the call graph for this function:

◆ writeString()

int writeString ( msParam_t where,
msParam_t inString,
ruleExecInfo_t rei 
)

Definition at line 311 of file irods_re_structs.cpp.

References _writeString(), MsParam::inOutStruct, MsParam::label, and NULL.

Here is the call graph for this function: