epoc32/include/mw/sensoapmessage2.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100 (2010-03-31)
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). 
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:        CSenSoapMessage is an utility class offering capability to
williamr@2
    15
*                parse XML SOAP envelope and manipulation methods to alter its
williamr@2
    16
*                contents.
williamr@2
    17
*
williamr@2
    18
*/
williamr@2
    19
williamr@2
    20
williamr@2
    21
williamr@2
    22
williamr@2
    23
williamr@2
    24
williamr@2
    25
williamr@2
    26
williamr@2
    27
#ifndef SEN_SOAP_MESSAGE2_H
williamr@2
    28
#define SEN_SOAP_MESSAGE2_H
williamr@2
    29
williamr@2
    30
//  INCLUDES
williamr@2
    31
#include <SenWsSecurityHeader2.h>
williamr@2
    32
#include <SenSoapEnvelope2.h>
williamr@2
    33
williamr@2
    34
class MSenMessageContext;
williamr@2
    35
williamr@2
    36
// CLASS DECLARATION
williamr@2
    37
williamr@2
    38
/**
williamr@2
    39
* CSenSoapMessage extends basic SOAP envelope functionality by
williamr@2
    40
* offering methods to set the security header and security token.
williamr@2
    41
* @lib SenUtils.lib
williamr@2
    42
* @since Series60 4.0
williamr@2
    43
*/
williamr@2
    44
