Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
iRODS Library

A collection of methods to access parts of an iRODS system. More...

Data Structures

struct  IRodsConnection
 This is a wrapper which hides the internals of the code and objects needed to access an iRODS system. More...
 
struct  IRodsSearch
 A set of SearchTerms to use when running a search. More...
 
struct  SearchTerm
 A datatype for storing the values needed for an iRODS search. More...
 
struct  SearchTermNode
 A datatype for storing a SearchTerm on a LinkedList. More...
 
struct  QueryResult
 A datatype for accessing a single result of a search on an iRODS server. More...
 
struct  QueryResults
 A datatype for holding an array of the results of a search on an iRODS server. More...
 

Functions

char * BuildQueryString (const char **args_ss)
 Build a new query string to use to execute a query. More...
 
void FreeBuiltQueryString (char *query_s)
 Free a previously generated query string. More...
 
json_t * GetModifiedIRodsFiles (const char *const username_s, const char *const password_s, const time_t from, const time_t to)
 Get all data objects for a given user modified within a given time interval. More...
 
json_t * GetInterestedServicesForIrodsDataObject (const char *services_path_s, char *const username_s, char *const password_s, const char *data_name_s)
 Get all Services that can work on a given data object. More...
 
const char * GetUsernameForId (const int64 user_id)
 Get the username for an iRODS user id. More...
 
bool FindIdForUsername (rcComm_t *connection_p, const char *const username_s, int64 *id_p)
 Get the iRODS numeric user id for a given username. More...
 
QueryResultsGetAllCollectionsForUsername (rcComm_t *connection_p, const char *const username_s)
 Get all collections for a given user. More...
 
QueryResultsGetAllDataForUsername (rcComm_t *connection_p, const char *const username_s, const char *user_id_s)
 Get all data objects for a given user. More...
 
QueryResultsGetAllZoneNames (rcComm_t *connection_p)
 Get all zones on an iRODS server. More...
 
QueryResultsGetAllModifiedDataForUsername (rcComm_t *connection_p, const char *const username_s, const time_t from, const time_t to)
 Get all data objects for a given user modified within a given time interval. More...
 

Detailed Description

A collection of methods to access parts of an iRODS system.

Function Documentation

◆ BuildQueryString()

char* BuildQueryString ( const char **  args_ss)

Build a new query string to use to execute a query.

Parameters
args_ssThe array of strings to build query string from terminated by a NULL.
Returns
A newly-allocated string containing the query or NULL upon error.

◆ FreeBuiltQueryString()

void FreeBuiltQueryString ( char *  query_s)

Free a previously generated query string.

Parameters
query_sThe string to free.
See also
BuildQueryString

◆ GetModifiedIRodsFiles()

json_t* GetModifiedIRodsFiles ( const char *const  username_s,
const char *const  password_s,
const time_t  from,
const time_t  to 
)

Get all data objects for a given user modified within a given time interval.

This calls GetAllModifiedDataForUsername before constructing a json object from these results.

Parameters
username_sThe username to get the data objects for.
password_sThe password for the user.
fromThe start of the time interval.
toThe end of the time interval.
Returns
A json-based representation of the matching data objects.
See also
GetAllModifiedDataForUsername

◆ GetInterestedServicesForIrodsDataObject()

json_t* GetInterestedServicesForIrodsDataObject ( const char *  services_path_s,
char *const  username_s,
char *const  password_s,
const char *  data_name_s 
)

Get all Services that can work on a given data object.

Parameters
services_path_sThe directory containing the Service modules.
username_sThe username to get the data objects for.
password_sThe iRODS password. FIXME! This needs to change to being encrypted.
data_name_sThe name of the data object.
Returns
A json-based representation of the matching Services.

◆ GetUsernameForId()

const char* GetUsernameForId ( const int64  user_id)

Get the username for an iRODS user id.

Parameters
user_idThe iRODS numeric user id.
Returns
The corresponding username or NULL upon error.

◆ FindIdForUsername()

bool FindIdForUsername ( rcComm_t *  connection_p,
const char *const  username_s,
int64 *  id_p 
)

Get the iRODS numeric user id for a given username.

Parameters
connection_pThe connection to the iRODS server.
username_sThe username to get the id for.
id_pPointer to where the id will be stored if it can be found.
Returns
true if the id was found successfully, false otherwise.

◆ GetAllCollectionsForUsername()

QueryResults* GetAllCollectionsForUsername ( rcComm_t *  connection_p,
const char *const  username_s 
)

Get all collections for a given user.

Parameters
connection_pThe connection to the iRODS server.
username_sThe username to get the collections for.
Returns
The QueryResults for the matching collections. The results have following columns: COL_COLL_ID & COL_COLL_NAME.

◆ GetAllDataForUsername()

QueryResults* GetAllDataForUsername ( rcComm_t *  connection_p,
const char *const  username_s,
const char *  user_id_s 
)

Get all data objects for a given user.

Parameters
connection_pThe connection to the iRODS server.
username_sThe username to get the data objects for.
user_id_sThe user id to get the data objects for.
Returns
The QueryResults for the matching data objects. The results have following columns: COL_D_DATA_ID, COL_COLL_ID & COL_DATA_NAME .

◆ GetAllZoneNames()

QueryResults* GetAllZoneNames ( rcComm_t *  connection_p)

Get all zones on an iRODS server.

Parameters
connection_pThe connection to the iRODS server.
Returns
The QueryResults for the matcshing data objects. The results have the following columns: COL_ZONE_ID & COL_ZONE_NAME.

◆ GetAllModifiedDataForUsername()

QueryResults* GetAllModifiedDataForUsername ( rcComm_t *  connection_p,
const char *const  username_s,
const time_t  from,
const time_t  to 
)

Get all data objects for a given user modified within a given time interval.

Parameters
connection_pThe connection to the iRODS server.
username_sThe username to get the data objects for.
fromThe start of the time interval.
toThe end of the time interval.
Returns
The QueryResults for the matching data objects. The results have following columns: COL_D_DATA_ID, COL_COLL_ID, COL_DATA_NAME & COL_D_MODIFY_TIME.