PECengine/PresenceManager2/SrcContactList/CPEngCntLstPublishSyncOp.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: this class handles the operation for publishing / synhronizing contact lists.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CPENGCNTLSTPUBLISHSYNCOP_H
       
    19 #define CPENGCNTLSTPUBLISHSYNCOP_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include <E32Base.h>
       
    23 #include <badesca.h>
       
    24 #include "CPEngAsyncOperation.h"
       
    25 
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MPEngContactListTransactionObserver2;
       
    29 class MPEngAdvTransactionStatus2;
       
    30 class CPEngContactListTransaction2;
       
    31 
       
    32 
       
    33 
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 
       
    38 /**
       
    39  * Operation handler for publishing / synhronizing contact lists.
       
    40  *
       
    41  * @lib
       
    42  * @since 3.0
       
    43  */
       
    44 NONSHARABLE_CLASS( CPEngCntLstPublishSyncOp ) : public CPEngAsyncOperation
       
    45     {
       
    46 public:  // enumerations
       
    47 
       
    48 
       
    49 
       
    50 public:  // Constructors and destructor
       
    51 
       
    52     /**
       
    53      * Two-phased constructor.
       
    54      */
       
    55     static CPEngCntLstPublishSyncOp* NewL( TInt aPriority,
       
    56     CPEngContactListTransaction2& aInterface,
       
    57     CPEngNWSessionSlotStorageProxy& aUsedSlot,
       
    58     const MDesCArray& aContactListNames,
       
    59     TBool aSynchronization,
       
    60     MPEngContactListTransactionObserver2& aObserver,
       
    61     RPEngManagerClient& aServer );
       
    62 
       
    63     /**
       
    64      * Destructor.
       
    65      */
       
    66     virtual ~CPEngCntLstPublishSyncOp();
       
    67 
       
    68 private:
       
    69 
       
    70     /**
       
    71      * C++ default constructor.
       
    72      */
       
    73     CPEngCntLstPublishSyncOp( TInt aPriority,
       
    74                               CPEngContactListTransaction2& aInterface,
       
    75                               MPEngContactListTransactionObserver2& aObserver,
       
    76                               RPEngManagerClient& aServer );
       
    77 
       
    78     /**
       
    79      * Symbian OS constructor.
       
    80      */
       
    81     void ConstructL( CPEngNWSessionSlotStorageProxy& aUsedSlot,
       
    82                      const MDesCArray& aContactListNames,
       
    83                      TBool aSynchronization );
       
    84 
       
    85 
       
    86 public: //New services
       
    87 
       
    88 
       
    89     /**
       
    90      *
       
    91      *
       
    92      *
       
    93      *
       
    94      * @since 3.0
       
    95      */
       
    96     void IssuePublishSync();
       
    97 
       
    98 
       
    99 
       
   100 
       
   101 private: //Template method from base
       
   102 
       
   103     /**
       
   104      * Notifies from operation complete.
       
   105      */
       
   106     void DoHandleOpSuccessL( MPEngAdvTransactionStatus2& aStatus,
       
   107                              TInt aTransactionOperation );
       
   108 
       
   109     void DoHandleOpFailure( MPEngAdvTransactionStatus2& aStatus,
       
   110                             TInt aTransactionOperation );
       
   111 
       
   112     TPEngAsyncOpResult DoNotifyObserver( MPEngAdvTransactionStatus2& aStatus,
       
   113                                          TInt aTransactionOperation );
       
   114 
       
   115 
       
   116 
       
   117 
       
   118 private:
       
   119 
       
   120     //REF: The implemented interface
       
   121     CPEngContactListTransaction2&     iInterface;
       
   122 
       
   123     //REF: The observer
       
   124     MPEngContactListTransactionObserver2&     iObserver;
       
   125 
       
   126     };
       
   127 
       
   128 #endif  //CPENGCNTLSTPUBLISHSYNCOP_H
       
   129 
       
   130 
       
   131