email_plat/nmail_settings_api/nmapimailboxsettingsdata.h
changeset 74 6c59112cfd31
parent 69 4e54af54a4a1
child 76 38bf5461e270
equal deleted inserted replaced
69:4e54af54a4a1 74:6c59112cfd31
     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 NMAPIMAILBOXSETTINGSDATA_H_
       
    19 #define NMAPIMAILBOXSETTINGSDATA_H_
       
    20 
       
    21 #include <QVariant>
       
    22 #include <nmapidef.h>
       
    23 
       
    24 namespace EmailClientApi
       
    25 {
       
    26 
       
    27 const QString NmApiMailboxTypeImap = "imap";
       
    28 const QString NmApiMailboxTypePop = "pop";
       
    29 
       
    30 const QString NmApiAuthNone = "none";
       
    31 const QString NmApiAuthSameAsIncoming = "SameAsIncoming";
       
    32 const QString NmApiAuthUserAuthentication = "UserAuthentication";
       
    33 
       
    34 const QString NmApiAutomatic = "automatic";
       
    35 const QString NmApiAlways = "always";
       
    36 const QString NmApiHomeOnly = "homeOnly";
       
    37 const QString NmApiOff = "off";
       
    38 
       
    39 const QString NmApiStartTls = "StartTls";
       
    40 const QString NmApiSSLTls = "SSLTls";
       
    41 const QString NmApiSecurityOff = NmApiOff;
       
    42 
       
    43 const QString NmApiKeepUpToDate = "Keep-Up-To-Date";
       
    44 const QString NmApiSaveEnergy = "Save-Energy";
       
    45 const QString NmApiFetchManually = "Manual-Fetch";
       
    46 const QString NmApiUserDefined = "User-Defined";
       
    47 
       
    48 const QString EmailProfileOffsetKUTD = "KUTD";
       
    49 const QString EmailProfileOffsetSE = "SE";
       
    50 const QString EmailProfileOffsetMF = "MF";
       
    51 const QString EmailProfileOffsetUD = "UD";
       
    52 
       
    53 enum NmApiWeekDays
       
    54 {
       
    55     Mon = 0x01, Tue = 0x02, Wed = 0x04, Thu = 0x08, Fri = 0x10,
       
    56     Sat = 0x20, Sun = 0x40
       
    57 };
       
    58 
       
    59 enum NmApiRefreshPeriods
       
    60 {
       
    61     WhenMailboxOpens = 0, Every5minutes = 5, Every15minutes = 15,
       
    62     EveryHour = 60, Every4Hours = 240
       
    63 };
       
    64 
       
    65 enum NmApiMailboxSettingKey
       
    66 {
       
    67     IncomingLoginName = 0, // String
       
    68     IncomingPassword, // String
       
    69     MailboxName, // String
       
    70     EmailAddress, // String
       
    71     ReplyAddress, // String
       
    72     EmailAlias, // String
       
    73     MyName, // String    
       
    74     DownloadPictures, // Integer: 0=Off, 1=On
       
    75     MessageDivider, // Integer: 0=Off, 1=On
       
    76     ReceptionActiveProfile, // String: Reception profile
       
    77     ReceptionUserDefinedProfile, // Integer: 0=Disabled, 1=Enabled
       
    78     ReceptionInboxSyncWindow, // Integer: 0=All messages
       
    79     ReceptionGenericSyncWindowInMessages, // Integer: 0=All messages
       
    80     ReceptionWeekDays, // Integer bitmask of weekdays
       
    81     ReceptionDayStartTime, // Integer: 0-23
       
    82     ReceptionDayEndTime, // Integer: 0-23
       
    83     ReceptionRefreshPeriodDayTime, // Integer: 5,15,60,240,0="When open mailbox"
       
    84     ReceptionRefreshPeriodOther, // Integer: 5,15,60,240,0="When open mailbox"
       
    85     UserNameHidden, // Integer: 0=Off, 1=On
       
    86     IncomingMailServer, // String
       
    87     IncomingMailUsesAuthentication, // String    "none", "UserAuthentication"
       
    88     IncomingMailSecurityType, // String  "StartTls", "SSLTls", "none"
       
    89     OutgoingMailServer, // String
       
    90     OutgoingMailUsesAuthentication, // String "none", "SameAsIncoming", "UserAuthentication"
       
    91     OutgoingMailSecurityType, // String 	"StartTls", "SSLTls", "none"
       
    92     IncomingPort, // Integer
       
    93     OutgoingPort, // Integer
       
    94     FolderPath, // String: Empty string means 'Default'
       
    95     AlwaysOnlineState, // string "always", "homeOnly", "off"
       
    96     EmailNotificationState, // string "automatic", "homeOnly", "off"
       
    97     FirstEmnReceived, // Integer: 0=false,1=true
       
    98     EmnReceivedNotSynced, // Integer: 0=false,1=true
       
    99     AoLastSuccessfulUpdate, // QDateTime
       
   100     AoLastUpdateFailed, // Integer: 0=false, 1=true
       
   101     AoUpdateSuccessfulWithCurSettings, // Integer: 0=false, 1=true
       
   102     IncomingSecureSockets, // Boolean
       
   103     IncomingSSLWrapper, // Boolean
       
   104     OutgoingLoginName, // String
       
   105     OutgoingPassword, // String
       
   106     UseOutgoingAuthentication, // Boolean
       
   107     OutgoingSecureSockets, // Boolean
       
   108     OutgoingSSLWrapper // Boolean
       
   109 };
       
   110 
       
   111 class NmApiMailboxSettingsDataPrivate;
       
   112 class NMAPI_EXPORT NmApiMailboxSettingsData
       
   113 {
       
   114 
       
   115 public:    
       
   116     NmApiMailboxSettingsData();
       
   117     ~NmApiMailboxSettingsData();
       
   118 
       
   119     void setMailboxId(quint64 mailboxId);
       
   120     quint64 mailboxId() const;
       
   121     void setValue(int key, const QVariant &settingValue);
       
   122     bool getValue(int key, QVariant &settingValue) const;
       
   123     bool validateData() const;
       
   124     void clearSettings();
       
   125     QList<int> listSettings() const;
       
   126 
       
   127 protected:    
       
   128     NmApiMailboxSettingsDataPrivate *d;
       
   129 
       
   130 };
       
   131 
       
   132 }//end namespace
       
   133 
       
   134 #endif /* NMAPIMAILBOXSETTINGSDATA_H_ */