|
1 // Copyright (c) 2004-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 // DST TZ Database Compiler |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __TZGLOBALS_H |
|
19 #define __TZGLOBALS_H |
|
20 //============================================================================ |
|
21 // This disables a Visual Studio 6 browser symbol truncation warning which |
|
22 // appears in debug builds only when using the standard template library. |
|
23 // This occurs when the template names are expanded and become longer than 255 |
|
24 // characters. This does not appear in release builds. |
|
25 //============================================================================ |
|
26 #pragma warning(disable: 4786) |
|
27 //============================================================================ |
|
28 // Include files |
|
29 //============================================================================ |
|
30 #include <string> |
|
31 #include <vector> |
|
32 #include "..\..\tz\Server\Include\tzpersisted.h" |
|
33 //============================================================================ |
|
34 // Global variables used by the Tz Database Compiler |
|
35 //============================================================================ |
|
36 |
|
37 const int KDefaultStartYear = 1900; |
|
38 const int KMinStartYear = 1; |
|
39 const int KMaxStartYear = 2100; |
|
40 const int KMaxZoneNameLength = 255; |
|
41 const int KMaxPathLength = 255; |
|
42 const int KMaxFiles = 255; |
|
43 const int KFirstZoneNumericId = 8; |
|
44 extern const char KCharOlsonStartOfComment; |
|
45 extern const char* KOlsonRuleTag; |
|
46 extern const char* KOlsonZoneTag; |
|
47 extern const char* KOlsonLinkTag; |
|
48 |
|
49 class TzGlobals |
|
50 { |
|
51 public: |
|
52 |
|
53 enum TzFaults |
|
54 { |
|
55 ETzNone = 0, |
|
56 ETzAbortNoConfigFile, |
|
57 ETzAbortNoInputFiles, |
|
58 ETzAbortCreateDatabaseFile, |
|
59 ETzAbortScannerSyntaxError, |
|
60 ETzAbortScannerFileIOError, |
|
61 ETzAbortInvalidCompilerState |
|
62 }; |
|
63 |
|
64 |
|
65 static TUint16 iStartYear; |
|
66 static char iDefaultZoneName[KMaxZoneNameLength]; |
|
67 static TUint16 iRegionMask; |
|
68 static TUint16 iNextNumericZoneId; |
|
69 static bool iIncludeAllRegions; |
|
70 static std::string iIniFilePath; //Path to the ini file in use |
|
71 static std::string iZoneIdIniFilePath; //Zone Identity ini file |
|
72 static std::string iOutputFilePath; |
|
73 static std::string iInputFilePath; |
|
74 static std::vector<std::string> iIncludedRegions; |
|
75 static std::vector<std::string> iExcludedRegions; |
|
76 static std::vector<std::string> iAvailableRegions; |
|
77 static std::vector<std::string> iExcludedFiles; |
|
78 static std::vector<std::string> iAvailableFiles; |
|
79 }; |
|
80 |
|
81 #endif //__TZGLOBALS_H |
|
82 //============================================================================ |
|
83 // End of file |
|
84 //============================================================================ |