class CSenSoapMessage2 : public CSenSoapEnvelope2
williamr@2
    45
    {
williamr@2
    46
    public:  // Constructors and destructor
williamr@2
    47
williamr@2
    48
        /**
williamr@2
    49
        * Two-phase constructor.
williamr@2
    50
        */
williamr@2
    51
        IMPORT_C static CSenSoapMessage2* NewL();
williamr@2
    52
williamr@2
    53
        /**
williamr@2
    54
        * Two-phase constructor.
williamr@2
    55
        */
williamr@2
    56
        IMPORT_C static CSenSoapMessage2* NewLC();
williamr@2
    57
williamr@2
    58
        /**
williamr@2
    59
        * Two-phase constructor.
williamr@2
    60
        */
williamr@2
    61
	    IMPORT_C static CSenSoapMessage2* NewL(TSOAPVersion aVersion);
williamr@2
    62
williamr@2
    63
        /**
williamr@2
    64
        * Two-phase constructor.
williamr@2
    65
        */
williamr@2
    66
	    IMPORT_C static CSenSoapMessage2* NewLC(TSOAPVersion aVersion);
williamr@2
    67
williamr@2
    68
        /**
williamr@2
    69
        * Two-phase constructor.
williamr@2
    70
        */
williamr@2
    71
        IMPORT_C static CSenSoapMessage2* NewL(TSOAPVersion aVersion, const TDesC8& aSecurityNs);
williamr@2
    72
williamr@2
    73
        /**
williamr@2
    74
        * Two-phase constructor.
williamr@2
    75
        */
williamr@2
    76
        IMPORT_C static CSenSoapMessage2* NewLC(TSOAPVersion aVersion, const TDesC8& aSecurityNs);
williamr@2
    77
williamr@2
    78
        /**
williamr@2
    79
        * Two-phase constructor.
williamr@2
    80
        */
williamr@2
    81
        IMPORT_C static CSenSoapMessage2* NewL(MSenMessageContext& aContext);
williamr@2
    82
williamr@2
    83
        /**
williamr@2
    84
        * Two-phase constructor.
williamr@2
    85
        */
williamr@2
    86
        IMPORT_C static CSenSoapMessage2* NewLC(MSenMessageContext& aContext);
williamr@2
    87
williamr@2
    88
        /**
williamr@2
    89
        * Two-phase constructor.
williamr@2
    90
        */
williamr@2
    91
	    IMPORT_C static CSenSoapMessage2* NewL(MSenMessageContext& aContext,
williamr@2
    92
	                                           TSOAPVersion aVersion);
williamr@2
    93
williamr@2
    94
        /**
williamr@2
    95
        * Two-phase constructor.
williamr@2
    96
        */
williamr@2
    97
	    IMPORT_C static CSenSoapMessage2* NewLC(MSenMessageContext& aContext,
williamr@2
    98
	                                            TSOAPVersion aVersion);
williamr@2
    99
williamr@2
   100
        /**
williamr@2
   101
        * Two-phase constructor.
williamr@2
   102
        */
williamr@2
   103
        IMPORT_C static CSenSoapMessage2* NewL(MSenMessageContext& aContext,
williamr@2
   104
                                               TSOAPVersion aVersion,
williamr@2
   105
                                               const TDesC8& aSecurityNs);
williamr@2
   106
williamr@2
   107
        /**
williamr@2
   108
        * Two-phase constructor.
williamr@2
   109
        */
williamr@2
   110
        IMPORT_C static CSenSoapMessage2* NewLC(MSenMessageContext& aContext,
williamr@2
   111
                                                TSOAPVersion aVersion,
williamr@2
   112
                                                const TDesC8& aSecurityNs);
williamr@2
   113
williamr@2
   114
        /**
williamr@2
   115
        * Two-phased copy constructor.
williamr@2
   116
        */
williamr@2
   117
        IMPORT_C static CSenSoapMessage2* NewL(CSenSoapMessage2& aMessage);
williamr@2
   118
williamr@2
   119
        /**
williamr@2
   120
        * Two-phased copy constructor.
williamr@2
   121
        */
williamr@2
   122
        IMPORT_C static CSenSoapMessage2* NewLC(CSenSoapMessage2& aMessage);
williamr@2
   123
williamr@2
   124
        /**
williamr@2
   125
        * Destructor.
williamr@2
   126
        */
williamr@2
   127
        IMPORT_C virtual ~CSenSoapMessage2();
williamr@2
   128
williamr@2
   129
        // New functions
williamr@2
   130
williamr@2
   131
        /**
williamr@2
   132
        * Sets a new security header for the soap message. If existant, the
williamr@2
   133
        * old security header is deleted and new one with given data is added.
williamr@2
   134
        * @since Series60 4.0
williamr@2
   135
        * @param    aData   Data to be used in the security header.
williamr@2
   136
        */
williamr@2
   137
        IMPORT_C void SetSecurityHeaderL(const TDesC8& aData);
williamr@2
   138
williamr@2
   139
        /**
williamr@2
   140
        * Adds new token (content) to current security header,
williamr@2
   141
        * appending to existing. The token is appended after the
williamr@2
   142
        * current content of security token. Method instantiates
williamr@2
   143
        * and adds default security header (without data), if
williamr@2
   144
        * such was not set in beforehand.
williamr@2
   145
        * @since Series60 4.0
williamr@2
   146
        * @param    aNewToken   Token to be inserted.
williamr@2
   147
        * @return   KErrNone or some system-wide Symbian error codes.
williamr@2
   148
        */
williamr@2
   149
        IMPORT_C TInt AddSecurityTokenL(const TDesC8& aNewToken);
williamr@2
   150
        
williamr@2
   151
    public: // From MSenMessage
williamr@2
   152
        IMPORT_C virtual TClass Type();
williamr@2
   153
        IMPORT_C virtual MSenMessage* CloneL();
williamr@2
   154
williamr@2
   155
    protected:
williamr@2
   156
williamr@2
   157
        /**
williamr@2
   158
         *  C++ default constructor.
williamr@2
   159
         */
williamr@2
   160
        IMPORT_C CSenSoapMessage2::CSenSoapMessage2();
williamr@2
   161
williamr@2
   162
        // New functions
williamr@2
   163
williamr@2
   164
        /**
williamr@2
   165
        * Helper function to make a new security header.
williamr@2
   166
        * @since Series60 4.0
williamr@2
   167
        * @param    aData   Default=NULL. Data to be set in the security header.
williamr@2
   168
        * @return   new security header, which is located in the cleanup stack.
williamr@2
   169
        *           Caller takes ownership.
williamr@2
   170
        */
williamr@2
   171
        IMPORT_C virtual CSenWsSecurityHeader2* NewSecurityHeaderLC(
williamr@2
   172
                                                    const TDesC8* aData,
williamr@2
   173
                                                    RSenDocument aDocument,
williamr@2
   174
                                                    TXmlEngElement element);
williamr@2
   175
williamr@2
   176
        // Functions from base classes
williamr@2
   177
williamr@2
   178
        // From CSenSoapEnvelope
williamr@2
   179
        IMPORT_C virtual void ParseHeaderL(const RTagInfo& aElement,
williamr@2
   180
                                           const RAttributeArray& aAttributes);
williamr@2
   181
williamr@2
   182
        /**
williamr@2
   183
        * This method should be called from the deriving classes ConstructL() methods.
williamr@2
   184
        * @since Series60 4.0
williamr@2
   185
        */
williamr@2
   186
        IMPORT_C void BaseConstructL();
williamr@2
   187
williamr@2
   188
		/**
williamr@2
   189
		* This method should be called from the deriving classes ConstructL() methods.
williamr@2
   190
	    * @since Series60 4.0
williamr@2
   191
		*/
williamr@2
   192
	    IMPORT_C void BaseConstructL(TSOAPVersion aVersion);
williamr@2
   193
	    
williamr@2
   194
		/**
williamr@2
   195
		* This method should be called from the deriving classes ConstructL() methods.
williamr@2
   196
	    * @since Series60 4.0
williamr@2
   197
		*/
williamr@2
   198
        IMPORT_C void BaseConstructL(TSOAPVersion aVersion, const TDesC8& aSecurityNs);	    
williamr@2
   199
williamr@2
   200
        /**
williamr@2
   201
        * This method should be called from the deriving classes ConstructL() methods.
williamr@2
   202
        * @since Series60 4.0
williamr@2
   203
        */
williamr@2
   204
        IMPORT_C void BaseConstructL(MSenMessageContext& aContext);
williamr@2
   205
williamr@2
   206
		/**
williamr@2
   207
		* This method should be called from the deriving classes ConstructL() methods.
williamr@2
   208
	    * @since Series60 4.0
williamr@2
   209
		*/
williamr@2
   210
	    IMPORT_C void BaseConstructL(MSenMessageContext& aContext,
williamr@2
   211
	                                 TSOAPVersion aVersion);
williamr@2
   212
	    
williamr@2
   213
		/**
williamr@2
   214
		* This method should be called from the deriving classes ConstructL() methods.
williamr@2
   215
	    * @since Series60 4.0
williamr@2
   216
		*/
williamr@2
   217
        IMPORT_C void BaseConstructL(MSenMessageContext& aContext,
williamr@2
   218
                                     TSOAPVersion aVersion,
williamr@2
   219
                                     const TDesC8& aSecurityNs);	    
williamr@2
   220
williamr@2
   221
        /**
williamr@2
   222
        * This method should be called from the deriving
williamr@2
   223
        * classes ConstructL() methods.
williamr@2
   224
        * @since Series60 4.0
williamr@2
   225
        */
williamr@2
   226
        IMPORT_C void BaseConstructL(CSenSoapMessage2& aMessage);
williamr@2
   227
williamr@2
   228
    protected: // Data
williamr@2
   229
        // Owned, but element not owned
williamr@2
   230
        CSenWsSecurityHeader2* ipSecurityHeader;
williamr@2
   231
    };
williamr@2
   232
williamr@2
   233
#endif // SEN_SOAP_MESSAGE_H
williamr@2
   234
williamr@2
   235
// End of File
williamr@2
   236
williamr@2
   237