example_interface.h

1 /*
2  * ====================== WARNING ======================
3  *
4  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
5  * DO NOT MODIFY IN ANY WAY.
6  *
7  * ====================== WARNING ======================
8  */
9 
10 /**
11  * Example API file
12  */
13 
14 #ifndef EXAMPLE_H_INCLUDE_GUARD
15 #define EXAMPLE_H_INCLUDE_GUARD
16 
17 
18 #include "legato.h"
19 
20 // Interface specific includes
21 #include "defn_interface.h"
22 #include "common_interface.h"
23 
24 
25 //--------------------------------------------------------------------------------------------------
26 /**
27  * Connect the client to the service
28  */
29 //--------------------------------------------------------------------------------------------------
30 void example_ConnectService
31 (
32  void
33 );
34 
35 //--------------------------------------------------------------------------------------------------
36 /**
37  * Disconnect the client from the service
38  */
39 //--------------------------------------------------------------------------------------------------
40 void example_DisconnectService
41 (
42  void
43 );
44 
45 
46 //--------------------------------------------------------------------------------------------------
47 
48 //--------------------------------------------------------------------------------------------------
49 #define EXAMPLE_TEN 10
50 
51 
52 //--------------------------------------------------------------------------------------------------
53 
54 //--------------------------------------------------------------------------------------------------
55 #define EXAMPLE_TWENTY 20
56 
57 
58 //--------------------------------------------------------------------------------------------------
59 
60 //--------------------------------------------------------------------------------------------------
61 #define EXAMPLE_SOME_STRING "some string"
62 
63 
64 //--------------------------------------------------------------------------------------------------
65 /**
66  * Reference type used by Add/Remove functions for EVENT 'example_TestA'
67  */
68 //--------------------------------------------------------------------------------------------------
69 typedef struct example_TestAHandler* example_TestAHandlerRef_t;
70 
71 
72 //--------------------------------------------------------------------------------------------------
73 /**
74  * Handler definition
75  *
76  * @param x
77  * First parameter for the handler
78  * Second comment line
79  * @param contextPtr
80  */
81 //--------------------------------------------------------------------------------------------------
82 typedef void (*example_TestAHandlerFunc_t)
83 (
84  int32_t x,
85  void* contextPtr
86 );
87 
88 //--------------------------------------------------------------------------------------------------
89 /**
90  * Add handler function for EVENT 'example_TestA'
91  *
92  * This event provides an example of an EVENT definition
93  */
94 //--------------------------------------------------------------------------------------------------
95 example_TestAHandlerRef_t example_AddTestAHandler
96 (
97  uint32_t data,
98  ///< [IN]
99  ///< Used when registering the handler i.e. it is
100  ///< passed into the generated ADD_HANDLER function.
101 
102  example_TestAHandlerFunc_t handlerPtr,
103  ///< [IN]
104 
105  void* contextPtr
106  ///< [IN]
107 );
108 
109 //--------------------------------------------------------------------------------------------------
110 /**
111  * Remove handler function for EVENT 'example_TestA'
112  */
113 //--------------------------------------------------------------------------------------------------
114 void example_RemoveTestAHandler
115 (
116  example_TestAHandlerRef_t addHandlerRef
117  ///< [IN]
118 );
119 
120 //--------------------------------------------------------------------------------------------------
121 /**
122  * Function takes all the possible kinds of parameters, but returns nothing
123  */
124 //--------------------------------------------------------------------------------------------------
125 void example_AllParameters
126 (
127  common_EnumExample_t a,
128  ///< [IN]
129  ///< first one-line comment
130  ///< second one-line comment
131 
132  uint32_t* bPtr,
133  ///< [OUT]
134 
135  const uint32_t* dataPtr,
136  ///< [IN]
137 
138  size_t dataNumElements,
139  ///< [IN]
140 
141  uint32_t* outputPtr,
142  ///< [OUT]
143  ///< some more comments here
144  ///< and some comments here as well
145 
146  size_t* outputNumElementsPtr,
147  ///< [INOUT]
148 
149  const char* label,
150  ///< [IN]
151 
152  char* response,
153  ///< [OUT]
154  ///< comments on final parameter, first line
155  ///< and more comments
156 
157  size_t responseNumElements
158  ///< [IN]
159 );
160 
161 //--------------------------------------------------------------------------------------------------
162 /**
163  * Test file descriptors as IN and OUT parameters
164  */
165 //--------------------------------------------------------------------------------------------------
166 void example_FileTest
167 (
168  int dataFile,
169  ///< [IN]
170  ///< file descriptor as IN parameter
171 
172  int* dataOutPtr
173  ///< [OUT]
174  ///< file descriptor as OUT parameter
175 );
176 
177 //--------------------------------------------------------------------------------------------------
178 /**
179  * Function that takes a handler parameter
180  */
181 //--------------------------------------------------------------------------------------------------
182 int32_t example_UseCallback
183 (
184  uint32_t someParm,
185  ///< [IN]
186 
187  example_TestAHandlerFunc_t handlerPtr,
188  ///< [IN]
189 
190  void* contextPtr
191  ///< [IN]
192 );
193 
194 
195 #endif // EXAMPLE_H_INCLUDE_GUARD
196