contextframework/cfwplugins/CallStateSourcePlugIn/inc/CallStateSourcePlugIn.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2006-2006 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:  CCallStateSourcePlugIn class declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_CALLSTATESOURCEPLUGIN_H
       
    21 #define C_CALLSTATESOURCEPLUGIN_H
       
    22 
       
    23 #include <cfcontextsourceplugin.h>
       
    24 #include <cfcontextobject.h>
       
    25 
       
    26 #include "PropertyListenerCallBack.h"
       
    27 
       
    28 class CPropertyListener;
       
    29 
       
    30 /**
       
    31 * Call state source.
       
    32 * Call state source interprets P&S keys related to call state to
       
    33 * context objects.
       
    34 * 
       
    35 * @lib -
       
    36 * @since S60 4.0
       
    37 */
       
    38 NONSHARABLE_CLASS( CCallStateSourcePlugIn ):
       
    39     public CCFContextSourcePlugIn,
       
    40     public MPropertyListenerCallBack
       
    41     {
       
    42     public:
       
    43     
       
    44         // Two phased constructors
       
    45         static CCallStateSourcePlugIn* NewL( 
       
    46         	TContextSourceInitParams* aParams );
       
    47         static CCallStateSourcePlugIn* NewLC( 
       
    48         	TContextSourceInitParams* aParams );
       
    49             
       
    50         // Destructor
       
    51         ~CCallStateSourcePlugIn();
       
    52     
       
    53     public: // From base classes
       
    54     
       
    55         // @see CCFContextSourcePlugIn
       
    56     	void HandleSettingL( CCFContextSourceSettingArray* aSettingList );
       
    57             
       
    58         // @see CCFContextSourcePlugIn
       
    59     	void DefineContextsL();
       
    60     	
       
    61         // @see CCFContextSourcePlugIn
       
    62     	void InitializeL();
       
    63     	
       
    64         // @see MPropertyListenerCallBack
       
    65         void HandlePropertyChangedL();
       
    66         
       
    67     private: // New methods
       
    68     
       
    69         // Publishes current call state value
       
    70         void PublishContextL();
       
    71     
       
    72     private:
       
    73     
       
    74         CCallStateSourcePlugIn( TContextSourceInitParams* aParams );
       
    75         
       
    76     private:
       
    77     
       
    78         // Own: Call state property observer
       
    79         CPropertyListener* iCallStateProperty;
       
    80         
       
    81         // Own: Context
       
    82         CCFContextObject* iContext;
       
    83     };
       
    84     
       
    85 #endif//C_CALLSTATESOURCEPLUGIN_H