|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "nmimapclientpluginheaders.h" |
|
19 #ifdef Q_OS_SYMBIAN |
|
20 #include <e32base.h> |
|
21 #endif |
|
22 |
|
23 Q_EXPORT_PLUGIN(NmImapClientPlugin) |
|
24 |
|
25 |
|
26 /*! |
|
27 \class NmImapClientPlugin |
|
28 |
|
29 \brief The NmImapClientPlugin plugin provides ui services for IMAP mail protocol. |
|
30 */ |
|
31 |
|
32 /*! |
|
33 Constructs a new NmImapClientPlugin. |
|
34 */ |
|
35 NmImapClientPlugin::NmImapClientPlugin() |
|
36 { |
|
37 } |
|
38 |
|
39 /*! |
|
40 Destructor. |
|
41 */ |
|
42 NmImapClientPlugin::~NmImapClientPlugin() |
|
43 { |
|
44 } |
|
45 |
|
46 /*! |
|
47 Provides list of supported NmActions. |
|
48 Implementation of NmUiExtensionInterface. |
|
49 Parameter \a request controls list of request services. |
|
50 Parameter \a actionList is updated by supported NmActions. |
|
51 */ |
|
52 void NmImapClientPlugin::getActions( |
|
53 const NmActionRequest &request, |
|
54 QList<NmAction *> &actionList) |
|
55 { |
|
56 NMLOG("NmImapClientPlugin::getActions()-->"); |
|
57 |
|
58 // Check if this request is for the IMAP protocol. |
|
59 quint32 pluginId = this->pluginId(); |
|
60 if (request.mailboxId().pluginId32() != pluginId |
|
61 #ifdef USE_POPIMAP_TESTPLUGIN |
|
62 && request.mailboxId().pluginId32() != IMAPTESTPLUGINID |
|
63 #endif |
|
64 ) { |
|
65 NMLOG("NmImapClientPlugin::getActions(): PluginId incorrect."); |
|
66 NMLOG(QString("request.mailboxId().pluginId32()=%1").arg(request.mailboxId().pluginId32())); |
|
67 return; |
|
68 } |
|
69 |
|
70 // Get the NmBaseClientPlugin implementation of the UI actions. |
|
71 NmBaseClientPlugin::getActions(request, actionList); |
|
72 NMLOG("<--NmImapClientPlugin::getActions()"); |
|
73 } |
|
74 |
|
75 |
|
76 /*! |
|
77 Provide id of plugin. |
|
78 Implementation of NmUiExtensionInterface. |
|
79 */ |
|
80 quint32 NmImapClientPlugin::pluginId() |
|
81 { |
|
82 NMLOG("NmImapClientPlugin::pluginId()-->"); |
|
83 return IPSSOSIMAP4PLUGIN_IMPLEMENTATION_UID; |
|
84 } |