|
1 /* |
|
2 * Copyright (c) 2004 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 * Inline functions for CAlwaysOnlineEmailAgentBase |
|
16 * |
|
17 * |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #include <ImumInSettingsData.h> |
|
23 #include <ImumInSettingsDataCollection.h> |
|
24 |
|
25 //----------------------------------------------------------------------------- |
|
26 // IsImap4 |
|
27 //----------------------------------------------------------------------------- |
|
28 inline TBool CAlwaysOnlineEmailAgentBase::IsImap4() const |
|
29 { |
|
30 return iFlags->Flag( EAOBFIsImap4 ); |
|
31 } |
|
32 |
|
33 //----------------------------------------------------------------------------- |
|
34 // IsEmn |
|
35 //----------------------------------------------------------------------------- |
|
36 inline TBool CAlwaysOnlineEmailAgentBase::IsEmn() const |
|
37 { |
|
38 return ( EmnState() != TImumDaSettings::EValueNotificationsOff ); |
|
39 } |
|
40 |
|
41 // --------------------------------------------------------------------------- |
|
42 // CAlwaysOnlineEmailAgentBase::LoadSettingL() |
|
43 // --------------------------------------------------------------------------- |
|
44 // |
|
45 template<class T> |
|
46 T CAlwaysOnlineEmailAgentBase::LoadSettingL( |
|
47 const TUint aKey, |
|
48 const TBool aConnectionSetting ) const |
|
49 { |
|
50 T state; |
|
51 |
|
52 if ( aConnectionSetting ) |
|
53 { |
|
54 User::LeaveIfError( |
|
55 iMailboxSettings->GetInSetL( 0 ).GetAttr( aKey, state ) ); |
|
56 } |
|
57 else |
|
58 { |
|
59 User::LeaveIfError( iMailboxSettings->GetAttr( aKey, state ) ); |
|
60 } |
|
61 |
|
62 return state; |
|
63 } |
|
64 |