1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/uloggerdatatypes.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,81 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// ULogger
1.18 +//
1.19 +//
1.20 +
1.21 +/**
1.22 + @file
1.23 + @publishedPartner
1.24 + @prototype
1.25 +*/
1.26 +#ifndef DATATYPES_INL_
1.27 +#define DATATYPES_INL_
1.28 +
1.29 +#include <e32base.h>
1.30 +
1.31 +namespace Ulogger
1.32 +{
1.33 +
1.34 +const TInt KPluginConfigMaxKeySize = 256;
1.35 +const TInt KPluginConfigMaxValSize = KPluginConfigMaxKeySize;
1.36 +
1.37 +/**
1.38 +Class to store 'key - value' data on heap.
1.39 +*/
1.40 +class TPluginConfiguration
1.41 + {
1.42 +public:
1.43 + void SetKey(const TDesC& aKey)
1.44 + {
1.45 + iKey.Copy(aKey);
1.46 + }
1.47 +
1.48 + void SetKey(const TDesC8& aKey)
1.49 + {
1.50 + iKey.Copy(aKey);
1.51 + }
1.52 +
1.53 + const TBuf<KPluginConfigMaxKeySize>& Key() const
1.54 + {
1.55 + return iKey;
1.56 + }
1.57 +
1.58 + void SetValue(const TDesC& aValue)
1.59 + {
1.60 + iValue.Copy(aValue);
1.61 + }
1.62 +
1.63 + void SetValue(const TDesC8& aValue)
1.64 + {
1.65 + iValue.Copy(aValue);
1.66 + }
1.67 +
1.68 + const TBuf<KPluginConfigMaxValSize>& Value() const
1.69 + {
1.70 + return iValue;
1.71 + }
1.72 +
1.73 +private:
1.74 + TBuf<KPluginConfigMaxKeySize> iKey;
1.75 + TBuf<KPluginConfigMaxValSize> iValue;
1.76 + };
1.77 +
1.78 + enum //TBufferMode
1.79 + {
1.80 + ECircularBuffer = 0,
1.81 + EStraightBuffer
1.82 + };
1.83 +} //end of namespace
1.84 +#endif /*DATATYPES_INL_*/