1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef XFA_FGAS_CRT_LOCALE_IFACE_H_
8 #define XFA_FGAS_CRT_LOCALE_IFACE_H_
9 
10 #include "core/fxcrt/cfx_datetime.h"
11 #include "core/fxcrt/fx_string.h"
12 
13 enum FX_LOCALEDATETIMESUBCATEGORY {
14   FX_LOCALEDATETIMESUBCATEGORY_Default,
15   FX_LOCALEDATETIMESUBCATEGORY_Short,
16   FX_LOCALEDATETIMESUBCATEGORY_Medium,
17   FX_LOCALEDATETIMESUBCATEGORY_Full,
18   FX_LOCALEDATETIMESUBCATEGORY_Long,
19 };
20 
21 enum FX_LOCALENUMSUBCATEGORY {
22   FX_LOCALENUMPATTERN_Percent,
23   FX_LOCALENUMPATTERN_Currency,
24   FX_LOCALENUMPATTERN_Decimal,
25   FX_LOCALENUMPATTERN_Integer,
26 };
27 
28 enum FX_LOCALECATEGORY {
29   FX_LOCALECATEGORY_Unknown,
30   FX_LOCALECATEGORY_Date,
31   FX_LOCALECATEGORY_Time,
32   FX_LOCALECATEGORY_DateTime,
33   FX_LOCALECATEGORY_Num,
34   FX_LOCALECATEGORY_Text,
35   FX_LOCALECATEGORY_Zero,
36   FX_LOCALECATEGORY_Null,
37 };
38 
39 enum FX_DATETIMETYPE {
40   FX_DATETIMETYPE_Unknown,
41   FX_DATETIMETYPE_Date,
42   FX_DATETIMETYPE_Time,
43   FX_DATETIMETYPE_DateTime,
44   FX_DATETIMETYPE_TimeDate,
45 };
46 
47 class LocaleIface {
48  public:
49   virtual ~LocaleIface() = default;
50 
51   virtual WideString GetName() const = 0;
52   virtual WideString GetDecimalSymbol() const = 0;
53   virtual WideString GetGroupingSymbol() const = 0;
54   virtual WideString GetPercentSymbol() const = 0;
55   virtual WideString GetMinusSymbol() const = 0;
56   virtual WideString GetCurrencySymbol() const = 0;
57   virtual WideString GetDateTimeSymbols() const = 0;
58   virtual WideString GetMonthName(int32_t nMonth, bool bAbbr) const = 0;
59   virtual WideString GetDayName(int32_t nWeek, bool bAbbr) const = 0;
60   virtual WideString GetMeridiemName(bool bAM) const = 0;
61   virtual FX_TIMEZONE GetTimeZone() const = 0;
62   virtual WideString GetEraName(bool bAD) const = 0;
63   virtual WideString GetDatePattern(
64       FX_LOCALEDATETIMESUBCATEGORY eType) const = 0;
65   virtual WideString GetTimePattern(
66       FX_LOCALEDATETIMESUBCATEGORY eType) const = 0;
67   virtual WideString GetNumPattern(FX_LOCALENUMSUBCATEGORY eType) const = 0;
68 };
69 
70 #endif  // XFA_FGAS_CRT_LOCALE_IFACE_H_
71