|
1 /* |
|
2 * Copyright (c) 2010 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 #ifndef NMSETTINGSPLUGININTERFACE_H |
|
19 #define NMSETTINGSPLUGININTERFACE_H |
|
20 |
|
21 #include <QtPlugin> |
|
22 #include <QVariant> |
|
23 |
|
24 #include "nmsettingscommon.h" |
|
25 |
|
26 /*! |
|
27 \class NmSettingsPluginInterface |
|
28 \brief The class NmSettingsPluginInterface is an interface for mailbox settings. |
|
29 Mailbox settings can be displayed in mailbox settings view. |
|
30 */ |
|
31 |
|
32 class HbDataForm; |
|
33 class HbDataFormModel; |
|
34 class NmId; |
|
35 |
|
36 class NmSettingsPluginInterface |
|
37 { |
|
38 |
|
39 public: |
|
40 |
|
41 /*! |
|
42 Destructor of NmSettingsPluginInterface. |
|
43 */ |
|
44 virtual ~NmSettingsPluginInterface() |
|
45 { |
|
46 } |
|
47 |
|
48 /*! |
|
49 Populates form model with mailbox settings. |
|
50 Model can be populated with HbDataFormModelItems. |
|
51 Items that are added to model can be displayed in mailbox settings view. |
|
52 Signals that are emitted by items that are added to form model, needs to be handled by |
|
53 realizing class. |
|
54 |
|
55 \param model Form model where items are added. |
|
56 \param form Used to add connections. |
|
57 \param mailboxId Specific mailbox |
|
58 \return <code>true</code> if plug-in contains certain mailbox otherwise <code>false</code> |
|
59 */ |
|
60 virtual bool populateModel(HbDataFormModel &model, HbDataForm &form, const NmId &mailboxId) = 0; |
|
61 |
|
62 signals: |
|
63 |
|
64 virtual void mailboxListChanged(const NmId &mailboxId, NmSettings::MailboxEventType type) = 0; |
|
65 virtual void mailboxPropertyChanged(const NmId &mailboxId, QVariant property, QVariant value) = 0; |
|
66 |
|
67 }; |
|
68 |
|
69 Q_DECLARE_INTERFACE(NmSettingsPluginInterface, "sf.app.commonmail.emailuis.nmailsettingui.nmsettingsplugininterface/1.0"); |
|
70 |
|
71 #endif // NMSETTINGSPLUGININTERFACE_H |