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.
service_job.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  * service_job.h
23  *
24  * Created on: 25 Apr 2015
25  * Author: billy
26  */
27 
28 #ifndef SERVICE_JOB_H_
29 #define SERVICE_JOB_H_
30 
31 #include "typedefs.h"
33 #include "operation.h"
34 #include "jansson.h"
35 #include "linked_list.h"
36 #include "memory_allocations.h"
37 #include "linked_service.h"
38 
39 
40 #include "uuid_defs.h"
41 
42 /* forward declarations */
43 struct Service;
44 struct ServiceJob;
45 struct LinkedService;
46 
47 
48 #ifndef DOXYGEN_SHOULD_SKIP_THIS
49 
50 #ifdef ALLOCATE_SERVICE_JOB_TAGS
51  #define SERVICE_JOB_PREFIX GRASSROOTS_SERVICE_API
52  #define SERVICE_JOB_VAL(x) = x
53 #else
54  #define SERVICE_JOB_PREFIX extern GRASSROOTS_SERVICE_API
55  #define SERVICE_JOB_VAL(x)
56 #endif
57 
58 #endif
59 
60 
62 SERVICE_JOB_PREFIX const char *SJ_DEFAULT_TYPE_S SERVICE_JOB_VAL ("default_service_job");
63 
64 
72 typedef struct ServiceJob
73 {
76 
79 
82 
85 
87  char *sj_name_s;
88 
91 
93  char *sj_url_s;
94 
98  json_t *sj_result_p;
99 
103  json_t *sj_metadata_p;
104 
109  json_t *sj_errors_p;
110 
111 
118 
119 
125  bool (*sj_update_fn) (struct ServiceJob *job_p);
126 
133  void (*sj_free_fn) (struct ServiceJob *job_p);
134 
135 
136 
142  bool (*sj_calculate_result_fn) (struct ServiceJob *job_p);
143 
144 
145 
150 
151 
158  char *sj_type_s;
159 } ServiceJob;
160 
161 
169 typedef struct ServiceJobNode
170 {
173 
176 
178 
179 
185 typedef struct ServiceJobSet
186 {
189 
192 
193 
194 } ServiceJobSet;
195 
196 
197 #ifdef __cplusplus
198 extern "C"
199 {
200 #endif
201 
202 
210 
211 
224 
225 
251 GRASSROOTS_SERVICE_API ServiceJob *AllocateServiceJob (struct Service *service_p, const char *job_name_s, const char *job_description_s, bool (*update_fn) (struct ServiceJob *job_p), bool (*calculate_results_fn) (struct ServiceJob *job_p), void (*free_job_fn) (struct ServiceJob *job_p), const char *job_type_s);
252 
253 
254 
279 GRASSROOTS_SERVICE_API ServiceJob *CreateAndAddServiceJobToService (struct Service *service_p, const char *job_name_s, const char *job_description_s, bool (*update_fn) (struct ServiceJob *job_p), bool (*calculate_results_fn) (struct ServiceJob *job_p), void (*free_job_fn) (struct ServiceJob *job_p));
280 
281 
308 GRASSROOTS_SERVICE_API bool InitServiceJob (ServiceJob *job_p, struct Service *service_p, const char *job_name_s, const char *job_description_s, bool (*update_fn) (struct ServiceJob *job_p), bool (*calculate_results_fn) (struct ServiceJob *job_p), void (*free_job_fn) (struct ServiceJob *job_p), uuid_t *id_p, const char *job_type_s);
309 
310 
318 
319 
328 
329 
338 GRASSROOTS_SERVICE_API bool CopyServiceJob (const ServiceJob *src_p, ServiceJob *dest_p);
339 
340 
349 
350 
361 
362 
363 GRASSROOTS_SERVICE_API bool IsServiceJobInServiceJobSet (const ServiceJobSet *job_set_p, const ServiceJob *job_p);
364 
365 
376 
377 
390 
391 
403 
404 
405 
415 GRASSROOTS_SERVICE_API bool SetServiceJobDescription (ServiceJob *job_p, const char * const description_s);
416 
417 
418 
419 
429 GRASSROOTS_SERVICE_API bool SetServiceJobURL (ServiceJob *job_p, const char * const url_s);
430 
431 
441 GRASSROOTS_SERVICE_API bool SetServiceJobName (ServiceJob *job_p, const char * const name_s);
442 
443 
453 
454 
455 
467 GRASSROOTS_SERVICE_API ServiceJobSet *AllocateSimpleServiceJobSet (struct Service *service_p, const char *job_name_s, const char *job_description_s);
468 
469 
477 
478 
479 
488 
489 
496 GRASSROOTS_SERVICE_API void FreeServiceJobNode (ListItem *service_job_node_p);
497 
498 
509 
510 
521 GRASSROOTS_SERVICE_API json_t *GetServiceJobSetAsJSON (const ServiceJobSet *jobs_p, bool omit_results_flag);
522 
523 
534 GRASSROOTS_SERVICE_API json_t *GetServiceJobAsJSON (ServiceJob * const job_p, bool omit_results_flag);
535 
536 
547 GRASSROOTS_SERVICE_API json_t *GetServiceJobStatusAsJSON (ServiceJob *job_p, bool omit_results_flag);
548 
549 
562 GRASSROOTS_SERVICE_API bool ProcessServiceJobSet (ServiceJobSet *jobs_p, json_t *res_p);
563 
564 
578 GRASSROOTS_SERVICE_API ServiceJob *CreateServiceJobFromJSON (const json_t *job_json_p, GrassrootsServer *grassroots_p);
579 
580 
590 GRASSROOTS_SERVICE_API bool InitServiceJobFromJSON (ServiceJob *job_p, const json_t *json_p, struct Service *service_p, GrassrootsServer *grassroots_p);
591 
592 
604 
605 
619 
620 
628 GRASSROOTS_SERVICE_API const char *GetServiceJobName (const ServiceJob *job_p);
629 
630 
642 
643 
654 
662 GRASSROOTS_SERVICE_API uint32 GetServiceJobSetSize (const ServiceJobSet * const jobs_p);
663 
664 
676 GRASSROOTS_SERVICE_API void ClearServiceJobResults (ServiceJob *job_p, bool free_memory_flag);
677 
678 
693 GRASSROOTS_SERVICE_API char *SerialiseServiceJobToJSON (ServiceJob * const job_p, bool omit_results_flag);
694 
695 
713 GRASSROOTS_SERVICE_API ServiceJob *CreateServiceJobFromResultsJSON (const json_t *results_p, struct Service *service_p, const char *name_s, const char *description_s, OperationStatus status, const char *job_type_s);
714 
715 
716 
731 GRASSROOTS_SERVICE_API bool InitServiceJobFromResultsJSON (ServiceJob *job_p, const json_t *results_p, struct Service *service_p, const char *name_s, const char *description_s, OperationStatus status, const char *job_type_s);
732 
733 
745 GRASSROOTS_SERVICE_API bool AddParameterErrorMessageToServiceJob (ServiceJob *job_p, const char * const param_s, const ParameterType param_type, const char * const value_s);
746 
747 
758 GRASSROOTS_SERVICE_API bool AddGeneralErrorMessageToServiceJob (ServiceJob *job_p, const char * const value_s);
759 
760 
771 GRASSROOTS_SERVICE_API bool AddCompoundErrorToServiceJob (ServiceJob *job_p, const char *param_s, const ParameterType param_type, json_t *error_details_p);
772 
773 
774 GRASSROOTS_SERVICE_API bool AddTabularParameterErrorMessageToServiceJob (ServiceJob *job_p, const char * const param_s, const ParameterType param_type, const char * const value_s, const uint32 row, const char *column_s);
775 
776 
786 GRASSROOTS_SERVICE_API bool AddResultToServiceJob (ServiceJob *job_p, json_t *result_p);
787 
788 
789 
798 
799 
807 GRASSROOTS_SERVICE_API void SetServiceJobUpdateFunction (ServiceJob *job_p, bool (*update_fn) (ServiceJob *job_p));
808 
809 
817 GRASSROOTS_SERVICE_API void SetServiceJobFreeFunction (ServiceJob *job_p, void (*free_fn) (ServiceJob *job_p));
818 
819 
820 
828 GRASSROOTS_SERVICE_API void SetServiceJobCalculateResultFunction (ServiceJob *job_p, bool (*calculate_fn) (ServiceJob *job_p));
829 
830 
831 
846 
847 
856 
857 
868 GRASSROOTS_SERVICE_API bool ReplaceServiceJobResults (ServiceJob *job_p, json_t *results_p);
869 
870 
882 GRASSROOTS_SERVICE_API bool AddLinkedServiceToServiceJob (ServiceJob *job_p, struct LinkedService *linked_service_p);
883 
893 
894 
903 
904 
912 GRASSROOTS_SERVICE_API void SetServiceJobUUID (ServiceJob *job_p, const uuid_t new_job_id);
913 
914 
915 
916 GRASSROOTS_SERVICE_LOCAL int32 GetNumberOfLiveJobsFromServiceJobSet (const ServiceJobSet *jobs_p);
917 
918 
919 
920 GRASSROOTS_SERVICE_LOCAL bool GetOperationStatusFromServiceJobJSON (const json_t *value_p, OperationStatus *status_p);
921 
922 
931 
932 
933 #ifdef __cplusplus
934 }
935 #endif
936 
937 
938 
939 #endif /* SERVICE_JOB_H_ */
ServiceJob::GetCachedServiceJobStatus
OperationStatus GetCachedServiceJobStatus(const ServiceJob *job_p)
Get the last retrieved OperationStatus of a ServiceJob.
ServiceJobNode::sjn_job_p
ServiceJob * sjn_job_p
The ServiceJob.
Definition: service_job.h:175
ServiceJobNode
A datatype used to store a ServiceJob within a ServceJobSet using a LinkedList.
Definition: service_job.h:169
ServiceJobNode::FreeServiceJobNode
void FreeServiceJobNode(ListItem *service_job_node_p)
Free a ServiceJobNode.
linked_service.h
ServiceJobSet::GetServiceJobSetAsJSON
json_t * GetServiceJobSetAsJSON(const ServiceJobSet *jobs_p, bool omit_results_flag)
Get the json representation of a ServiceJobSet.
ServiceJob::CalculateServiceJobResult
bool CalculateServiceJobResult(ServiceJob *job_p)
Calculate the results for the given ServiceJob.
ServiceJob::sj_name_s
char * sj_name_s
The name of the ServiceJob.
Definition: service_job.h:87
ServiceJob::AddCompoundErrorToServiceJob
bool AddCompoundErrorToServiceJob(ServiceJob *job_p, const char *param_s, const ParameterType param_type, json_t *error_details_p)
Add a key-value pair error statement to a ServiceJob.
ParameterType
ParameterType
The different types that a Parameter can take.
Definition: parameter_type.h:35
ServiceJob::ClearServiceJob
void ClearServiceJob(ServiceJob *job_p)
Clear a Service Job ready for reuse.
ServiceJob
A datatype to represent a running task.
Definition: service_job.h:72
grassroots_service_library.h
GRASSROOTS_SERVICE_API
#define GRASSROOTS_SERVICE_API
Definition: grassroots_service_library.h:49
operation.h
ServiceJob::sj_description_s
char * sj_description_s
The description of the ServiceJob.
Definition: service_job.h:90
ServiceJob::sj_url_s
char * sj_url_s
Any user-facing URL for showing results of running this ServiceJob.
Definition: service_job.h:93
ServiceJob::SetServiceJobURL
bool SetServiceJobURL(ServiceJob *job_p, const char *const url_s)
Set the description of ServiceJob.
ServiceJob::SetServiceJobFreeFunction
void SetServiceJobFreeFunction(ServiceJob *job_p, void(*free_fn)(ServiceJob *job_p))
Set the function that a ServiceJob will use to free itself.
ServiceJob::AddGeneralErrorMessageToServiceJob
bool AddGeneralErrorMessageToServiceJob(ServiceJob *job_p, const char *const value_s)
Add a key-value pair error statement to a ServiceJob.
ServiceJob::CloseServiceJob
bool CloseServiceJob(ServiceJob *job_p)
Close a ServiceJob.
ServiceJob::SetServiceJobUUID
void SetServiceJobUUID(ServiceJob *job_p, const uuid_t new_job_id)
Replace the uuid for a given ServiceJob.
ServiceJob::sj_id
uuid_t sj_id
The unique identifier for this job.
Definition: service_job.h:78
ServiceJob::AddResultToServiceJob
bool AddResultToServiceJob(ServiceJob *job_p, json_t *result_p)
Add a result to ServiceJob.
ServiceJob::ClearServiceJobResults
void ClearServiceJobResults(ServiceJob *job_p, bool free_memory_flag)
Clear the results associated with a ServiceJob.
ServiceJob::sj_service_p
struct Service * sj_service_p
The Service that is running this job.
Definition: service_job.h:75
ServiceJob::FreeBaseServiceJob
void FreeBaseServiceJob(ServiceJob *job_p)
Free a ServiceJob ignoring if it is a subclass.
GRASSROOTS_SERVICE_LOCAL
#define GRASSROOTS_SERVICE_LOCAL
Definition: grassroots_service_library.h:50
ServiceJobSet::RemoveServiceJobFromServiceJobSet
bool RemoveServiceJobFromServiceJobSet(ServiceJobSet *job_set_p, ServiceJob *job_p)
Remove a ServiceJob from a ServiceJobSet.
ServiceJobSet::sjs_service_p
struct Service * sjs_service_p
The Service that is running these jobs.
Definition: service_job.h:188
ServiceJob::SetServiceJobStatus
void SetServiceJobStatus(ServiceJob *job_p, OperationStatus status)
Set the current OperationStatus for a given ServiceJob.
uuid_defs.h
MergeServiceJobStatus
void MergeServiceJobStatus(ServiceJob *job_p, OperationStatus status)
For a given ServiceJob that is running multiple tasks, update its status to reflect the given status ...
ServiceJob::sj_is_updating_flag
bool sj_is_updating_flag
Is this ServiceJob in the process of updating itself?
Definition: service_job.h:149
ServiceJob::AddLinkedServiceToServiceJob
bool AddLinkedServiceToServiceJob(ServiceJob *job_p, struct LinkedService *linked_service_p)
Add a LinkedService to ServiceJob.
Service
A datatype which defines an available service, its capabilities and its parameters.
Definition: service.h:153
ServiceJob::GetServiceFromServiceJob
struct Service * GetServiceFromServiceJob(ServiceJob *job_p)
Get the owning Service for a given ServiceJob.
typedefs.h
ServiceJob::FreeServiceJob
void FreeServiceJob(ServiceJob *job_p)
Free a ServiceJob.
ServiceJob::GetNumberOfServiceJobResults
uint32 GetNumberOfServiceJobResults(const ServiceJob *job_p)
Get the number of results stored on a ServiceJob.
ServiceJob::SetServiceJobName
bool SetServiceJobName(ServiceJob *job_p, const char *const name_s)
Set the name of ServiceJob.
ServiceJob::InitServiceJobFromResultsJSON
bool InitServiceJobFromResultsJSON(ServiceJob *job_p, const json_t *results_p, struct Service *service_p, const char *name_s, const char *description_s, OperationStatus status, const char *job_type_s)
Fill in the data for a ServiceJob from a given JSON fragement.
ServiceJob::CopyServiceJob
bool CopyServiceJob(const ServiceJob *src_p, ServiceJob *dest_p)
Make a deep copy of one ServiceJob to another.
LinkedList
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
ServiceJob::AddParameterErrorMessageToServiceJob
bool AddParameterErrorMessageToServiceJob(ServiceJob *job_p, const char *const param_s, const ParameterType param_type, const char *const value_s)
Add a key-value pair error statement to a ServiceJob.
ServiceJobSet::FindServiceJobNodeInServiceJobSet
ServiceJobNode * FindServiceJobNodeInServiceJobSet(const ServiceJobSet *job_set_p, const ServiceJob *job_p)
Find the ServiceJobNode for a given ServiceJob within a ServiceJobSet.
LinkedService
This datatype stores the data needed to get the required information from the output of one Service t...
Definition: linked_service.h:50
ServiceJob::InitServiceJobFromJSON
bool InitServiceJobFromJSON(ServiceJob *job_p, const json_t *json_p, struct Service *service_p, GrassrootsServer *grassroots_p)
Get a ServiceJob from a json_t object.
OperationStatus
OperationStatus
The current status of an Operation.
Definition: operation.h:96
ServiceJob::sj_linked_services_p
json_t * sj_linked_services_p
A JSON array where each object contains the details of running a different Service based upon the res...
Definition: service_job.h:117
ServiceJobSet::sjs_jobs_p
LinkedList * sjs_jobs_p
The ServiceJobs that are in use for the Service.
Definition: service_job.h:191
ServiceJobNode::sjn_node
ListItem sjn_node
The node used to hold this in a LinkedList.
Definition: service_job.h:172
AddTabularParameterErrorMessageToServiceJob
bool AddTabularParameterErrorMessageToServiceJob(ServiceJob *job_p, const char *const param_s, const ParameterType param_type, const char *const value_s, const uint32 row, const char *column_s)
GrassrootsServer
Definition: grassroots_server.h:45
ServiceJobSet
A datatype to represent a collection of ServiceJobs.
Definition: service_job.h:185
ServiceJobSet::FindServiceJobNodeByUUIDInServiceJobSet
ServiceJobNode * FindServiceJobNodeByUUIDInServiceJobSet(const ServiceJobSet *job_set_p, const uuid_t job_id)
Find the ServiceJobNode for a ServiceJob with a given uuid within a ServiceJobSet.
ServiceJobSet::GetServiceJobFromServiceJobSetById
ServiceJob * GetServiceJobFromServiceJobSetById(const ServiceJobSet *jobs_p, const uuid_t job_id)
Search a ServiceJobSet for ServiceJob.
ServiceJobSet::AllocateSimpleServiceJobSet
ServiceJobSet * AllocateSimpleServiceJobSet(struct Service *service_p, const char *job_name_s, const char *job_description_s)
Allocate a ServiceJobSet and populate it with a single ServiceJob.
ServiceJob::CreateServiceJobFromResultsJSON
ServiceJob * CreateServiceJobFromResultsJSON(const json_t *results_p, struct Service *service_p, const char *name_s, const char *description_s, OperationStatus status, const char *job_type_s)
Create a ServiceJob from a JSON Resource fragment.
ServiceJob::ProcessLinkedServices
void ProcessLinkedServices(ServiceJob *job_p)
Attempt to extract the relevant data for all LinkedServices that the ServiceJob's Service has and sto...
IsServiceJobInServiceJobSet
bool IsServiceJobInServiceJobSet(const ServiceJobSet *job_set_p, const ServiceJob *job_p)
ServiceJob::GetServiceJobStatus
OperationStatus GetServiceJobStatus(ServiceJob *job_p)
Get the Current OperationStatus of a ServiceJob.
ServiceJob::SetServiceJobDescription
bool SetServiceJobDescription(ServiceJob *job_p, const char *const description_s)
Set the description of ServiceJob.
ServiceJob::CloneServiceJob
ServiceJob * CloneServiceJob(const ServiceJob *src_p)
Create a deep copy of a ServiceJob.
memory_allocations.h
ServiceJob::sj_metadata_p
json_t * sj_metadata_p
The JSON fragment for any extra information for this ServiceJob.
Definition: service_job.h:103
ServiceJob::sj_type_s
char * sj_type_s
The type of ServiceJob.
Definition: service_job.h:158
ServiceJob::UpdateServiceJob
bool UpdateServiceJob(ServiceJob *job_p)
Update, if appropriate, a given ServiceJob.
linked_list.h
A doubly-linked list.
ServiceJob::sj_result_p
json_t * sj_result_p
The JSON fragment for the results of this ServiceJob.
Definition: service_job.h:98
ServiceJob::sj_errors_p
json_t * sj_errors_p
The JSON fragment for any errors that have occurred whilst running this ServiceJob.
Definition: service_job.h:109
ServiceJob::sj_calculate_result_fn
bool(* sj_calculate_result_fn)(struct ServiceJob *job_p)
The callback function to use when a ServiceJob needs to generate its results This is useful for subcl...
Definition: service_job.h:142
ServiceJob::SetServiceJobUpdateFunction
void SetServiceJobUpdateFunction(ServiceJob *job_p, bool(*update_fn)(ServiceJob *job_p))
Set the function that a ServiceJob will use to update itself.
ServiceJob::AllocateServiceJob
ServiceJob * AllocateServiceJob(struct Service *service_p, const char *job_name_s, const char *job_description_s, bool(*update_fn)(struct ServiceJob *job_p), bool(*calculate_results_fn)(struct ServiceJob *job_p), void(*free_job_fn)(struct ServiceJob *job_p), const char *job_type_s)
Allocate a ServiceJob.
ServiceJobSet::GetServiceJobSetSize
uint32 GetServiceJobSetSize(const ServiceJobSet *const jobs_p)
Get the number of ServiceJobs in a ServiceJobSet.
ServiceJobNode::AllocateServiceJobNode
ServiceJobNode * AllocateServiceJobNode(ServiceJob *job_p)
Allocate a ServiceJobNode.
ServiceJob::CreateServiceJobFromJSON
ServiceJob * CreateServiceJobFromJSON(const json_t *job_json_p, GrassrootsServer *grassroots_p)
Create a ServiceJob from a json_t object.
ServiceJobSet::FreeServiceJobSet
void FreeServiceJobSet(ServiceJobSet *job_set_p)
Free a ServiceJobSet.
ServiceJob::GetServiceJobAsJSON
json_t * GetServiceJobAsJSON(ServiceJob *const job_p, bool omit_results_flag)
Get a ServiceJob as JSON.
ServiceJobSet::AllocateServiceJobSet
ServiceJobSet * AllocateServiceJobSet(struct Service *service_p)
Allocate a ServiceJobSet.
ServiceJob::SerialiseServiceJobToJSON
char * SerialiseServiceJobToJSON(ServiceJob *const job_p, bool omit_results_flag)
Save the ServiceJob to a persistent format that allows the ServiceJob to be recreated in a potentiall...
ServiceJob::sj_status
enum OperationStatus sj_status
Is the service currently in an open state?
Definition: service_job.h:81
ServiceJob::GetServiceJobStatusAsJSON
json_t * GetServiceJobStatusAsJSON(ServiceJob *job_p, bool omit_results_flag)
Get the Current OperationStatus of a ServiceJob as JSON.
ServiceJob::SetServiceJobCalculateResultFunction
void SetServiceJobCalculateResultFunction(ServiceJob *job_p, bool(*calculate_fn)(ServiceJob *job_p))
Set the function that a ServiceJob will use to calculate its results.
ServiceJob::sj_free_fn
void(* sj_free_fn)(struct ServiceJob *job_p)
The callback function to use when freeing this ServiceJob.
Definition: service_job.h:133
ServiceJob::CreateAndAddServiceJobToService
ServiceJob * CreateAndAddServiceJobToService(struct Service *service_p, const char *job_name_s, const char *job_description_s, bool(*update_fn)(struct ServiceJob *job_p), bool(*calculate_results_fn)(struct ServiceJob *job_p), void(*free_job_fn)(struct ServiceJob *job_p))
Allocate a ServiceJob and add it to a ServiceJobSet.
ServiceJob::sj_update_fn
bool(* sj_update_fn)(struct ServiceJob *job_p)
The callback function to use when checking the status of this ServiceJob.
Definition: service_job.h:125
ServiceJob::GetServiceJobName
const char * GetServiceJobName(const ServiceJob *job_p)
Get the name of ServiceJob.
ServiceJob::InitServiceJob
bool InitServiceJob(ServiceJob *job_p, struct Service *service_p, const char *job_name_s, const char *job_description_s, bool(*update_fn)(struct ServiceJob *job_p), bool(*calculate_results_fn)(struct ServiceJob *job_p), void(*free_job_fn)(struct ServiceJob *job_p), uuid_t *id_p, const char *job_type_s)
Initialise a ServiceJob.
SJ_DEFAULT_TYPE_S
const SERVICE_JOB_PREFIX char * SJ_DEFAULT_TYPE_S
The default type id for ServiceJobs.
Definition: service_job.h:62
ServiceJobSet::GetServiceJobFromServiceJobSet
ServiceJob * GetServiceJobFromServiceJobSet(const ServiceJobSet *jobs_p, const uint32 index)
Get the ServiceJob at a particular position in a ServiceJobSet.
ServiceJobSet::ProcessServiceJobSet
bool ProcessServiceJobSet(ServiceJobSet *jobs_p, json_t *res_p)
Process all ServiceJobs within a ServiceJobSet.
ServiceJob::ReplaceServiceJobResults
bool ReplaceServiceJobResults(ServiceJob *job_p, json_t *results_p)
Replace the set of results for a given ServiceJob.
ServiceJobSet::RemoveServiceJobByUUIDFromServiceJobSet
bool RemoveServiceJobByUUIDFromServiceJobSet(ServiceJobSet *job_set_p, uuid_t job_id)
Remove a ServiceJob with a given uuid from a ServiceJobSet.
ListItem
A doubly-linked node that points to its predecessor and successor.
Definition: linked_list.h:43
uuid_t
Definition: windows_uuid.h:43
ServiceJob::sj_service_name_s
char * sj_service_name_s
The name of the Service that this ServiceJob is for.
Definition: service_job.h:84