vmbx/vmbxengine/inc/vmbxsimstoreobserver.h
changeset 12 ae8abd0db65c
child 19 e44a8c097b15
equal deleted inserted replaced
0:ff3b6d0fd310 12:ae8abd0db65c
       
     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 "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:  Observer to Sim Store changed
       
    15 *  Interface   : Private, CVmbxSimStoreObserver
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef C_VMBXSIMSTOREOBSERVERR_H
       
    21 #define C_VMBXSIMSTOREOBSERVERR_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include "mvmbxsimstoreobserver.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CVmbxSimHandler;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  DECLARATION CVmbxSimStoreObserver
       
    34 *
       
    35 *  @lib vmbxengine.lib
       
    36 *  @since S60 v5.2
       
    37 */
       
    38 NONSHARABLE_CLASS( CVmbxSimStoreObserver ) : public CActive
       
    39     {
       
    40 
       
    41 public:  // Constructors and destructor
       
    42 
       
    43     /**
       
    44      * Two-phased constructor
       
    45      * @param in aSimHandler Reference to Sim handler
       
    46      * @param in aObserver observer of MVmbxSimStoreObserver
       
    47      */
       
    48     static CVmbxSimStoreObserver* NewL( CVmbxSimHandler& aSimHandler,
       
    49                                     MVmbxSimStoreObserver& aObserver );
       
    50 
       
    51     /**
       
    52      * Destructor.
       
    53      */
       
    54     virtual ~CVmbxSimStoreObserver();
       
    55 
       
    56 public: // New functions
       
    57 
       
    58     /**
       
    59     * Activates this notification. Call ETel NotifyStoreEvent.
       
    60     */
       
    61     void ActivateL();
       
    62 
       
    63 private:
       
    64 
       
    65     /**
       
    66      * C++ default constructor.
       
    67      * @param in aSimHandler Reference to Sim handler
       
    68      * @param in aObserver observer of MVmbxSimStoreObserver
       
    69      */
       
    70     CVmbxSimStoreObserver( CVmbxSimHandler& aSimHandler,
       
    71                         MVmbxSimStoreObserver& aObserver );
       
    72 
       
    73     /**
       
    74      * By default Symbian 2nd phase constructor is private.
       
    75      */
       
    76     void ConstructL();
       
    77 
       
    78     /**
       
    79      * Informs SimHandler about changed number
       
    80      */
       
    81     void NotifySimHandler();
       
    82 
       
    83 // from base class CActive
       
    84 private: 
       
    85     /**
       
    86     * @see CActive::RunL
       
    87     */
       
    88     void RunL();
       
    89 
       
    90     /**
       
    91     * @see CActive::DoCancel
       
    92     */
       
    93     void DoCancel();
       
    94 
       
    95 
       
    96 private: // data
       
    97 
       
    98     /**
       
    99      * The index of the entry that has been changed
       
   100      */
       
   101     TInt iIndex;
       
   102 
       
   103     /**
       
   104      * The events that ETel sends
       
   105      */
       
   106     TUint32 iEvents;
       
   107 
       
   108     /**
       
   109      * CVmbxSimHandler reference
       
   110      * 
       
   111      */
       
   112     CVmbxSimHandler& iSimHandler;
       
   113 
       
   114     /**
       
   115      * MVmbxSimStoreObserver reference
       
   116      * 
       
   117      */
       
   118     MVmbxSimStoreObserver& iObserver;
       
   119 
       
   120     };
       
   121 
       
   122 #endif  // C_VMBXSIMSTOREOBSERVERR_H