|
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: Definition of key-value pair interface and implementation class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NCD_KEY_VALUE_PAIR_H |
|
20 #define NCD_KEY_VALUE_PAIR_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 /** |
|
25 * An interface for accessing a key - value pair object. |
|
26 * |
|
27 * |
|
28 */ |
|
29 class MNcdKeyValuePair |
|
30 { |
|
31 public: |
|
32 |
|
33 /** |
|
34 * Returns the key of the pair. |
|
35 * |
|
36 * |
|
37 * @return Key of the pair. |
|
38 */ |
|
39 virtual const TDesC& Key() const = 0; |
|
40 |
|
41 /** |
|
42 * Returns the value of the pair. |
|
43 * |
|
44 * |
|
45 * @return Value of the pair. |
|
46 */ |
|
47 virtual const TDesC& Value() const = 0; |
|
48 |
|
49 #if 0 |
|
50 /** |
|
51 * Externalizes the pair to a stream |
|
52 * |
|
53 * @param aStream Target stream |
|
54 */ |
|
55 virtual void ExternalizeL( RWriteStream& aStream ) const = 0; |
|
56 |
|
57 |
|
58 /** |
|
59 * Externalizes the pair to a descriptor |
|
60 * |
|
61 * @return Descriptor containing the pair |
|
62 */ |
|
63 virtual HBufC8* ExternalizeLC() const = 0; |
|
64 |
|
65 |
|
66 /** |
|
67 * Internalizes the pair from a stream |
|
68 * |
|
69 * @param aStream Source stream |
|
70 */ |
|
71 virtual void InternalizeL( RReadStream& aStream ) = 0; |
|
72 |
|
73 #endif |
|
74 |
|
75 }; |
|
76 |
|
77 #endif // NCD_KEY_VALUE_PAIR_H |