adaptationlayer/tsy/nokiatsy_dll/inc/cmmphonebookstoreoperationlist.h
changeset 0 63b37f68c1ce
child 5 8ccc39f9d787
equal deleted inserted replaced
-1:000000000000 0:63b37f68c1ce
       
     1 /*
       
     2 * Copyright (c) 2009 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 the License "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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CMMPHONEBOOKOPERATIONLIST_H
       
    19 #define CMMPHONEBOOKOPERATIONLIST_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include <ctsy/pluginapi/cmmdatapackage.h>
       
    23 #include <e32base.h>
       
    24 
       
    25 #include "cmmphonebookstoreoperationbase.h"
       
    26 
       
    27 //UICC
       
    28 #include "muiccoperationbase.h"
       
    29 #include "cmmuiccmesshandler.h"
       
    30 
       
    31 
       
    32 //  CONSTANTS
       
    33     //none
       
    34 
       
    35 //  MACROS
       
    36     //none
       
    37 
       
    38 //  DATA TYPES
       
    39     //none
       
    40 
       
    41 //  EXTERNAL DATA STRUCTURES
       
    42 
       
    43 //  FUNCTION PROTOTYPES
       
    44     //none
       
    45 
       
    46 //  FORWARD DECLARATIONS
       
    47     //none
       
    48 
       
    49 // CLASS DECLARATION
       
    50 class CMmMessageManager;
       
    51 class CMmPhoneBookStoreMessHandler;
       
    52 //class CMmUiccMessHandler;
       
    53 
       
    54 /**
       
    55 * CMmPhoneBookStoreOperationList is used to keep list of different request(s)
       
    56 * (operation(s))
       
    57 */
       
    58 class CMmPhoneBookStoreOperationList
       
    59     : public CBase
       
    60     {
       
    61     public:  // Constructors and destructor
       
    62 
       
    63         /**
       
    64         * Two-phased constructor.
       
    65         */
       
    66         static CMmPhoneBookStoreOperationList* NewL(
       
    67             CMmPhoneBookStoreMessHandler* aMmPhoneBookStoreMessHandler,
       
    68             CMmUiccMessHandler* aMmUiccMessHandler);
       
    69 
       
    70         /**
       
    71         * Destructor.
       
    72         */
       
    73         ~CMmPhoneBookStoreOperationList();
       
    74 
       
    75         /**
       
    76         * Creates entry point to correct operation.
       
    77         *
       
    78         * @param aDataPackage Packaged data
       
    79         * @param aIpc Identify number of request.
       
    80         * @return Pointer to operation.
       
    81         */
       
    82         CMmPhoneBookStoreOperationBase* BuildL(
       
    83             const CMmDataPackage* aDataPackage,
       
    84             TInt aIpc );
       
    85 
       
    86         /**
       
    87         * Get pointer to correct operation uing identify number.
       
    88         *
       
    89         * @param aTrans Identify number of request.
       
    90         * @param aSearchFrom pointer to entry to start search from
       
    91         * @return Pointer to operation.
       
    92         */
       
    93         CMmPhoneBookStoreOperationBase* Find(
       
    94             TUint8 aTrans,
       
    95             const CMmPhoneBookStoreOperationBase* aSearchFrom=NULL );
       
    96 
       
    97         /**
       
    98         * Remove correct operation from operation list.
       
    99         *
       
   100         * @param aTrans Transaction Id
       
   101         * @return None
       
   102         */
       
   103         void RemoveOperationFromList( TUint8 aTrans );
       
   104 
       
   105         /**
       
   106         * Removes last operation from operation list.
       
   107         * @return TInt KErrNone or KErrNotFound in case list is empty
       
   108         */
       
   109         TInt RemoveLastOperationFromList();
       
   110 
       
   111         /**
       
   112         * Calculates transaction Id from IPC number and
       
   113         * data package
       
   114         * @param aIpc IPC number
       
   115         * @param aDataPackage data package
       
   116         * @param aTransactionId resulting transaction id
       
   117         * @return TInt KErrNone or KErrNotSupported
       
   118         */
       
   119         static TInt CalculateTransactionId(
       
   120             TInt aIpc,
       
   121             const CMmDataPackage* aDataPackage,
       
   122             TUint8& aTransactionId
       
   123             );
       
   124   private:
       
   125 
       
   126         /**
       
   127          * By default Symbian OS constructor is private.
       
   128          */
       
   129          CMmPhoneBookStoreOperationList();
       
   130 
       
   131         /**
       
   132         * Class attributes are created in ConstructL.
       
   133         */
       
   134         void ConstructL();
       
   135 
       
   136     public:     // Data
       
   137         // none
       
   138 
       
   139     protected:  // Data
       
   140         // none
       
   141 
       
   142     private: //data
       
   143         // Pointer to CMmPhoneBookStoreMessHandler.
       
   144         CMmPhoneBookStoreMessHandler* iMmPhoneBookStoreMessHandler;
       
   145         
       
   146         // Pointer to CMmUiccMessHandler
       
   147         CMmUiccMessHandler* iUiccMessHandler;
       
   148         
       
   149         //CMmUiccMessHandler* iMmUiccMessHandler;
       
   150         // Array for saving operation(s)
       
   151         RPointerArray<CMmPhoneBookStoreOperationBase> iPtrOperationArray;
       
   152 };
       
   153 
       
   154 #endif // CMMPHONEBOOKOPERATIONLIST_H
       
   155 
       
   156 // End of file.