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.
samtools_service.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 #ifndef SAMTOOLS_SERVICE_H
22 #define SAMTOOLS_SERVICE_H
23 
24 #include "service.h"
25 #include "library.h"
26 
27 /*
28 ** Now we use the generic helper definitions above to define LIB_API and LIB_LOCAL.
29 ** LIB_API is used for the public API symbols. It either DLL imports or DLL exports
30 ** (or does nothing for static build)
31 ** LIB_LOCAL is used for non-api symbols.
32 */
33 
34 
35 
36 
37 #ifdef SHARED_LIBRARY /* defined if LIB is compiled as a DLL */
38  #ifdef SAMTOOLS_LIBRARY_EXPORTS /* defined if we are building the LIB DLL (instead of using it) */
39  #define SAMTOOLS_SERVICE_API LIB_HELPER_SYMBOL_EXPORT
40  #else
41  #define SAMTOOLS_SERVICE_API LIB_HELPER_SYMBOL_IMPORT
42  #endif /* #ifdef SAMTOOLS_LIBRARY_EXPORTS */
43  #define SAMTOOLS_SERVICE_LOCAL LIB_HELPER_SYMBOL_LOCAL
44 #else /* SHARED_LIBRARY is not defined: this means LIB is a static lib. */
45  #define SAMTOOLS_SERVICE_API
46  #define SAMTOOLS_SERVICE_LOCAL
47 #endif /* #ifdef SHARED_LIBRARY */
48 
49 
50 
51 /*
52  * The following preprocessor macros allow us to declare
53  * and define the variables in the same place. By default,
54  * they will expand to
55  *
56  * extern const char *SERVICE_NAME_S;
57  *
58  * however if ALLOCATE_JSON_TAGS is defined then it will
59  * become
60  *
61  * const char *SERVICE_NAME_S = "path";
62  *
63  * ALLOCATE_SAMTOOLS_TAGS must be defined only once prior to
64  * including this header file. Currently this happens in
65  * samtools_service.c.
66  */
67 #ifndef DOXYGEN_SHOULD_SKIP_THIS
68 
69 #ifdef ALLOCATE_SAMTOOLS_TAGS
70  #define SAMTOOLS_PREFIX SAMTOOLS_SERVICE_API
71  #define SAMTOOLS_VAL(x,y) = { x, y}
72 #else
73  #define SAMTOOLS_PREFIX extern
74  #define SAMTOOLS_VAL(x,y)
75 #endif
76 
77 #endif /* #ifndef DOXYGEN_SHOULD_SKIP_THIS */
78 
84 SAMTOOLS_PREFIX NamedParameterType SS_INDEX SAMTOOLS_VAL ("input_file", PT_STRING);
85 
86 
87 #ifdef __cplusplus
88 extern "C"
89 {
90 #endif
91 
101 SAMTOOLS_SERVICE_API ServicesArray *GetServices (UserDetails *user_p, GrassrootsServer *grassroots_p);
102 
103 
111 
112 #ifdef __cplusplus
113 }
114 #endif
115 
116 
117 
118 #endif /* #ifndef SAMTOOLS_SERVICE_H */
SS_INDEX
NamedParameterType SS_INDEX
The NamedParamaterType specifying the input file that the Samtools service will use.
Definition: samtools_service.h:84
SAMTOOLS_SERVICE_API
#define SAMTOOLS_SERVICE_API
Definition: samtools_service.h:45
NamedParameterType
This is a datatype that stores a read-only c-style string along with a ParameterType.
Definition: parameter.h:85
service.h
PT_STRING
A c-style string.
Definition: parameter_type.h:58
ReleaseServices
void ReleaseServices(ServicesArray *services_p)
Free the ServicesArray containing the SamTools Services.
ServicesArray
A datatype for having a set of Services.
Definition: service.h:422
library.h
GrassrootsServer
Definition: grassroots_server.h:45
GetServices
ServicesArray * GetServices(UserDetails *user_p, GrassrootsServer *grassroots_p)
Get the ServicesArray containing the SamTools Services.