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)  

msParam.cpp File Reference
#include "msParam.h"
#include "apiHeaderAll.h"
#include "modDataObjMeta.h"
#include "rcGlobalExtern.h"
Include dependency graph for msParam.cpp:

Go to the source code of this file.

Functions

int addMsParam (msParamArray_t *msParamArray, const char *label, const char *type, void *inOutStruct, bytesBuf_t *inpOutBuf)
 
int addIntParamToArray (msParamArray_t *msParamArray, char *label, int inpInt)
 
int addMsParamToArray (msParamArray_t *msParamArray, const char *label, const char *type, void *inOutStruct, bytesBuf_t *inpOutBuf, int replFlag)
 
int replMsParamArray (msParamArray_t *in, msParamArray_t *out)
 
int replMsParam (msParam_t *in, msParam_t *out)
 
int replInOutStruct (void *inStruct, void **outStruct, const char *type)
 
bytesBuf_treplBytesBuf (const bytesBuf_t *in)
 
int fillMsParam (msParam_t *msParam, const char *label, const char *type, void *inOutStruct, bytesBuf_t *inpOutBuf)
 
void fillIntInMsParam (msParam_t *msParam, const int val)
 
void fillFloatInMsParam (msParam_t *msParam, const float val)
 
void fillDoubleInMsParam (msParam_t *msParam, const rodsLong_t val)
 
void fillCharInMsParam (msParam_t *msParam, const char val)
 
void fillStrInMsParam (msParam_t *msParam, const char *str)
 
void fillBufLenInMsParam (msParam_t *msParam, int len, bytesBuf_t *bytesBuf)
 
int printMsParam (msParamArray_t *outParamArray)
 
int writeMsParam (char *buf, int len, msParam_t *msParam)
 
msParam_tgetMsParamByLabel (msParamArray_t *msParamArray, const char *label)
 
msParam_tgetMsParamByType (msParamArray_t *msParamArray, const char *type)
 
void * getMspInOutStructByLabel (msParamArray_t *msParamArray, const char *label)
 
int rmMsParamByLabel (msParamArray_t *msParamArray, const char *label, int freeStruct)
 
int clearMsParamArray (msParamArray_t *msParamArray, int freeStruct)
 
int clearMsParam (msParam_t *msParam, int freeStruct)
 
int resetMsParam (msParam_t *msParam)
 
int trimMsParamArray (msParamArray_t *msParamArray, char *outParamDesc)
 
int parseMspForDataObjInp (msParam_t *inpParam, dataObjInp_t *dataObjInpCache, dataObjInp_t **outDataObjInp, int outputToCache)
 
int parseMspForCollInp (msParam_t *inpParam, collInp_t *collInpCache, collInp_t **outCollInp, int outputToCache)
 
int parseMspForDataObjCopyInp (msParam_t *inpParam, dataObjCopyInp_t *dataObjCopyInpCache, dataObjCopyInp_t **outDataObjCopyInp)
 
int parseMspForCondInp (msParam_t *inpParam, keyValPair_t *condInput, char *condKw)
 
int parseMspForCondKw (msParam_t *inpParam, keyValPair_t *condInput)
 
int parseMspForPhyPathReg (msParam_t *inpParam, keyValPair_t *condInput)
 
int parseMspForPosInt (msParam_t *inpParam)
 
char * parseMspForStr (msParam_t *inpParam)
 
int parseMspForFloat (msParam_t *inpParam, float *floatout)
 
int parseMspForDouble (msParam_t *inpParam, double *doubleout)
 
int parseMspForExecCmdInp (msParam_t *inpParam, execCmd_t *execCmdInpCache, execCmd_t **ouExecCmdInp)
 
int getStdoutInExecCmdOut (msParam_t *inpExecCmdOut, char **outStr)
 
int getStderrInExecCmdOut (msParam_t *inpExecCmdOut, char **outStr)
 
