13 * |
13 * |
14 * Description: ?Description |
14 * Description: ?Description |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #ifndef C_CAAPPHANDLER_H |
18 #ifndef CAAPPHANDLER_H |
19 #define C_CAAPPHANDLER_H |
19 #define CAAPPHANDLER_H |
20 |
20 |
21 #include <e32base.h> |
21 #include <QObject> |
22 |
22 |
23 // forward declarations |
23 #include "cahandler.h" |
|
24 |
24 class CEikonEnv; |
25 class CEikonEnv; |
25 class CCaInnerEntry; |
|
26 class CCaUsifUninstallOperation; |
26 class CCaUsifUninstallOperation; |
|
27 class CaEntry; |
27 |
28 |
28 /** |
29 /** |
29 * Command handler for application entries. |
30 * Command handler for application entries. |
30 * |
31 * |
31 * @lib caclient.lib |
32 * @lib caclient.lib |
32 */ |
33 */ |
33 NONSHARABLE_CLASS( CCaAppHandler ): public CBase |
34 class CaAppHandler: public QObject, public CaHandler |
34 { |
35 { |
|
36 Q_OBJECT |
|
37 Q_INTERFACES(CaHandler) |
35 |
38 |
36 public: |
39 public: |
37 /** |
40 |
38 * Allocates memory for and initializes CCaAppHandler object |
41 explicit CaAppHandler(QObject *parent = 0); |
39 */ |
|
40 static CCaAppHandler* NewL(); |
|
41 |
42 |
42 /** |
43 /** |
43 * Destructor. |
44 * Destructor. |
44 */ |
45 */ |
45 virtual ~CCaAppHandler(); |
46 virtual ~CaAppHandler(); |
46 |
|
47 protected: |
|
48 |
|
49 CCaAppHandler(); |
|
50 |
|
51 void ConstructL(); |
|
52 |
47 |
53 public: |
48 public: |
54 |
49 |
55 /** |
50 int execute(const CaEntry &entry, const QString &command); |
56 * Handle command. |
|
57 * @param aItem Item of supported type. |
|
58 * @param aCommand Command. |
|
59 * @param aParams. Command parameters. |
|
60 * @param aStatus Observer request status. When the operation completes, |
|
61 * this status will be completed with the resulting error code. |
|
62 * @return Asynchronous operation. Owned by the caller. |
|
63 */ |
|
64 void HandleCommandL( CCaInnerEntry& aEntry, const TDesC8& aCommand ); |
|
65 |
51 |
66 private: |
52 private: |
|
53 |
67 /** |
54 /** |
68 * Launches application |
55 * Launches application |
69 * @param aUid UID of the application to launch |
56 * @param aUid UID of the application to launch |
70 * @param aParam command parameters |
57 * @param aParam command parameters |
71 * @param aViewId id of the view the application is to start in |
58 * @param aViewId id of the view the application is to start in |
72 */ |
59 */ |
73 void LaunchApplicationL( const TUid aUid, const TDesC8 &aParam, |
60 void launchApplicationL(const TUid aUid, TInt aViewId); |
74 TInt aViewId ); |
|
75 |
61 |
76 /** |
62 /** |
77 * Closes application |
63 * Closes application |
78 * @param aEntry the entry represeting application to close |
64 * @param aEntry the entry represeting application to close |
79 */ |
65 */ |
80 void CloseApplicationL( CCaInnerEntry& aEntry ); |
66 int closeApplication(const EntryFlags &flags, TInt windowGroupId); |
81 |
67 |
82 /** |
68 /** |
83 * Uninstall application |
69 * Uninstall application |
84 * @param aEntry the entry represeting application to uninstall |
70 * @param aEntry the entry represeting application to uninstall |
85 */ |
71 */ |
86 void HandleRemoveL( CCaInnerEntry &aEntry ); |
72 int handleRemove(const EntryFlags &flags, |
87 |
73 const QString &typeName, |
88 /** |
74 const QString &componentId); |
89 * Gets component id |
|
90 * @param aEntry the entry |
|
91 * @param aSoftwareType indicates software type |
|
92 * @return component id |
|
93 */ |
|
94 TInt GetComponentIdL( const CCaInnerEntry &aEntry, |
|
95 const TDesC& aSoftwareType ); |
|
96 |
75 |
97 /** |
76 /** |
98 * Start uninstall operation via usif |
77 * Start uninstall operation via usif |
99 * @param aComponentId component id |
78 * @param aComponentId component id |
100 */ |
79 */ |
101 void StartUsifUninstallL( TInt aComponentId ); |
80 void startUsifUninstallL(TInt aComponentId); |
102 |
81 |
103 private: |
82 private: |
104 // data |
83 CEikonEnv *iEikEnv; |
|
84 CCaUsifUninstallOperation *iUsifUninstallOperation; |
|
85 }; |
105 |
86 |
106 CEikonEnv* iEikEnv; |
87 #endif // CAAPPHANDLER_H |
107 CCaUsifUninstallOperation* iUsifUninstallOperation; |
|
108 }; |
|
109 |
|
110 #endif // C_CAAPPHANDLER_H |
|