1.1 --- a/epoc32/include/iapprefs.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,132 +0,0 @@
1.4 -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -//
1.18 -
1.19 -#ifndef IAPPrefs__
1.20 -#define IAPPrefs__
1.21 -
1.22 -
1.23 -
1.24 -
1.25 -#include <e32base.h>
1.26 -#include <msvapi.h>
1.27 -#include <msvuids.h>
1.28 -#include <cdbcols.h>
1.29 -
1.30 -// Note: Version 1 = EPOC6.1
1.31 -// Version 2 = EPOC6.2 / Hurricane
1.32 -const TInt KImIAPPreferencesVersion = 2; // identify which version of this class has been stored
1.33 -
1.34 -// for builds which don't define it.
1.35 -/*
1.36 -enum TCommDbDialogPref
1.37 - {
1.38 - ECommDbDialogPrefUnknown =0,
1.39 - ECommDbDialogPrefPrompt,
1.40 - ECommDbDialogPrefWarn,
1.41 - ECommDbDialogPrefDoNotPrompt
1.42 - };
1.43 -*/
1.44 -
1.45 -class TImIAPChoice
1.46 -/** Sets the connection dialog preference to be used with a particular IAP used
1.47 -for an internet mail service.
1.48 -
1.49 -The connection control component (GenConn) allows various options for whether
1.50 -or not the user should be should be prompted with a dialog at connect time.
1.51 -For example, a connection using the first choice GPRS IAP might not show a
1.52 -dialog, but a second choice connection using GSM might bring up a warning.
1.53 -@publishedAll
1.54 -@released
1.55 -*/
1.56 - {
1.57 - public:
1.58 - /** The IAP identifier, as specified in the CommDb record for the IAP. */
1.59 - TUint32 iIAP;
1.60 - /** Preference for what type of dialog is shown before a connection is made using
1.61 - the specified IAP. */
1.62 - TCommDbDialogPref iDialogPref;
1.63 - };
1.64 -
1.65 -class CImIAPPreferences : public CBase
1.66 -/** Encapsulates preferences relating to IAPs for an email service.
1.67 -
1.68 -An IAP defines all of the variable factors that determine how an Internet
1.69 -connection is made. These variable factors can include the bearer (CDMA, GSM
1.70 -or GPRS), dial-in number. network login names and passwords.
1.71 -
1.72 -The Comms Database is capable of storing details of several IAPs, which can
1.73 -then be used to initiate different types of connection. The database also
1.74 -stores the preference order of the IAPs: this defines which IAP should be
1.75 -used as the first choice, and also an optional second choice to be used if
1.76 -the first choice is not available.
1.77 -
1.78 -The CImIAPPreferences class associates a first choice, and optionally a second
1.79 -choice IAP to use with a particular email service. The preference object is
1.80 -stored in the service entry's message store.
1.81 -
1.82 -For SMTP, if no object has been stored in the service, then the SMTP client
1.83 -will attempt to use any default Internet settings in the Comms Database, or
1.84 -will use the existing Internet connection if one does already exist. Note
1.85 -that SMTP sessions will normally fail to send any email messages if the SMTP
1.86 -session is not created using an IAP which the SMTP server does not accept.
1.87 -
1.88 -Note that in Symbian OS v6.0 a single IAP was associated with an email service
1.89 -entry through the iMtmData1 field.
1.90 -@publishedAll
1.91 -@released
1.92 -*/
1.93 - {
1.94 - public:
1.95 - IMPORT_C static CImIAPPreferences* NewLC();
1.96 - IMPORT_C TInt Version() const;
1.97 - IMPORT_C TInt NumberOfIAPs() const;
1.98 - IMPORT_C TImIAPChoice IAPPreference(TInt aPreference) const;
1.99 - IMPORT_C void AddIAPL(TImIAPChoice aIap, TInt aIndex=0);
1.100 - IMPORT_C void RemoveIAPL(TInt aPreferenceNumber);
1.101 - IMPORT_C TInt FindIAPL(TUint32 aIAP, TInt &aLocation) const;
1.102 - IMPORT_C void ReplaceIAPL(TInt aPreferenceNumber,TImIAPChoice aIap);
1.103 - IMPORT_C ~CImIAPPreferences();
1.104 - IMPORT_C TBool SNAPDefined() const;
1.105 - IMPORT_C TUint32 SNAPPreference() const;
1.106 - IMPORT_C void SetSNAPL(TUint32 aSnap);
1.107 - IMPORT_C void RemoveSNAP();
1.108 -
1.109 - void Reset();
1.110 -
1.111 - // class constants
1.112 - /**
1.113 - @deprecated
1.114 - */
1.115 - enum
1.116 - {
1.117 - KSanityCheckOldWins = 0xEFBEADDE,
1.118 - KSanityCheck = 0xDEADBEEF
1.119 - };
1.120 - /** ID of the stream used to store IAP preference information in a
1.121 - message store. */
1.122 - const static TUid KUidMsgFileInternetAccessPreferences;
1.123 - private:
1.124 - CArrayFixFlat<TImIAPChoice>* iChoices;
1.125 - TInt iVersion;
1.126 - TUint32 iSnapId;
1.127 - private:
1.128 - CImIAPPreferences();
1.129 - CImIAPPreferences(CImIAPPreferences& aOther); // not implemented
1.130 - int operator=(CImIAPPreferences& aOther); // not implemented
1.131 - void ConstructL();
1.132 - void Panic(int err) const;
1.133 - };
1.134 -
1.135 -#endif