int initParsedMsKeyValStr (char *inpStr, parsedMsKeyValStr_t *parsedMsKeyValStr)
 
int clearParsedMsKeyValStr (parsedMsKeyValStr_t *parsedMsKeyValStr)
 
int getNextKeyValFromMsKeyValStr (parsedMsKeyValStr_t *parsedMsKeyValStr)
 
int parseMsKeyValStrForDataObjInp (msParam_t *inpParam, dataObjInp_t *dataObjInp, char *hintForMissingKw, int validKwFlags, char **outBadKeyWd)
 
int chkDataObjInpKw (char *keyWd, int validKwFlags)
 
int parseMsKeyValStrForCollInp (msParam_t *inpParam, collInp_t *collInp, char *hintForMissingKw, int validKwFlags, char **outBadKeyWd)
 
int chkCollInpKw (char *keyWd, int validKwFlags)
 
int addKeyValToMspStr (msParam_t *keyStr, msParam_t *valStr, msParam_t *msKeyValStr)
 
int parseMsKeyValStrForStructFileExtAndRegInp (msParam_t *inpParam, structFileExtAndRegInp_t *structFileExtAndRegInp, char *hintForMissingKw, int validKwFlags, char **outBadKeyWd)
 
int chkStructFileExtAndRegInpKw (char *keyWd, int validKwFlags)
 
int parseMsParamFromIRFile (msParamArray_t *inpParamArray, char *inBuf)
 

Function Documentation

◆ addIntParamToArray()

int addIntParamToArray ( msParamArray_t msParamArray,
char *  label,
int  inpInt 
)

Definition at line 24 of file msParam.cpp.

References addMsParamToArray(), INT_MS_T, NULL, and irods.pypyodbc::status.

Referenced by initXmsgHashQue().

Here is the call graph for this function:

◆ addKeyValToMspStr()

int addKeyValToMspStr ( msParam_t keyStr,
msParam_t valStr,
msParam_t msKeyValStr 
)

Definition at line 1389 of file msParam.cpp.

References fillStrInMsParam(), MsParam::inOutStruct, MS_INP_SEP_STR, MS_NULL_STR, NULL, parseMspForStr(), SYS_INTERNAL_NULL_INPUT_ERR, and MsParam::type.

Referenced by msiAddKeyValToMspStr().

Here is the call graph for this function:

◆ addMsParam()

int addMsParam ( msParamArray_t msParamArray,
const char *  label,
const char *  type,
void *  inOutStruct,
bytesBuf_t inpOutBuf 
)

Definition at line 17 of file msParam.cpp.

References addMsParamToArray(), and type.

Referenced by appendOutputToInput(), exec_rule(), initXmsgHashQue(), msiDataObjGet(), msiDataObjPut(), msiSetGraftPathScheme(), msiSetRandomScheme(), and parseMsParamFromIRFile().

Here is the call graph for this function:

◆ addMsParamToArray()

int addMsParamToArray ( msParamArray_t msParamArray,
const char *  label,
const char *  type,
void *  inOutStruct,
bytesBuf_t inpOutBuf,
int  replFlag 
)

◆ chkCollInpKw()

int chkCollInpKw ( char *  keyWd,
int  validKwFlags 
)

◆ chkDataObjInpKw()

int chkDataObjInpKw ( char *  keyWd,
int  validKwFlags 
)

◆ chkStructFileExtAndRegInpKw()

int chkStructFileExtAndRegInpKw ( char *  keyWd,
int  validKwFlags 
)

◆ clearMsParam()

◆ clearMsParamArray()

int clearMsParamArray ( msParamArray_t msParamArray,
int  freeStruct 
)

Definition at line 447 of file msParam.cpp.

References clearMsParam(), MsParamArray::len, MsParamArray::msParam, and NULL.

