|
1 /* |
|
2 * Copyright (c) 2009 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: Message extension interface |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CCONNECTIONSTATUSQUERY_H |
|
19 #define CCONNECTIONSTATUSQUERY_H |
|
20 |
|
21 #include "cemailextensionbase.h" |
|
22 #include "cfsmailcommon.h" |
|
23 #include "FreestyleEmailUiConstants.h" |
|
24 |
|
25 // interface UID value passed to CFSMailMessageBase::ExtensionL |
|
26 const TUid KEmailConnectionStatusQueryExtensionUid = { 0x2002EA82 }; |
|
27 |
|
28 /** |
|
29 * Extension interface for querying connection status directly from plugin |
|
30 */ |
|
31 class CConnectionStatusQueryExtension : public CEmailExtension |
|
32 { |
|
33 |
|
34 public: |
|
35 enum TConnectionStatus |
|
36 { |
|
37 // Reserve 0 for undefined status |
|
38 EUndefined, |
|
39 // Mailbox is disconnected |
|
40 EDisconnected, |
|
41 // Mailbox is connected |
|
42 EConnected, |
|
43 // Mailbox is synchronizing |
|
44 ESynchronizing |
|
45 }; |
|
46 |
|
47 public: |
|
48 |
|
49 virtual TConnectionStatus ConnectionStatus( |
|
50 const TFSMailMsgId& aMailboxId, |
|
51 TForcedStatus aForcedStatus) const = 0; |
|
52 |
|
53 protected: |
|
54 |
|
55 inline CConnectionStatusQueryExtension(); |
|
56 |
|
57 }; |
|
58 |
|
59 inline CConnectionStatusQueryExtension::CConnectionStatusQueryExtension() : |
|
60 CEmailExtension( KEmailConnectionStatusQueryExtensionUid ) |
|
61 { |
|
62 } |
|
63 |
|
64 #endif // CCONNECTIONSTATUSQUERY_H |