-
Notifications
You must be signed in to change notification settings - Fork 22
/
onvif.h
547 lines (412 loc) · 22.3 KB
/
onvif.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
// Reminder: Modify typemap.dat to customize the header file generated by wsdl2h
/* onvif.h
Generated by wsdl2h 2.8.17r from http://www.onvif.org/onvif/ver10/network/wsdl/remotediscovery.wsdl and typemap.dat
2014-06-27 14:54:54 GMT
DO NOT INCLUDE THIS FILE DIRECTLY INTO YOUR PROJECT BUILDS
USE THE soapcpp2-GENERATED SOURCE CODE FILES FOR YOUR PROJECT BUILDS
gSOAP XML Web services tools.
Copyright (C) 2000-2013 Robert van Engelen, Genivia Inc. All Rights Reserved.
Part of this software is released under one of the following licenses:
GPL or Genivia's license for commercial use.
*/
/** @page page_notes Usage Notes
NOTE:
- Run soapcpp2 on onvif.h to generate the SOAP/XML processing logic.
Use soapcpp2 -I to specify paths for #import
To build with STL, 'stlvector.h' is imported from 'import' dir in package.
Use soapcpp2 -j to generate improved proxy and server classes.
- Use wsdl2h -c and -s to generate pure C code or C++ code without STL.
- Use 'typemap.dat' to control namespace bindings and type mappings.
It is strongly recommended to customize the names of the namespace prefixes
generated by wsdl2h. To do so, modify the prefix bindings in the Namespaces
section below and add the modified lines to 'typemap.dat' to rerun wsdl2h.
- Use Doxygen (www.doxygen.org) on this file to generate documentation.
- Use wsdl2h -R to generate REST operations.
- Use wsdl2h -nname to use name as the base namespace prefix instead of 'ns'.
- Use wsdl2h -Nname for service prefix and produce multiple service bindings
- Use wsdl2h -d to enable DOM support for xsd:anyType.
- Use wsdl2h -g to auto-generate readers and writers for root elements.
- Use wsdl2h -b to auto-generate bi-directional operations (duplex ops).
- Struct/class members serialized as XML attributes are annotated with a '@'.
- Struct/class members that have a special role are annotated with a '$'.
WARNING:
DO NOT INCLUDE THIS ANNOTATED FILE DIRECTLY IN YOUR PROJECT SOURCE CODE.
USE THE FILES GENERATED BY soapcpp2 FOR YOUR PROJECT'S SOURCE CODE:
THE soapStub.h FILE CONTAINS THIS CONTENT WITHOUT ANNOTATIONS.
LICENSE:
@verbatim
--------------------------------------------------------------------------------
gSOAP XML Web services tools
Copyright (C) 2000-2013, Robert van Engelen, Genivia Inc. All Rights Reserved.
This software is released under one of the following licenses:
GPL or Genivia's license for commercial use.
--------------------------------------------------------------------------------
GPL license.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
Author contact information:
engelen@genivia.com / engelen@acm.org
This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed.
--------------------------------------------------------------------------------
A commercial-use license is available from Genivia, Inc., contact@genivia.com
--------------------------------------------------------------------------------
@endverbatim
*/
//gsoapopt cw
/******************************************************************************\
* *
* Definitions *
* http://www.onvif.org/ver10/network/wsdl *
* *
\******************************************************************************/
/******************************************************************************\
* *
* Import *
* *
\******************************************************************************/
#import "wsa.h"
#import "wsdd10.h" // wsdd10 = <http://schemas.xmlsoap.org/ws/2005/04/discovery>
/******************************************************************************\
* *
* Schema Namespaces *
* *
\******************************************************************************/
/* NOTE:
It is strongly recommended to customize the names of the namespace prefixes
generated by wsdl2h. To do so, modify the prefix bindings below and add the
modified lines to typemap.dat to rerun wsdl2h:
tdn = "http://www.onvif.org/ver10/network/wsdl"
*/
#define SOAP_NAMESPACE_OF_tdn "http://www.onvif.org/ver10/network/wsdl"
//gsoap tdn schema namespace: http://www.onvif.org/ver10/network/wsdl
//gsoap tdn schema elementForm: qualified
//gsoap tdn schema attributeForm: unqualified
/******************************************************************************\
* *
* Built-in Schema Types and Top-Level Elements and Attributes *
* *
\******************************************************************************/
/******************************************************************************\
* *
* Schema Types and Top-Level Elements and Attributes *
* http://www.onvif.org/ver10/network/wsdl *
* *
\******************************************************************************/
/******************************************************************************\
* *
* Schema Complex Types and Top-Level Elements *
* http://www.onvif.org/ver10/network/wsdl *
* *
\******************************************************************************/
/******************************************************************************\
* *
* Additional Top-Level Elements *
* http://www.onvif.org/ver10/network/wsdl *
* *
\******************************************************************************/
/// Top-level root element "http://www.onvif.org/ver10/network/wsdl":Hello of type "http://schemas.xmlsoap.org/ws/2005/04/discovery":HelloType.
/// Note: use wsdl2h option -g to auto-generate a top-level root element declaration and processing code.
/// Top-level root element "http://www.onvif.org/ver10/network/wsdl":HelloResponse of type "http://schemas.xmlsoap.org/ws/2005/04/discovery":ResolveType.
/// Note: use wsdl2h option -g to auto-generate a top-level root element declaration and processing code.
/// Top-level root element "http://www.onvif.org/ver10/network/wsdl":Probe of type "http://schemas.xmlsoap.org/ws/2005/04/discovery":ProbeType.
/// Note: use wsdl2h option -g to auto-generate a top-level root element declaration and processing code.
/// Top-level root element "http://www.onvif.org/ver10/network/wsdl":ProbeResponse of type "http://schemas.xmlsoap.org/ws/2005/04/discovery":ProbeMatchesType.
/// Note: use wsdl2h option -g to auto-generate a top-level root element declaration and processing code.
/// Top-level root element "http://www.onvif.org/ver10/network/wsdl":Bye of type "http://schemas.xmlsoap.org/ws/2005/04/discovery":ByeType.
/// Note: use wsdl2h option -g to auto-generate a top-level root element declaration and processing code.
/// Top-level root element "http://www.onvif.org/ver10/network/wsdl":ByeResponse of type "http://schemas.xmlsoap.org/ws/2005/04/discovery":ResolveType.
/// Note: use wsdl2h option -g to auto-generate a top-level root element declaration and processing code.
/******************************************************************************\
* *
* Additional Top-Level Attributes *
* http://www.onvif.org/ver10/network/wsdl *
* *
\******************************************************************************/
/******************************************************************************\
* *
* Services *
* *
\******************************************************************************/
// This service supports SOAP 1.2 namespaces:
#import "soap12.h"
//gsoap tdn service name: RemoteDiscoveryBinding
//gsoap tdn service type: RemoteDiscoveryPort
//gsoap tdn service namespace: http://www.onvif.org/ver10/network/wsdl
//gsoap tdn service transport: http://schemas.xmlsoap.org/soap/http
/** @mainpage Service Definitions
@section Service_bindings Service Bindings
- @ref RemoteDiscoveryBinding
@section Service_more More Information
- @ref page_notes "Usage Notes"
- @ref page_XMLDataBinding "XML Data Binding"
- @ref SOAP_ENV__Header "SOAP Header Content" (when applicable)
- @ref SOAP_ENV__Detail "SOAP Fault Detail Content" (when applicable)
*/
/**
@page RemoteDiscoveryBinding Binding "RemoteDiscoveryBinding"
@section RemoteDiscoveryBinding_operations Operations of Binding "RemoteDiscoveryBinding"
- @ref __tdn__Hello
- @ref __tdn__Bye
- @ref __tdn__Probe
@section RemoteDiscoveryBinding_ports Endpoints of Binding "RemoteDiscoveryBinding"
Note: use wsdl2h option -Nname to change the service binding prefix name
*/
/******************************************************************************\
* *
* Service Binding *
* RemoteDiscoveryBinding *
* *
\******************************************************************************/
/******************************************************************************\
* *
* Service Operation *
* __tdn__Hello *
* *
\******************************************************************************/
/// Operation "__tdn__Hello" of service binding "RemoteDiscoveryBinding"
/**
Operation details:
- SOAP document/literal style messaging
- Action: "http://www.onvif.org/ver10/network/wsdl/Hello"
- Addressing input action: "http://www.onvif.org/ver10/network/wsdl/Hello"
- Addressing output action: "http://www.onvif.org/ver10/network/wsdl/HelloResponse"
C stub function (defined in soapClient.c[pp] generated by soapcpp2):
@code
int soap_call___tdn__Hello(
struct soap *soap,
NULL, // char *endpoint = NULL selects default endpoint for this operation
NULL, // char *action = NULL selects default action for this operation
// input parameters:
wsdd__HelloType tdn__Hello,
// output parameters:
wsdd__ResolveType *tdn__HelloResponse
);
@endcode
C server function (called from the service dispatcher defined in soapServer.c[pp]):
@code
int __tdn__Hello(
struct soap *soap,
// input parameters:
wsdd__HelloType tdn__Hello,
// output parameters:
wsdd__ResolveType *tdn__HelloResponse
);
@endcode
*/
//gsoap tdn service method-protocol: Hello SOAP
//gsoap tdn service method-style: Hello document
//gsoap tdn service method-encoding: Hello literal
//gsoap tdn service method-input-action: Hello http://www.onvif.org/ver10/network/wsdl/Hello
//gsoap tdn service method-output-action: Hello http://www.onvif.org/ver10/network/wsdl/HelloResponse
int __tdn__Hello(
wsdd__HelloType tdn__Hello, ///< Input parameter
wsdd__ResolveType *tdn__HelloResponse ///< Output parameter
);
/******************************************************************************\
* *
* Service Operation *
* __tdn__Bye *
* *
\******************************************************************************/
/// Operation "__tdn__Bye" of service binding "RemoteDiscoveryBinding"
/**
Operation details:
- SOAP document/literal style messaging
- Action: "http://www.onvif.org/ver10/network/wsdl/Bye"
- Addressing input action: "http://www.onvif.org/ver10/network/wsdl/Bye"
- Addressing output action: "http://www.onvif.org/ver10/network/wsdl/ByeResponse"
C stub function (defined in soapClient.c[pp] generated by soapcpp2):
@code
int soap_call___tdn__Bye(
struct soap *soap,
NULL, // char *endpoint = NULL selects default endpoint for this operation
NULL, // char *action = NULL selects default action for this operation
// input parameters:
wsdd__ByeType tdn__Bye,
// output parameters:
wsdd__ResolveType *tdn__ByeResponse
);
@endcode
C server function (called from the service dispatcher defined in soapServer.c[pp]):
@code
int __tdn__Bye(
struct soap *soap,
// input parameters:
wsdd__ByeType tdn__Bye,
// output parameters:
wsdd__ResolveType *tdn__ByeResponse
);
@endcode
*/
//gsoap tdn service method-protocol: Bye SOAP
//gsoap tdn service method-style: Bye document
//gsoap tdn service method-encoding: Bye literal
//gsoap tdn service method-input-action: Bye http://www.onvif.org/ver10/network/wsdl/Bye
//gsoap tdn service method-output-action: Bye http://www.onvif.org/ver10/network/wsdl/ByeResponse
int __tdn__Bye(
wsdd__ByeType tdn__Bye, ///< Input parameter
wsdd__ResolveType *tdn__ByeResponse ///< Output parameter
);
/******************************************************************************\
* *
* Service Operation *
* __tdn__Probe *
* *
\******************************************************************************/
/// Operation "__tdn__Probe" of service binding "RemoteDiscoveryBinding"
/**
Operation details:
- SOAP document/literal style messaging
- Action: "http://www.onvif.org/ver10/network/wsdl/Probe"
- Addressing input action: "http://www.onvif.org/ver10/network/wsdl/Probe"
- Addressing output action: "http://www.onvif.org/ver10/network/wsdl/ProbeResponse"
C stub function (defined in soapClient.c[pp] generated by soapcpp2):
@code
int soap_call___tdn__Probe(
struct soap *soap,
NULL, // char *endpoint = NULL selects default endpoint for this operation
NULL, // char *action = NULL selects default action for this operation
// input parameters:
wsdd__ProbeType tdn__Probe,
// output parameters:
wsdd__ProbeMatchesType *tdn__ProbeResponse
);
@endcode
C server function (called from the service dispatcher defined in soapServer.c[pp]):
@code
int __tdn__Probe(
struct soap *soap,
// input parameters:
wsdd__ProbeType tdn__Probe,
// output parameters:
wsdd__ProbeMatchesType *tdn__ProbeResponse
);
@endcode
*/
//gsoap tdn service method-protocol: Probe SOAP
//gsoap tdn service method-style: Probe document
//gsoap tdn service method-encoding: Probe literal
//gsoap tdn service method-input-action: Probe http://www.onvif.org/ver10/network/wsdl/Probe
//gsoap tdn service method-output-action: Probe http://www.onvif.org/ver10/network/wsdl/ProbeResponse
int __tdn__Probe(
wsdd__ProbeType tdn__Probe, ///< Input parameter
wsdd__ProbeMatchesType *tdn__ProbeResponse ///< Output parameter
);
/**
@page RemoteDiscoveryBinding Binding "RemoteDiscoveryBinding"
@section RemoteDiscoveryBinding_policy_enablers Policy Enablers of Binding "RemoteDiscoveryBinding"
Based on policies, this service imports
- WS-Policy reminders and enablers:
- WS-Addressing 1.0 (2005/08, accepts 2004/08):
@code
#import "wsa5.h" // to be added to this header file for the soapcpp2 build step
@endcode
@code
#include "plugin/wsaapi.h"
soap_register_plugin(soap, soap_wsa); // register the wsa plugin in your code
// See the user guide gsoap/doc/wsa/html/index.html
@endcode
- WS-Addressing (2004/08):
@code
#import "wsa.h" // to be added to this header file for the soapcpp2 build step
@endcode
@code
#include "plugin/wsaapi.h"
soap_register_plugin(soap, soap_wsa); // register the wsa plugin in your code
// See the user guide gsoap/doc/wsa/html/index.html
@endcode
- WS-ReliableMessaging 1.0:
@code
#import "wsrm5.h" // to be added to this header file for the soapcpp2 build step
@endcode
@code
#include "plugin/wsrmapi.h"
soap_register_plugin(soap, soap_wsa); // register the wsa plugin in your code
soap_register_plugin(soap, soap_wsrm); // register the wsrm plugin in your code
// See the user guide gsoap/doc/wsrm/html/index.html
@endcode
- WS-ReliableMessaging 1.1:
@code
#import "wsrm.h" // to be added to this header file for the soapcpp2 build step
@endcode
@code
#include "plugin/wsrmapi.h"
soap_register_plugin(soap, soap_wsa); // register the wsa plugin in your code
soap_register_plugin(soap, soap_wsrm); // register the wsrm plugin in your code
// See the user guide gsoap/doc/wsrm/html/index.html
@endcode
- WS-Security (SOAP Message Security) 1.0 (accepts 1.1):
@code
#import "wsse.h" // to be added to this header file for the soapcpp2 build step
@endcode
@code
#include "plugin/wsseapi.h"
soap_register_plugin(soap, soap_wsse); // register the wsse plugin in your code
// See the user guide gsoap/doc/wsse/html/index.html
@endcode
- WS-Security (SOAP Message Security) 1.1 (accepts 1.0):
@code
#import "wsse11.h" // to be added to this header file for the soapcpp2 build step
@endcode
@code
#include "plugin/wsseapi.h"
soap_register_plugin(soap, soap_wsse); // register the wsse plugin in your code
// See the user guide gsoap/doc/wsse/html/index.html
@endcode
- HTTP Digest Authentication:
@code
#include "plugin/httpda.h"
soap_register_plugin(soap, soap_http_da); // register the HTTP DA plugin in your code
// See the user guide gsoap/doc/httpda/html/index.html
@endcode
*/
/******************************************************************************\
* *
* XML Data Binding *
* *
\******************************************************************************/
/**
@page page_XMLDataBinding XML Data Binding
SOAP/XML services use data bindings contractually bound by WSDL and auto-
generated by wsdl2h and soapcpp2 (see Service Bindings). Plain data bindings
are adopted from XML schemas as part of the WSDL types section or when running
wsdl2h on a set of schemas to produce non-SOAP-based XML data bindings.
The following readers and writers are C/C++ data type (de)serializers auto-
generated by wsdl2h and soapcpp2. Run soapcpp2 on this file to generate the
(de)serialization code, which is stored in soapC.c[pp]. Include "soapH.h" in
your code to import these data type and function declarations. Only use the
soapcpp2-generated files in your project build. Do not include the wsdl2h-
generated .h file in your code.
Data can be read in XML and deserialized from:
- a file descriptor, using soap->recvfd = fd
- a socket, using soap->socket = ...
- a C++ stream, using soap->is = ...
- a buffer, using the soap->frecv() callback
Data can be serialized in XML and written to:
- a file descriptor, using soap->sendfd = fd
- a socket, using soap->socket = ...
- a C++ stream, using soap->os = ...
- a buffer, using the soap->fsend() callback
The following options are available for (de)serialization control:
- soap->encodingStyle = NULL; to remove SOAP 1.1/1.2 encodingStyle
- soap_mode(soap, SOAP_XML_TREE); XML without id-ref (no cycles!)
- soap_mode(soap, SOAP_XML_GRAPH); XML with id-ref (including cycles)
- soap_set_namespaces(soap, struct Namespace *nsmap); to set xmlns bindings
@section tdn Top-level root elements of schema "http://www.onvif.org/ver10/network/wsdl"
- <tdn:Hello> (use wsdl2h option -g to auto-generate)
- <tdn:HelloResponse> (use wsdl2h option -g to auto-generate)
- <tdn:Probe> (use wsdl2h option -g to auto-generate)
- <tdn:ProbeResponse> (use wsdl2h option -g to auto-generate)
- <tdn:Bye> (use wsdl2h option -g to auto-generate)
- <tdn:ByeResponse> (use wsdl2h option -g to auto-generate)
*/
/* End of onvif.h */