|
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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Class CRfc822Token Inline functions |
|
15 // |
|
16 // |
|
17 |
|
18 inline HBufC8* CRfc822Token::OutputLine() |
|
19 { |
|
20 return iOutputLine; |
|
21 } |
|
22 |
|
23 inline TBool CRfc822Token::LastToken() |
|
24 { |
|
25 return iLastToken; |
|
26 } |
|
27 |
|
28 inline void CRfc822Token::SetImRecvConvert( CImRecvConvert* aImRecvConvert ) |
|
29 { |
|
30 iImRecvConvert = aImRecvConvert; |
|
31 } |
|
32 |
|
33 |
|
34 /**************************************************************************** |
|
35 Class CImRecvConvert Inline functions |
|
36 *****************************************************************************/ |
|
37 |
|
38 inline void CImRecvConvert::SetAttachmentPathL(const TDesC& aFullPath) |
|
39 { |
|
40 // get full path to current message file = directory path |
|
41 if (iAttachmentFullPath) |
|
42 { |
|
43 delete iAttachmentFullPath; |
|
44 iAttachmentFullPath=NULL; |
|
45 } |
|
46 iAttachmentFullPath=aFullPath.AllocL(); |
|
47 } |
|
48 |
|
49 inline void CImRecvConvert::SetMsvId(TMsvId aId) |
|
50 { |
|
51 iServerEntry->SetEntry(aId); |
|
52 iPopulateMessage = (iServerEntry->Entry().iType == KUidMsvMessageEntry); |
|
53 iRootEntryId = aId; |
|
54 } |
|
55 |
|
56 inline const TTime CImRecvConvert::Date() const |
|
57 { |
|
58 return iTimeDate; |
|
59 } |
|
60 |
|
61 inline const TMsvPriority CImRecvConvert::Priority() const |
|
62 { |
|
63 return iImPriority; |
|
64 } |
|
65 |
|
66 inline void CImRecvConvert::SaveAllAttachments(TBool aSave) |
|
67 { |
|
68 iSavingAttachments=aSave; |
|
69 } |
|
70 |
|
71 inline const TInt CImRecvConvert::ReceiveError() const |
|
72 { |
|
73 return iReceiveError; |
|
74 } |
|
75 |
|
76 inline CMsvServerEntry& CImRecvConvert::ServerEntry() |
|
77 { |
|
78 return *iServerEntry; |
|
79 } |
|
80 |
|
81 inline const TBool CImRecvConvert::ValidCompleteHeader() const |
|
82 { |
|
83 return (iEmptyHeaderSize<(iOutputHeader->DataSize()) && iFinishedHeader); |
|
84 } |
|
85 |
|
86 inline const CImHeader& CImRecvConvert::Header() const |
|
87 { |
|
88 return *iOutputHeader; |
|
89 } |
|
90 |
|
91 inline const TMsvId CImRecvConvert::EntryId() const |
|
92 { |
|
93 // If we are temporarily on the null entry then return the saved entry |
|
94 if (iServerEntry->Entry().Id() == KMsvNullIndexEntryId) |
|
95 return iSavedEntryId; |
|
96 else |
|
97 return iServerEntry->Entry().Id(); |
|
98 } |
|
99 |
|
100 inline TBool CImRecvConvert::NotFinishedRfc822Header() |
|
101 { |
|
102 return iNotFinishedRfc822Header; |
|
103 } |
|
104 |
|
105 inline CImConvertCharconv& CImRecvConvert::CharacterConverter() |
|
106 { |
|
107 return *iCharConv; |
|
108 } |
|
109 |
|
110 /**************************************************************************** |
|
111 Class CMimeParser Inline functions |
|
112 *****************************************************************************/ |
|
113 inline void CMimeParser::StoreMimeHeaderL(CMsvStore& entryStore) |
|
114 { |
|
115 iMimeHeader->StoreL(entryStore); |
|
116 } |
|
117 |
|
118 inline void CMimeParser::StoreMimeHeaderWithoutCommitL(CMsvStore& entryStore) |
|
119 { |
|
120 iMimeHeader->StoreL(entryStore); |
|
121 } |
|
122 |
|
123 inline void CMimeParser::RestoreMimeHeaderL(CMsvStore& entryStore) |
|
124 { |
|
125 RestoreMimeParserL(entryStore); |
|
126 } |
|
127 |
|
128 inline TMimeContentType CMimeParser::ContentType() |
|
129 { |
|
130 return iContentType; |
|
131 } |
|
132 |
|
133 inline TImEncodingType CMimeParser::ContentEncoding() |
|
134 { |
|
135 return iContentEncoding; |
|
136 } |
|
137 |
|
138 inline const TBool CMimeParser::MessageIsMime() const |
|
139 { |
|
140 return isMime; |
|
141 } |
|
142 |
|
143 inline const TDesC& CMimeParser::ContentDescription() const |
|
144 { |
|
145 return iContentDescription; |
|
146 } |
|
147 |
|
148 inline const TPtrC CMimeParser::ContentLocation() const |
|
149 { |
|
150 return iMimeHeader->ContentLocation(); |
|
151 } |
|
152 |
|
153 inline const TPtrC8 CMimeParser::ContentId() const |
|
154 { |
|
155 return iMimeHeader->ContentID(); |
|
156 } |
|
157 |
|
158 inline const TPtrC8 CMimeParser::ContentDisposition() const |
|
159 { |
|
160 return iMimeHeader->ContentDisposition(); |
|
161 } |
|
162 |
|
163 inline const TBool CMimeParser::IsTerminatingBoundary() const |
|
164 { |
|
165 return iTerminatingBoundary; |
|
166 } |
|
167 |
|
168 inline const TBool CMimeParser::BoundaryExists() const |
|
169 { |
|
170 return (iBoundaryLength!=0); |
|
171 } |
|
172 |
|
173 inline const TBool CMimeParser::BoundaryFound() const |
|
174 { |
|
175 return iBoundaryFound; |
|
176 } |
|
177 |
|
178 inline const TInt CMimeParser::MimeHeaderSize() const |
|
179 { |
|
180 return iEmptyMimeHeaderSize-iMimeHeader->Size(); |
|
181 } |
|
182 |
|
183 inline const TInt CMimeParser::ReceiveError() const |
|
184 { |
|
185 return iReceiveError; |
|
186 } |
|
187 |
|
188 inline TBool CMimeParser::IsMessageDigest() |
|
189 { |
|
190 return (ContentType()==EMimeMultipart && ContentSubType().Compare(KImcvDigest)==0); |
|
191 } |
|
192 |
|
193 inline TBool CMimeParser::MimeFieldsExist() const |
|
194 { |
|
195 return iMimeFieldsExist; |
|
196 } |
|
197 |
|
198 inline void CMimeParser::ResetMimeFieldsExist() |
|
199 { |
|
200 iMimeFieldsExist=EFalse; |
|
201 } |