contextframework/cfwplugins/PSStateSourcePlugIn/inc/psstatesourceplugin.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:  CPSStateSourcePlugIn class declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_PSSTATESOURCEPLUGIN_H
       
    21 #define C_PSSTATESOURCEPLUGIN_H
       
    22 
       
    23 #include <badesca.h>
       
    24 #include <cfcontextsourceplugin.h>
       
    25 #include <cfcontextsourcesetting.h>
       
    26 
       
    27 class CPSStateMapper;
       
    28 class CPSStateMapperParams;
       
    29 class CPSStateMapperParamsInt;
       
    30 class CCFContextSourceSettingArray;
       
    31 
       
    32 /**
       
    33 * P&S state source plug-in.
       
    34 * CPSStateSourcePlugIn is responsible for mapping defined P&S keys
       
    35 * into contexts.
       
    36 * 
       
    37 * @lib -
       
    38 * @since S60 4.0
       
    39 */
       
    40 NONSHARABLE_CLASS( CPSStateSourcePlugIn ):
       
    41     public CCFContextSourcePlugIn
       
    42     {
       
    43     public:
       
    44     
       
    45         // Two phased constructors
       
    46         static CPSStateSourcePlugIn* NewL( 
       
    47         	TContextSourceInitParams* aParams );
       
    48         static CPSStateSourcePlugIn* NewLC( 
       
    49         	TContextSourceInitParams* aParams );
       
    50             
       
    51         // Destructor
       
    52         ~CPSStateSourcePlugIn();
       
    53     
       
    54     public: // From base classes
       
    55     
       
    56         // @see CCFContextSourcePlugIn
       
    57     	void HandleSettingL(
       
    58              CCFContextSourceSettingArray* aSettingList );
       
    59             
       
    60         // @see CCFContextSourcePlugIn
       
    61     	void DefineContextsL();
       
    62     	
       
    63         // @see CCFContextSourcePlugIn
       
    64     	void InitializeL();
       
    65     	
       
    66     private: // New methods
       
    67         
       
    68         TInt ConvertHexToTUint( const TDesC& aString, TUint32& aValue );
       
    69     	
       
    70     	void ParseIntMapperParamsL(CPSStateMapper& aMapper,
       
    71 			const RSettingParameterArray& aParameters);
       
    72 			
       
    73 		void ParseTextMapperParamsL(CPSStateMapper& aMapper,
       
    74 			const RSettingParameterArray& aParameters);
       
    75     	
       
    76     	void ConvertDescToSecurityPolicy( const TDesC& aString, 
       
    77     		TSecurityPolicy& aSecurityPolicy );
       
    78     		
       
    79     	TCapability ConvertToCapabilityNumber( const TDesC& aString );
       
    80     	
       
    81     private:
       
    82     
       
    83         CPSStateSourcePlugIn( TContextSourceInitParams* aParams );
       
    84         
       
    85     private: // Data
       
    86     
       
    87         // Own: P&S state mappers
       
    88         RPointerArray<CPSStateMapper> iMappers;
       
    89         
       
    90         // My settings
       
    91          CCFContextSourceSettingArray* iSettings;
       
    92     };
       
    93 
       
    94 #endif