qtinternetradio/irqsystemeventhandler/inc/irpropertyobserver.h
changeset 5 0930554dc389
equal deleted inserted replaced
3:ee64f059b8e1 5:0930554dc389
       
     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 IRPROPERTYOBSERVER_H
       
    19 #define IRPROPERTYOBSERVER_H 
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 //This is an symbian interface.  
       
    24 class MIRPropertyChangeObserverInterface
       
    25 {
       
    26 
       
    27 public:
       
    28 
       
    29     virtual void HandlePropertyChangeL(const TUid& aCategory, const TUint aKey, const TInt aValue) = 0;
       
    30     virtual void HandlePropertyChangeErrorL(const TUid& aCategory, const TUint aKey, TInt aError) = 0;
       
    31 };
       
    32 
       
    33 class MIRPropertyObserverInterface;
       
    34 class CIRPropertyChangeAO;
       
    35 
       
    36 class CIRPropertyObserver : public CBase, public MIRPropertyChangeObserverInterface
       
    37 {
       
    38 public:
       
    39 
       
    40     //only two-phase constructor is permit to use
       
    41     static  CIRPropertyObserver* NewL(MIRPropertyObserverInterface* aObserver);
       
    42     static  CIRPropertyObserver* NewLC(MIRPropertyObserverInterface* aObserver);
       
    43     ~CIRPropertyObserver();
       
    44     TBool    IsCallActive() const;
       
    45 
       
    46 protected:
       
    47 
       
    48     //from base class MIRPropertyChangeObserverInterface
       
    49     void HandlePropertyChangeL(const TUid& aCategory, const TUint aKey, const TInt aValue);
       
    50     void HandlePropertyChangeErrorL(const TUid& aCategory, const TUint aKey, TInt aError);
       
    51 
       
    52 private:
       
    53 
       
    54     void ConstructL();
       
    55     CIRPropertyObserver(MIRPropertyObserverInterface* aObserver);
       
    56 
       
    57 private: 
       
    58     
       
    59     CIRPropertyChangeAO* iCallStatusObserver;
       
    60     TBool                iIsCallActive;
       
    61     
       
    62     MIRPropertyObserverInterface* iPropertyObserver;
       
    63 };
       
    64  
       
    65 #endif	//IRPROPERTYOBSERVER_H
       
    66