Referenced by _rsCollRsync(), applyRuleForPostProcForRead(), applyRuleForPostProcForWrite(), clearMsparamInRei(), deleteMsParamArray(), exec_rule(), freeRuleExecInfoInternals(), getVaultPathPolicy(), msiDataObjGet(), msiDataObjPut(), msiDataObjRsync(), parseAndComputeExpressionAdapter(), rcDataObjRsync(), rcExecMyRule(), and remoteExec().

Here is the call graph for this function:

◆ clearParsedMsKeyValStr()

int clearParsedMsKeyValStr ( parsedMsKeyValStr_t parsedMsKeyValStr)

Definition at line 1072 of file msParam.cpp.

References ParsedMsKeyValStr::inpStr, LOG_ERROR, NULL, rodsLog(), and SYS_INTERNAL_NULL_INPUT_ERR.

Referenced by parseMsKeyValStrForCollInp(), parseMsKeyValStrForDataObjInp(), and parseMsKeyValStrForStructFileExtAndRegInp().

Here is the call graph for this function:

◆ fillBufLenInMsParam()

void fillBufLenInMsParam ( msParam_t msParam,
int  len,
bytesBuf_t bytesBuf 
)

◆ fillCharInMsParam()

void fillCharInMsParam ( msParam_t msParam,
const char  val 
)

Definition at line 269 of file msParam.cpp.

References FLOAT_MS_T, MsParam::inOutStruct, NULL, and MsParam::type.

◆ fillDoubleInMsParam()

void fillDoubleInMsParam ( msParam_t msParam,
const rodsLong_t  val 
)

Definition at line 260 of file msParam.cpp.

References DOUBLE_MS_T, MsParam::inOutStruct, NULL, and MsParam::type.

◆ fillFloatInMsParam()

void fillFloatInMsParam ( msParam_t msParam,
const float  val 
)

Definition at line 251 of file msParam.cpp.

References FLOAT_MS_T, MsParam::inOutStruct, NULL, and MsParam::type.

◆ fillIntInMsParam()

◆ fillMsParam()

int fillMsParam ( msParam_t msParam,
const char *  label,
const char *  type,
void *  inOutStruct,
bytesBuf_t inpOutBuf 
)

◆ fillStrInMsParam()

◆ getMsParamByLabel()

◆ getMsParamByType()

msParam_t* getMsParamByType ( msParamArray_t msParamArray,
const char *  type 
)

Definition at line 392 of file msParam.cpp.

References MsParamArray::len, MsParamArray::msParam, NULL, MsParam::type, and type.

◆ getMspInOutStructByLabel()

void* getMspInOutStructByLabel ( msParamArray_t msParamArray,
const char *  label 
)

◆ getNextKeyValFromMsKeyValStr()

int getNextKeyValFromMsKeyValStr ( parsedMsKeyValStr_t parsedMsKeyValStr)

Definition at line 1094 of file msParam.cpp.

References ParsedMsKeyValStr::curPtr, ParsedMsKeyValStr::endPtr, ParsedMsKeyValStr::kwPtr, LOG_ERROR, MS_INP_SEP_STR, MS_NULL_STR, NO_MORE_RESULT, NULL, rodsLog(), SYS_INTERNAL_NULL_INPUT_ERR, and ParsedMsKeyValStr::valPtr.

Referenced by parseMsKeyValStrForCollInp(), parseMsKeyValStrForDataObjInp(), and parseMsKeyValStrForStructFileExtAndRegInp().

Here is the call graph for this function:

◆ getStderrInExecCmdOut()

int getStderrInExecCmdOut ( msParam_t inpExecCmdOut,
char **  outStr 
)

Definition at line 1028 of file msParam.cpp.

References BytesBuf::buf, ExecCmdOut_MS_T, MsParam::inOutStruct, BytesBuf::len, LOG_ERROR, NULL, rodsLog(), ExecCmdOut::stderrBuf, SYS_INTERNAL_NULL_INPUT_ERR, MsParam::type, and USER_PARAM_TYPE_ERR.

