email_plat/nmail_settings_api/nmapimailboxsettingsdata.h
changeset 54 997a02608b3a
child 56 15bc1d5d6267
equal deleted inserted replaced
53:bf7eb7911fc5 54:997a02608b3a
       
     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 enum NmApiWeekDays
       
    49 {
       
    50     Mon = 0x01, Tue = 0x02, Wed = 0x04, Thu = 0x08, Fri = 0x10,
       
    51     Sat = 0x20, Sun = 0x40
       
    52 };
       
    53 
       
    54 enum NmApiRefreshPeriods
       
    55 {
       
    56     WhenMailboxOpens = 0, Every5minutes = 5, Every15minutes = 15,
       
    57     EveryHour = 60, Every4Hours = 240
       
    58 };
       
    59 
       
    60 enum NmApiMailboxSettingKey
       
    61 {
       
    62     IncomingLoginName = 0, // String
       
    63     IncomingPassword, // String
       
    64     MailboxName, // String
       
    65     EmailAddress, // String
       
    66     ReplyAddress, // String
       
    67     EmailAlias, // String
       
    68     MyName, // String    
       
    69     DownloadPictures, // Integer: 0=Off, 1=On
       
    70     MessageDivider, // Integer: 0=Off, 1=On
       
    71     ReceptionActiveProfile, // String: Reception profile
       
    72     ReceptionUserDefinedProfile, // Integer: 0=Disabled, 1=Enabled
       
    73     ReceptionInboxSyncWindow, // Integer: 0=All messages
       
    74     ReceptionGenericSyncWindowInMessages, // Integer: 0=All messages
       
    75     ReceptionWeekDays, // Integer bitmask of weekdays
       
    76     ReceptionDayStartTime, // Integer: 0-23
       
    77     ReceptionDayEndTime, // Integer: 0-23
       
    78     ReceptionRefreshPeriodDayTime, // Integer: 5,15,60,240,0="When open mailbox"
       
    79     ReceptionRefreshPeriodOther, // Integer: 5,15,60,240,0="When open mailbox"
       
    80     UserNameHidden, // Integer: 0=Off, 1=On
       
    81     IncomingMailServer, // String
       
    82     IncomingMailUsesAuthentication, // String    "none", "UserAuthentication"
       
    83     IncomingMailSecurityType, // String  "StartTls", "SSLTls", "none"
       
    84     OutgoingMailServer, // String
       
    85     OutgoingMailUsesAuthentication, // String "none", "SameAsIncoming", "UserAuthentication"
       
    86     OutgoingMailSecurityType, // String 	"StartTls", "SSLTls", "none"
       
    87     IncomingPort, // Integer
       
    88     OutgoingPort, // Integer
       
    89     FolderPath, // String: Empty string means 'Default'
       
    90     AlwaysOnlineState, // string "always", "homeOnly", "off"
       
    91     EmailNotificationState, // string "automatic", "homeOnly", "off"
       
    92     FirstEmnReceived, // Integer: 0=false,1=true
       
    93     EmnReceivedNotSynced, // Integer: 0=false,1=true
       
    94     AoLastSuccessfulUpdate, // QDateTime
       
    95     AoLastUpdateFailed, // Integer: 0=false, 1=true
       
    96     AoUpdateSuccessfulWithCurSettings, // Integer: 0=false, 1=true
       
    97     IncomingSecureSockets, // Boolean
       
    98     IncomingSSLWrapper, // Boolean
       
    99     OutgoingLoginName, // String
       
   100     OutgoingPassword, // String
       
   101     UseOutgoingAuthentication, // Boolean
       
   102     OutgoingSecureSockets, // Boolean
       
   103     OutgoingSSLWrapper // Boolean
       
   104 };
       
   105 
       
   106 class NmApiMailboxSettingsDataPrivate;
       
   107 class NMAPI_EXPORT NmApiMailboxSettingsData
       
   108 {
       
   109 
       
   110 public:    
       
   111     NmApiMailboxSettingsData();
       
   112     ~NmApiMailboxSettingsData();
       
   113 
       
   114     void setMailboxId(quint64 mailboxId);
       
   115     quint64 mailboxId() const;
       
   116     void setValue(int key, const QVariant &settingValue);
       
   117     bool getValue(int key, QVariant &settingValue) const;
       
   118     bool validateData() const;
       
   119     void clearSettings();
       
   120     QList<int> listSettings() const;
       
   121 
       
   122 protected:    
       
   123     NmApiMailboxSettingsDataPrivate *d;
       
   124 
       
   125 };
       
   126 
       
   127 }//end namespace
       
   128 
       
   129 #endif /* NMAPIMAILBOXSETTINGSDATA_H_ */