123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- /* soapcwmpService.h
- Generated by gSOAP 2.8.83 for trapi.h
- gSOAP XML Web services tools
- Copyright (C) 2000-2018, 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
- --------------------------------------------------------------------------------
- */
- #ifndef soapcwmpService_H
- #define soapcwmpService_H
- #include "soapH.h"
- class SOAP_CMAC cwmpService {
- public:
- /// Context to manage service IO and data
- struct soap *soap;
- /// flag indicating that this context is owned by this service and should be deleted by the destructor
- bool soap_own;
- /// Variables globally declared in trapi.h, if any
- /// Construct a service with new managing context
- cwmpService();
- /// Copy constructor
- cwmpService(const cwmpService&);
- /// Construct service given a shared managing context
- cwmpService(struct soap*);
- /// Constructor taking input+output mode flags for the new managing context
- cwmpService(soap_mode iomode);
- /// Constructor taking input and output mode flags for the new managing context
- cwmpService(soap_mode imode, soap_mode omode);
- /// Destructor deletes deserialized data and its managing context, when the context was allocated by the contructor
- virtual ~cwmpService();
- /// Delete all deserialized data (with soap_destroy() and soap_end())
- virtual void destroy();
- /// Delete all deserialized data and reset to defaults
- virtual void reset();
- /// Initializer used by constructors
- virtual void cwmpService_init(soap_mode imode, soap_mode omode);
- /// Return a copy that has a new managing context with the same engine state
- virtual cwmpService *copy() SOAP_PURE_VIRTUAL_COPY;
- /// Copy assignment
- cwmpService& operator=(const cwmpService&);
- /// Close connection (normally automatic)
- virtual int soap_close_socket();
- /// Force close connection (can kill a thread blocked on IO)
- virtual int soap_force_close_socket();
- /// Return sender-related fault to sender
- virtual int soap_senderfault(const char *string, const char *detailXML);
- /// Return sender-related fault with SOAP 1.2 subcode to sender
- virtual int soap_senderfault(const char *subcodeQName, const char *string, const char *detailXML);
- /// Return receiver-related fault to sender
- virtual int soap_receiverfault(const char *string, const char *detailXML);
- /// Return receiver-related fault with SOAP 1.2 subcode to sender
- virtual int soap_receiverfault(const char *subcodeQName, const char *string, const char *detailXML);
- /// Print fault
- virtual void soap_print_fault(FILE*);
- #ifndef WITH_LEAN
- #ifndef WITH_COMPAT
- /// Print fault to stream
- virtual void soap_stream_fault(std::ostream&);
- #endif
- /// Write fault to buffer
- virtual char *soap_sprint_fault(char *buf, size_t len);
- #endif
- /// Disables and removes SOAP Header from message by setting soap->header = NULL
- virtual void soap_noheader();
- /// Add SOAP Header to message
- virtual void soap_header(struct _cwmp__SupportedCWMPVersions *cwmp__SupportedCWMPVersions, struct _cwmp__UseCWMPVersion *cwmp__UseCWMPVersion, struct _cwmp__SessionTimeout *cwmp__SessionTimeout, struct _cwmp__ID *cwmp__ID, struct _cwmp__HoldRequests *cwmp__HoldRequests);
- /// Get SOAP Header structure (i.e. soap->header, which is NULL when absent)
- virtual ::SOAP_ENV__Header *soap_header();
- #ifndef WITH_NOIO
- /// Run simple single-thread (iterative, non-SSL) service on port until a connection error occurs (returns SOAP_OK or error code), use this->bind_flag = SO_REUSEADDR to rebind for immediate rerun
- virtual int run(int port, int backlog = 1);
- #if defined(WITH_OPENSSL) || defined(WITH_GNUTLS)
- /// Run simple single-thread SSL service on port until a connection error occurs (returns SOAP_OK or error code), use this->bind_flag = SO_REUSEADDR to rebind for immediate rerun
- virtual int ssl_run(int port, int backlog = 1);
- #endif
- /// Bind service to port (returns master socket or SOAP_INVALID_SOCKET upon error)
- virtual SOAP_SOCKET bind(const char *host, int port, int backlog);
- /// Accept next request (returns socket or SOAP_INVALID_SOCKET upon error)
- virtual SOAP_SOCKET accept();
- #if defined(WITH_OPENSSL) || defined(WITH_GNUTLS)
- /// When SSL is used, after accept() should perform and accept SSL handshake
- virtual int ssl_accept();
- #endif
- #endif
- /// After accept() serve the pending request (returns SOAP_OK or error code)
- virtual int serve();
- /// Used by serve() to dispatch a pending request (returns SOAP_OK or error code)
- virtual int dispatch();
- virtual int dispatch(struct soap *soap);
- //
- // Service operations are listed below: you should define these
- // Note: compile with -DWITH_PURE_VIRTUAL to declare pure virtual methods
- //
- /// Web service operation 'GetParameterNames' implementation, should return SOAP_OK or error code
- virtual int GetParameterNames(struct _cwmp__GetParameterNames *cwmp__GetParameterNames, struct _cwmp__GetParameterNamesResponse *cwmp__GetParameterNamesResponse) SOAP_PURE_VIRTUAL;
- //
- /// Web service operation 'GetParameterValues' implementation, should return SOAP_OK or error code
- virtual int GetParameterValues(struct _cwmp__GetParameterValues *cwmp__GetParameterValues, struct _cwmp__GetParameterValuesResponse *cwmp__GetParameterValuesResponse) SOAP_PURE_VIRTUAL;
- //
- /// Web service one-way operation 'GetParameterValuesResponse' implementation, should return value of send_GetParameterValuesResponse_empty_response() to send HTTP Accept acknowledgment, or return an error code, or return SOAP_OK to immediately return without sending an HTTP response message
- virtual int GetParameterValuesResponse(struct _cwmp__GetParameterValuesResponse *cwmp__GetParameterValuesResponse) SOAP_PURE_VIRTUAL;
- /// Web service asynchronous send of HTTP Accept acknowledgment to be called in 'GetParameterValuesResponse', returns SOAP_OK or error code
- virtual int send_GetParameterValuesResponse_empty_response(int soap_http_status = 202) { return soap_send_empty_response(this->soap, soap_http_status); }
- //
- /// Web service operation 'SetParameterValues' implementation, should return SOAP_OK or error code
- virtual int SetParameterValues(struct _cwmp__SetParameterValues *cwmp__SetParameterValues, struct _cwmp__SetParameterValuesResponse *cwmp__SetParameterValuesResponse) SOAP_PURE_VIRTUAL;
- //
- /// Web service operation 'GetParameterAttributes' implementation, should return SOAP_OK or error code
- virtual int GetParameterAttributes(struct _cwmp__GetParameterAttributes *cwmp__GetParameterAttributes, struct _cwmp__GetParameterAttributesResponse *cwmp__GetParameterAttributesResponse) SOAP_PURE_VIRTUAL;
- //
- /// Web service operation 'SetParameterAttributes' implementation, should return SOAP_OK or error code
- virtual int SetParameterAttributes(struct _cwmp__SetParameterAttributes *cwmp__SetParameterAttributes, struct _cwmp__SetParameterAttributesResponse *cwmp__SetParameterAttributesResponse) SOAP_PURE_VIRTUAL;
- //
- /// Web service operation 'Download' implementation, should return SOAP_OK or error code
- virtual int Download(struct _cwmp__Download *cwmp__Download, struct _cwmp__DownloadResponse *cwmp__DownloadResponse) SOAP_PURE_VIRTUAL;
- //
- /// Web service operation 'Upload' implementation, should return SOAP_OK or error code
- virtual int Upload(struct _cwmp__Upload *cwmp__Upload, struct _cwmp__UploadResponse *cwmp__UploadResponse) SOAP_PURE_VIRTUAL;
- //
- /// Web service operation 'AddObject' implementation, should return SOAP_OK or error code
- virtual int AddObject(struct _cwmp__AddObject *cwmp__AddObject, struct _cwmp__AddObjectResponse *cwmp__AddObjectResponse) SOAP_PURE_VIRTUAL;
- //
- /// Web service operation 'DeleteObject' implementation, should return SOAP_OK or error code
- virtual int DeleteObject(struct _cwmp__DeleteObject *cwmp__DeleteObject, struct _cwmp__DeleteObjectResponse *cwmp__DeleteObjectResponse) SOAP_PURE_VIRTUAL;
- //
- /// Web service operation 'GetRPCMethods' implementation, should return SOAP_OK or error code
- virtual int GetRPCMethods(struct _cwmp__GetRPCMethods *cwmp__GetRPCMethods, struct _cwmp__GetRPCMethodsResponse *cwmp__GetRPCMethodsResponse) SOAP_PURE_VIRTUAL;
- //
- /// Web service operation 'Inform' implementation, should return SOAP_OK or error code
- virtual int Inform(struct _cwmp__Inform *cwmp__Inform, struct _cwmp__InformResponse *cwmp__InformResponse) SOAP_PURE_VIRTUAL;
- //
- /// Web service operation 'Reboot' implementation, should return SOAP_OK or error code
- virtual int Reboot(struct _cwmp__Reboot *cwmp__Reboot, struct _cwmp__RebootResponse *cwmp__RebootResponse) SOAP_PURE_VIRTUAL;
- //
- /// Web service operation 'FactoryReset' implementation, should return SOAP_OK or error code
- virtual int FactoryReset(struct _cwmp__FactoryReset *cwmp__FactoryReset, struct _cwmp__FactoryResetResponse *cwmp__FactoryResetResponse) SOAP_PURE_VIRTUAL;
- virtual int CheckQueue(struct soap *soap, cwmpService *cwmpService1) SOAP_PURE_VIRTUAL;
- virtual int CustomeFactoryReset(struct soap *soap , cwmpService *cwmpService1) SOAP_PURE_VIRTUAL;
- virtual int CustomeReboot(struct soap *soap , cwmpService *cwmpService1) SOAP_PURE_VIRTUAL;
- virtual int CustomeRebootResonse(struct soap *soap , cwmpService *cwmpService1) SOAP_PURE_VIRTUAL;
- };
- #endif
|