/* soapC.c
Generated by gSOAP 2.8.15 from onvif.h
Copyright(C) 2000-2013, Robert van Engelen, Genivia Inc. All Rights Reserved.
The generated code is released under ONE of the following licenses:
GPL or Genivia's license for commercial use.
This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed.
*/
#if defined(__BORLANDC__)
#pragma option push -w-8060
#pragma option push -w-8004
#endif
#include "soapH.h"
#ifdef __cplusplus
extern "C" {
#endif
SOAP_SOURCE_STAMP("@(#) soapC.c ver 2.8.15 2013-08-05 08:53:54 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, NULL))
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", NULL);
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**)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Value;
return (const char**)&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**)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value;
}
return (const char**)&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 && 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**)&soap->fault->SOAP_ENV__Reason->SOAP_ENV__Text;
return (const char**)&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**)&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**)&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_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_unsignedLONG64:
return soap_in_unsignedLONG64(soap, NULL, NULL, "xsd:unsignedLong");
case SOAP_TYPE_time:
return soap_in_time(soap, NULL, NULL, "xsd:dateTime");
case SOAP_TYPE_ns4__DoorMode:
return soap_in_ns4__DoorMode(soap, NULL, NULL, "ns4:DoorMode");
case SOAP_TYPE_ns4__DoorFaultState:
return soap_in_ns4__DoorFaultState(soap, NULL, NULL, "ns4:DoorFaultState");
case SOAP_TYPE_ns4__DoorTamperState:
return soap_in_ns4__DoorTamperState(soap, NULL, NULL, "ns4:DoorTamperState");
case SOAP_TYPE_ns4__DoorAlarmState:
return soap_in_ns4__DoorAlarmState(soap, NULL, NULL, "ns4:DoorAlarmState");
case SOAP_TYPE_ns4__LockPhysicalState:
return soap_in_ns4__LockPhysicalState(soap, NULL, NULL, "ns4:LockPhysicalState");
case SOAP_TYPE_ns4__DoorPhysicalState:
return soap_in_ns4__DoorPhysicalState(soap, NULL, NULL, "ns4:DoorPhysicalState");
case SOAP_TYPE_ns2__DenyReason:
return soap_in_ns2__DenyReason(soap, NULL, NULL, "ns2:DenyReason");
case SOAP_TYPE_ns2__Decision:
return soap_in_ns2__Decision(soap, NULL, NULL, "ns2:Decision");
case SOAP_TYPE_ns1__FileSuffixType:
return soap_in_ns1__FileSuffixType(soap, NULL, NULL, "ns1:FileSuffixType");
case SOAP_TYPE_ns1__HttpAuthenticationMethodType:
return soap_in_ns1__HttpAuthenticationMethodType(soap, NULL, NULL, "ns1:HttpAuthenticationMethodType");
case SOAP_TYPE_ns1__HttpProtocolType:
return soap_in_ns1__HttpProtocolType(soap, NULL, NULL, "ns1:HttpProtocolType");
case SOAP_TYPE_ns1__EMailAuthenticationMode:
return soap_in_ns1__EMailAuthenti
- 1
- 2
- 3
- 4
- 5
- 6
前往页