|
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: MNcdProtocolElementEntity declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NCD_CONFIGURATION_PROTOCOL_QUERYRESPONSE_H |
|
20 #define NCD_CONFIGURATION_PROTOCOL_QUERYRESPONSE_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "ncdquery.h" |
|
25 //#include "ncdprotocoltypes.h" |
|
26 |
|
27 class MNcdConfigurationProtocolQueryResponseValue |
|
28 { |
|
29 public: |
|
30 /** |
|
31 * Destructor |
|
32 */ |
|
33 virtual ~MNcdConfigurationProtocolQueryResponseValue() {} |
|
34 |
|
35 /** |
|
36 * Value ID |
|
37 * @return Id |
|
38 */ |
|
39 virtual const TDesC& Id() const = 0; |
|
40 |
|
41 /** |
|
42 * Semantics type. |
|
43 * @return Type |
|
44 * @see MNcdQuery::TSemantics |
|
45 */ |
|
46 virtual MNcdQuery::TSemantics Semantics() const = 0; |
|
47 |
|
48 /** |
|
49 * Amount of value strings. |
|
50 * @return Value count |
|
51 */ |
|
52 virtual TInt ValueCount() const = 0; |
|
53 |
|
54 /** |
|
55 * Get value by index |
|
56 * @param aIndex Value index. Leaves if index is out of bounds. |
|
57 * @return Value string. |
|
58 * @see ValueCount() |
|
59 */ |
|
60 virtual TDesC& ValueL(TInt aIndex) const = 0; |
|
61 }; |
|
62 |
|
63 |
|
64 class MNcdConfigurationProtocolQueryResponse |
|
65 { |
|
66 public: |
|
67 |
|
68 /** |
|
69 * Destructor |
|
70 */ |
|
71 virtual ~MNcdConfigurationProtocolQueryResponse() {} |
|
72 |
|
73 /** |
|
74 * Returns the ID of this query. |
|
75 * @return Id |
|
76 */ |
|
77 virtual const TDesC& Id() const = 0; |
|
78 |
|
79 /** |
|
80 * Returns the semantics of this query. |
|
81 * |
|
82 * @return NcdQueryItemSemantics::NcdQueryItemSemantics::NcdQuerySemantics::TNcdQuerySemantics |
|
83 */ |
|
84 virtual MNcdQuery::TSemantics Semantics() const = 0; |
|
85 |
|
86 /** |
|
87 * If true then the client must show this query to the end-user. |
|
88 * |
|
89 * @return TBool |
|
90 */ |
|
91 virtual TBool Cancel() const = 0; |
|
92 |
|
93 /** |
|
94 * Returns the number of query elements in this query. |
|
95 * |
|
96 * @return Query element count. |
|
97 */ |
|
98 virtual TInt ResponseCount() const = 0; |
|
99 |
|
100 /** |
|
101 * Returns query element by index. |
|
102 * @param aIndex Response index. Leaves if index is out of bounds. |
|
103 * @return Query element |
|
104 * @see ResponseCount() |
|
105 */ |
|
106 virtual const MNcdConfigurationProtocolQueryResponseValue& |
|
107 ResponseL( TInt aIndex ) const = 0; |
|
108 |
|
109 }; |
|
110 |
|
111 |
|
112 #endif // NCD_CONFIGURATION_PROTOCOL_QUERYRESPONSE_H |