|
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.
|
Utility code for accessing Handlers. More...
Data Structures | |
| struct | Handler |
| A Handler is a datatype for accessing data. More... | |
| struct | HandlerNode |
| A datatype for storing a Handler on a LinkedList. More... | |
Enumerations | |
| enum | HandlerStatus { HS_GOOD, HS_FINISHED, HS_BAD, HS_NONE } |
| An enumeration of the possible status values of a stream being used by a Handler. More... | |
Functions | |
| Handler * | GetResourceHandler (const DataResource *resource_p, struct GrassrootsServer *server_p, const User *user_p) |
| Get the appropriate Handler for a given Resource. More... | |
| bool | InitHandlerUtil (void) |
| This allocates the internal structures used by the Handler library. More... | |
| bool | DestroyHandlerUtil (void) |
| This frees the internal structures used by the Handler library. More... | |
| const char * | GetMappedFilename (const char *protocol_s, const char *user_id_s, const char *filename_s, time_t *time_p) |
| Create a local file for caching changes to a remote file allowing changes to be committed once editing has finished,. More... | |
| bool | SetMappedFilename (const char *protocol_s, const char *user_id_s, const char *filename_s, const char *mapped_filename_s, const time_t last_mod_time) |
| Store the details of an external file and its locally-mapped copy. More... | |
Utility code for accessing Handlers.
| enum HandlerStatus |
An enumeration of the possible status values of a stream being used by a Handler.
| Enumerator | |
|---|---|
| HS_GOOD | The stream is in a valid state. |
| HS_FINISHED | The Handler has reached the end of the stream. |
| HS_BAD | The Handler has encountered an error using the stream. |
| HS_NONE | The Handler does not have an open stream. |
| Handler* GetResourceHandler | ( | const DataResource * | resource_p, |
| struct GrassrootsServer * | server_p, | ||
| const User * | user_p | ||
| ) |
| bool InitHandlerUtil | ( | void | ) |
This allocates the internal structures used by the Handler library.
true upon success, false on failure. | bool DestroyHandlerUtil | ( | void | ) |
This frees the internal structures used by the Handler library.
true upon success, false on failure. | const char* GetMappedFilename | ( | const char * | protocol_s, |
| const char * | user_id_s, | ||
| const char * | filename_s, | ||
| time_t * | time_p | ||
| ) |
Create a local file for caching changes to a remote file allowing changes to be committed once editing has finished,.
| protocol_s | The protocol of the remote file. |
| user_id_s | The id of the current user. This can be NULL. |
| filename_s | The remote filename. |
| time_p | The time when the local cached file was created. |
NULL upon error. | bool SetMappedFilename | ( | const char * | protocol_s, |
| const char * | user_id_s, | ||
| const char * | filename_s, | ||
| const char * | mapped_filename_s, | ||
| const time_t | last_mod_time | ||
| ) |
Store the details of an external file and its locally-mapped copy.
| protocol_s | The protocol of the remote file. |
| user_id_s | The id of the current user. This can be NULL. |
| filename_s | The external filename of the file that is to be mapped. |
| mapped_filename_s | The local mapped filename. |
| last_mod_time | The time that the local cached file was last modified. |
true upon success, false on failure.