|
1 /* |
|
2 * Copyright (c) 2002-2004 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: Declares the upnpsettings class |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef C_CUPNPSETTING_H |
|
21 #define C_CUPNPSETTING_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 #include <e32base.h> |
|
26 |
|
27 // CONSTANTS |
|
28 const TUid KHnCRUidUPnPStack = { 0x2000F881 }; //for parallel stack |
|
29 const TUid KCRUidUPnPStack = { 0x101F9784 }; |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CRepository; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * Configuration API for UPnP stack operation |
|
38 * |
|
39 * @lib serviceframework.lib |
|
40 * @since Series 60 3.1 |
|
41 */ |
|
42 |
|
43 class CUpnpSettings: public CBase |
|
44 { |
|
45 public: |
|
46 |
|
47 /** Central repository value for IAP key */ |
|
48 static const TUint KUPnPStackIapId = 1; |
|
49 |
|
50 /** Central repository value for customized UserAgent key */ |
|
51 static const TUint KUPnPStackCustomizedUserAgent = 2; |
|
52 |
|
53 /** Central repository value for file buffer size key */ |
|
54 static const TUint KUPnPStackFileBufferSize = 3; |
|
55 |
|
56 /** Central repository value for customized ServerHeader key */ |
|
57 static const TUint KUPnPStackCustomizedServerHeader = 4; |
|
58 |
|
59 /** Central repository value for customized M-Search string key */ |
|
60 static const TUint KUPnPStackMSearchConfig = 5; |
|
61 |
|
62 public: // Constructors and destructor |
|
63 |
|
64 /** |
|
65 * Two-phased constructor. |
|
66 */ |
|
67 IMPORT_C static CUpnpSettings* NewL(TUid aRepositoryUid); |
|
68 |
|
69 /** |
|
70 * Destructor. |
|
71 */ |
|
72 virtual ~CUpnpSettings(); |
|
73 |
|
74 public: // New functions |
|
75 /** |
|
76 * Sets numeric value. |
|
77 * @param aId parameter id |
|
78 * @return error code |
|
79 */ |
|
80 IMPORT_C TInt Set(TUint aId, TInt& aValue); |
|
81 |
|
82 /** |
|
83 * Gets numeric value. |
|
84 * @param aId parameter id |
|
85 * @return error code |
|
86 */ |
|
87 IMPORT_C TInt Get(TUint aId, TInt& aValue); |
|
88 |
|
89 /** |
|
90 * Gets numeric value. |
|
91 * @param aId parameter id |
|
92 * @return error code |
|
93 */ |
|
94 IMPORT_C static TInt GetIapL(); |
|
95 |
|
96 /** |
|
97 * Sets string value. |
|
98 * @param aId parameter id |
|
99 * @return error code |
|
100 */ |
|
101 IMPORT_C TInt Set(TUint aId, const TDesC& aValue); |
|
102 |
|
103 /** |
|
104 * Sets string value. |
|
105 * @param aId parameter id |
|
106 * @return error code |
|
107 */ |
|
108 IMPORT_C TInt SetL(TUint aId, const TDesC8& aValue); |
|
109 |
|
110 /** |
|
111 * Gets string value. |
|
112 * @param aId parameter id |
|
113 * @return error code |
|
114 */ |
|
115 IMPORT_C TInt Get(TUint aId, TDes& aValue); |
|
116 |
|
117 /** |
|
118 * Gets string value. |
|
119 * @param aId parameter id |
|
120 * @return string value |
|
121 */ |
|
122 IMPORT_C HBufC8* GetL(TUint aId); |
|
123 |
|
124 /** |
|
125 * Gets User-Agent string value. |
|
126 * @return string value |
|
127 */ |
|
128 IMPORT_C static HBufC8* GetUserAgentL(); |
|
129 |
|
130 /** |
|
131 * Gets Product string value. |
|
132 * @return string value |
|
133 */ |
|
134 IMPORT_C static TInt GetFileBufferSizeL(); |
|
135 |
|
136 /** |
|
137 * Gets Server header string value. |
|
138 * @return string value |
|
139 */ |
|
140 IMPORT_C static HBufC8* GetServerHeaderL(); |
|
141 |
|
142 /** |
|
143 * Gets Server header string value. |
|
144 * @return string value |
|
145 */ |
|
146 static HBufC8* GetMSearchConfigurationL(); |
|
147 |
|
148 private: |
|
149 /** |
|
150 * By default Symbian 2nd phase constructor is private. |
|
151 * @param aRepositoryId |
|
152 */ |
|
153 void ConstructL(TUid aRepositoryId); |
|
154 |
|
155 private: |
|
156 // Central repository client |
|
157 CRepository* iRepository; |
|
158 }; |
|
159 |
|
160 #endif // C_CUPNPSETTING_H |
|
161 |
|
162 // End of File |