|
1 /* |
|
2 * Copyright (c) 2002 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: Declaration of class CSchemeDocument |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SCHEME_DOCUMENT_H |
|
20 #define SCHEME_DOCUMENT_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <eikdoc.h> |
|
26 #include <apparc.h> |
|
27 #include <AknServerApp.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 class CEikAppUi; |
|
32 class CSchemeHandler; |
|
33 class CSchemeAppUi; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 /** |
|
37 * Shutdown class forScheme App. |
|
38 */ |
|
39 class CSchemeShutdown : public CActive |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * C++ default constructor. |
|
45 */ |
|
46 CSchemeShutdown( CSchemeAppUi* iAppUi ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 ~CSchemeShutdown(); |
|
52 |
|
53 public: |
|
54 |
|
55 /** |
|
56 * Starts handle request completion event. |
|
57 * @param - |
|
58 * @return None. |
|
59 */ |
|
60 void Start(); |
|
61 |
|
62 private: // From CActive |
|
63 |
|
64 /** |
|
65 * Handles an active object’s request completion event. |
|
66 * @param - |
|
67 * @return None. |
|
68 */ |
|
69 void RunL(); |
|
70 |
|
71 /** |
|
72 * Implements cancellation of an outstanding request. |
|
73 * @param - |
|
74 * @return None. |
|
75 */ |
|
76 void DoCancel(); |
|
77 |
|
78 private: |
|
79 |
|
80 CSchemeAppUi* iAppUi; |
|
81 }; |
|
82 |
|
83 /** |
|
84 * Document class forScheme App. |
|
85 */ |
|
86 class CSchemeDocument : public CEikDocument, |
|
87 public MAknServerAppExitObserver |
|
88 { |
|
89 public: // Constructors and destructor |
|
90 |
|
91 /** |
|
92 * Two-phased constructor. Leaves on failure. |
|
93 * @param aApp Application. |
|
94 * @return The created document. |
|
95 */ |
|
96 static CSchemeDocument* NewL( CEikApplication& aApp ); |
|
97 |
|
98 /** |
|
99 * Destructor. |
|
100 */ |
|
101 virtual ~CSchemeDocument(); |
|
102 |
|
103 private: // Constructors |
|
104 |
|
105 /** |
|
106 * Constructor. |
|
107 * @param aApp Application. |
|
108 */ |
|
109 CSchemeDocument( CEikApplication& aApp ); |
|
110 |
|
111 /** |
|
112 * Second phase constructor. Leaves on failure. |
|
113 */ |
|
114 void ConstructL(); |
|
115 |
|
116 private: // Functions from base classes |
|
117 |
|
118 /** |
|
119 * Create Application Ui. |
|
120 * @return Pointer to App Ui. |
|
121 */ |
|
122 CEikAppUi* CreateAppUiL(); |
|
123 |
|
124 /** |
|
125 * Open a file. |
|
126 * @param aDoOpen Don't know what it is. |
|
127 * @param aFilename File name. |
|
128 * @param aFs File Server Session to be used. |
|
129 * @return NULL (DD file is not EPOC-style store based). |
|
130 *//* |
|
131 CFileStore* OpenFileL |
|
132 ( |
|
133 TBool aDoOpen, |
|
134 const TDesC& aFilename, |
|
135 RFs& aFs |
|
136 );*/ |
|
137 |
|
138 /** |
|
139 * |
|
140 * Implements the required behaviour when the editing of an embedded |
|
141 * document completes. |
|
142 * |
|
143 * @param |
|
144 * Indicates the state of the document. |
|
145 */ |
|
146 void HandleServerAppExit( TInt aReason ); |
|
147 |
|
148 private: // Data members |
|
149 |
|
150 //CSchemeHandler* iSchemeHandler; ///< Owned. |
|
151 CSchemeAppUi* iSchemeAppUi; |
|
152 CSchemeShutdown* iShutdown; |
|
153 }; |
|
154 |
|
155 #endif // SCHEME_DOCUMENT_H |
|
156 |
|
157 // End of File |
|
158 |