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.
user_util.h
Go to the documentation of this file.
1 /*
2 ** Copyright 2014-2016 The Earlham Institute
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16 
21 /*
22  * user_util.h
23  *
24  * Created on: 18 Feb 2016
25  * Author: tyrrells
26  */
27 
28 #ifndef IRODS_LIB_INCLUDE_USER_UTIL_H_
29 #define IRODS_LIB_INCLUDE_USER_UTIL_H_
30 
31 
32 
33 #include "rcConnect.h"
34 #include "irods_util_library.h"
35 
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #endif
40 
48 IRODS_UTIL_API const char *GetUsernameForId (const int64 user_id);
49 
59 IRODS_UTIL_API bool FindIdForUsername (rcComm_t *connection_p, const char * const username_s, int64 *id_p);
60 
61 
71 IRODS_UTIL_API QueryResults *GetAllCollectionsForUsername (rcComm_t *connection_p, const char * const username_s);
72 
73 
84 IRODS_UTIL_API QueryResults *GetAllDataForUsername (rcComm_t *connection_p, const char * const username_s, const char *user_id_s);
85 
86 
95 IRODS_UTIL_API QueryResults *GetAllZoneNames (rcComm_t *connection_p);
96 
97 
110 IRODS_UTIL_API QueryResults *GetAllModifiedDataForUsername (rcComm_t *connection_p, const char * const username_s, const time_t from, const time_t to);
111 
112 
114 IRODS_UTIL_LOCAL QueryResults *RunQuery (rcComm_t *connection_p, const int *select_column_ids_p, const int num_select_columns, const int *where_column_ids_p, const char **where_column_values_pp, const char **where_ops_pp, const int num_where_columns);
115 
116 
117 #ifdef __cplusplus
118 }
119 #endif
120 
121 
122 #endif /* IRODS_LIB_INCLUDE_USER_UTIL_H_ */
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.
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.
IRODS_UTIL_API
#define IRODS_UTIL_API
Definition: irods_util_library.h:46
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.
irods_util_library.h
GetAllZoneNames
QueryResults * GetAllZoneNames(rcComm_t *connection_p)
Get all zones on an iRODS server.
GetUsernameForId
const char * GetUsernameForId(const int64 user_id)
Get the username for an iRODS user id.
QueryResults
A datatype for holding an array of the results of a search on an iRODS server.
Definition: query.h:62
IRODS_UTIL_LOCAL
#define IRODS_UTIL_LOCAL
Definition: irods_util_library.h:47
GetAllCollectionsForUsername
QueryResults * GetAllCollectionsForUsername(rcComm_t *connection_p, const char *const username_s)
Get all collections for a given user.