Referenced by msiGetStderrInExecCmdOut().

Here is the call graph for this function:

◆ getStdoutInExecCmdOut()

int getStdoutInExecCmdOut ( msParam_t inpExecCmdOut,
char **  outStr 
)

Definition at line 1000 of file msParam.cpp.

References BytesBuf::buf, ExecCmdOut_MS_T, MsParam::inOutStruct, BytesBuf::len, LOG_ERROR, NULL, rodsLog(), ExecCmdOut::stdoutBuf, SYS_INTERNAL_NULL_INPUT_ERR, MsParam::type, and USER_PARAM_TYPE_ERR.

Referenced by msiGetStdoutInExecCmdOut().

Here is the call graph for this function:

◆ initParsedMsKeyValStr()

int initParsedMsKeyValStr ( char *  inpStr,
parsedMsKeyValStr_t parsedMsKeyValStr 
)

Definition at line 1056 of file msParam.cpp.

References ParsedMsKeyValStr::curPtr, ParsedMsKeyValStr::endPtr, ParsedMsKeyValStr::inpStr, LOG_ERROR, NULL, rodsLog(), and SYS_INTERNAL_NULL_INPUT_ERR.

Referenced by parseMsKeyValStrForCollInp(), parseMsKeyValStrForDataObjInp(), and parseMsKeyValStrForStructFileExtAndRegInp().

Here is the call graph for this function:

◆ parseMsKeyValStrForCollInp()

int parseMsKeyValStrForCollInp ( msParam_t inpParam,
collInp_t collInp,
char *  hintForMissingKw,
int  validKwFlags,
char **  outBadKeyWd 
)

◆ parseMsKeyValStrForDataObjInp()

◆ parseMsKeyValStrForStructFileExtAndRegInp()

◆ parseMsParamFromIRFile()

int parseMsParamFromIRFile ( msParamArray_t inpParamArray,
char *  inBuf 
)

Definition at line 1558 of file msParam.cpp.

References addMsParam(), StrArray::len, LOG_ERROR, NULL, rodsLog(), StrArray::size, splitMultiStr(), irods.pypyodbc::status, STR_MS_T, StrArray::value, and get_irods_version::value.

Here is the call graph for this function:

◆ parseMspForCollInp()

int parseMspForCollInp ( msParam_t inpParam,
collInp_t collInpCache,
collInp_t **  outCollInp,
int  outputToCache 
)

Definition at line 677 of file msParam.cpp.

References CollInp_MS_T, CollInp::collName, CollInp::condInput, MsParam::inOutStruct, LOG_ERROR, MAX_NAME_LEN, NULL, rodsLog(), rstrcpy(), STR_MS_T, SYS_INTERNAL_NULL_INPUT_ERR, MsParam::type, and USER_PARAM_TYPE_ERR.

Referenced by convertResToString(), msiCollCreate(), msiCollRepl(), and msiRmColl().

Here is the call graph for this function:

◆ parseMspForCondInp()

int parseMspForCondInp ( msParam_t inpParam,
keyValPair_t condInput,
char *  condKw 
)

Definition at line 782 of file msParam.cpp.

References addKeyVal(), MsParam::inOutStruct, LOG_ERROR, NULL, rodsLog(), STR_MS_T, MsParam::type, and USER_PARAM_TYPE_ERR.

Referenced by msiCollRsync(), msiDataObjPhymv(), msiDataObjPut(), msiDataObjRsync(), msiDataObjTrim(), and msiPhyPathReg().

Here is the call graph for this function:

◆ parseMspForCondKw()

int parseMspForCondKw ( msParam_t inpParam,
keyValPair_t condInput 
)

Definition at line 807 of file msParam.cpp.

References addKeyVal(), MsParam::inOutStruct, LOG_ERROR, NULL, rodsLog(), STR_MS_T, MsParam::type, and USER_PARAM_TYPE_ERR.

