traceservices/tracefw/ulogger/inc/uloggersysconfig.h
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // ULogger config
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalTechnology
       
    21  @prototype
       
    22 */
       
    23 
       
    24 
       
    25 #ifndef ULOGGERSYSCONFIG_H
       
    26 #define ULOGGERSYSCONFIG_H
       
    27 
       
    28 #include <e32base.h> //CBase
       
    29 
       
    30 
       
    31 namespace Ulogger
       
    32 {
       
    33 
       
    34 class CConfigSettingsImpl;
       
    35 /**
       
    36 ULogger Configuration settings iterator class
       
    37 This class is used to iterate all the settings within a
       
    38 section in the configuration store.
       
    39 */
       
    40 class CConfigSettingsIter : public CBase
       
    41 {
       
    42 	friend class CConfigImpl;
       
    43 public:
       
    44 	IMPORT_C static CConfigSettingsIter* NewL();
       
    45 	
       
    46 	IMPORT_C ~CConfigSettingsIter();
       
    47 		
       
    48 	IMPORT_C TBool Next(TPtrC8& aSetting,TPtrC8& aSettingValue);
       
    49 	
       
    50 	IMPORT_C void Reset();
       
    51 	
       
    52 private:
       
    53 	CConfigSettingsIter();
       
    54 	CConfigSettingsImpl* iImpl;
       
    55 };
       
    56 
       
    57 class CConfigImpl;
       
    58 /**
       
    59 ULogger Configuration class
       
    60 This class is provided to allow read and write access to
       
    61 the configuration store. It also allows the client to be 
       
    62 notified when there is a configuration change.
       
    63 */
       
    64 class CConfig : public CBase
       
    65 	{
       
    66 public:
       
    67 	IMPORT_C static CConfig* NewL(RHeap* aHeap,TFileName& aFilename);
       
    68 	IMPORT_C static CConfig* NewLC(RHeap* aHeap,TFileName& aFilename);
       
    69 	IMPORT_C ~CConfig();
       
    70 
       
    71 	IMPORT_C TInt GetSectionValues(const TDesC8& aSectionName,CConfigSettingsIter& aIter);
       
    72 	IMPORT_C TInt GetOutputPlugins(CConfigSettingsIter& aIter);
       
    73 	IMPORT_C TInt RemovePluginSettings(const TDesC8& aOutputChanId);
       
    74 										
       
    75 	IMPORT_C TInt GetActiveFilters(CConfigSettingsIter& aIter,TInt aFilter);
       
    76 	IMPORT_C TInt RemoveActiveFilter(const RArray<TUint32>&  aFilter, const TInt &aFilterValue);
       
    77 	//Get direct setting's value API												
       
    78 	
       
    79 	IMPORT_C TInt SetActiveFilter(const RArray<TUint32>& aFilter, const TDesC8 &aSectionName);
       
    80 	IMPORT_C TInt SetTraceSettings(const TDesC8&  aValue, const TDesC8& aSetting);
       
    81 
       
    82 	IMPORT_C TInt SetPluginSetting(const TDesC8& aOutputChanId,
       
    83 									const TDesC8& aSetting,
       
    84 									const TDesC8& aValue);
       
    85 	IMPORT_C TInt SetActiveOutputPlugin(const TDesC8& aMediaName);
       
    86 	
       
    87 	IMPORT_C TInt SetActiveInputPlugin(const TDesC8& aMediaName);
       
    88 	
       
    89 	IMPORT_C TInt GetActivePlugins(CConfigSettingsIter& aIter);
       
    90 		
       
    91 	IMPORT_C TInt GetTraceSettings(CConfigSettingsIter& aIter);
       
    92 	
       
    93 	IMPORT_C TInt DeActivateOutputPlugin(const TDesC8& aMediaName);
       
    94 
       
    95 	IMPORT_C TInt DeActivateInputPlugin(const TDesC8& aMediaName);
       
    96 	
       
    97 private:
       
    98 
       
    99 	CConfig();
       
   100 	CConfigImpl* iImpl;
       
   101 	};
       
   102 }
       
   103 #endif //ULOGGERSYSCONFIG_H
       
   104