radioengine/utils/inc/cradiorepositoryentitybase.h
branchGCC_SURGE
changeset 37 451b2e1545b2
parent 26 6bcf277166c1
parent 33 11b6825f0862
equal deleted inserted replaced
26:6bcf277166c1 37:451b2e1545b2
     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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_RADIOREPOSITORYENTITYBASE_H
       
    19 #define C_RADIOREPOSITORYENTITYBASE_H
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 class MRadioRepositoryEntityObserver;
       
    24 
       
    25 /**
       
    26  * Base class for a central repository entity.
       
    27  *
       
    28  * All instantiable central repository entities must be derived from this class.
       
    29  * The class is provided so that a heterogenous array of templated objects can be created, and to
       
    30  * provide common data fields for the said purpose.
       
    31  */
       
    32 NONSHARABLE_CLASS( CRadioRepositoryEntityBase ) : public CActive
       
    33     {
       
    34 
       
    35 public:
       
    36 
       
    37     ~CRadioRepositoryEntityBase();
       
    38 
       
    39     /**
       
    40      * Returns the UID of the repository the entity is bound to.
       
    41      *
       
    42      * @return  The UID of the repository the entity is bound to.
       
    43      */
       
    44     const TUid& Uid() const;
       
    45 
       
    46     /**
       
    47      * Returns the key the entity is bound to.
       
    48      *
       
    49      * @return  The key the entity is bound to.
       
    50      */
       
    51     TUint32 Key() const;
       
    52 
       
    53 protected:
       
    54 
       
    55     /**
       
    56      * Constructor.
       
    57      *
       
    58      * @param   aUid        The UID of the repository that this entity will be bound to.
       
    59      * @param   aKey        The key within the repository that this entity will be bound to.
       
    60      * @param   aObserver   The observer that is notified whenever the value of the key within the repository changes.
       
    61      * @param   aPriority   The priority of the active object.
       
    62      */
       
    63     CRadioRepositoryEntityBase( const TUid& aUid, TUint32 aKey, MRadioRepositoryEntityObserver& aObserver, CActive::TPriority aPriority );
       
    64 
       
    65 protected:
       
    66 
       
    67     /** The observer that is notified of changes in the key. */
       
    68     MRadioRepositoryEntityObserver& iObserver;
       
    69 
       
    70     /** The UID of the repository the entity is bound to. */
       
    71     TUid iUid;
       
    72 
       
    73     /** The key the entity is bound to.. */
       
    74     TUint32 iKey;
       
    75 
       
    76     };
       
    77 
       
    78 #endif // C_RADIOREPOSITORYENTITYBASE_H