1 /*
2 * Copyright 1999-2006 University of Chicago
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
17
18 #include "PausableSubscriptionManagerService_skeleton.h"
19 #include "PausableSubscriptionManagerService_internal_skeleton.h"
20 #include "globus_notification_producer.h"
21
22 #define GLOBUS_WSNT_SUBSCRIPTIONMANAGER_PROVIDER \
23 "globus_wsnt_SubscriptionManager_provider"
24 #define GLOBUS_WSNT_PAUSABLESUBSCRIPTIONMANAGER_PROVIDER \
25 "globus_wsnt_PausableSubscriptionManager_provider"
26
27 static
28 xsd_QName
29 globus_l_subcription_manager_Renew_provider_qname =
30 {
31 "http://docs.oasis-open.org/wsn/bw-2/providers",
32 "Renew"
33 };
34
35 static
36 xsd_QName
37 globus_l_subcription_manager_Unsubscribe_provider_qname =
38 {
39 "http://docs.oasis-open.org/wsn/bw-2/providers",
40 "Unsubscribe"
41 };
42
43 static
44 xsd_QName
45 globus_l_subcription_manager_PauseSubscription_provider_qname =
46 {
47 "http://docs.oasis-open.org/wsn/bw-2/providers",
48 "PauseSubscription"
49 };
50
51 static
52 xsd_QName
53 globus_l_subcription_manager_ResumeSubscription_provider_qname =
54 {
55 "http://docs.oasis-open.org/wsn/bw-2/providers",
56 "ResumeSubscription"
57 };
58
59 globus_result_t
60 PausableSubscriptionManagerService_init(
61 globus_service_descriptor_t * service_desc)
62 23 {
63 globus_result_t result;
64
65 GlobusFuncName(PausableSubscriptionManagerService_init);
66 23 PausableSubscriptionManagerServiceDebugEnter();
67
68 23 result = globus_module_activate(GLOBUS_NOTIFICATION_PRODUCER_MODULE);
69 23 if (result != GLOBUS_SUCCESS)
70 {
71 0 goto out;
72 }
73
74 23 result = globus_extension_activate(GLOBUS_WSNT_SUBSCRIPTIONMANAGER_PROVIDER);
75 23 if (result != GLOBUS_SUCCESS)
76 {
77 0 goto deactivate_out;
78 }
79 23 result = globus_extension_activate(GLOBUS_WSNT_PAUSABLESUBSCRIPTIONMANAGER_PROVIDER);
80 23 if (result != GLOBUS_SUCCESS)
81 {
82 0 goto deactivate_extension_out;
83 }
84
85 23 result = globus_operation_table_add_provider(
86 service_desc->operations,
87 &globus_l_subcription_manager_Renew_provider_qname);
88 23 if (result != GLOBUS_SUCCESS)
89 {
90 0 goto deactivate_pausable_extension_out;
91 }
92 23 result = globus_operation_table_add_provider(
93 service_desc->operations,
94 &globus_l_subcription_manager_Unsubscribe_provider_qname);
95 23 if (result != GLOBUS_SUCCESS)
96 {
97 0 goto deactivate_pausable_extension_out;
98 }
99
100 23 result = globus_operation_table_add_provider(
101 service_desc->operations,
102 &globus_l_subcription_manager_PauseSubscription_provider_qname);
103 23 if (result != GLOBUS_SUCCESS)
104 {
105 0 goto deactivate_pausable_extension_out;
106 }
107 23 result = globus_operation_table_add_provider(
108 service_desc->operations,
109 &globus_l_subcription_manager_ResumeSubscription_provider_qname);
110 23 if (result != GLOBUS_SUCCESS)
111 {
112 0 goto deactivate_pausable_extension_out;
113 }
114
115 23 if (result != GLOBUS_SUCCESS)
116 {
117 0 deactivate_pausable_extension_out:
118 0 globus_extension_deactivate(GLOBUS_WSNT_PAUSABLESUBSCRIPTIONMANAGER_PROVIDER);
119 0 deactivate_extension_out:
120 0 globus_extension_deactivate(GLOBUS_WSNT_SUBSCRIPTIONMANAGER_PROVIDER);
121 0 deactivate_out:
122 0 globus_module_activate(GLOBUS_NOTIFICATION_PRODUCER_MODULE);
123 }
124
125 23 out:
126 23 PausableSubscriptionManagerServiceDebugExit();
127 23 return GLOBUS_SUCCESS;
128 }
129
130 globus_result_t
131 PausableSubscriptionManagerService_finalize(
132 globus_service_descriptor_t * service_desc)
133 0 {
134 globus_result_t result1;
135 globus_result_t result2;
136 globus_result_t result3;
137
138 GlobusFuncName(PausableSubscriptionManagerService_finalize);
139 0 PausableSubscriptionManagerServiceDebugEnter();
140
141 0 result1 = globus_extension_deactivate(GLOBUS_WSNT_PAUSABLESUBSCRIPTIONMANAGER_PROVIDER);
142 0 result2 = globus_extension_deactivate(GLOBUS_WSNT_SUBSCRIPTIONMANAGER_PROVIDER);
143 0 result3 = globus_module_deactivate(GLOBUS_NOTIFICATION_PRODUCER_MODULE);
144
145 0 PausableSubscriptionManagerServiceDebugExit();
146 0 return result1 ? result1 : (result2 ? result2 : result3);
147 }
148
149
150
151 globus_result_t
152 PausableSubscriptionManager_Destroy_impl(
153 globus_service_engine_t engine,
154 globus_soap_message_handle_t message,
155 globus_service_descriptor_t * descriptor,
156 wsrl_DestroyType * Destroy,
157 wsrl_DestroyResponseType * DestroyResponse,
158 xsd_any * fault)
159 0 {
160 /* add function local variable declarations here */
161 0 globus_result_t result = GLOBUS_SUCCESS;
162
163 /* initialize trace debugging info */
164 GlobusFuncName(PausableSubscriptionManager_Destroy_impl);
165 0 PausableSubscriptionManagerServiceDebugEnter();
166
167 /* This is where it all happens. Service implementer must
168 * implmenent this function. Asume that Destroy has
169 * been initialized and filled with request values.
170 * DestroyResponse must be set by the implementer.
171 */
172
173 /* do not use GLOBUS_FAILURE, you the error object construction api */
174 0 result = PausableSubscriptionManagerServiceErrorNotImplemented("PausableSubscriptionManager_Destroy");
175
176 0 PausableSubscriptionManagerServiceDebugExit();
177 0 return result;
178 }
179
180
181
182 globus_result_t
183 PausableSubscriptionManager_ResumeSubscription_impl(
184 globus_service_engine_t engine,
185 globus_soap_message_handle_t message,
186 globus_service_descriptor_t * descriptor,
187 wsnt_ResumeSubscriptionType * ResumeSubscription,
188 wsnt_ResumeSubscriptionResponseType * ResumeSubscriptionResponse,
189 xsd_any * fault)
190 0 {
191 /* add function local variable declarations here */
192 0 globus_result_t result = GLOBUS_SUCCESS;
193
194 /* initialize trace debugging info */
195 GlobusFuncName(PausableSubscriptionManager_ResumeSubscription_impl);
196 0 PausableSubscriptionManagerServiceDebugEnter();
197
198 /* This is where it all happens. Service implementer must
199 * implmenent this function. Asume that ResumeSubscription has
200 * been initialized and filled with request values.
201 * ResumeSubscriptionResponse must be set by the implementer.
202 */
203
204 /* do not use GLOBUS_FAILURE, you the error object construction api */
205 0 result = PausableSubscriptionManagerServiceErrorNotImplemented("PausableSubscriptionManager_ResumeSubscription");
206
207 0 PausableSubscriptionManagerServiceDebugExit();
208 0 return result;
209 }
210
211
212
213 globus_result_t
214 PausableSubscriptionManager_PauseSubscription_impl(
215 globus_service_engine_t engine,
216 globus_soap_message_handle_t message,
217 globus_service_descriptor_t * descriptor,
218 wsnt_PauseSubscriptionType * PauseSubscription,
219 wsnt_PauseSubscriptionResponseType * PauseSubscriptionResponse,
220 xsd_any * fault)
221 0 {
222 /* add function local variable declarations here */
223 0 globus_result_t result = GLOBUS_SUCCESS;
224
225 /* initialize trace debugging info */
226 GlobusFuncName(PausableSubscriptionManager_PauseSubscription_impl);
227 0 PausableSubscriptionManagerServiceDebugEnter();
228
229 /* This is where it all happens. Service implementer must
230 * implmenent this function. Asume that PauseSubscription has
231 * been initialized and filled with request values.
232 * PauseSubscriptionResponse must be set by the implementer.
233 */
234
235 /* do not use GLOBUS_FAILURE, you the error object construction api */
236 0 result = PausableSubscriptionManagerServiceErrorNotImplemented("PausableSubscriptionManager_PauseSubscription");
237
238 0 PausableSubscriptionManagerServiceDebugExit();
239 0 return result;
240 }
241
242
243
244 globus_result_t
245 PausableSubscriptionManager_Unsubscribe_impl(
246 globus_service_engine_t engine,
247 globus_soap_message_handle_t message,
248 globus_service_descriptor_t * descriptor,
249 wsnt_UnsubscribeType * Unsubscribe,
250 wsnt_UnsubscribeResponseType * UnsubscribeResponse,
251 xsd_any * fault)
252 0 {
253 /* add function local variable declarations here */
254 0 globus_result_t result = GLOBUS_SUCCESS;
255
256 /* initialize trace debugging info */
257 GlobusFuncName(PausableSubscriptionManager_Unsubscribe_impl);
258 0 PausableSubscriptionManagerServiceDebugEnter();
259
260 /* This is where it all happens. Service implementer must
261 * implmenent this function. Asume that Unsubscribe has
262 * been initialized and filled with request values.
263 * UnsubscribeResponse must be set by the implementer.
264 */
265
266 /* do not use GLOBUS_FAILURE, you the error object construction api */
267 0 result = PausableSubscriptionManagerServiceErrorNotImplemented("PausableSubscriptionManager_Unsubscribe");
268
269 0 PausableSubscriptionManagerServiceDebugExit();
270 0 return result;
271 }
272
273
274
275 globus_result_t
276 PausableSubscriptionManager_Renew_impl(
277 globus_service_engine_t engine,
278 globus_soap_message_handle_t message,
279 globus_service_descriptor_t * descriptor,
280 wsnt_RenewType * Renew,
281 wsnt_RenewResponseType * RenewResponse,
282 xsd_any * fault)
283 0 {
284 /* add function local variable declarations here */
285 0 globus_result_t result = GLOBUS_SUCCESS;
286
287 /* initialize trace debugging info */
288 GlobusFuncName(PausableSubscriptionManager_Renew_impl);
289 0 PausableSubscriptionManagerServiceDebugEnter();
290
291 /* This is where it all happens. Service implementer must
292 * implmenent this function. Asume that Renew has
293 * been initialized and filled with request values.
294 * RenewResponse must be set by the implementer.
295 */
296
297 /* do not use GLOBUS_FAILURE, you the error object construction api */
298 0 result = PausableSubscriptionManagerServiceErrorNotImplemented("PausableSubscriptionManager_Renew");
299
300 0 PausableSubscriptionManagerServiceDebugExit();
301 0 return result;
302 }
303
304
305
306 globus_result_t
307 PausableSubscriptionManager_GetResourceProperty_impl(
308 globus_service_engine_t engine,
309 globus_soap_message_handle_t message,
310 globus_service_descriptor_t * descriptor,
311 xsd_QName * GetResourceProperty,
312 wsrp_GetResourcePropertyResponseType * GetResourcePropertyResponse,
313 xsd_any * fault)
314 0 {
315 /* add function local variable declarations here */
316 0 globus_result_t result = GLOBUS_SUCCESS;
317
318 /* initialize trace debugging info */
319 GlobusFuncName(PausableSubscriptionManager_GetResourceProperty_impl);
320 0 PausableSubscriptionManagerServiceDebugEnter();
321
322 /* This is where it all happens. Service implementer must
323 * implmenent this function. Asume that GetResourceProperty has
324 * been initialized and filled with request values.
325 * GetResourcePropertyResponse must be set by the implementer.
326 */
327
328 /* do not use GLOBUS_FAILURE, you the error object construction api */
329 0 result = PausableSubscriptionManagerServiceErrorNotImplemented("PausableSubscriptionManager_GetResourceProperty");
330
331 0 PausableSubscriptionManagerServiceDebugExit();
332 0 return result;