sl@0
|
1 |
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// This file contains the definition of internal classes used to parse TInternetDate data
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
/**
|
sl@0
|
19 |
@file tinternetdateparser.h
|
sl@0
|
20 |
*/
|
sl@0
|
21 |
|
sl@0
|
22 |
|
sl@0
|
23 |
#ifndef __TINTERNETDATEPARSER_H__
|
sl@0
|
24 |
#define __TINTERNETDATEPARSER_H__
|
sl@0
|
25 |
|
sl@0
|
26 |
#include <e32std.h>
|
sl@0
|
27 |
|
sl@0
|
28 |
/**
|
sl@0
|
29 |
Used as a support class of TInternetDate. This provides the implementation of parsing
|
sl@0
|
30 |
|
sl@0
|
31 |
Supports parsing of the following date formats:
|
sl@0
|
32 |
Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
|
sl@0
|
33 |
Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
|
sl@0
|
34 |
Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
|
sl@0
|
35 |
|
sl@0
|
36 |
All dates are store relative to Universal Time and not local time.
|
sl@0
|
37 |
|
sl@0
|
38 |
@internalAll
|
sl@0
|
39 |
@since 7.0
|
sl@0
|
40 |
*/
|
sl@0
|
41 |
class TInternetDateParser
|
sl@0
|
42 |
{
|
sl@0
|
43 |
public:
|
sl@0
|
44 |
inline TInternetDateParser();
|
sl@0
|
45 |
|
sl@0
|
46 |
void ConvertFromInternetFormL(const TDesC8& aInternetTextDateTime, TDateTime& aDateTime);
|
sl@0
|
47 |
|
sl@0
|
48 |
HBufC8* ConvertToRfc1123FormL(const TDateTime& aDateTime);
|
sl@0
|
49 |
private:
|
sl@0
|
50 |
|
sl@0
|
51 |
void ConvertFromRfc1123And850FormL(const TDesC8& aRfc1123DateTime, TDateTime& aDateTime);
|
sl@0
|
52 |
void ConvertFromAscTimeFormL(const TDesC8& aAscTimeDateTime, TDateTime& aDateTime);
|
sl@0
|
53 |
TInt ParseRfcDateDayMonthYearL(const TDesC8& aDateTimeText, TDateTime& aDateTime);
|
sl@0
|
54 |
TMonth GetMonthL(const TDesC8& aMonthText);
|
sl@0
|
55 |
void ParseHHMMSSTimeL(const TDesC8& aDateTimeText, TDateTime& aDateTime);
|
sl@0
|
56 |
void ParseTimeOffsetL(const TDesC8& aTimeOffset, TTimeIntervalMinutes& aOffsetMinutes);
|
sl@0
|
57 |
void ParseHHMMTimeOffsetL(const TDesC8& aTimeOffset, TTimeIntervalMinutes& aOffsetMinutes);
|
sl@0
|
58 |
};
|
sl@0
|
59 |
|
sl@0
|
60 |
|
sl@0
|
61 |
inline TInternetDateParser::TInternetDateParser()
|
sl@0
|
62 |
{}
|
sl@0
|
63 |
|
sl@0
|
64 |
|
sl@0
|
65 |
|
sl@0
|
66 |
#endif // __TINTERNETDATEPARSER_H__
|