ipsservices/nmipssettings/inc/nmipssettingshelper.h
branchGCC_SURGE
changeset 55 cdd802add233
parent 54 997a02608b3a
child 56 15bc1d5d6267
--- a/ipsservices/nmipssettings/inc/nmipssettingshelper.h	Fri Jun 11 16:23:29 2010 +0100
+++ b/ipsservices/nmipssettings/inc/nmipssettingshelper.h	Thu Jul 22 16:30:28 2010 +0100
@@ -22,6 +22,7 @@
 #include <QMap>
 #include <QVariant>
 #include <QDateTime>
+#include <QPersistentModelIndex>
 
 #include "nmsettingscommon.h"
 #include "nmipssettingitems.h"
@@ -37,11 +38,12 @@
 class CpSettingFormItemData;
 class NmIpsSettingsManagerBase;
 class NmId;
+class CmApplSettingsUi;
 
 
 // Constant for User Defined sync profile (EmailProfileOffsetUD)
 // \sa ipssettingkeys.h - Currently used sync profile
-const int NmIpsSettingsReceivingScheduleUserDefinedProfile = 3;
+const int NmIpsSettingsReceivingScheduleUserDefinedProfile(3);
 
 class NmIpsSettingsHelper : public QObject
 {
@@ -61,15 +63,17 @@
     void setReceivingScheduleGroupItem(HbDataFormModelItem *item);
     void setServerInfoGroupItem(HbDataFormModelItem *item);
     void createOrUpdateReceivingScheduleGroupDynamicItem(IpsServices::SettingItem item);
-    void createServerInfoGroupDynamicItems();
+    void createServerInfoGroupDynamicItems(bool hiddenItem);
     
-    int getCorrectPortRadioButtonIndex(int currentPort);
-    int getCorrectSecureRadioButtonIndex(QVariant secureSockets, QVariant secureSSLWrapper);
-    int getCorrectInboxPathRadioButtonIndex(QVariant folderPath);
-    int getCorrectOutgoingPortRadioButtonIndex(int currentPort);
+    int getCorrectIncomingPortRadioButtonIndex();
+    int getCorrectIncomingSecureRadioButtonIndex();
+    int getCorrectOutgoingSecureRadioButtonIndex();
+    int getCorrectFolderPathRadioButtonIndex();
+    int getCorrectOutgoingPortRadioButtonIndex();
     int getCorrectOutgoingAuthenticationRadioButtonIndex();
     void handleReceivingScheduleSettingChange(IpsServices::SettingItem settingItem,
         const QVariant &settingValue);
+    QString destinationNameFromIdentifier(uint identifier);
     
 signals:
 
@@ -101,32 +105,34 @@
     void saveOutgoingMailServer();
     void outgoingMailServerTextChange(const QString &text);
     void incomingPortChange(int index);
-    void incomingPortPress(const QModelIndex &index);
     void incomingSecureConnectionItemChange(int index);
-    void incomingSecureConnectionPress(const QModelIndex &index);
     void folderPathChange(int index);
-    void folderPathPress(const QModelIndex &index);
     void outgoingPortChange(int index);
-    void outgoingPortPress(const QModelIndex &index);
     void outgoingSecureConnectionItemChange(int index);
-    void outgoingSecureConnectionPress(const QModelIndex &index);
     void outgoingAuthenticationChange(int index);
-    void outgoingAuthenticationPress(const QModelIndex &index);
+    void connectionButtonPress();
 
 private slots:
 
     void receivingWeekdaysModified();
     void startTimeModified(QTime time);
     void endTimeModified(QTime time);
-    void refreshPeriodModified(int index);
+    void refreshPeriodModified(QPersistentModelIndex, QVariant);
     void handleMailboxDelete(HbAction *action);
     void handleMailboxDeleteUpdate(HbAction *action);
     void handleUserDefinedIncomingPortInput(HbAction *action);
     void handleUserDefinedFolderPathInput(HbAction *action);
     void handleUserDefinedOutgoingPortInput(HbAction *action);
+    void handleConnectionSelected(uint status);
     
 private:
 
+    enum AppLibUpdateOperation
+    {
+        UnregisterMailbox,
+        UpdateMailboxName
+    };
+
     void updateShowMailInMailbox();
     void deleteReceivingScheduleGroupDynamicItem(IpsServices::SettingItem item);
     void deleteServerInfoGroupDynamicItems();
@@ -134,6 +140,8 @@
     void showFolderPathInputDialog();
     void showOutgoingPortInputDialog();
     void copyReceivingScheduleSettingsFromActiveProfile(int profileMode);
+    void updateAppLib(AppLibUpdateOperation op, QString mailboxName = QString());
+    void noReceptionWeekdaysSelected();
 
     Q_DISABLE_COPY(NmIpsSettingsHelper)
 
@@ -147,15 +155,16 @@
     HbDataFormModelItem *mServerInfoGroupItem;	// Not owned.
 	HbDataForm &mDataForm;
 	HbDataFormModel &mDataFormModel;
-	HbMessageBox *mDeleteConfirmationDialog; // Owned;
-	HbMessageBox *mDeleteInformationDialog; // Owned;
-	HbInputDialog *mIncomingPortInputDialog; // Owned;
-	HbValidator *mIncomingPortInputValidator; // Owned;
-    HbInputDialog *mFolderPathInputDialog; // Owned;
-    HbInputDialog *mOutgoingPortInputDialog; // Owned;
-    HbValidator *mOutgoingPortInputValidator; // Owned;    
+	HbMessageBox *mDeleteConfirmationDialog; // Owned.
+	HbMessageBox *mDeleteInformationDialog; // Owned.
+	HbInputDialog *mIncomingPortInputDialog; // Owned.
+	HbValidator *mIncomingPortInputValidator; // Owned.
+    HbInputDialog *mFolderPathInputDialog; // Owned.
+    HbInputDialog *mOutgoingPortInputDialog; // Owned.
+    HbValidator *mOutgoingPortInputValidator; // Owned.
+    CmApplSettingsUi *mDestinationDialog; // Owned.
     bool mServerInfoDynamicItemsVisible;
-    int mRadioButtonPreviousIndex;
+    bool mAbortDynamicRSItemHandling;
 };
 
 #endif // NMIPSSETTINGSHELPER_H