|
1 /* |
|
2 * Copyright (c) 2007 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __DEVENCSTARTERUTILS_H__ |
|
21 #define __DEVENCSTARTERUTILS_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 #include <eikenv.h> |
|
26 #include <w32std.h> |
|
27 //#include <akncapserverclient.h> // for RAknUiServer |
|
28 |
|
29 #include "DevEncStarterdef.h" |
|
30 #include "DevEncStarterAppStarter.h" |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 |
|
34 // CLASS DECLARATION |
|
35 /** |
|
36 * Callback class for CDevEncStarterUtils. |
|
37 */ |
|
38 class MUtilsCallback |
|
39 { |
|
40 public: |
|
41 /** |
|
42 * Called when an application is started using CDevEncStarterUtils. |
|
43 * @param aUid The UID of the started application. |
|
44 */ |
|
45 virtual void AppStarted( const TUint32& aUid ) = 0; |
|
46 }; |
|
47 |
|
48 /** |
|
49 * Containts various utility functions. |
|
50 */ |
|
51 class CDevEncStarterUtils : public CBase, |
|
52 public MAppStarterCallback |
|
53 { |
|
54 public: |
|
55 /** |
|
56 * Symbian two-phased construction. |
|
57 * @param aEikEnv Reference to the Eikon environment. |
|
58 */ |
|
59 static CDevEncStarterUtils* NewL(); |
|
60 |
|
61 /* |
|
62 * Destructor |
|
63 */ |
|
64 virtual ~CDevEncStarterUtils(); |
|
65 |
|
66 /* |
|
67 * Sends a key event to the application that currently has focus. |
|
68 * @param aUid the UID of the application to start |
|
69 * @param aCallback Reference to callback class. If specified, the |
|
70 * class's AppStarted function will be called on completion of the |
|
71 * request. |
|
72 * @leave Symbian error code. |
|
73 */ |
|
74 void StartAppL( const TUint32& aUid, MUtilsCallback* aCallback = 0 ); |
|
75 |
|
76 /* |
|
77 * From MAppStarterCallback. Calls MUtilsCallback::AppStarted if |
|
78 * specified. |
|
79 * @param aUid The UID of the started application |
|
80 */ |
|
81 void AppStarted( const TUint32& aUid ); |
|
82 |
|
83 private: |
|
84 // Functions |
|
85 |
|
86 /* |
|
87 * Second-phase constructor. |
|
88 */ |
|
89 void ConstructL(); |
|
90 |
|
91 /* |
|
92 * C++ constructor. |
|
93 */ |
|
94 CDevEncStarterUtils(); |
|
95 |
|
96 // Data |
|
97 /* |
|
98 * Application starter. Owned |
|
99 */ |
|
100 CDevEncStarterStarter* iAppStarter; |
|
101 |
|
102 /* |
|
103 * Reference to the callback object. Not owned. |
|
104 */ |
|
105 MUtilsCallback* iCallback; |
|
106 }; |
|
107 |
|
108 #endif //__DEVENCSTARTERUTILS_H__ |
|
109 |
|
110 // End of file |