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.
operation.h File Reference
#include "grassroots_util_library.h"
#include "jansson.h"
Include dependency graph for operation.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  Operation {
  OP_NONE = -1, OP_LIST_ALL_SERVICES, OP_GET_SCHEMA_VERSION, OP_LIST_INTERESTED_SERVICES,
  OP_GET_NAMED_SERVICES, OP_GET_SERVICE_RESULTS, OP_GET_RESOURCE, OP_SERVER_STATUS,
  OP_GET_SERVICE_INFO, OP_NUM_OPERATIONS
}
 The various Operations that a Server can perform. More...
 
enum  OperationStatus {
  OS_LOWER_LIMIT = -4, OS_FAILED = -3, OS_FAILED_TO_START = -2, OS_ERROR = -1,
  OS_IDLE = 0, OS_PENDING, OS_STARTED, OS_FINISHED,
  OS_PARTIALLY_SUCCEEDED, OS_SUCCEEDED, OS_CLEANED_UP, OS_UPPER_LIMIT,
  OS_NUM_STATUSES = OS_UPPER_LIMIT - OS_LOWER_LIMIT + 1
}
 The current status of an Operation. More...
 

Functions

const char * GetOperationAsString (const Operation op)
 Get the string-based representation of a given Operation. More...
 
Operation GetOperationFromString (const char *op_s)
 Get the Operation for a given String. More...
 
const char * GetOperationStatusAsString (const OperationStatus status)
 Get the string-based representation of a given OperationStatus. More...
 
OperationStatus GetOperationStatusFromString (const char *status_s)
 Get the OperationStatus for a given String. More...
 
Operation GetOperationFromJSON (const json_t *ops_p)
 Get the Operation from a JSON fragment with a key of either OPERATION_S or OPERATION_ID_S. More...