PECengine/ListLibrary2/ContactListSrc/CPEngGetWatchersTransaction.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     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:  Handler to get watcher list.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CPENGGETWATCHERSTRANSACTION_H__
       
    19 #define __CPENGGETWATCHERSTRANSACTION_H__
       
    20 
       
    21 //  INCLUDES
       
    22 #include <e32base.h>
       
    23 #include <badesca.h>
       
    24 #include "MPEngOutgoingTransactionHandler.h"
       
    25 #include "PEngWVCspVersion.h"
       
    26 
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CPEngTransactionStatus;
       
    30 class CPEngContactListModBase;
       
    31 
       
    32 
       
    33 
       
    34 // CLASS DECLARATION
       
    35 /**
       
    36  * Transaction to fetch list of watchers.
       
    37  *
       
    38  * @lib PEngListLib2
       
    39  * @since 3.0
       
    40  */
       
    41 NONSHARABLE_CLASS( CPEngGetWatchersTransaction ):
       
    42         public CBase,
       
    43         public MPEngOutgoingTransactionHandler
       
    44     {
       
    45 public:
       
    46 
       
    47     /**
       
    48      * Two-phased constructor.
       
    49      */
       
    50     static CPEngGetWatchersTransaction* NewLC(
       
    51         CPEngContactListModBase& aWatchers,
       
    52         TPEngWVCspVersion& aCSPVersion,
       
    53         TInt aOperationId );
       
    54     /**
       
    55      * Destructor.
       
    56      */
       
    57     virtual ~CPEngGetWatchersTransaction();
       
    58 
       
    59 
       
    60 public: // Functions from MPEngOutgoingTransactionHandler
       
    61 
       
    62     /**
       
    63      * Synchronous method, get Outgoing transaction request
       
    64      * @see <MPEngOutgoingTransactionHandler.h>
       
    65      */
       
    66     void RequestL( TDes8& aSendBuffer );
       
    67 
       
    68 
       
    69     /**
       
    70      * Signals to the transaction handler that it is last
       
    71      * @see <MPEngOutgoingTransactionHandler.h>
       
    72      */
       
    73     void LastRunningTransactionHandler(  );
       
    74 
       
    75 
       
    76     /**
       
    77      * Process the response to the request.
       
    78      * @see <MPEngOutgoingTransactionHandler.h>
       
    79      */
       
    80     void ProcessResponseL( const TDesC8& aResponse,
       
    81                            TRequestStatus& aStatus );
       
    82 
       
    83     /**
       
    84      * Cancels asynchronous processing of the request
       
    85      * @see <MPEngOutgoingTransactionHandler.h>
       
    86      */
       
    87     void CancelProcessing();
       
    88 
       
    89 
       
    90     /**
       
    91      * Support for simultaneous transaction handling
       
    92      * @see <MPEngOutgoingTransactionHandler.h>
       
    93      */
       
    94     void NewTransactionHandlersL(
       
    95         RPointerArray<MPEngOutgoingTransactionHandler>& aHandlers );
       
    96 
       
    97 
       
    98     /**
       
    99      * Function to signal completing of the transaction
       
   100      * @see <MPEngOutgoingTransactionHandler.h>
       
   101      */
       
   102     TBool TransactionCompleted();
       
   103 
       
   104 
       
   105     /**
       
   106      * Gets transaction status result class
       
   107      * @see <MPEngOutgoingTransactionHandler.h>
       
   108      */
       
   109     CPEngTransactionStatus* TransactionResult( );
       
   110 
       
   111 
       
   112     /**
       
   113      * Releases the handler
       
   114      * @see <MPEngOutgoingTransactionHandler.h>
       
   115      */
       
   116     void ReleaseHandler();
       
   117 
       
   118 
       
   119 private: // constructor
       
   120 
       
   121     /**
       
   122      * C++ default constructor.
       
   123      */
       
   124     CPEngGetWatchersTransaction( CPEngContactListModBase& aWatchers,
       
   125                                  TPEngWVCspVersion& aCSPVersion,
       
   126                                  TInt aOperationId );
       
   127 
       
   128     /**
       
   129     * Symbian constructor.
       
   130     */
       
   131     void ConstructL();
       
   132 
       
   133 private:    // Data
       
   134 
       
   135     /// OWN: flag if transaction is completed
       
   136     TBool                           iIsTransactionCompleted;
       
   137 
       
   138     /// OWN: transaction status class
       
   139     CPEngTransactionStatus*     iTransactionStatus;
       
   140 
       
   141     /// OWN: watcher list main array class
       
   142     CPEngContactListModBase&        iWatchers;
       
   143 
       
   144     /// OWN: CSP Version
       
   145     TPEngWVCspVersion&              iCSPVersion;
       
   146 
       
   147     /// OWN: Operation Id
       
   148     TInt                            iOperationId;
       
   149 
       
   150     };
       
   151 
       
   152 #endif      //  __CPENGGETWATCHERSTRANSACTION_H__
       
   153 
       
   154 //  End of File
       
   155