emailuis/nmsettingui/inc/nmmailboxsettingsmanager.h
branchRCL_3
changeset 63 d189ee25cf9d
equal deleted inserted replaced
61:dcf0eedfc1a3 63:d189ee25cf9d
       
     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 NMMAILBOXSETTINGSMANAGER_H
       
    19 #define NMMAILBOXSETTINGSMANAGER_H
       
    20 
       
    21 #include <QList>
       
    22 #include <QObject>
       
    23 #include <QVariant>
       
    24 
       
    25 #include "nmsettingscommon.h"
       
    26 
       
    27 class NmMailbox;
       
    28 class NmDataManager;
       
    29 class HbIcon;
       
    30 class NmId;
       
    31 class HbDataFormModel;
       
    32 class HbDataForm;
       
    33 class QPluginLoader;
       
    34 
       
    35 
       
    36 class NmMailboxSettingsManager : public QObject
       
    37 {
       
    38     Q_OBJECT
       
    39 
       
    40 public:
       
    41 
       
    42     NmMailboxSettingsManager();
       
    43 
       
    44     ~NmMailboxSettingsManager();
       
    45 
       
    46     void listMailboxes(QList<NmMailbox *> &mailboxList);
       
    47 
       
    48     HbIcon &mailboxIcon(const NmId &mailboxId) const;
       
    49 
       
    50     void populateModel(HbDataFormModel &model,
       
    51                        HbDataForm &form,
       
    52                        const NmId &mailboxId) const;
       
    53 
       
    54 
       
    55 signals:
       
    56 
       
    57     void mailboxListChanged(const NmId &mailboxId,
       
    58                             NmSettings::MailboxEventType type);
       
    59 
       
    60     void mailboxPropertyChanged(const NmId &mailboxId,
       
    61                                 QVariant property,
       
    62                                 QVariant value);
       
    63 
       
    64     void goOnline(const NmId &mailboxId);
       
    65 
       
    66     void goOffline(const NmId &mailboxId);
       
    67 
       
    68     void aboutToClose();
       
    69 
       
    70 
       
    71 private:
       
    72 
       
    73     Q_DISABLE_COPY(NmMailboxSettingsManager)
       
    74 
       
    75     void loadPlugins();
       
    76 
       
    77     void unloadPlugins();
       
    78 
       
    79 
       
    80 private: // Data
       
    81 
       
    82     // Owned.
       
    83     NmDataManager* mDataManager;
       
    84 
       
    85     QList<QPluginLoader *> mPluginLoaders;
       
    86 };
       
    87 
       
    88 #endif // NMMAILBOXSETTINGSMANAGER_H
       
    89 
       
    90 // End of file.