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)  

objInfo.h
Go to the documentation of this file.
1 
3 /* objInfo.h - header file for general Obj Info
4  */
5 
6 /* dataObjInfo_t is for info about a data object.
7  intKeyStrVal_t is a generic (integer keyword)/(string value) pair.
8  It can be used for many things. For example, for the input "condition",
9  the condKeywd_t is used for keyword. But it can also be used to
10  input parameters for rcat registration.
11 
12  The routine addIntKeywdStrVal() in rcMisc.c can be used to add a
13  keyword/value pair and getValByIntKeywd() can be used to get the
14  value string based on a keyword.
15 */
16 
17 #ifndef OBJ_INFO_H__
18 #define OBJ_INFO_H__
19 
20 #include "rodsType.h"
21 #include "rodsUser.h"
22 
23 /* this defines the "copies" condition */
24 #define ALL_COPIES -1 /* "all" */
25 
26 /* defines some commonly used dataTypes */
27 #define GENERIC_DT_STR "generic"
28 #define TAR_DT_STR "tar file"
29 #define GZIP_TAR_DT_STR "gzipTar" // JMC - backport 4632
30 #define BZIP2_TAR_DT_STR "bzip2Tar" // JMC - backport 4632
31 #define ZIP_DT_STR "zipFile" // JMC - backport 4633
32 #define MSSO_DT_STR "msso file"
33 /* bundle are types for internal phybun use */ // JMC - backport 4658
34 #define TAR_BUNDLE_DT_STR "tar bundle" // JMC - backport 4658
35 #define GZIP_TAR_BUNDLE_DT_STR "gzipTar bundle" // JMC - backport 4658
36 #define BZIP2_TAR_BUNDLE_DT_STR "bzip2Tar bundle" // JMC - backport 4658
37 #define ZIP_BUNDLE_DT_STR "zipFile bundle" // JMC - backport 4658
38 
39 #define HAAW_DT_STR "haaw file"
40 #define MAX_LINK_CNT 20 /* max number soft link in a path */
41 
42 
43 /* special collection */
44 
45 typedef enum { /* class of SpecColl */
51 
52 typedef enum { /* structFile type */
53  NONE_STRUCT_FILE_T = 0, /* no known type */
54  HAAW_STRUCT_FILE_T = 1, /* the UK eScience structFile */
55  TAR_STRUCT_FILE_T = 2, /* The tar structFile */
56  MSSO_STRUCT_FILE_T = 3, /* The workflow structFile */
58 
59 typedef enum { /* specColl operation type */
65 
66 #define HAAW_STRUCT_FILE_STR "haawStructFile"
67 #define TAR_STRUCT_FILE_STR "tarStructFile"
68 #define MOUNT_POINT_STR "mountPoint"
69 #define LINK_POINT_STR "linkPoint"
70 #define INHERIT_PAR_SPEC_COLL_STR "inheritParentSpecColl"
71 #define MSSO_STRUCT_FILE_STR "mssoStructFile"
72 #define MSO_STR "mso"
73 
74 #define UNMOUNT_STR "unmount"
75 
76 typedef struct SpecColl {
79  char collection[MAX_NAME_LEN]; /* structured file or mounted collection */
80  char objPath[MAX_NAME_LEN]; /* STRUCT_FILE_COLL-logical path of structFile
81  * MOUNTED_COLL - NA
82  */
83  char resource[NAME_LEN]; /* the resource */
84  char rescHier[MAX_NAME_LEN]; // the resource hierarchy
85  char phyPath[MAX_NAME_LEN]; /* STRUCT_FILE_COLL-the phyPath of structFile
86  * MOUNTED_COLL-the phyPath od mounted
87  * directory
88  */
89  char cacheDir[MAX_NAME_LEN]; /* STRUCT_FILE_COLL-the directory where
90  * the cache tree is kept
91  */
92  int cacheDirty; /* Whether the cache has been written */
93  int replNum;
95 
96 typedef enum {
101 
102 typedef struct SpecCollCache {
112 
113 /* definition for replStatus (isDirty) */
114 #define OLD_COPY 0x0
115 #define NEWLY_CREATED_COPY 0x1
116 #define OPEN_EXISTING_COPY 0x10
117 #define FILE_PATH_HAS_CHG 0x20
118 
119 /* keyValPair_t - str key, str value pair */
120 typedef struct KeyValPair {
121  int len;
122  char **keyWord; /* array of keywords */
123  char **value; /* pointer to an array of values */
125 
126 /* definition for flags in dataObjInfo_t */
127 #define NO_COMMIT_FLAG 0x1 /* used in chlModDataObjMeta and chlRegDataObj */
128 
129 typedef struct DataObjInfo {
131  char rescName[NAME_LEN]; /* This could be resource group */
132  char rescHier[MAX_NAME_LEN]; // The hierarchy of resources within which the object resides
140  int replNum;
141  int replStatus; /* isDirty flag */
146  int flags; /* used in chlModDataObjMeta and chlRegDataObj */
159  int regUid; /* the UNIX uid the registering user */
160  int otherFlags; /* not used for now */
162  char in_pdmo[MAX_NAME_LEN]; // If this is set then we are currently in a pdmo call at that level of hierarchy
163  struct DataObjInfo *next;
166 
167 /* collInfo_t definitions:
168  * collInfo1:
169  * MOUNTED_COLL - physical directory path
170  * LINKED_COLL - linked logical path
171  * TAR_STRUCT_FILE_T - logical path of the tar file
172  * collInfo2:
173  * MOUNTED_COLL - resource
174  * LINKED_COLL - none
175  * TAR_STRUCT_FILE_T - cacheDirPath;;;resource;;;cacheDirty
176  */
177 typedef struct CollInfo {
195 
196  struct CollInfo *next;
198 
199 typedef struct RuleInfo {
200  int TDB;
202 
203 /* inxIvalPair_t - int index, int value pair */
204 
205 typedef struct InxIvalPair {
206  int len;
207  int *inx; /* pointer to an array of int index */
208  int *value; /* pointer to an array of int value values */
210 
211 /* inxValPair_t - int index, str value pair */
212 
213 typedef struct InxValPair {
214  int len;
215  int *inx; /* pointer to an array of int index */
216  char **value; /* pointer to an array of str value values */
218 
219 /* strArray_t - just a single array */
220 typedef struct StrArray {
221  int len;
222  int size;
223  char *value; /* char aray of [len][size] */
225 
226 /* intArray_t - just a single array */
227 typedef struct IntArray {
228  int len;
229  int *value; /* int aray of [len] */
231 
232 
233 /* definition for RescTypeDef */
234 
235 typedef enum { /* resource category */
237  DB_CAT
239 
240 #define DEFAULT_FILE_MODE 0600
241 #define DEFAULT_DIR_MODE 0750
242 
243 /* definition for chkPathPerm */
244 
245 #define DISALLOW_PATH_REG 0 /* disallow path registration */ // JMC - backport 4774
246 #define NO_CHK_PATH_PERM 1 // JMC - backport 4758
247 #define DO_CHK_PATH_PERM 2 // JMC - backport 4774
248 #define CHK_NON_VAULT_PATH_PERM 3 /* allow reg of user's vault path */// JMC - backport 4774
249 
250 #define DISALLOW_PATH_REG_STR "disallowPathReg" // JMC - backport 4774
251 #define NO_CHK_PATH_PERM_STR "noChkPathPerm" // JMC - backport 4774
252 #define DO_CHK_PATH_PERM_STR "doChkPathPerm" // JMC - backport 4774
253 #define CHK_NON_VAULT_PATH_PERM_STR "chkNonVaultPathPerm" // JMC - backport 4774
254 
255 /* definition for stageFlag to specify whether staging is required */
256 #define NO_STAGING 0
257 #define STAGE_SRC 1
258 #define SYNC_DEST 2
259 
260 /* definition for trash policy */
261 
262 #define DO_TRASH_CAN 0
263 #define NO_TRASH_CAN 1
264 
265 typedef enum {
269 
270 /* definition for classType */
271 
272 #define CACHE_CL 0
273 #define ARCHIVAL_CL 1
274 #define BUNDLE_CL 2
275 #define COMPOUND_CL 3
276 #define DATABASE_CL 4
277 
278 #define PRIMARY_FLAG 0x8000 /* primary class when this bit is set */
279 // JMC - legacy resource - typedef struct RescClass {
280 // char *className;
281 // int classType;
282 //} rescClass_t;
283 
284 /* transStat_t is being replaced by transferStat_t because of the 64 bits
285  * padding */
286 typedef struct {
289 } transStat_t;
290 
291 typedef struct {
293  int flags; /* padding to 64 bits */
296 
297 #define FILE_CNT_PER_STAT_OUT 10 /* the default file count per
298  * collOprStat output */
299 typedef struct {
300  int filesCnt;
301  int totalFileCnt;
302  rodsLong_t bytesWritten;
303  char lastObjPath[MAX_NAME_LEN];
304 } collOprStat_t;
305 
306 /* tagStruct_t - tagged keyword structure
307  preTag defines the reg exp to find beginning of value
308  postTag defines the reg exp to be checked to find end of value
309  the value found between the tags is associated with the KeyWord*/
310 typedef struct TagStruct {
311  int len;
312  char **preTag; /* array of prestring tag */
313  char **postTag; /* array of poststring tag */
314  char **keyWord; /* pointer to an array of KeyWords */
315 } tagStruct_t;
316 
317 typedef struct Subfile {
320  int mode;
321  int flags;
324 } subFile_t;
325 
326 typedef struct StructFileTypeDef {
327  char *typeName;
330 
331 #endif // OBJ_INFO_H__
332 
CollInfo::collMapId
int collMapId
Definition: objInfo.h:183
transferStat_t
Definition: objInfo.h:291
DataObjInfo::version
char version[64]
Definition: objInfo.h:136
TagStruct::len
int len
Definition: objInfo.h:310
TagStruct
Definition: objInfo.h:309
DataObjInfo::dataCreate
char dataCreate[32]
Definition: objInfo.h:150
Subfile::offset
rodsLong_t offset
Definition: objInfo.h:321
DataObjInfo::dataModify
char dataModify[32]
Definition: objInfo.h:151
SpecColl::resource
char resource[64]
Definition: objInfo.h:83
RuleInfo
Definition: objInfo.h:199
inxValPair_t
struct InxValPair inxValPair_t
Subfile
Definition: objInfo.h:316
rodsUser.h
SpecCollCache::ownerName
char ownerName[64]
Definition: objInfo.h:106
Subfile::subFilePath
char subFilePath[(1024+64)]
Definition: objInfo.h:318
SpecCollCache::ownerZone
char ownerZone[64]
Definition: objInfo.h:107
DataObjInfo::dataOwnerZone
char dataOwnerZone[64]
Definition: objInfo.h:139
SpecCollCache::perm
specCollPerm_t perm
Definition: objInfo.h:103
StructFileTypeDef::type
structFileType_t type
Definition: objInfo.h:327
SpecColl::cacheDirty
int cacheDirty
Definition: objInfo.h:92
DataObjInfo::dataType
char dataType[64]
Definition: objInfo.h:133
SpecColl::phyPath
char phyPath[(1024+64)]
Definition: objInfo.h:85
subFile_t
struct Subfile subFile_t
SpecCollCache::next
struct SpecCollCache * next
Definition: objInfo.h:110
SpecColl::cacheDir
char cacheDir[(1024+64)]
Definition: objInfo.h:89
DataObjInfo::rescId
rodsLong_t rescId
Definition: objInfo.h:164
LONG_NAME_LEN
#define LONG_NAME_LEN
Definition: rodsDef.h:57
SpecColl::type
structFileType_t type
Definition: objInfo.h:78
DataObjInfo::rescHier
char rescHier[(1024+64)]
Definition: objInfo.h:132
DataObjInfo::replStatus
int replStatus
Definition: objInfo.h:141
SpecColl::replNum
int replNum
Definition: objInfo.h:93
NO_CREATE_PATH
@ NO_CREATE_PATH
Definition: objInfo.h:266
HAAW_STRUCT_FILE_T
@ HAAW_STRUCT_FILE_T
Definition: objInfo.h:54
tagStruct_t
struct TagStruct tagStruct_t
DataObjInfo::condInput
keyValPair_t condInput
Definition: objInfo.h:161
Subfile::specColl
specColl_t * specColl
Definition: objInfo.h:322
CollInfo::collOwnerZone
char collOwnerZone[64]
Definition: objInfo.h:182
SpecColl
Definition: objInfo.h:76
structFileType_t
structFileType_t
Definition: objInfo.h:52
WRITE_COLL_PERM
@ WRITE_COLL_PERM
Definition: objInfo.h:99
InxIvalPair::len
int len
Definition: objInfo.h:206
DataObjInfo::otherFlags
int otherFlags
Definition: objInfo.h:160
SpecCollCache::collId
char collId[64]
Definition: objInfo.h:105
DataObjInfo::collId
rodsLong_t collId
Definition: objInfo.h:144
InxValPair::inx
int * inx
Definition: objInfo.h:215
STRUCT_FILE_COLL
@ STRUCT_FILE_COLL
Definition: objInfo.h:47
DataObjInfo::filePath
char filePath[(1024+64)]
Definition: objInfo.h:137
structFileOprType_t
structFileOprType_t
Definition: objInfo.h:59
DataObjInfo::dataComments
char dataComments[256]
Definition: objInfo.h:147
IntArray::len
int len
Definition: objInfo.h:228
transferStat_t::flags
int flags
Definition: objInfo.h:293
DataObjInfo::dataId
rodsLong_t dataId
Definition: objInfo.h:143
CollInfo
Definition: objInfo.h:177
DataObjInfo::next
struct DataObjInfo * next
Definition: objInfo.h:163
DataObjInfo::specColl
specColl_t * specColl
Definition: objInfo.h:158
InxValPair::value
char ** value
Definition: objInfo.h:216
transferStat_t::bytesWritten
rodsLong_t bytesWritten
Definition: objInfo.h:294
StrArray::len
int len
Definition: objInfo.h:221
KeyValPair::value
char ** value
Definition: objInfo.h:123
RuleInfo::TDB
int TDB
Definition: objInfo.h:200
CollInfo::collOwnerName
char collOwnerName[64]
Definition: objInfo.h:181
DataObjInfo::dataAccessInx
int dataAccessInx
Definition: objInfo.h:153
DataObjInfo::flags
int flags
Definition: objInfo.h:146
CollInfo::next
struct CollInfo * next
Definition: objInfo.h:196
CollInfo::collExpiry
char collExpiry[32]
Definition: objInfo.h:187
LINKED_COLL
@ LINKED_COLL
Definition: objInfo.h:49
transferStat_t::numThreads
int numThreads
Definition: objInfo.h:292
CollInfo::collAccessInx
int collAccessInx
Definition: objInfo.h:184
DataObjInfo::in_pdmo
char in_pdmo[(1024+64)]
Definition: objInfo.h:162
DataObjInfo::dataOwnerName
char dataOwnerName[64]
Definition: objInfo.h:138
rodsType.h
CollInfo::collInheritance
char collInheritance[256]
Definition: objInfo.h:186
TIME_LEN
#define TIME_LEN
Definition: rodsDef.h:54
collOprStat_t
Definition: objInfo.h:298
createPath_t
createPath_t
Definition: objInfo.h:265
ruleInfo_t
struct RuleInfo ruleInfo_t
keyValPair_t
struct KeyValPair keyValPair_t
KeyValPair::keyWord
char ** keyWord
Definition: objInfo.h:122
STRUCT_FILE_SPEC_COLL_OPR
@ STRUCT_FILE_SPEC_COLL_OPR
Definition: objInfo.h:62
specCollClass_t
specCollClass_t
Definition: objInfo.h:45
InxIvalPair::inx
int * inx
Definition: objInfo.h:207
DataObjInfo::destRescName
char destRescName[64]
Definition: objInfo.h:155
UNKNOWN_COLL_PERM
@ UNKNOWN_COLL_PERM
Definition: objInfo.h:97
MAX_NAME_LEN
#define MAX_NAME_LEN
Definition: rodsDef.h:61
specCollPerm_t
specCollPerm_t
Definition: objInfo.h:96
Subfile::addr
rodsHostAddr_t addr
Definition: objInfo.h:317
StructFileTypeDef::typeName
char * typeName
Definition: objInfo.h:326
DataObjInfo::writeFlag
int writeFlag
Definition: objInfo.h:154
CollInfo::collCreate
char collCreate[32]
Definition: objInfo.h:188
DataObjInfo::replNum
int replNum
Definition: objInfo.h:140
transStat_t
Definition: objInfo.h:286
SpecColl::rescHier
char rescHier[(1024+64)]
Definition: objInfo.h:84
NO_SPEC_COLL
@ NO_SPEC_COLL
Definition: objInfo.h:46
READ_COLL_PERM
@ READ_COLL_PERM
Definition: objInfo.h:98
StructFileTypeDef
Definition: objInfo.h:325
NON_STRUCT_FILE_SPEC_COLL_OPR
@ NON_STRUCT_FILE_SPEC_COLL_OPR
Definition: objInfo.h:61
intArray_t
struct IntArray intArray_t
InxIvalPair::value
int * value
Definition: objInfo.h:208
InxValPair::len
int len
Definition: objInfo.h:214
DataObjInfo::chksum
char chksum[64]
Definition: objInfo.h:135
SpecColl::collection
char collection[(1024+64)]
Definition: objInfo.h:79
dataObjInfo_t
struct DataObjInfo dataObjInfo_t
CollInfo::collParentName
char collParentName[(1024+64)]
Definition: objInfo.h:180
SpecCollCache::modifyTime
char modifyTime[64]
Definition: objInfo.h:109
CollInfo::condInput
keyValPair_t condInput
Definition: objInfo.h:194
CollInfo::collInfo2
char collInfo2[(1024+64)]
Definition: objInfo.h:193
DataObjInfo::dataExpiry
char dataExpiry[32]
Definition: objInfo.h:149
CollInfo::collComments
char collComments[256]
Definition: objInfo.h:185
TAR_STRUCT_FILE_T
@ TAR_STRUCT_FILE_T
Definition: objInfo.h:55
StrArray::size
int size
Definition: objInfo.h:222
CollInfo::collAccess
char collAccess[64]
Definition: objInfo.h:190
strArray_t
struct StrArray strArray_t
DataObjInfo::dataAccess
char dataAccess[64]
Definition: objInfo.h:152
DataObjInfo::rescName
char rescName[64]
Definition: objInfo.h:131
DataObjInfo::regUid
int regUid
Definition: objInfo.h:159
DataObjInfo::dataMapId
int dataMapId
Definition: objInfo.h:145
KeyValPair::len
int len
Definition: objInfo.h:121
MOUNTED_COLL
@ MOUNTED_COLL
Definition: objInfo.h:48
collInfo_t
struct CollInfo collInfo_t
InxIvalPair
Definition: objInfo.h:205
CollInfo::collModify
char collModify[32]
Definition: objInfo.h:189
CollInfo::collId
rodsLong_t collId
Definition: objInfo.h:178
StrArray::value
char * value
Definition: objInfo.h:223
transStat_t::bytesWritten
rodsLong_t bytesWritten
Definition: objInfo.h:288
inxIvalPair_t
struct InxIvalPair inxIvalPair_t
CREATE_PATH
@ CREATE_PATH
Definition: objInfo.h:267
DataObjInfo::objPath
char objPath[(1024+64)]
Definition: objInfo.h:130
Subfile::mode
int mode
Definition: objInfo.h:319
DataObjInfo::backupRescName
char backupRescName[64]
Definition: objInfo.h:156
SHORT_STR_LEN
#define SHORT_STR_LEN
Definition: rodsDef.h:67
TagStruct::keyWord
char ** keyWord
Definition: objInfo.h:313
CollInfo::collType
char collType[64]
Definition: objInfo.h:191
CollInfo::collInfo1
char collInfo1[(1024+64)]
Definition: objInfo.h:192
transStat_t::numThreads
int numThreads
Definition: objInfo.h:287
DB_CAT
@ DB_CAT
Definition: objInfo.h:237
NOT_SPEC_COLL_OPR
@ NOT_SPEC_COLL_OPR
Definition: objInfo.h:60
NAME_LEN
#define NAME_LEN
Definition: rodsDef.h:55
KeyValPair
Definition: objInfo.h:120
NORMAL_OPR_ON_STRUCT_FILE_COLL
@ NORMAL_OPR_ON_STRUCT_FILE_COLL
Definition: objInfo.h:63
SpecCollCache::createTime
char createTime[64]
Definition: objInfo.h:108
TagStruct::postTag
char ** postTag
Definition: objInfo.h:312
DataObjInfo::statusString
char statusString[64]
Definition: objInfo.h:142
Subfile::flags
int flags
Definition: objInfo.h:320
NONE_STRUCT_FILE_T
@ NONE_STRUCT_FILE_T
Definition: objInfo.h:53
SpecColl::objPath
char objPath[(1024+64)]
Definition: objInfo.h:80
IntArray::value
int * value
Definition: objInfo.h:229
structFileTypeDef_t
struct StructFileTypeDef structFileTypeDef_t
DataObjInfo
Definition: objInfo.h:129
DataObjInfo::dataSize
rodsLong_t dataSize
Definition: objInfo.h:134
MSSO_STRUCT_FILE_T
@ MSSO_STRUCT_FILE_T
Definition: objInfo.h:56
CollInfo::collName
char collName[(1024+64)]
Definition: objInfo.h:179
specColl_t
struct SpecColl specColl_t
InxValPair
Definition: objInfo.h:213
SpecCollCache::specColl
specColl_t specColl
Definition: objInfo.h:104
DataObjInfo::dataMode
char dataMode[32]
Definition: objInfo.h:148
specCollCache_t
struct SpecCollCache specCollCache_t
FILE_CAT
@ FILE_CAT
Definition: objInfo.h:236
rescCat_t
rescCat_t
Definition: objInfo.h:235
SpecCollCache
Definition: objInfo.h:102
rodsLong_t
long long rodsLong_t
Definition: rodsType.h:32
StrArray
Definition: objInfo.h:220
SpecColl::collClass
specCollClass_t collClass
Definition: objInfo.h:77
DataObjInfo::subPath
char subPath[(1024+64)]
Definition: objInfo.h:157
rodsHostAddr_t
Definition: rodsDef.h:296
IntArray
Definition: objInfo.h:227
TagStruct::preTag
char ** preTag
Definition: objInfo.h:311