|
1 /* |
|
2 * Copyright (c) 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: Implementation of PnPMS components |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __HTTP_PROV_CONTENT_TYPE__H |
|
20 #define __HTTP_PROV_CONTENT_TYPE__H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "SupportedContentTypes.h" |
|
25 |
|
26 // Security parameter NETWPIN |
|
27 const TUint8 KSECNETWPIN = 0x00; |
|
28 |
|
29 // Security parameter USERPIN |
|
30 const TUint8 KSECUSERPIN = 0x01; |
|
31 |
|
32 // Security parameter USERNETWPIN |
|
33 const TUint8 KSECUSERNETWPIN = 0x02; |
|
34 |
|
35 // Security parameter USERPINMAC |
|
36 const TUint8 KSECUSERPINMAC = 0x03; |
|
37 |
|
38 // Securirty parameter PKA (or PKI) |
|
39 const TUint8 KSECPKA = 0x04; |
|
40 |
|
41 // No security parameter |
|
42 const TUint8 KSECNONE = 0xff; |
|
43 |
|
44 // FORWARD DECLARATIONS |
|
45 |
|
46 // CLASS DECLARATION |
|
47 |
|
48 /** |
|
49 * CHttpProvContentType holds http provisioning content |
|
50 */ |
|
51 class CHttpProvContentType : public CBase |
|
52 { |
|
53 public: // Constructors and destructor |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 */ |
|
58 static CHttpProvContentType* NewL(const TDesC8& aContentTypeField); |
|
59 |
|
60 /** |
|
61 * Two-phased constructor. |
|
62 */ |
|
63 static CHttpProvContentType* NewLC(const TDesC8& aContentTypeField); |
|
64 |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 virtual ~CHttpProvContentType(); |
|
69 |
|
70 public: |
|
71 |
|
72 /** |
|
73 * Get MAC |
|
74 */ |
|
75 void MACL( TPtrC8& aMac ); |
|
76 |
|
77 /** |
|
78 * Returns SEC type. |
|
79 * @return SEC |
|
80 */ |
|
81 TUint8 SEC(); |
|
82 |
|
83 /** |
|
84 * Get content type. |
|
85 */ |
|
86 const TDesC8& ContentTypeL() const; |
|
87 |
|
88 private: |
|
89 /** |
|
90 * C++ default constructor. |
|
91 */ |
|
92 CHttpProvContentType(); |
|
93 |
|
94 /** |
|
95 * By default Symbian 2nd phase constructor is private. |
|
96 * Descriptor aContentTypeField must remain in the scope until CHttpProvContentType |
|
97 * is deleted. |
|
98 */ |
|
99 void ConstructL(const TDesC8& aContentTypeField); |
|
100 |
|
101 /** |
|
102 * Parses content type |
|
103 */ |
|
104 void ParseL(const TDesC8& aContentTypeField); |
|
105 |
|
106 private: // Data |
|
107 // SEC type |
|
108 TUint8 iSEC; |
|
109 // Content type |
|
110 TPtrC8 iContentType; |
|
111 // MAC |
|
112 TPtrC8 iMAC; |
|
113 }; |
|
114 |
|
115 #endif // __HTTP_PROV_CONTENT_TYPE__H |
|
116 |
|
117 // End of File |