|
1 // Copyright (c) 2001-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 // CSIContentHandler..inl |
|
15 // WAP Push Message Inline functions file for the Handler classes |
|
16 // attribute methods |
|
17 // |
|
18 // |
|
19 |
|
20 /** |
|
21 |
|
22 Flag whether message has an action attribute |
|
23 @param aAction |
|
24 boolean to set flag to - ETrue for action attrib present |
|
25 EFalse for no action attrib |
|
26 |
|
27 */ |
|
28 inline void CSIContentHandler::SetActionFlag(TBool aAction) |
|
29 { |
|
30 if (aAction) |
|
31 iAttributes |= EAction; |
|
32 else |
|
33 iAttributes &=~ EAction; |
|
34 } |
|
35 |
|
36 /** |
|
37 * Check status of action flag to see if message has an action attribute. |
|
38 * @return TBool |
|
39 * ETrue - action attribute present in message |
|
40 * EFalse - no action attribute |
|
41 */ |
|
42 inline TBool CSIContentHandler::ActionFlag() const |
|
43 { |
|
44 return iAttributes & EAction; |
|
45 } |
|
46 |
|
47 /** |
|
48 * Flag whether message has a created date attribute |
|
49 * @param aCreated |
|
50 * boolean to set flag to - ETrue for si-created attrib present |
|
51 * EFalse for no si-created attrib |
|
52 */ |
|
53 inline void CSIContentHandler::SetCreatedFlag(TBool aCreated) |
|
54 { |
|
55 if (aCreated) |
|
56 iAttributes |= ECreated; |
|
57 else |
|
58 iAttributes &=~ ECreated; |
|
59 } |
|
60 |
|
61 /** |
|
62 * Check status of created flag to see if message has a si-created attribute. |
|
63 * @return TBool |
|
64 * ETrue - si-created attribute present in message |
|
65 * EFalse - no si-created attribute |
|
66 */ |
|
67 inline TBool CSIContentHandler::CreatedFlag() const |
|
68 { |
|
69 return iAttributes & ECreated; |
|
70 } |
|
71 |
|
72 /** |
|
73 * Flag whether message has a Href attribute |
|
74 * @param aHref |
|
75 * boolean to set flag to - ETrue for Href attrib present |
|
76 * EFalse for no href attrib |
|
77 */ |
|
78 inline void CSIContentHandler::SetHrefFlag(TBool aHref) |
|
79 { |
|
80 if (aHref) |
|
81 iAttributes |= EHref; |
|
82 else |
|
83 iAttributes &=~ EHref; |
|
84 } |
|
85 |
|
86 |
|
87 /** |
|
88 * Check status of href flag to see if message has an href attribute. |
|
89 * @return TBool |
|
90 * ETrue - href attribute present in message |
|
91 * EFalse - no href attribute |
|
92 */ |
|
93 inline TBool CSIContentHandler::HrefFlag() const |
|
94 { |
|
95 return iAttributes & EHref; |
|
96 } |
|
97 |
|
98 /** |
|
99 * Flag whether message has an expiry date attribute (si-expires) |
|
100 * @param aExpires |
|
101 * boolean to set flag to - ETrue for si-expires present |
|
102 * EFalse for no si-expires date |
|
103 */ |
|
104 inline void CSIContentHandler::SetExpiresFlag(TBool aExpires) |
|
105 { |
|
106 if (aExpires) |
|
107 iAttributes |= EExpires; |
|
108 else |
|
109 iAttributes &=~ EExpires; |
|
110 } |
|
111 |
|
112 /** |
|
113 * Check status of flag to see if message has an expiry date attribute. |
|
114 * @return TBool |
|
115 * ETrue - si-expires attribute present in message |
|
116 * EFalse - no si-expires attribute |
|
117 */ |
|
118 inline TBool CSIContentHandler::ExpiresFlag() const |
|
119 { |
|
120 return iAttributes & EExpires; |
|
121 } |
|
122 |
|
123 /** |
|
124 * Flag whether message has a si-id attribute |
|
125 * @param aSiId |
|
126 * boolean to set flag to - ETrue for si-id attrib present |
|
127 * EFalse for no si-id attrib |
|
128 */ |
|
129 inline void CSIContentHandler::SetSiIdFlag(TBool aSiId) |
|
130 { |
|
131 if (aSiId) |
|
132 iAttributes |= ESiId; |
|
133 else |
|
134 iAttributes &=~ ESiId; |
|
135 } |
|
136 |
|
137 /** |
|
138 * Check status of flag to see if message has an si-id attribute. |
|
139 * @return TBool |
|
140 * ETrue - si-id attribute present in message |
|
141 * EFalse - no si-id attribute |
|
142 */ |
|
143 inline TBool CSIContentHandler::SiIdFlag() const |
|
144 { |
|
145 return iAttributes & ESiId; |
|
146 } |
|
147 |
|
148 /** |
|
149 * Flag whether message has a Data attribute (text) |
|
150 * @param aData |
|
151 * boolean to set flag to - ETrue for data attrib present |
|
152 * EFalse for no data attrib |
|
153 */ |
|
154 inline void CSIContentHandler::SetDataFlag(TBool aData) |
|
155 { |
|
156 if (aData) |
|
157 iAttributes |= EData; |
|
158 else |
|
159 iAttributes &=~ EData; |
|
160 } |
|
161 |
|
162 /** |
|
163 * Check status of data flag to see if message has any data. |
|
164 * @return TBool |
|
165 * ETrue - data attribute present in message |
|
166 * EFalse - no data attribute |
|
167 */ |
|
168 inline TBool CSIContentHandler::DataFlag() const |
|
169 { |
|
170 return iAttributes & EData; |
|
171 } |
|
172 |