|
1 // Copyright (c) 2001-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 // |
|
15 |
|
16 /** |
|
17 @file MWspUnknownCapabilities.h |
|
18 @warning : This file contains Rose Model ID comments - please do not delete |
|
19 */ |
|
20 |
|
21 #ifndef __MWSPUNKNOWNCAPABILITIES_H__ |
|
22 #define __MWSPUNKNOWNCAPABILITIES_H__ |
|
23 |
|
24 // System includes |
|
25 #include <e32base.h> |
|
26 #include <wsp/wsptypes.h> |
|
27 |
|
28 class MWspUnknownCapabilities |
|
29 /** |
|
30 @class MWspUnknownCapabilities |
|
31 @since 7.0 |
|
32 The MWspUnknownCapabilities API provides an interface to a set of unknown |
|
33 capabilities as defined by the WSP Specification, July 2001. The Identifier |
|
34 is encoded in the same way as the header field name - it uses the BNF rule |
|
35 for Field-Name, as shown in the WSP Specification, Section 8.4.2.6. Well- |
|
36 known capabilities have their identifier encoded using a short-integer, and |
|
37 unknown capabilities encode their identifier using a Null-terminated string. |
|
38 Any extra capabilities must be defined in such a way that an empty parameter |
|
39 value is illegal. This allows the unknown capability to be rejected. |
|
40 |
|
41 The interface allows the set of unknown capabilities to be accessed one by |
|
42 one. The read function provides the caller with a copy of the capability |
|
43 information. The set can be reset to the default value of the capability (as |
|
44 defined by the WSP Specification), which is an empty set. An unknown |
|
45 capability can be added to the set. |
|
46 @publishedAll |
|
47 @deprecated |
|
48 */ |
|
49 { |
|
50 public: // Methods |
|
51 |
|
52 /** |
|
53 @fn Start() const =0 |
|
54 Intended Usage : Ensures that the first unknown capability in the set is |
|
55 available for reading. |
|
56 @since 7.0 |
|
57 @return An error code. If there are no unknown capabilities, then |
|
58 the value returned is KErrNotFound. If there are unknown |
|
59 capabilities then the value KErrNone is returned. |
|
60 @post The subsequent call to GetNext() is applied to the first |
|
61 unknown capability in the set. |
|
62 */ |
|
63 virtual TInt Start() const =0; |
|
64 |
|
65 /** |
|
66 @fn GetNext(TPtrC8& aIdentifier, TPtrC8& aValue) const =0 |
|
67 Intended Usage : Gets the next unknown capability in the set. If there |
|
68 are no unknown capabilities left then KErrNotFound error code is |
|
69 returned. |
|
70 @since 7.0 |
|
71 @param aIdentifier An output parameter reference for a buffer with |
|
72 the identifier for the unknown capability. |
|
73 @param aValue An output parameter reference for a buffer with |
|
74 the parameters for the capability. |
|
75 @return An error code. If there are no unknown capabilities left, |
|
76 then the value returned is KErrNotFound. If there are unknown |
|
77 capabilities left then the value KErrNone is returned. |
|
78 @post The next unknown capability in the set is available for |
|
79 reading. |
|
80 */ |
|
81 virtual TInt GetNext(TPtrC8& aIdentifier, TPtrC8& aValue) const =0; |
|
82 |
|
83 /** |
|
84 @fn Reset() =0 |
|
85 Intended Usage : Resets the capability to the default. The default is |
|
86 defined in the WSP Specification, July 2001, as being an |
|
87 empty set of code pages. |
|
88 @since 7.0 |
|
89 @post The set of unknown capabilities is empty. |
|
90 */ |
|
91 virtual void Reset() =0; |
|
92 |
|
93 /** |
|
94 @fn AddUnknownCapabilityL(const TDesC8& aIdentifier, const TDesC8& aValue) =0 |
|
95 Intended Usage : Adds an unknown capability to the set. |
|
96 @since 7.0 |
|
97 @leave Leave code KErrNoMemory if the capability cannot be added to |
|
98 the set. |
|
99 @param aIdentifier A buffer with the identifier for the unknown |
|
100 capability. |
|
101 @param aValue A buffer with the parameters for the capability. |
|
102 @post If no error has occurred then the unknown capability has been |
|
103 added. |
|
104 */ |
|
105 virtual void AddUnknownCapabilityL(const TDesC8& aIdentifier, const TDesC8& aValue) =0; |
|
106 |
|
107 }; |
|
108 |
|
109 #endif // __MWSPUNKNOWNCAPABILITIES_H__ |