Here is the call graph for this function:

◆ parseMspForDataObjCopyInp()

int parseMspForDataObjCopyInp ( msParam_t inpParam,
dataObjCopyInp_t dataObjCopyInpCache,
dataObjCopyInp_t **  outDataObjCopyInp 
)

Definition at line 727 of file msParam.cpp.

References DataObjCopyInp_MS_T, DataObjInp_MS_T, getValByKey(), MsParam::inOutStruct, KeyValPair_MS_T, LOG_ERROR, MAX_NAME_LEN, NULL, DataObjInp::objPath, rodsLog(), rstrcpy(), DataObjCopyInp::srcDataObjInp, STR_MS_T, SYS_INTERNAL_NULL_INPUT_ERR, MsParam::type, and USER_PARAM_TYPE_ERR.

Referenced by convertResToString(), msiDataObjCopy(), and msiDataObjRename().

Here is the call graph for this function:

◆ parseMspForDataObjInp()

int parseMspForDataObjInp ( msParam_t inpParam,
dataObjInp_t dataObjInpCache,
dataObjInp_t **  outDataObjInp,
int  outputToCache 
)

◆ parseMspForDouble()

int parseMspForDouble ( msParam_t inpParam,
double *  doubleout 
)

Definition at line 943 of file msParam.cpp.

References DOUBLE_MS_T, MsParam::inOutStruct, LOG_ERROR, NULL, rodsLog(), STR_MS_T, SYS_NULL_INPUT, MsParam::type, and USER_PARAM_TYPE_ERR.

Here is the call graph for this function:

◆ parseMspForExecCmdInp()

int parseMspForExecCmdInp ( msParam_t inpParam,
execCmd_t execCmdInpCache,
execCmd_t **  ouExecCmdInp 
)

Definition at line 972 of file msParam.cpp.

References ExecCmd::cmd, ExecCmd_MS_T, MsParam::inOutStruct, LOG_ERROR, LONG_NAME_LEN, NULL, rodsLog(), rstrcpy(), STR_MS_T, SYS_INTERNAL_NULL_INPUT_ERR, MsParam::type, and USER_PARAM_TYPE_ERR.

Referenced by msiExecCmd().

Here is the call graph for this function:

◆ parseMspForFloat()

int parseMspForFloat ( msParam_t inpParam,
float *  floatout 
)

Definition at line 913 of file msParam.cpp.

References FLOAT_MS_T, MsParam::inOutStruct, INT_MS_T, LOG_ERROR, NULL, rodsLog(), STR_MS_T, SYS_NULL_INPUT, MsParam::type, and USER_PARAM_TYPE_ERR.

Here is the call graph for this function:

◆ parseMspForPhyPathReg()

int parseMspForPhyPathReg ( msParam_t inpParam,
keyValPair_t condInput 
)

Definition at line 827 of file msParam.cpp.

References addKeyVal(), COLLECTION_KW, COLLECTION_TYPE_KW, MsParam::inOutStruct, LINK_POINT_STR, LOG_ERROR, MOUNT_POINT_STR, NULL, rodsLog(), STR_MS_T, MsParam::type, UNMOUNT_STR, and USER_PARAM_TYPE_ERR.

Referenced by msiPhyPathReg().

Here is the call graph for this function:

◆ parseMspForPosInt()

int parseMspForPosInt ( msParam_t inpParam)

Definition at line 861 of file msParam.cpp.

References BUF_LEN_MS_T, DOUBLE_MS_T, MsParam::inOutStruct, INT_MS_T, LOG_DEBUG, LOG_ERROR, rodsLog(), STR_MS_T, SYS_NULL_INPUT, MsParam::type, and USER_PARAM_TYPE_ERR.

