/* soapC.c
Generated by gSOAP 2.8.32 for onvif.h
gSOAP XML Web services tools
Copyright (C) 2000-2016, Robert van Engelen, Genivia Inc. All Rights Reserved.
The soapcpp2 tool and its generated software are released under the GPL.
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
--------------------------------------------------------------------------------
*/
#if defined(__BORLANDC__)
#pragma option push -w-8060
#pragma option push -w-8004
#endif
#include "soapH.h"
#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
SOAP_SOURCE_STAMP("@(#) soapC.c ver 2.8.32 2016-05-18 06:12:47 GMT")
#ifndef WITH_NOGLOBAL
SOAP_FMAC3 int SOAP_FMAC4 soap_getheader(struct soap *soap)
{
soap->part = SOAP_IN_HEADER;
soap->header = soap_in_SOAP_ENV__Header(soap, "SOAP-ENV:Header", soap->header, NULL);
soap->part = SOAP_END_HEADER;
return soap->header == NULL;
}
SOAP_FMAC3 int SOAP_FMAC4 soap_putheader(struct soap *soap)
{
if (soap->version && soap->header)
{ soap->part = SOAP_IN_HEADER;
if (soap_out_SOAP_ENV__Header(soap, "SOAP-ENV:Header", 0, soap->header, ""))
return soap->error;
soap->part = SOAP_END_HEADER;
}
return SOAP_OK;
}
SOAP_FMAC3 void SOAP_FMAC4 soap_serializeheader(struct soap *soap)
{
if (soap->version && soap->header)
soap_serialize_SOAP_ENV__Header(soap, soap->header);
}
SOAP_FMAC3 void SOAP_FMAC4 soap_header(struct soap *soap)
{
if (soap->header == NULL)
{ if ((soap->header = (struct SOAP_ENV__Header*)soap_malloc(soap, sizeof(struct SOAP_ENV__Header))))
soap_default_SOAP_ENV__Header(soap, soap->header);
}
}
SOAP_FMAC3 void SOAP_FMAC4 soap_fault(struct soap *soap)
{
if (soap->fault == NULL)
{ soap->fault = (struct SOAP_ENV__Fault*)soap_malloc(soap, sizeof(struct SOAP_ENV__Fault));
if (soap->fault == NULL)
return;
soap_default_SOAP_ENV__Fault(soap, soap->fault);
}
if (soap->version == 2 && !soap->fault->SOAP_ENV__Code)
{ soap->fault->SOAP_ENV__Code = (struct SOAP_ENV__Code*)soap_malloc(soap, sizeof(struct SOAP_ENV__Code));
soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code);
}
if (soap->version == 2 && !soap->fault->SOAP_ENV__Reason)
{ soap->fault->SOAP_ENV__Reason = (struct SOAP_ENV__Reason*)soap_malloc(soap, sizeof(struct SOAP_ENV__Reason));
soap_default_SOAP_ENV__Reason(soap, soap->fault->SOAP_ENV__Reason);
}
}
SOAP_FMAC3 void SOAP_FMAC4 soap_serializefault(struct soap *soap)
{
if (soap->fault)
soap_serialize_SOAP_ENV__Fault(soap, soap->fault);
}
SOAP_FMAC3 int SOAP_FMAC4 soap_putfault(struct soap *soap)
{
if (soap->fault)
return soap_put_SOAP_ENV__Fault(soap, soap->fault, "SOAP-ENV:Fault", "");
return SOAP_OK;
}
SOAP_FMAC3 int SOAP_FMAC4 soap_getfault(struct soap *soap)
{
return (soap->fault = soap_get_SOAP_ENV__Fault(soap, NULL, "SOAP-ENV:Fault", NULL)) == NULL;
}
SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultcode(struct soap *soap)
{
soap_fault(soap);
if (soap->version == 2 && soap->fault->SOAP_ENV__Code)
return (const char**)(void*)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Value;
return (const char**)(void*)&soap->fault->faultcode;
}
SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultsubcode(struct soap *soap)
{
soap_fault(soap);
if (soap->version == 2)
{ if (soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode == NULL)
{ soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode = (struct SOAP_ENV__Code*)soap_malloc(soap, sizeof(struct SOAP_ENV__Code));
soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode);
}
return (const char**)(void*)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value;
}
return (const char**)(void*)&soap->fault->faultcode;
}
SOAP_FMAC3 const char * SOAP_FMAC4 soap_check_faultsubcode(struct soap *soap)
{
soap_fault(soap);
if (soap->version == 2)
{ if (soap->fault->SOAP_ENV__Code && soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode)
return soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value;
return NULL;
}
return soap->fault->faultcode;
}
SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultstring(struct soap *soap)
{
soap_fault(soap);
if (soap->version == 2)
return (const char**)(void*)&soap->fault->SOAP_ENV__Reason->SOAP_ENV__Text;
return (const char**)(void*)&soap->fault->faultstring;
}
SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultdetail(struct soap *soap)
{
soap_fault(soap);
if (soap->version == 2)
{ if (soap->fault->SOAP_ENV__Detail == NULL)
{ soap->fault->SOAP_ENV__Detail = (struct SOAP_ENV__Detail*)soap_malloc(soap, sizeof(struct SOAP_ENV__Detail));
soap_default_SOAP_ENV__Detail(soap, soap->fault->SOAP_ENV__Detail);
}
return (const char**)(void*)&soap->fault->SOAP_ENV__Detail->__any;
}
if (soap->fault->detail == NULL)
{ soap->fault->detail = (struct SOAP_ENV__Detail*)soap_malloc(soap, sizeof(struct SOAP_ENV__Detail));
soap_default_SOAP_ENV__Detail(soap, soap->fault->detail);
}
return (const char**)(void*)&soap->fault->detail->__any;
}
SOAP_FMAC3 const char * SOAP_FMAC4 soap_check_faultdetail(struct soap *soap)
{
soap_fault(soap);
if (soap->version == 2 && soap->fault->SOAP_ENV__Detail)
return soap->fault->SOAP_ENV__Detail->__any;
if (soap->fault->detail)
return soap->fault->detail->__any;
return NULL;
}
#endif
#ifndef WITH_NOIDREF
SOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap *soap)
{
int t;
if (soap->version == 1)
{ for (;;)
{ if (!soap_getelement(soap, &t))
if ((soap->error && soap->error != SOAP_TAG_MISMATCH) || soap_ignore_element(soap))
break;
}
}
if (soap->error == SOAP_NO_TAG || soap->error == SOAP_EOF)
soap->error = SOAP_OK;
return soap->error;
}
#endif
SOAP_FMAC3 void * SOAP_FMAC4 soap_getelement(struct soap *soap, int *type)
{ (void)type;
if (soap_peek_element(soap))
return NULL;
#ifndef WITH_NOIDREF
if (!*soap->id || !(*type = soap_lookup_type(soap, soap->id)))
*type = soap_lookup_type(soap, soap->href);
switch (*type)
{
case SOAP_TYPE_byte:
return soap_in_byte(soap, NULL, NULL, "xsd:byte");
case SOAP_TYPE_tt__IANA_IfTypes:
return soap_in_tt__IANA_IfTypes(soap, NULL, NULL, "tt:IANA-IfTypes");
case SOAP_TYPE_int:
return soap_in_int(soap, NULL, NULL, "xsd:int");
case SOAP_TYPE_xsd__duration:
return soap_in_xsd__duration(soap, NULL, NULL, "xsd:duration");
case SOAP_TYPE_float:
return soap_in_float(soap, NULL, NULL, "xsd:float");
case SOAP_TYPE_unsignedByte:
return soap_in_unsignedByte(soap, NULL, NULL, "xsd:unsignedByte");
case SOAP_TYPE_unsignedInt:
return soap_in_unsignedInt(soap, NULL, NULL, "xsd:unsignedInt");
case SOAP_TYPE_ULONG64:
return soap_in_ULONG64(soap, NULL, NULL, "xsd:unsignedLong");
case SOAP_TYPE_dateTime:
return soap_in_dateTime(soap, NULL, NULL, "xsd:dateTime");
case SOAP_TYPE_tds__StorageType:
return soap_in_tds__StorageType(soap, NULL, NULL, "tds:StorageType");
case SOAP_TYPE_tmd__ParityBit:
return soap_in_tmd__ParityBit(soap, NULL, NULL, "tmd:ParityBit");
case SOAP_TYPE_tmd__SerialPortType:
return soap_in_tmd__SerialPortType(soap, NULL, NULL, "tmd:SerialPortType");
case SOAP_TYPE_tt__OSDType:
return soap_in_tt__OSDType(soap, NULL, NULL, "tt:OSDType");
case SOAP_TYPE_tt__ModeOfOperation:
return soap_in_tt__ModeOfOperation(soap, NULL, NULL, "tt:ModeOfOperation");
case SOAP_TYPE_tt__TrackType:
return soap_in_tt__TrackType(soap, NULL, NULL, "tt:TrackType");
case SOAP_TYPE_tt__RecordingStatus:
return soap_in_tt__RecordingStatus(soap, NULL, NULL, "tt:RecordingStatus");
case SOAP_TYPE_tt__SearchState:
return soap_in_tt__SearchState(soap, NULL, NULL, "tt:SearchState");
case SOAP_TYPE_tt__ReceiverState:
return soap_in_tt__ReceiverState(soap, NULL, NULL, "tt:ReceiverState");
case SOAP_TYPE_tt__ReceiverMode:
return soap_in_tt__ReceiverMode(soap, NULL, NULL, "tt:ReceiverMode");
case SOAP_TYPE_tt__ClassType
- 1
- 2
前往页