PECengine/ListLibrary2/AuthSrc/CPEngAuthorizationTransactionOut.h
branchRCL_3
changeset 17 a941bc465d9f
parent 0 094583676ce7
equal deleted inserted replaced
16:6ca72c0fe49a 17:a941bc465d9f
       
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Authorization out transaction handler.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CPENGAUTHORIZATIONTRANSACTIONOUT_H__
       
    19 #define __CPENGAUTHORIZATIONTRANSACTIONOUT_H__
       
    20 
       
    21 //  INCLUDES
       
    22 #include <e32base.h>
       
    23 #include "MPEngOutgoingTransactionHandler.h"
       
    24 #include "PEngWVCspVersion.h"
       
    25 
       
    26 // CLASS DECLARATION
       
    27 class MPEngAuthorizationEngine;
       
    28 class CPEngAuthorizationResponse;
       
    29 class CPEngTransactionStatus;
       
    30 class MPEngXMLParser;
       
    31 class MPEngXMLSerializer;
       
    32 class MPEngPresenceAttrManager;
       
    33 
       
    34 
       
    35 /**
       
    36  * Authorization out transaction handler.
       
    37  *
       
    38  * @lib PEngListLib2
       
    39  * @since 3.0
       
    40  */
       
    41 class CPEngAuthorizationTransactionOut : public CBase,
       
    42             public MPEngOutgoingTransactionHandler
       
    43     {
       
    44     public:
       
    45 
       
    46         /**
       
    47          * Two-phased constructor.
       
    48          */
       
    49         static CPEngAuthorizationTransactionOut* NewLC(
       
    50             MPEngAuthorizationEngine& aAuthEngine,
       
    51             MPEngPresenceAttrManager& aAttrManager,
       
    52             MPEngXMLParser& aXMLParser,
       
    53             TPEngWVCspVersion& aCSPVersion,
       
    54             TInt aOperationId );
       
    55 
       
    56         /**
       
    57          * Destructor.
       
    58          */
       
    59         virtual ~CPEngAuthorizationTransactionOut();
       
    60 
       
    61 
       
    62     public: // From MPEngOutgoingTransactionHandler
       
    63 
       
    64         /**
       
    65          * Synchronous method, get Outgoing transaction request
       
    66          * @see <MPEngOutgoingTransactionHandler.h>
       
    67          */
       
    68         void RequestL( TDes8& aSendBuffer );
       
    69 
       
    70 
       
    71         /**
       
    72          * Signals to the transaction handler thst it is last
       
    73          * @see <MPEngOutgoingTransactionHandler.h>
       
    74          */
       
    75         void LastRunningTransactionHandler();
       
    76 
       
    77 
       
    78         /**
       
    79          * Process the response to the request.
       
    80          * @see <MPEngOutgoingTransactionHandler.h>
       
    81          */
       
    82         void ProcessResponseL( const TDesC8& aResponse,
       
    83                                TRequestStatus& aStatus );
       
    84 
       
    85         /**
       
    86          * Cancels asynchronous processing of the request
       
    87          * @see <MPEngOutgoingTransactionHandler.h>
       
    88          */
       
    89         void CancelProcessing();
       
    90 
       
    91 
       
    92         /**
       
    93          * Support for simultaneous transaction handling
       
    94          * @see <MPEngOutgoingTransactionHandler.h>
       
    95          */
       
    96         void NewTransactionHandlersL(
       
    97             RPointerArray<MPEngOutgoingTransactionHandler>& aHandlers );
       
    98 
       
    99         /**
       
   100          * Function to signal completing of the transaction
       
   101          * @see <MPEngOutgoingTransactionHandler.h>
       
   102          */
       
   103         TBool TransactionCompleted();
       
   104 
       
   105 
       
   106         /**
       
   107          * Gets transaction status result class
       
   108          * @see <MPEngOutgoingTransactionHandler.h>
       
   109          */
       
   110         CPEngTransactionStatus* TransactionResult( );
       
   111 
       
   112 
       
   113         /**
       
   114          * Releases the handler
       
   115          * @see <MPEngOutgoingTransactionHandler.h>
       
   116          */
       
   117         void ReleaseHandler();
       
   118 
       
   119 
       
   120     public:  // Set authorization response
       
   121 
       
   122         /**
       
   123          * Set authorization response
       
   124          * Function takes ownership
       
   125          *
       
   126          * @since 3.0
       
   127          * @param aResponse authorization response
       
   128          */
       
   129         void SetAuthResponse( CPEngAuthorizationResponse* aResponse );
       
   130 
       
   131 
       
   132 
       
   133     private: // XML message serializers
       
   134 
       
   135         /**
       
   136          * Append XML request to responde to authorization
       
   137          *
       
   138          * @since 3.0
       
   139          * @param aXmlSerializer XML serializer
       
   140          */
       
   141         void AppendXMLPresenceAuthUserL( MPEngXMLSerializer& aXmlSerializer );
       
   142 
       
   143 
       
   144         /**
       
   145          * Append XML request to Cancel authorization
       
   146          *
       
   147          * @since 3.0
       
   148          * @param aXmlSerializer XML serializer
       
   149          */
       
   150         void AppendXMLCancelAuthorizationL( MPEngXMLSerializer& aXmlSerializer );
       
   151 
       
   152 
       
   153         /**
       
   154          * Append in XML message User Id
       
   155          *
       
   156          * @since 3.0
       
   157          * @param aXmlSerializer XML serializer
       
   158          */
       
   159         void AppendXMLUserIdL( MPEngXMLSerializer& aXmlSerializer );
       
   160 
       
   161 
       
   162     private: // Constructors
       
   163 
       
   164         /**
       
   165          * C++ constructor.
       
   166          */
       
   167         CPEngAuthorizationTransactionOut(
       
   168             MPEngAuthorizationEngine& aAuthEngine,
       
   169             MPEngPresenceAttrManager& aAttrManager,
       
   170             MPEngXMLParser& aXMLParser,
       
   171             TPEngWVCspVersion& aCSPVersion,
       
   172             TInt aOperationId );
       
   173 
       
   174 
       
   175         /**
       
   176          * Symbian constructor.
       
   177          */
       
   178         void ConstructL();
       
   179 
       
   180 
       
   181     private:    // Data
       
   182 
       
   183         /// REF: Authorization engine
       
   184         MPEngAuthorizationEngine&               iAuthEngine;
       
   185 
       
   186         /// REF: Attribute manager
       
   187         MPEngPresenceAttrManager&               iAttributeManager;
       
   188 
       
   189         /// REF: XML Parser
       
   190         MPEngXMLParser&                         iXMLParser;
       
   191 
       
   192         /// REF: CSP Version
       
   193         TPEngWVCspVersion&                      iCSPVersion;
       
   194 
       
   195         /// OWN: Transaction completed
       
   196         TBool                                   iTransCompleted;
       
   197 
       
   198         /// OWN: Authorization response
       
   199         CPEngAuthorizationResponse*             iResponse;
       
   200 
       
   201         /// OWN: Transaction status class
       
   202         CPEngTransactionStatus*                 iTransactionStatus;
       
   203 
       
   204         /// OWN: Operation Id
       
   205         TInt                                    iOperationId;
       
   206 
       
   207     };
       
   208 
       
   209 #endif      //  __CPENGAUTHORIZATIONTRANSACTIONOUT_H__
       
   210 
       
   211 
       
   212 
       
   213 //  End of File
       
   214