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.
|
Go to the documentation of this file.
21 #ifndef SERVICE_MATCHER_H
22 #define SERVICE_MATCHER_H
GRASSROOTS_SERVICE_MANAGER_LOCAL void InitPluginOperationNameServiceMatcher(PluginOperationNameServiceMatcher *matcher_p, const char *plugin_name_s, const char *operation_name_s)
ServiceMatcher * AllocateServiceMatcher(void)
Allocate an empty ServiceMatcher.
A ServiceMatcher that will find any Service with a keyword parameter.
Definition: service_matcher.h:149
A ServiceMatcher that matches a Service if it can run on a given Resource.
Definition: service_matcher.h:69
ServiceMatcher * AllocateKeywordServiceMatcher(void)
Allocate a KeywordServiceMatcher.
void SetPluginNameForServiceMatcher(PluginNameServiceMatcher *matcher_p, const char *plugin_name_s)
Set the Plugin name to match for a PluginNameServiceMatcher.
GRASSROOTS_SERVICE_MANAGER_LOCAL void FreePluginNameServiceMatcher(ServiceMatcher *matcher_p)
A ServiceMatcher that matches a Service by its name.
Definition: service_matcher.h:89
GRASSROOTS_SERVICE_MANAGER_LOCAL void InitResourceServiceMatcher(ResourceServiceMatcher *matcher_p, DataResource *resource_p, Handler *handler_p)
const char * nsm_service_name_s
The name of the Service to match.
Definition: service_matcher.h:95
A datatype representing a URI.
Definition: data_resource.h:40
ServiceMatcher * AllocatePluginOperationNameServiceMatcher(const char *plugin_name_s, const char *service_name_s)
Allocate a PluginOperationNameServiceMatcher.
A datatype used to find any Services that match given criteria.
Definition: service_matcher.h:44
GRASSROOTS_SERVICE_MANAGER_LOCAL bool MatchServiceByPluginAndOperationsName(ServiceMatcher *matcher_p, Service *service_p)
PluginNameServiceMatcher ponsm_base_matcher
The base matcher for matching by Plugin name.
Definition: service_matcher.h:135
DestroyServiceMatcherCallback sm_destroy_fn
Callback to call when destroying a custom ServiceMatcher.
Definition: service_matcher.h:58
void(* DestroyServiceMatcherCallback)(struct ServiceMatcher *matcher_p)
A callback function used to free a ServiceMatcher.
Definition: service_matcher.h:36
GRASSROOTS_SERVICE_MANAGER_LOCAL void FreeKeywordServiceMatcher(ServiceMatcher *matcher_p)
GRASSROOTS_SERVICE_MANAGER_LOCAL void FreePluginOperationNameServiceMatcher(ServiceMatcher *matcher_p)
ServiceMatcher ksm_base_matcher
The base ServiceMatcher.
Definition: service_matcher.h:152
ServiceMatcher * AllocatePluginNameServiceMatcher(const char *plugin_name_s)
Allocate a PluginNameServiceMatcher.
ServiceMatcher nsm_base_matcher
The base matcher.
Definition: service_matcher.h:92
GRASSROOTS_SERVICE_MANAGER_LOCAL bool MatchServiceByResource(ServiceMatcher *matcher_p, Service *service_p)
const char * nsm_service_alias_s
The alias of the Service to match.
Definition: service_matcher.h:98
ServiceMatcher rsm_base_matcher
The base matcher.
Definition: service_matcher.h:72
GRASSROOTS_SERVICE_MANAGER_LOCAL bool MatchServiceByPluginName(ServiceMatcher *matcher_p, Service *service_p)
A datatype which defines an available service, its capabilities and its parameters.
Definition: service.h:153
ServiceMatcher * AllocateResourceServiceMatcher(DataResource *resource_p, Handler *handler_p)
Allocate a ResourceServiceMatcher.
A ServiceMatcher that matches a Service by its Plugin name and an Service name.
Definition: service_matcher.h:132
Handler * rsm_handler_p
The Handler to access the Resource.
Definition: service_matcher.h:78
bool RunServiceMatcher(ServiceMatcher *matcher_p, Service *service_p)
Run a ServiceMatcher on a given Service.
const char * pnsm_plugin_name_s
The name of the Service's Plugin to match.
Definition: service_matcher.h:118
#define GRASSROOTS_SERVICE_MANAGER_LOCAL
Definition: grassroots_service_manager_library.h:47
GRASSROOTS_SERVICE_MANAGER_LOCAL void InitOperationNameServiceMatcher(NameServiceMatcher *matcher_p, const char *name_s, const char *alias_s)
GRASSROOTS_SERVICE_MANAGER_LOCAL void InitServiceMatcher(ServiceMatcher *matcher_p, RunServiceMatcherCallback match_fn)
Initialise a ServiceMatcher.
GRASSROOTS_SERVICE_MANAGER_LOCAL void InitPluginNameServiceMatcher(PluginNameServiceMatcher *matcher_p, const char *plugin_name_s)
GRASSROOTS_SERVICE_MANAGER_LOCAL bool MatchServiceByKeyword(ServiceMatcher *matcher_p, Service *service_p)
DataResource * rsm_resource_p
The Resource to test if a Service can operate upon.
Definition: service_matcher.h:75
GRASSROOTS_SERVICE_MANAGER_LOCAL void FreeNameServiceMatcher(ServiceMatcher *matcher_p)
RunServiceMatcherCallback sm_match_fn
Callback function to run against a given Service to see if is a match.
Definition: service_matcher.h:51
GRASSROOTS_SERVICE_MANAGER_LOCAL bool MatchServiceByNameOrAlias(ServiceMatcher *matcher_p, Service *service_p)
GRASSROOTS_SERVICE_MANAGER_LOCAL void FreeResourceServiceMatcher(ServiceMatcher *matcher_p)
A ServiceMatcher that matches a Service by its Plugin name.
Definition: service_matcher.h:112
void FreeServiceMatcher(ServiceMatcher *matcher_p)
Free a ServiceMatcher.
A Handler is a datatype for accessing data.
Definition: handler.h:72
bool(* RunServiceMatcherCallback)(struct ServiceMatcher *matcher_p, Service *service_p)
A callback function used to run a ServiceMatcher.
Definition: service_matcher.h:33
GRASSROOTS_SERVICE_MANAGER_LOCAL void InitKeywordServiceMatcher(KeywordServiceMatcher *matcher_p)
#define GRASSROOTS_SERVICE_MANAGER_API
Definition: grassroots_service_manager_library.h:46
ServiceMatcher pnsm_base_matcher
The base matcher.
Definition: service_matcher.h:115
const char * ponsm_operation_name_s
The Service name to match.
Definition: service_matcher.h:138
ServiceMatcher * AllocateOperationNameServiceMatcher(const char *name_s, const char *alias_s)
Allocate a NameServiceMatcher.
GRASSROOTS_SERVICE_MANAGER_LOCAL bool MatchServiceByName(ServiceMatcher *matcher_p, Service *service_p)