PECengine/AttributeLibrary2/SrcTransactions/CPEngAttributePublishHandler.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Presence attribute publisher.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CPENGATTRIBUTEPUBLISHHANDLER_H__
       
    19 #define CPENGATTRIBUTEPUBLISHHANDLER_H__
       
    20 
       
    21 
       
    22 //  INCLUDES
       
    23 #include "MPEngOutgoingTransactionHandler.h"
       
    24 #include "PEngWVCspVersion.h"
       
    25 #include <E32Base.h>
       
    26 
       
    27 
       
    28 //FORWARD DECLARATION
       
    29 class CPEngTransactionStatus;
       
    30 class MPEngPresenceAttrManager;
       
    31 class MPEngPresenceAttrTransactionEnv;
       
    32 class MPEngPresenceAttrModel2;
       
    33 class MPEngXMLParser;
       
    34 
       
    35 
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40  * Presence attribute publisher.
       
    41  *
       
    42  * @lib PEngAttrLib
       
    43  * @since 3.0
       
    44  */
       
    45 NONSHARABLE_CLASS( CPEngAttributePublishHandler ) : public CBase,
       
    46         public MPEngOutgoingTransactionHandler
       
    47     {
       
    48 public:  // Constructors and destructor
       
    49 
       
    50     /**
       
    51     * Two-phased constructor.
       
    52     */
       
    53     static CPEngAttributePublishHandler* NewLC( MPEngPresenceAttrManager& aAttrManager,
       
    54     MPEngPresenceAttrTransactionEnv& aTransEnv,
       
    55     const TDesC16& aData,
       
    56     TInt aTransactionOperation,
       
    57     TPEngWVCspVersion aCspVersion );
       
    58 
       
    59     /**
       
    60     * Destructor.
       
    61     */
       
    62     virtual ~CPEngAttributePublishHandler();
       
    63 
       
    64 
       
    65 
       
    66 private:
       
    67 
       
    68     /**
       
    69      * C++ default constructor.
       
    70      */
       
    71     CPEngAttributePublishHandler( MPEngPresenceAttrManager& aAttrManager,
       
    72                                   MPEngPresenceAttrTransactionEnv& aTransEnv,
       
    73                                   TInt aTransactionOperation,
       
    74                                   TPEngWVCspVersion aCspVersion );
       
    75 
       
    76     /**
       
    77      * By default Symbian 2nd phase constructor is private.
       
    78      */
       
    79     void ConstructL( const TDesC16& aData );
       
    80 
       
    81 
       
    82 
       
    83 
       
    84 
       
    85 public: // Functions from MPEngOutgoingTransactionHandler
       
    86 
       
    87     /**
       
    88      * From MPEngOutgoingTransactionHandler
       
    89      *
       
    90      * @since 3.0
       
    91      */
       
    92     void RequestL( TDes8& aSendBuffer );
       
    93 
       
    94     void LastRunningTransactionHandler();
       
    95 
       
    96     void ProcessResponseL( const TDesC8& aResponse,
       
    97                            TRequestStatus& aStatus );
       
    98 
       
    99 
       
   100     void CancelProcessing();
       
   101     void NewTransactionHandlersL(
       
   102         RPointerArray<MPEngOutgoingTransactionHandler>& aHandlers );
       
   103 
       
   104 
       
   105     TBool TransactionCompleted();
       
   106     CPEngTransactionStatus* TransactionResult();
       
   107 
       
   108     void ReleaseHandler();
       
   109 
       
   110 
       
   111 
       
   112 
       
   113 
       
   114 
       
   115 
       
   116 private:    // Data
       
   117 
       
   118     //REF: Attribute Manager
       
   119     MPEngPresenceAttrManager&   iAttributeManager;
       
   120 
       
   121     //REF: Attribute Transaction Env
       
   122     MPEngPresenceAttrTransactionEnv&    iTransEnv;
       
   123 
       
   124     //OWN : Transaction operation
       
   125     const TInt iTransactionOperation;
       
   126 
       
   127     //OWN: WV CSP version
       
   128     const TPEngWVCspVersion  iCspVersion;
       
   129 
       
   130     //OWN : Transaction status
       
   131     CPEngTransactionStatus*     iTransactionStatus;
       
   132 
       
   133     //OWN: Published attribute models
       
   134     RPointerArray< MPEngPresenceAttrModel2 >  iAttributeModels;
       
   135 
       
   136     //OWN: XML Parser
       
   137     MPEngXMLParser*     iXmlParser;
       
   138 
       
   139     /// OWN: Online status was published flag
       
   140     TBool               iOnlineStPublished;
       
   141 
       
   142     };
       
   143 
       
   144 #endif      //  CPENGATTRIBUTEPUBLISHHANDLER_H__
       
   145 
       
   146 //  End of File
       
   147