|
1 // Copyright (c) 2006-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 #include "cimapcapabilityinfo.h" |
|
18 |
|
19 /** |
|
20 Public construction |
|
21 */ |
|
22 EXPORT_C CImapCapabilityInfo* CImapCapabilityInfo::NewL() |
|
23 // static method |
|
24 { |
|
25 return new(ELeave)CImapCapabilityInfo; |
|
26 } |
|
27 |
|
28 /** |
|
29 Private constructor |
|
30 */ |
|
31 CImapCapabilityInfo::CImapCapabilityInfo() |
|
32 {} |
|
33 |
|
34 /** |
|
35 Destructor |
|
36 */ |
|
37 CImapCapabilityInfo::~CImapCapabilityInfo() |
|
38 {} |
|
39 |
|
40 /** |
|
41 Set the flag identified by aFlagId to the value of aValue. |
|
42 @param aFlagId Identifies which flag to set. |
|
43 @param aValue The value to apply to the flag. |
|
44 */ |
|
45 EXPORT_C void CImapCapabilityInfo::SetFlag(TImapCapabilityFlags aFlagId, TBool aValue) |
|
46 { |
|
47 if (aValue) |
|
48 { |
|
49 iFlags |= aFlagId; |
|
50 } |
|
51 else |
|
52 { |
|
53 iFlags &= ~aFlagId; |
|
54 } |
|
55 } |
|
56 |
|
57 /** |
|
58 Retrieve the value of the flag identified by aFlagId. |
|
59 @param aFlagId Identifies which flag to query. |
|
60 @return The value of the querried flag. |
|
61 */ |
|
62 EXPORT_C TBool CImapCapabilityInfo::QueryFlag(const TImapCapabilityFlags aFlagId) const |
|
63 { |
|
64 return iFlags & aFlagId; |
|
65 } |
|
66 |
|
67 /** |
|
68 This method is called by the system when it recieves updated capability information, |
|
69 prior to updating this object with new data. |
|
70 The method unsets all flags and removes the AuthType. |
|
71 */ |
|
72 void CImapCapabilityInfo::Reset() |
|
73 { |
|
74 iFlags = 0; |
|
75 } |