|
1 /* |
|
2 * Copyright (c) 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: CNcdString declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NCDSTRING_H |
|
20 #define NCDSTRING_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <s32strm.h> |
|
24 |
|
25 class CNcdString : public CBase |
|
26 { |
|
27 public: |
|
28 static CNcdString* NewL( const TDesC& aKey = KNullDesC, |
|
29 const TDesC& aData = KNullDesC ); |
|
30 static CNcdString* NewLC( const TDesC& aKey = KNullDesC, |
|
31 const TDesC& aData = KNullDesC); |
|
32 static CNcdString* NewL( RReadStream& aReadStream ); |
|
33 static CNcdString* NewLC( RReadStream& aReadStream ); |
|
34 static CNcdString* NewL( const CNcdString& aString ); |
|
35 static CNcdString* NewLC( const CNcdString& aString ); |
|
36 ~CNcdString(); |
|
37 |
|
38 void ExternalizeL( RWriteStream& aWriteStream ) const; |
|
39 void InternalizeL( RReadStream& aReadStream ); |
|
40 |
|
41 private: |
|
42 void ConstructL( const TDesC& aKey, const TDesC& aData ); |
|
43 void ConstructL( RReadStream& aStream ); |
|
44 void ConstructL( const CNcdString& aString ); |
|
45 CNcdString(); |
|
46 public: |
|
47 const TDesC& Key() const; |
|
48 const TDesC& Data() const; |
|
49 void SetDataL( const TDesC8& aData ); |
|
50 void SetDataL( const TDesC16& aData ); |
|
51 void SetKeyL( const TDesC8& aData ); |
|
52 void SetKeyL( const TDesC16& aData ); |
|
53 private: |
|
54 HBufC* iKey; |
|
55 HBufC* iData; |
|
56 }; |
|
57 |
|
58 #endif |