phonebookengines/VirtualPhonebook/VPbkSimStoreImpl/inc/CServiceTableCmd.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  A command that queries (U)SIM service table and checks
       
    15 *                if the store is supported. Updates the data in CVPbkPhone
       
    16 *                so this command is needs to run only once.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef VPBKSIMSTOREIMPL_CSERVICETABLECMD_H
       
    23 #define VPBKSIMSTOREIMPL_CSERVICETABLECMD_H
       
    24 
       
    25 //  INCLUDES
       
    26 #include <MVPbkSimCommand.h>
       
    27 #include <e32base.h>
       
    28 #include <etelmm.h>
       
    29 #include "VPbkSimStoreCommon.h"
       
    30 
       
    31 namespace VPbkSimStoreImpl {
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CPhone;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 *  A command that queries (U)SIM service table
       
    40 *
       
    41 */
       
    42 NONSHARABLE_CLASS(CServiceTableCmd) : public CActive,
       
    43                                       public MVPbkSimCommand
       
    44     {
       
    45     public:  // Constructors and destructor
       
    46         
       
    47         /**
       
    48         * Two-phased constructor.
       
    49         * @param aPhone the phone for making the request
       
    50         * @param aServiceTable a table to update with TVPbkSimPhoneFlags
       
    51         * @return a new instance of this class
       
    52         */
       
    53         static CServiceTableCmd* NewLC( CPhone& aPhone, 
       
    54                 TUint32& aServiceTable );
       
    55 
       
    56         /**
       
    57         * Destructor.
       
    58         */
       
    59         virtual ~CServiceTableCmd();
       
    60 
       
    61     public: // Functions from base classes
       
    62 
       
    63         /**
       
    64         * From MVPbkSimCommand
       
    65         */
       
    66         void Execute();
       
    67 
       
    68         /**
       
    69         * From MVPbkSimCommand
       
    70         */
       
    71         void AddObserverL( MVPbkSimCommandObserver& aObserver );
       
    72 
       
    73         /**
       
    74         * From MVPbkSimCommand
       
    75         */
       
    76         void CancelCmd();
       
    77         
       
    78     private: // From CActive
       
    79         void RunL();                
       
    80         void DoCancel();
       
    81         TInt RunError( TInt aError );
       
    82         
       
    83         
       
    84     private:    // Construction
       
    85 
       
    86         /**
       
    87         * C++ constructor.
       
    88         */
       
    89         CServiceTableCmd( CPhone& aPhone, TUint32& aServiceTable );
       
    90 
       
    91     private:    // Data
       
    92         /// The phone for requesting servicetable
       
    93         CPhone& iPhone;
       
    94         /// The identifier of the store
       
    95         TUint32& iVPbkServiceTable;
       
    96         /// ETrue if USIM supported
       
    97         TBool iUSimSupported;
       
    98         /// The (U)SIM service table
       
    99         RMobilePhone::TMobilePhoneServiceTableV1 iServiceTable;
       
   100         // A package for service table
       
   101         RMobilePhone::TMobilePhoneServiceTableV1Pckg iServiceTablePckg;
       
   102         /// Ref: only one observer supported
       
   103         MVPbkSimCommandObserver* iObserver;
       
   104     };
       
   105 } // namespace VPbkSimStoreImpl
       
   106 #endif      // VPBKSIMSTOREIMPL_CSERVICETABLECMD_H
       
   107             
       
   108 // End of File