PECengine/ListLibrary2/ContactListSrc/CPEngContactListDeleteTrans.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 delete contact list.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CPENGCONTACTLISTDELETETRANS_H__
       
    19 #define __CPENGCONTACTLISTDELETETRANS_H__
       
    20 
       
    21 
       
    22 //  INCLUDES
       
    23 #include "MPEngOutgoingTransactionHandler.h"
       
    24 #include "PEngWVCspVersion.h"
       
    25 #include <e32base.h>
       
    26 
       
    27 
       
    28 // CLASS DECLARATION
       
    29 class MPEngContactListTransactionManager;
       
    30 class CPEngTransactionStatus;
       
    31 class MPEngXMLParser;
       
    32 class CPEngContactListModBase;
       
    33 class MPEngXMLSerializer;
       
    34 
       
    35 
       
    36 /**
       
    37  * Handler to delete contact list.
       
    38  *
       
    39  * @lib PEngListLib2
       
    40  * @since 3.0
       
    41  */
       
    42 NONSHARABLE_CLASS( CPEngContactListDeleteTrans ) :
       
    43         public CBase,
       
    44         public MPEngOutgoingTransactionHandler
       
    45     {
       
    46 private:
       
    47 
       
    48     /**
       
    49      * Private enumerations.
       
    50      */
       
    51     enum TPEngDeleteTransState
       
    52         {
       
    53         EPEngUnSubscribeContactList = 0,
       
    54         EPEngDeleteContactList,
       
    55         EPEngTransactionCompleted
       
    56         };
       
    57 
       
    58 
       
    59 public:
       
    60 
       
    61     /**
       
    62      * Two-phased constructor.
       
    63      */
       
    64     static CPEngContactListDeleteTrans* NewLC(
       
    65         CPEngContactListModBase& aContactList,
       
    66         MPEngContactListTransactionManager& aSettingsManager,
       
    67         TPEngWVCspVersion& aCSPVersion,
       
    68         TInt aOperationId );
       
    69 
       
    70     /**
       
    71      * Destructor.
       
    72      */
       
    73     virtual ~CPEngContactListDeleteTrans();
       
    74 
       
    75 
       
    76 public: // From MPEngOutgoingTransactionHandler
       
    77 
       
    78     /**
       
    79      * Synchronous method, get Outgoing transaction request
       
    80      * @see <MPEngOutgoingTransactionHandler.h>
       
    81      */
       
    82     void RequestL( TDes8& aSendBuffer );
       
    83 
       
    84 
       
    85     /**
       
    86      * Signals to the transaction handler thst it is last
       
    87      * @see <MPEngOutgoingTransactionHandler.h>
       
    88      */
       
    89     void LastRunningTransactionHandler();
       
    90 
       
    91 
       
    92     /**
       
    93      * Process the response to the request.
       
    94      * @see <MPEngOutgoingTransactionHandler.h>
       
    95      */
       
    96     void ProcessResponseL( const TDesC8& aResponse,
       
    97                            TRequestStatus& aStatus );
       
    98 
       
    99 
       
   100     /**
       
   101      * Cancels asynchronous processing of the request
       
   102      * @see <MPEngOutgoingTransactionHandler.h>
       
   103      */
       
   104     void CancelProcessing();
       
   105 
       
   106 
       
   107     /**
       
   108      * Support for simultaneous transaction handling
       
   109      * @see <MPEngOutgoingTransactionHandler.h>
       
   110      */
       
   111     void NewTransactionHandlersL(
       
   112         RPointerArray<MPEngOutgoingTransactionHandler>& aHandlers );
       
   113 
       
   114     /**
       
   115      * Function to signal completing of the transaction
       
   116      * @see <MPEngOutgoingTransactionHandler.h>
       
   117      */
       
   118     TBool TransactionCompleted();
       
   119 
       
   120 
       
   121     /**
       
   122      * Gets transaction status result class
       
   123      * @see <MPEngOutgoingTransactionHandler.h>
       
   124      */
       
   125     CPEngTransactionStatus* TransactionResult( );
       
   126 
       
   127 
       
   128     /**
       
   129      * Releases the handler
       
   130      * @see <MPEngOutgoingTransactionHandler.h>
       
   131      */
       
   132     void ReleaseHandler();
       
   133 
       
   134 
       
   135 
       
   136 private:    // New functions
       
   137 
       
   138     /**
       
   139      * Get XML request to unsubscribe contact list
       
   140      *
       
   141      * @since 3.0
       
   142      * @param aXmlSerializer XML serializer
       
   143      */
       
   144     void GetXMLUnsubscribeContactListL( MPEngXMLSerializer& aXmlSerializer );
       
   145 
       
   146     /**
       
   147      * Get XML request to delete contact list
       
   148      *
       
   149      * @since 3.0
       
   150      * @param aXmlSerializer XML serializer
       
   151      */
       
   152     void GetXMLDeleteContactListL( MPEngXMLSerializer& aXmlSerializer );
       
   153 
       
   154 
       
   155 private: // Constructors
       
   156 
       
   157     /**
       
   158      * C++ constructor.
       
   159      */
       
   160     CPEngContactListDeleteTrans(
       
   161         CPEngContactListModBase& aContactList,
       
   162         MPEngContactListTransactionManager& aSettingsManager,
       
   163         TPEngWVCspVersion& aCSPVersion,
       
   164         TInt aOperationId );
       
   165 
       
   166 
       
   167     /**
       
   168      * Symbian constructor.
       
   169      */
       
   170     void ConstructL();
       
   171 
       
   172 private:    // Data
       
   173 
       
   174     /// OWN: Contact list model
       
   175     CPEngContactListModBase&                iContactList;
       
   176 
       
   177     /// REF: Manager of the contact lists
       
   178     MPEngContactListTransactionManager&     iSettingsManager;
       
   179 
       
   180     // OWN: State of the transaction handler
       
   181     TInt                                    iTransactionState;
       
   182 
       
   183     // OWN: Transaction status class
       
   184     CPEngTransactionStatus*                 iTransactionStatus;
       
   185 
       
   186     /// REF: CSP Version
       
   187     TPEngWVCspVersion&                      iCSPVersion;
       
   188 
       
   189     /// OWN: Operation Id
       
   190     TInt                                    iOperationId;
       
   191 
       
   192     };
       
   193 
       
   194 #endif      //  __CPENGCONTACTLISTDELETETRANS_H__
       
   195 
       
   196 
       
   197 
       
   198 
       
   199 //  End of File
       
   200