1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #if !defined (__MIUTSET_H__)
24 const TInt KMaxSettingStringLength = 1024;
26 /** UID of an SMTP message type. */
27 const TUid KUidMsgTypeSMTP = {0x10001028}; // 268439592
28 /** UID of a POP3 message type. */
29 const TUid KUidMsgTypePOP3 = {0x10001029}; // 268439593
30 /** UID of an IMAP4 message type. */
31 const TUid KUidMsgTypeIMAP4 = {0x1000102A}; // 268439594
36 const TUid KUidMsgTypeSMTPServer = {0x10003923}; // 268450083
39 class CImBaseEmailSettings : public CBase
41 Parent class for CImPop3Settings, CImImap4Settings, CImSmtpSettings.
43 This class should not be instantiated directly. It implements common email
44 settings such as the hostname or IP address of the server, port number,
45 and whether or not to use SSL.
56 IMPORT_C CImBaseEmailSettings();
57 IMPORT_C virtual ~CImBaseEmailSettings();
58 IMPORT_C void Reset();
59 IMPORT_C const TPtrC ServerAddress() const;
60 IMPORT_C void SetServerAddressL(const TDesC& aServerAddress);
61 IMPORT_C TUint Port() const;
62 IMPORT_C void SetPort(const TUint aPortNumber);
63 IMPORT_C TBool SecureSockets() const;
64 IMPORT_C void SetSecureSockets(TBool aFlag);
65 IMPORT_C TBool SSLWrapper() const;
66 IMPORT_C void SetSSLWrapper(TBool aFlag);
67 IMPORT_C CImBaseEmailSettings& CopyL(const CImBaseEmailSettings& aCImBaseEmailSettings);
68 IMPORT_C TBool operator==(const CImBaseEmailSettings& aCImBaseEmailSettings) const;
69 IMPORT_C void SetBearerMobility(TBool aFlag);
70 IMPORT_C TBool BearerMobility() const;
72 TUint32 SettingsFlags() const;
73 void SetSettingsFlags(TUint32 aSetFlags);
76 enum TImBaseEmailSettings
78 EBaseEmailSettingsClearFlag = 0x00000000,
79 EBaseEmailSettingsSecureSockets = 0x00000001,
80 EBaseEmailSettingsSSLWrappedSockets = EBaseEmailSettingsSecureSockets << 1, //0x00000002,
81 EBaseEmailSettingsLastUsedFlag = EBaseEmailSettingsSSLWrappedSockets, //0x00000002
82 EBaseEmailSettingsBearerMobFlag = 0x80000000
84 TUint32 iPortNumber; // the port the TCP/IP connection be made on
86 TUint32 iFlags; // space for flags info (now and for future)
89 HBufC* iServerAddress; // remote server's IP address