|
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: |
|
15 * Always online plugin for freestyle smtp handling |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef IPSSOSAOPLUGINECOMINTERFACE_H_ |
|
20 #define IPSSOSAOPLUGINECOMINTERFACE_H_ |
|
21 |
|
22 #include <e32base.h> // CBase |
|
23 #include <AlwaysOnlineEComInterface.h> |
|
24 #include <AlwaysOnlineManagerClient.h> |
|
25 #include <msvapi.h> |
|
26 |
|
27 |
|
28 class CIpsSosAOSmtpSendWatcher; |
|
29 class CIpsSosAOImapPopLogic; |
|
30 |
|
31 //constants |
|
32 /** |
|
33 * Always online plugin interface, creates imappop logic and smtp logic |
|
34 * objects, sends always online server command to both logic objects. |
|
35 * Sends msv events to logics |
|
36 * |
|
37 * @lib ipssosaoplugin.lib |
|
38 */ |
|
39 class CIpsSosAOPluginEComInterface : |
|
40 public CAlwaysOnlineEComInterface, |
|
41 public MMsvSessionObserver |
|
42 { |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Destructor |
|
47 */ |
|
48 virtual ~CIpsSosAOPluginEComInterface(); |
|
49 |
|
50 public: // from CAlwaysOnlineEComInterface |
|
51 |
|
52 /** |
|
53 * NewL |
|
54 * Two phased constructor |
|
55 * @return CEComEmailPlugin*, self pointer |
|
56 */ |
|
57 IMPORT_C static CIpsSosAOPluginEComInterface* NewL(); |
|
58 |
|
59 /** |
|
60 * Handles always online server commands |
|
61 * @param TInt, command Id |
|
62 * @param TDesC8*, parameter pack |
|
63 * @return TAny*, return value |
|
64 */ |
|
65 IMPORT_C virtual TAny* HandleServerCommandL( |
|
66 TInt aCommand, |
|
67 TDesC8* aParameters ); |
|
68 |
|
69 public: // from MMscServerSession |
|
70 |
|
71 /* |
|
72 * Handles message server session events |
|
73 */ |
|
74 virtual void HandleSessionEventL( |
|
75 TMsvSessionEvent aEvent, |
|
76 TAny* aArg1, TAny* aArg2, TAny* aArg3); |
|
77 |
|
78 private: |
|
79 /** |
|
80 * Constructor |
|
81 */ |
|
82 CIpsSosAOPluginEComInterface(); |
|
83 |
|
84 /** |
|
85 * ConstructL |
|
86 * Second phase constructor |
|
87 */ |
|
88 void ConstructL(); |
|
89 |
|
90 /** |
|
91 * Called when CMsvSession is ready |
|
92 */ |
|
93 void CompleteConstructL(); |
|
94 |
|
95 private: // data |
|
96 |
|
97 CIpsSosAOSmtpSendWatcher* iSendWatcher; |
|
98 CIpsSosAOImapPopLogic* iImapPopLogic; |
|
99 CMsvSession* iSession; |
|
100 RArray<TInt> iBufferedAOCommands; |
|
101 |
|
102 |
|
103 }; |
|
104 |
|
105 #endif /*IPSSOSAOPLUGINECOMINTERFACE_H_*/ |