|
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 the License "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: |
|
15 * Declaration of class CRoapAppDocument. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef ROAP_APP_DOCUMENT_H |
|
22 #define ROAP_APP_DOCUMENT_H |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <GenericParamConsumer.h> |
|
28 #include <RoapEng.h> |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 |
|
32 class CEikAppUi; |
|
33 class CRequestCompleteCallback; |
|
34 class CRoapAppData; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * Dummy document class for RoapApp application (application is not file-based). |
|
40 */ |
|
41 class CRoapAppDocument: public CAiwGenericParamConsumer |
|
42 { |
|
43 |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. Leaves on failure. |
|
48 * @param aApp Application. |
|
49 * @return The created document. |
|
50 */ |
|
51 static CRoapAppDocument* NewL( CEikApplication& aApp ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CRoapAppDocument(); |
|
57 |
|
58 public: // Member access |
|
59 |
|
60 /** |
|
61 * Access the model. |
|
62 * @return The model. |
|
63 */ |
|
64 Roap::CRoapEng& Engine() const; |
|
65 |
|
66 /** |
|
67 * Get data. |
|
68 * @return Data. |
|
69 */ |
|
70 const CRoapAppData& Data() const; |
|
71 |
|
72 public: // from CEikDocument |
|
73 |
|
74 /** |
|
75 * Create Application Ui. |
|
76 * @return Pointer to App Ui. |
|
77 */ |
|
78 CEikAppUi* CreateAppUiL(); |
|
79 |
|
80 /** |
|
81 * Open a file. |
|
82 * @param aDoOpen Don't know what it is. |
|
83 * @param aFilename File name. |
|
84 * @param aFs File Server Session to be used. |
|
85 * @return NULL (ROAP Trigger file is not EPOC-style store based). |
|
86 */ |
|
87 CFileStore* OpenFileL |
|
88 ( |
|
89 TBool aDoOpen, |
|
90 const TDesC& aFilename, |
|
91 RFs& aFs |
|
92 ); |
|
93 |
|
94 /** |
|
95 * Open a file. |
|
96 * @param aFs File Server Session to be used. |
|
97 * @param aFile File. |
|
98 * @return NULL (ROAP Trigger file is not EPOC-style store based). |
|
99 */ |
|
100 CFileStore* OpenFileL( RFs& aFs, RFile& aFile ); |
|
101 |
|
102 /** |
|
103 * Open a file. |
|
104 * @param aFile File. |
|
105 * @param aFileStore Return value placeholder. |
|
106 * Returns NULL (ROAP Trigger file is not EPOC-style store based). |
|
107 */ |
|
108 void OpenFileL( CFileStore*& aFileStore, RFile& aFile ); |
|
109 |
|
110 private: // Constructors |
|
111 |
|
112 /** |
|
113 * Constructor. |
|
114 * @param aApp Application. |
|
115 */ |
|
116 CRoapAppDocument( CEikApplication& aApp ); |
|
117 |
|
118 /** |
|
119 * Second phase constructor. Leaves on failure. |
|
120 */ |
|
121 void ConstructL(); |
|
122 |
|
123 private: // data |
|
124 |
|
125 Roap::CRoapEng* iEngine; ///< Engine. Owned. |
|
126 CRoapAppData* iData; ///< Data. Owned. |
|
127 TBool iFileOpened; |
|
128 RPointerArray<CDRMRights> iParsedRights; |
|
129 }; |
|
130 |
|
131 #endif /* def ROAP_APP_DOCUMENT_H */ |