|
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: Used by ProvisioningFile to read provisioning messages. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CWPOMAMSGHANDLER_H |
|
21 #define CWPOMAMSGHANDLER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "wpprovisioningfileconst.h" |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <f32file.h> |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * CWPOMAMsgHandler used te read OMA messages. |
|
33 * |
|
34 * @lib ProvisioningFile.lib |
|
35 * @since Series 60 3.0 |
|
36 */ |
|
37 NONSHARABLE_CLASS(CWPOMAMsgHandler) : public CBase |
|
38 { |
|
39 |
|
40 #ifdef PROVISIONINGFILE_TEST |
|
41 |
|
42 friend class UT_OmaMsgHandler; |
|
43 |
|
44 #endif |
|
45 |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 */ |
|
51 static CWPOMAMsgHandler* NewL(); |
|
52 |
|
53 /** |
|
54 * Two-phased constructor. |
|
55 */ |
|
56 static CWPOMAMsgHandler* NewLC(); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 virtual ~CWPOMAMsgHandler(); |
|
62 |
|
63 public: |
|
64 |
|
65 /** |
|
66 * ReadProvFileL, Reads provisioning file. |
|
67 * @since Series 60 3.0 |
|
68 * @param aConfig configuration path. |
|
69 */ |
|
70 void ReadProvFileL( TFileName aConfig ); |
|
71 |
|
72 /** |
|
73 * DocL, Fetches the read provisioning document. |
|
74 * @since Series 60 3.0 |
|
75 * @return pointer to a copy of the prov doc |
|
76 */ |
|
77 HBufC8* DocL(); |
|
78 |
|
79 private: |
|
80 |
|
81 /** |
|
82 * GetFileSize, Gets the size of the provisioning document. |
|
83 * @since Series 60 3.0 |
|
84 * @param aSize Messages size. |
|
85 * @return TInt system-wide error code. |
|
86 */ |
|
87 TInt GetFileSize( TInt& aSize ); |
|
88 |
|
89 private: |
|
90 |
|
91 /** |
|
92 * C++ default constructor. |
|
93 */ |
|
94 CWPOMAMsgHandler(); |
|
95 |
|
96 /** |
|
97 * By default Symbian 2nd phase constructor is private. |
|
98 */ |
|
99 void ConstructL(); |
|
100 |
|
101 private: // Data |
|
102 |
|
103 HBufC8* iProvisioningDoc; |
|
104 |
|
105 TPtr8 iProvData; |
|
106 |
|
107 RFs iFs; |
|
108 |
|
109 RFile iFile; |
|
110 |
|
111 TFileName iFileName; |
|
112 |
|
113 }; |
|
114 |
|
115 #endif // CWPOMAMSGHANDLER_H |
|
116 |
|
117 // End of File |