| 
    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. 
   | 
 
The datatypes and methods for network functionality. More...
Data Structures | |
| struct | Connection | 
| The base class for building a Server-Client connection.  More... | |
| struct | WebConnection | 
| A Connection that uses http(s) communication.  More... | |
| struct | CurlTool | 
| A tool for making http(s) requests and responses.  More... | |
| struct | KeyValuePair | 
| A pair of strings.  More... | |
| struct | KeyValuePairNode | 
| A datatype used for storing a KeyValuePair on a LinkedList.  More... | |
Enumerations | |
| enum | ConnectionType { CT_RAW, CT_WEB, CT_NUM_TYPES } | 
| An enumeration listing the different types of Connections.  More... | |
| enum | CurlMode { CM_MEMORY, CM_FILE, CM_NUM_MODES } | 
| An enum specifying where any resultant data from running a CurlTool will be stored.  More... | |
Functions | |
| json_t * | GetAvailableServicesRequest (const User *user_p, const SchemaVersion *const sv_p) | 
| Generate the JSON fragment to send to the Server for getting all available Services.  More... | |
| bool | GetUsernameAndPassword (const User *const user_p, const char *provider_s, const char **username_ss, const char **password_ss) | 
| Extract the user credentials from a JSON fragment.  More... | |
| json_t * | GetInterestedServicesRequest (const User *user_p, const char *const protocol_s, const char *const filename_s, const SchemaVersion *const sv_p) | 
| Generate the JSON fragment to send to the Server for getting Services that are viable for a given Resource.  More... | |
| json_t * | GetNamedServicesRequest (const User *user_p, const char *const service_name_s, const SchemaVersion *const sv_p) | 
| Generate the JSON fragment to send to the Server for getting the details of a particular Service.  More... | |
| json_t * | GetNamedServicesIndexingDataRequest (const User *user_p, const char *const service_names_s, const SchemaVersion *const sv_p) | 
| Generate the JSON fragment to send to the Server for getting the indexing data of a particular Service.  More... | |
| bool | AddClientConfigToJSON (json_t *root_p, const User *user_p) | 
| Add the given credentials in the correct position in a JSON fragment.  More... | |
| json_t * | GetOperationAsJSON (Operation op, const SchemaVersion *const sv_p) | 
| Get the JSON fragment for a given Operation.  More... | |
| json_t * | GetServicesRequest (const User *user_p, const Operation op, const char *const op_key_s, json_t *const op_data_p, const SchemaVersion *const sv_p) | 
| Generate the request to run an Operation.  More... | |
| json_t * | MakeRemoteJsonCall (json_t *req_p, Connection *connection_p) | 
| Send a JSON-based request to the server and get the JSON-based response.  More... | |
| const char * | GetUserUUIDStringFromJSON (const json_t *credentials_p) | 
| Get the User uuid from a JSON fragment.  More... | |
| json_t * | GetServicesResultsRequest (const uuid_t **ids_pp, const uint32 num_ids, Connection *connection_p, const SchemaVersion *const sv_p) | 
| Generate the JSON fragment to send to the Server for getting the results of one or more Operations.  More... | |
| bool | GetStatusFromJSON (const json_t *service_json_p, OperationStatus *status_p) | 
| Get the current OperationStatus for a Service from its JSON fragment.  More... | |
| json_t * | GetInitialisedMessage (const SchemaVersion *const sv_p) | 
| Create a response object with a valid header.  More... | |
The datatypes and methods for network functionality.
| enum ConnectionType | 
| enum CurlMode | 
An enum specifying where any resultant data from running a CurlTool will be stored.
| Enumerator | |
|---|---|
| CM_MEMORY | The data will be stored in memory.  | 
| CM_FILE | The data will be written to disk.  | 
| CM_NUM_MODES | The number of available modes.  | 
| json_t* GetAvailableServicesRequest | ( | const User * | user_p, | 
| const SchemaVersion *const | sv_p | ||
| ) | 
Generate the JSON fragment to send to the Server for getting all available Services.
| user_p | An optional User. | 
| sv_p | If you wish to create a JSON fragment for a different version of the Grassroots system, then you can set this value to the version that you require. If this is NULL, then the current version of the running Grassroots system will be used.  | 
 NULL upon error. | bool GetUsernameAndPassword | ( | const User *const | user_p, | 
| const char * | provider_s, | ||
| const char ** | username_ss, | ||
| const char ** | password_ss | ||
| ) | 
Extract the user credentials from a JSON fragment.
| user_p | The User for the credentials that will be added. | 
| provider_s | The name of the system that we are requesting the username and password for. | 
| username_ss | Pointer to the username to update. | 
| password_ss | Pointer to the encrypted password to update. | 
true if the credentials were extracted from the JSON fragment successfully, false otherwise. | json_t* GetInterestedServicesRequest | ( | const User * | user_p, | 
| const char *const | protocol_s, | ||
| const char *const | filename_s, | ||
| const SchemaVersion *const | sv_p | ||
| ) | 
Generate the JSON fragment to send to the Server for getting Services that are viable for a given Resource.
| user_p | The User for the credentials that will be added. | 
| protocol_s | The Resource protocol. | 
| filename_s | The filename of the Resource. | 
| sv_p | If you wish to create a JSON fragment for a different version of the Grassroots system, then you can set this value to the version that you require. If this is NULL, then the current version of the running Grassroots system will be used.  | 
 NULL upon error. | json_t* GetNamedServicesRequest | ( | const User * | user_p, | 
| const char *const | service_name_s, | ||
| const SchemaVersion *const | sv_p | ||
| ) | 
Generate the JSON fragment to send to the Server for getting the details of a particular Service.
| user_p | The User for the credentials that will be added. | 
| service_name_s | The name of the Service. | 
| sv_p | If you wish to create a JSON fragment for a different version of the Grassroots system, then you can set this value to the version that you require. If this is NULL, then the current version of the running Grassroots system will be used.  | 
 NULL upon error. | json_t* GetNamedServicesIndexingDataRequest | ( | const User * | user_p, | 
| const char *const | service_names_s, | ||
| const SchemaVersion *const | sv_p | ||
| ) | 
Generate the JSON fragment to send to the Server for getting the indexing data of a particular Service.
| user_p | The User for the credentials that will be added. | 
| service_name_s | The name of the Service. | 
| sv_p | If you wish to create a JSON fragment for a different version of the Grassroots system, then you can set this value to the version that you require. If this is NULL, then the current version of the running Grassroots system will be used.  | 
 NULL upon error. | bool AddClientConfigToJSON | ( | json_t * | root_p, | 
| const User * | user_p | ||
| ) | 
Add the given credentials in the correct position in a JSON fragment.
| root_p | The JSON fragment to update. | 
| user_p | The User for the credentials that will be added. | 
true if the JSON fragment was updated successfully, false otherwise. | json_t* GetOperationAsJSON | ( | Operation | op, | 
| const SchemaVersion *const | sv_p | ||
| ) | 
Get the JSON fragment for a given Operation.
| op | The Operation to generate the JSON for. | 
| sv_p | If you wish to create a JSON fragment for a different version of the Grassroots system, then you can set this value to the version that you require. If this is NULL, then the current version of the running Grassroots system will be used.  | 
NULL upon error. | json_t* GetServicesRequest | ( | const User * | user_p, | 
| const Operation | op, | ||
| const char *const | op_key_s, | ||
| json_t *const | op_data_p, | ||
| const SchemaVersion *const | sv_p | ||
| ) | 
Generate the request to run an Operation.
| user_p | The User for the credentials that will be added. | 
| op | The Operation to perform. | 
| op_key_s | The key to be used to attach the associated Operation-specific data with. | 
| op_data_p | The Operation-specific data. | 
| sv_p | If you wish to create a JSON fragment for a different version of the Grassroots system, then you can set this value to the version that you require. If this is NULL, then the current version of the running Grassroots system will be used.  | 
NULL upon error. | json_t* MakeRemoteJsonCall | ( | json_t * | req_p, | 
| Connection * | connection_p | ||
| ) | 
Send a JSON-based request to the server and get the JSON-based response.
| req_p | The JSON request to send to the Server. | 
| connection_p | The Connection to the Server. | 
NULL upon error. | const char* GetUserUUIDStringFromJSON | ( | const json_t * | credentials_p | ) | 
Get the User uuid from a JSON fragment.
| credentials_p | The JSON fragment to parse. | 
NULL if it could not be found. | json_t* GetServicesResultsRequest | ( | const uuid_t ** | ids_pp, | 
| const uint32 | num_ids, | ||
| Connection * | connection_p, | ||
| const SchemaVersion *const | sv_p | ||
| ) | 
Generate the JSON fragment to send to the Server for getting the results of one or more Operations.
| ids_pp | An array of uuid_ts, one for each operation . | 
| num_ids | The number of ids in ids_pp. | 
| connection_p | The Connection to the Server. | 
| sv_p | If you wish to create a JSON fragment for a different version of the Grassroots system, then you can set this value to the version that you require. If this is NULL, then the current version of the running Grassroots system will be used.  | 
 NULL upon error. | bool GetStatusFromJSON | ( | const json_t * | service_json_p, | 
| OperationStatus * | status_p | ||
| ) | 
Get the current OperationStatus for a Service from its JSON fragment.
| service_json_p | The JSON fragment of the response from the Server. | 
| status_p | Pointer to the OperationStatus value that will be updated. | 
true if the OperationStatus value was updated successfully,  false otherwise. | json_t* GetInitialisedMessage | ( | const SchemaVersion *const | sv_p | ) | 
Create a response object with a valid header.
The returned object will contain a header section with details such as the schema version.
| sv_p | If you wish to create a JSON fragment for a different version of the Grassroots system, then you can set this value to the version that you require. If this is NULL, then the current version of the running Grassroots system will be used.  | 
NULL upon error.