Referenced by msiCollCreate(), msiDataObjClose(), msiDataObjRead(), msiDataObjRename(), msiDataObjWrite(), msiExecCmd(), msiSetReplComment(), and writePosInt().

Here is the call graph for this function:

◆ parseMspForStr()

char* parseMspForStr ( msParam_t inpParam)

◆ printMsParam()

int printMsParam ( msParamArray_t outParamArray)

Definition at line 298 of file msParam.cpp.

References buf, MsParamArray::len, MsParamArray::msParam, NULL, and writeMsParam().

Here is the call graph for this function:

◆ replBytesBuf()

bytesBuf_t* replBytesBuf ( const bytesBuf_t in)

Definition at line 208 of file msParam.cpp.

References BytesBuf::buf, BytesBuf::len, NULL, and manual_cleanup::out.

Referenced by addMsParamToArray(), carryOverMsParam(), and replMsParam().

◆ replInOutStruct()

int replInOutStruct ( void *  inStruct,
void **  outStruct,
const char *  type 
)

Definition at line 173 of file msParam.cpp.

References BytesBuf::buf, freeBBuf(), LOG_ERROR, NATIVE_PROT, NULL, packStruct(), rodsLogError(), irods.pypyodbc::status, STR_MS_T, SYS_INTERNAL_NULL_INPUT_ERR, type, and unpackStruct().

Referenced by addMsParamToArray(), carryOverMsParam(), and replMsParam().

Here is the call graph for this function:

◆ replMsParam()

int replMsParam ( msParam_t in,
msParam_t out 
)

Definition at line 156 of file msParam.cpp.

References MsParam::inOutStruct, MsParam::inpOutBuf, MsParam::label, LOG_ERROR, NULL, manual_cleanup::out, replBytesBuf(), replInOutStruct(), rodsLogError(), irods.pypyodbc::status, SYS_INTERNAL_NULL_INPUT_ERR, and MsParam::type.

Referenced by irods::convertFromMsParam(), irods::convertToMsParam(), replMsParamArray(), and smsi_remoteExec().

Here is the call graph for this function:

◆ replMsParamArray()

int replMsParamArray ( msParamArray_t in,
msParamArray_t out 
)

Definition at line 129 of file msParam.cpp.

References MsParamArray::len, LOG_ERROR, MsParamArray::msParam, NULL, manual_cleanup::out, PTR_ARRAY_MALLOC_LEN, replMsParam(), rodsLogError(), irods.pypyodbc::status, and SYS_INTERNAL_NULL_INPUT_ERR.

Referenced by remoteExec().

Here is the call graph for this function:

◆ resetMsParam()

int resetMsParam ( msParam_t msParam)

Definition at line 491 of file msParam.cpp.

References freeBBuf(), MsParam::inOutStruct, MsParam::inpOutBuf, NULL, and MsParam::type.

Referenced by msiGetMoreRows(), and msiPrintGenQueryOutToBuffer().

Here is the call graph for this function:

◆ rmMsParamByLabel()

int rmMsParamByLabel ( msParamArray_t msParamArray,
const char *  label,
int  freeStruct 
)

Definition at line 424 of file msParam.cpp.

References clearMsParam(), MsParam::label, MsParamArray::len, MsParamArray::msParam, and NULL.

Referenced by removeTmpVarName(), and smsi_remoteExec().

Here is the call graph for this function:

◆ trimMsParamArray()

int trimMsParamArray ( msParamArray_t msParamArray,
char *  outParamDesc 
)

Definition at line 511 of file msParam.cpp.

References ALL_MS_PARAM_KW, clearMsParam(), MsParam::label, MsParamArray::len, StrArray::len, LOG_ERROR, match(), MsParamArray::msParam, NULL, parseMultiStr(), rodsLog(), StrArray::size, irods.pypyodbc::status, type, StrArray::value, and get_irods_version::value.

Referenced by rsExecMyRule().

Here is the call graph for this function:

◆ writeMsParam()