sysanadatacapture/piprofiler/piprofiler_api/inc/ProfilerAttributes.h
changeset 1 3ff3fecb12fe
equal deleted inserted replaced
0:f0f2b8682603 1:3ff3fecb12fe
       
     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 
       
    19 #ifndef PROFILER_ATTRIBUTES_H
       
    20 #define PROFILER_ATTRIBUTES_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include <s32mem.h>
       
    26 
       
    27 // LITERALS
       
    28 _LIT8(KDefaultTraceFilePrefix, "PIProfiler_#");
       
    29 _LIT8(KDefaultTraceOutput, "file_system");
       
    30 _LIT8(KDefaultTraceFileSaveDrive, "C:\\data\\");
       
    31 
       
    32 // CONSTANTS
       
    33 const TUint KPrefixMaxLength = 64;
       
    34 
       
    35 /*
       
    36  * 
       
    37  * TGeneralAttributes class definition, internal settings format
       
    38  *  
       
    39  */
       
    40 class TGeneralAttributes
       
    41     {
       
    42 public:
       
    43     TBuf8<KPrefixMaxLength> iTraceOutput;
       
    44     TBuf8<KPrefixMaxLength> iTraceFilePrefix;
       
    45     TBuf8<KPrefixMaxLength> iSaveFileDrive;
       
    46     };
       
    47 
       
    48 
       
    49 
       
    50 /*
       
    51  * 
       
    52  * TSettingItem class definition, internal settings format
       
    53  *  
       
    54  */
       
    55 class TSettingItem
       
    56     {
       
    57 public:
       
    58     enum 
       
    59     {
       
    60         ESettingItemTypeInt = 0,
       
    61         ESettingItemTypeBool,
       
    62         ESettingItemTypeHex,
       
    63         ESettingItemTypeText
       
    64     };
       
    65     
       
    66 public:
       
    67     TBuf<64>   iSettingText;
       
    68     TUint32    iType;
       
    69     TBuf<128>  iValue;
       
    70     TBuf<256>  iSettingDescription;
       
    71     TBuf<64>   iUIText;
       
    72     };
       
    73 /*
       
    74  * 
       
    75  * TSamplerAttributes class definition, internal settings format
       
    76  *  
       
    77  */
       
    78 class TSamplerAttributes
       
    79     {
       
    80 public:
       
    81     // default constructor
       
    82     TSamplerAttributes();
       
    83     // constructor
       
    84     TSamplerAttributes(TInt32 aUid,
       
    85             const TDesC8& aShortName,
       
    86             const TDesC8& aName,
       
    87             const TDesC8& aDescription,
       
    88             TInt aSampleRate,
       
    89             TBool aEnabled,
       
    90             TBool aHidden,
       
    91             TInt aItemCount);
       
    92 public:
       
    93     TInt32      iUid;
       
    94     TBuf8<8>    iShortName;     // name of the plugin, short name
       
    95     TBuf8<64>   iName;          // name of the plugin, long name
       
    96     TBuf8<256>  iDescription;   // sampler description, info about HW/SW dependencies etc.
       
    97     TInt        iSampleRate;    // sample rate of the plugin
       
    98     TBool       iEnabled;       // previous state of plugin
       
    99     TBool       iIsHidden;      
       
   100     TInt        iItemCount;     // plugin specific setting item count
       
   101     
       
   102     // plugin specific settings, plugin implementation dependent
       
   103     TSettingItem    iSettingItem1;
       
   104     TSettingItem    iSettingItem2;
       
   105     TSettingItem    iSettingItem3;
       
   106     TSettingItem    iSettingItem4;
       
   107     TSettingItem    iSettingItem5;
       
   108     TSettingItem    iSettingItem6;
       
   109     };
       
   110 
       
   111 inline TSamplerAttributes::TSamplerAttributes()
       
   112     {}
       
   113 
       
   114 inline TSamplerAttributes::TSamplerAttributes(TInt32 aUid,
       
   115             const TDesC8& aShortName,
       
   116             const TDesC8& aName,
       
   117             const TDesC8& aDescription,
       
   118             TInt aSampleRate,
       
   119             TBool aEnabled,
       
   120             TBool aHidden,
       
   121             TInt aItemCount)
       
   122     {
       
   123     iUid = aUid;
       
   124     iShortName.Copy(aShortName);
       
   125     iName.Copy(aName);
       
   126     iDescription.Copy(aDescription);
       
   127     iSampleRate = aSampleRate;
       
   128     iEnabled = aEnabled;
       
   129     iIsHidden = aHidden;
       
   130     iItemCount = aItemCount;
       
   131     }
       
   132 
       
   133 #endif