epoc32/include/uloggerdatatypes.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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
    15 // 
    16 //
    17 
    18 /**
    19  @file
    20  @publishedPartner
    21  @prototype
    22 */
    23 #ifndef DATATYPES_INL_
    24 #define DATATYPES_INL_
    25 
    26 #include <e32base.h>
    27 
    28 namespace Ulogger
    29 {
    30 
    31 const TInt KPluginConfigMaxKeySize = 256;
    32 const TInt KPluginConfigMaxValSize = KPluginConfigMaxKeySize;
    33 
    34 /**
    35 Class to store 'key - value' data on heap.
    36 */
    37 class TPluginConfiguration
    38 	{
    39 public:
    40 	void SetKey(const TDesC& aKey)
    41 		{
    42 		iKey.Copy(aKey);
    43 		}
    44 
    45 	void SetKey(const TDesC8& aKey)
    46 		{
    47 		iKey.Copy(aKey);
    48 		}
    49 
    50 	const TBuf<KPluginConfigMaxKeySize>& Key() const
    51 		{
    52 		return iKey;
    53 		}
    54 
    55 	void SetValue(const TDesC& aValue)
    56 		{
    57 		iValue.Copy(aValue);
    58 		}
    59 
    60 	void SetValue(const TDesC8& aValue)
    61 		{
    62 		iValue.Copy(aValue);
    63 		}
    64 
    65 	const TBuf<KPluginConfigMaxValSize>& Value() const
    66 		{
    67 		return iValue;
    68 		}
    69 
    70 private:
    71     TBuf<KPluginConfigMaxKeySize> iKey;
    72 	TBuf<KPluginConfigMaxValSize> iValue;
    73 	};
    74 
    75 	enum //TBufferMode
    76 	{
    77 		ECircularBuffer = 0,
    78 		EStraightBuffer
    79 	};
    80 } //end of namespace
    81 #endif /*DATATYPES_INL_*/