40
|
1 |
/*
|
|
2 |
* Copyright (c) 2008 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: ECom plugin install/uninstall/version listener
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef C_CDUNATECOMLISTEN_H
|
|
20 |
#define C_CDUNATECOMLISTEN_H
|
|
21 |
|
|
22 |
#include <atext.h>
|
|
23 |
#include "DunTransporter.h"
|
|
24 |
|
|
25 |
/**
|
|
26 |
* Notification interface class for ECOM plugin interface status changes
|
|
27 |
*
|
|
28 |
* @lib dunatext.lib
|
|
29 |
* @since TB9.2
|
|
30 |
*/
|
|
31 |
NONSHARABLE_CLASS( MDunAtEcomListen )
|
|
32 |
{
|
|
33 |
|
|
34 |
public:
|
|
35 |
|
|
36 |
/**
|
|
37 |
* Notifies about new plugin installation
|
|
38 |
*
|
|
39 |
* @since TB9.2
|
|
40 |
* @param aPluginUid UID of installed plugin
|
|
41 |
* @return Symbian error code on error, KErrNone otherwise
|
|
42 |
*/
|
|
43 |
virtual TInt NotifyPluginInstallation( TUid& aPluginUid ) = 0;
|
|
44 |
|
|
45 |
/**
|
|
46 |
* Notifies about existing plugin uninstallation
|
|
47 |
*
|
|
48 |
* @since TB9.2
|
|
49 |
* @param aPluginUid UID of uninstalled plugin
|
|
50 |
* @return Symbian error code on error, KErrNone otherwise
|
|
51 |
*/
|
|
52 |
virtual TInt NotifyPluginUninstallation( TUid& aPluginUid ) = 0;
|
|
53 |
|
|
54 |
};
|
|
55 |
|
|
56 |
/**
|
|
57 |
* Class for ECom plugin install/uninstall/version listener
|
|
58 |
*
|
|
59 |
* @lib dunatext.lib
|
|
60 |
* @since TB9.2
|
|
61 |
*/
|
|
62 |
NONSHARABLE_CLASS( CDunAtEcomListen ) : public CActive
|
|
63 |
{
|
|
64 |
|
|
65 |
public:
|
|
66 |
|
|
67 |
/**
|
|
68 |
* Two-phased constructor.
|
|
69 |
* @param aAtCmdExt Pointer to AT command extension
|
|
70 |
* @param aCallback Callback to mode status change
|
|
71 |
* @return Instance of self
|
|
72 |
*/
|
|
73 |
static CDunAtEcomListen* NewL( RATExt* aAtCmdExt,
|
|
74 |
MDunAtEcomListen* aCallback );
|
|
75 |
|
|
76 |
/**
|
|
77 |
* Two-phased constructor.
|
|
78 |
* @param aAtCmdExt Pointer to AT command extension
|
|
79 |
* @param aCallback Callback to mode status change
|
|
80 |
* @return Instance of self
|
|
81 |
*/
|
|
82 |
static CDunAtEcomListen* NewLC( RATExt* aAtCmdExt,
|
|
83 |
MDunAtEcomListen* aCallback );
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Destructor.
|
|
87 |
*/
|
|
88 |
virtual ~CDunAtEcomListen();
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Resets data to initial values
|
|
92 |
*
|
|
93 |
* @since TB9.2
|
|
94 |
* @return None
|
|
95 |
*/
|
|
96 |
void ResetData();
|
|
97 |
|
|
98 |
/**
|
|
99 |
* Starts waiting for ECom plugin install/uninstall/version status changes
|
|
100 |
*
|
|
101 |
* @since TB9.2
|
|
102 |
* @return Symbian error code on error, KErrNone otherwise
|
|
103 |
*/
|
|
104 |
TInt IssueRequest();
|
|
105 |
|
|
106 |
/**
|
|
107 |
* Stops waiting for Ecom plugin install/uninstall/version status changes
|
|
108 |
*
|
|
109 |
* @since TB9.2
|
|
110 |
* @return Symbian error code on error, KErrNone otherwise
|
|
111 |
*/
|
|
112 |
TInt Stop();
|
|
113 |
|
|
114 |
private:
|
|
115 |
|
|
116 |
CDunAtEcomListen( RATExt* aAtCmdExt,
|
|
117 |
MDunAtEcomListen* aCallback );
|
|
118 |
|
|
119 |
void ConstructL();
|
|
120 |
|
|
121 |
/**
|
|
122 |
* Initializes this class
|
|
123 |
*
|
|
124 |
* @since TB9.2
|
|
125 |
* @return None
|
|
126 |
*/
|
|
127 |
void Initialize();
|
|
128 |
|
|
129 |
// from base class CActive
|
|
130 |
|
|
131 |
/**
|
|
132 |
* From CActive.
|
|
133 |
* Gets called when plugin installed, uninstalled or changed
|
|
134 |
*
|
|
135 |
* @since TB9.2
|
|
136 |
* @return None
|
|
137 |
*/
|
|
138 |
void RunL();
|
|
139 |
|
|
140 |
/**
|
|
141 |
* From CActive.
|
|
142 |
* Gets called on cancel
|
|
143 |
*
|
|
144 |
* @since TB9.2
|
|
145 |
* @return None
|
|
146 |
*/
|
|
147 |
void DoCancel();
|
|
148 |
|
|
149 |
private: // data
|
|
150 |
|
|
151 |
/**
|
|
152 |
* AT command extension
|
|
153 |
* Not own.
|
|
154 |
*/
|
|
155 |
RATExt* iAtCmdExt;
|
|
156 |
|
|
157 |
/**
|
|
158 |
* Callback to call when plugin installed, uninstalled or changed
|
|
159 |
* Not own.
|
|
160 |
*/
|
|
161 |
MDunAtEcomListen* iCallback;
|
|
162 |
|
|
163 |
/**
|
|
164 |
* Current state of ECom interface listening: active or inactive
|
|
165 |
*/
|
|
166 |
TDunState iEcomListenState;
|
|
167 |
|
|
168 |
/**
|
|
169 |
* UID of the installed, uninstalled or changed plugin
|
|
170 |
*/
|
|
171 |
TUid iPluginUid;
|
|
172 |
|
|
173 |
/**
|
|
174 |
* Package for plugin UID
|
|
175 |
*/
|
|
176 |
TPckg<TUid> iPluginUidPckg;
|
|
177 |
|
|
178 |
/**
|
|
179 |
* Package for ECOM type
|
|
180 |
*/
|
|
181 |
TPckg<TATExtensionEcomType> iEcomTypePckg;
|
|
182 |
|
|
183 |
};
|
|
184 |
|
|
185 |
#endif // C_CDUNATECOMLISTEN_H
|