|
1 /* |
|
2 * Copyright (c) 2003 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: IMPS Connection Process observer. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __MIMPSCONNPROCESSOBSERVERNG_H |
|
19 #define __MIMPSCONNPROCESSOBSERVERNG_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <E32base.h> |
|
23 #include <impspresenceconnectionuiconstsng.h> |
|
24 |
|
25 |
|
26 // FORWARD DECLARATION |
|
27 class MIMPSConnProcessObserver; |
|
28 class MIMPSConnProcessUi; |
|
29 class MIMPSConnProcess; |
|
30 |
|
31 |
|
32 |
|
33 // CLASS DECLARATION |
|
34 /** |
|
35 * Connection UI observer interface. |
|
36 * |
|
37 * Connection UI client may implement this interface |
|
38 * and give it as connection operation parameter. |
|
39 * |
|
40 * Observer functions have default implementations |
|
41 * implemented in IMPSConnectionUi.dll. Thus the |
|
42 * client do not have to implement those observer |
|
43 * methods that it doesn't need. |
|
44 * |
|
45 * @since 2.1 |
|
46 * @lib IMPSConnectionUi |
|
47 */ |
|
48 class MIMPSConnProcessObserver |
|
49 { |
|
50 public: // New observation methods |
|
51 |
|
52 /** |
|
53 * Notifes observer from SAP access events. |
|
54 * (Connection UI is logging into or logging |
|
55 * out from certain network server.) |
|
56 * |
|
57 * Note! Access event might come several times |
|
58 * during one login/logout operation issued from |
|
59 * CIMPSPresenceConnectionUi interface. |
|
60 * |
|
61 * HandleSapAccessEventEventL() has empty default |
|
62 * implementation. |
|
63 * |
|
64 * @see MIMPSConnProcessUi. |
|
65 * |
|
66 * @since 2.1 |
|
67 * @param aServerName The accessed server name. |
|
68 * @param aServerURL The accessed server URL. |
|
69 * @param aConnProcessUi Connection process UI. |
|
70 * If connection process is executed in environment |
|
71 * which doesn't have UI, aConnProcessUi is NULL. |
|
72 * Else aConnProcessUi is a valid pointer to |
|
73 * Connection Process UI interface. |
|
74 */ |
|
75 IMPORT_C virtual void HandleSapAccessEventEventL( const TDesC& aServerName, |
|
76 const TDesC& aServerURL, |
|
77 MIMPSConnProcessUi* aConnProcessUi ); |
|
78 |
|
79 /** |
|
80 * Reserved virtual table slots for future use. |
|
81 * Do not implement these. |
|
82 */ |
|
83 IMPORT_C virtual TInt ReservedObservMethod_1L(); |
|
84 IMPORT_C virtual TInt ReservedObservMethod_2L(); |
|
85 IMPORT_C virtual TInt ReservedObservMethod_3L(); |
|
86 |
|
87 |
|
88 protected: //Destructor |
|
89 |
|
90 /** |
|
91 * Virtual inline destructor. |
|
92 * Concrete observer can't be |
|
93 * destroyed using this interface. |
|
94 */ |
|
95 virtual ~MIMPSConnProcessObserver() {}; |
|
96 }; |
|
97 |
|
98 |
|
99 |
|
100 // CLASS DECLARATION |
|
101 |
|
102 /** |
|
103 * Abstract interface for Connection Process UI. |
|
104 * |
|
105 * Connection Process UI is provided to |
|
106 * MIMPSConnProcessObserver's for handling |
|
107 * SAP access event's. |
|
108 * |
|
109 * @lib IMPSConnectionUi |
|
110 * @since 2.1 |
|
111 **/ |
|
112 class MIMPSConnProcessUi |
|
113 { |
|
114 public: // New methods |
|
115 |
|
116 |
|
117 /** |
|
118 * Sets the new resource file to use in Connection UI. |
|
119 * Parameter aNewResourceFile must be full path |
|
120 * and filename to the new resource file. |
|
121 * |
|
122 * Note! Given resourcefile name must point correctly |
|
123 * localised resource file for current locale. |
|
124 * |
|
125 * If empty new resource name is passed, changes the |
|
126 * Connection UI to use its default resource file. |
|
127 * Client can retrieve this default resource file |
|
128 * name using the ResourceFileNameL() method. |
|
129 * |
|
130 * |
|
131 * Handles errors coming from opening the new resource |
|
132 * file by leaving. |
|
133 * |
|
134 * @since 2.1 |
|
135 * @param aNewResourceFile The resource file to |
|
136 * use. |
|
137 */ |
|
138 virtual void UseResourceFileL( const TDesC& aNewResourceFile ) = 0; |
|
139 |
|
140 |
|
141 /** |
|
142 * Gets Connection UI's resource file name. |
|
143 * |
|
144 * Gets Connection UI's localised |
|
145 * default resource file name. |
|
146 * |
|
147 * Returns full filename and path. If resource file |
|
148 * name doesn't fit in passed aResourceFileName buffer, |
|
149 * leaves with KErrOverflow. (Passed buffer's max length |
|
150 * should be KMaxFileName.) |
|
151 * |
|
152 * @since 2.1 |
|
153 * @param aResourceFileName The resource file name. |
|
154 */ |
|
155 virtual void ResourceFileNameL( TDes& aResourceFileName ) = 0; |
|
156 |
|
157 |
|
158 |
|
159 protected: //Destructor |
|
160 |
|
161 /** |
|
162 * Virtual inline destructor. |
|
163 * Concrete process UI can't be |
|
164 * destroyed using this interface. |
|
165 */ |
|
166 virtual ~MIMPSConnProcessUi() {}; |
|
167 }; |
|
168 |
|
169 |
|
170 #endif //__MIMPSCONNPROCESSOBSERVERNG_H |
|
171 |
|
172 // End of File |
|
173 |