Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIScriptableDateFormat.idl
3 : */
4 :
5 : #ifndef __gen_nsIScriptableDateFormat_h__
6 : #define __gen_nsIScriptableDateFormat_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : /* For IDL files that don't want to include root IDL files. */
14 : #ifndef NS_NO_VTABLE
15 : #define NS_NO_VTABLE
16 : #endif
17 : typedef int32_t nsDateFormatSelector;
18 :
19 : enum
20 : {
21 : // Do not change the order of the values below (see bug 1225696).
22 : kDateFormatNone = 0, // do not include the date in the format string
23 : kDateFormatLong, // provides the long date format for the given locale
24 : kDateFormatShort, // provides the short date format for the given locale
25 : kDateFormatYearMonth, // formats using only the year and month
26 : kDateFormatWeekday, // week day (e.g. Mon, Tue)
27 : kDateFormatYearMonthLong, // long version of kDateFormatYearMonth
28 : kDateFormatMonthLong // long format of month name only
29 : };
30 : typedef int32_t nsTimeFormatSelector;
31 :
32 : enum
33 : {
34 : kTimeFormatNone = 0, // don't include the time in the format string
35 : kTimeFormatSeconds, // provides the time format with seconds in the given locale
36 : kTimeFormatNoSeconds // provides the time format without seconds in the given locale
37 : };
38 : // Define Contractid and CID
39 : // {2EA2E7D0-4095-11d3-9144-006008A6EDF6}
40 : #define NS_SCRIPTABLEDATEFORMAT_CID \
41 : { 0x2ea2e7d0, 0x4095, 0x11d3, { 0x91, 0x44, 0x0, 0x60, 0x8, 0xa6, 0xed, 0xf6 } }
42 : #define NS_SCRIPTABLEDATEFORMAT_CONTRACTID "@mozilla.org/intl/scriptabledateformat;1"
43 : extern nsresult
44 : NS_NewScriptableDateFormat(nsISupports* aOuter, REFNSIID aIID, void** aResult);
45 :
46 : /* starting interface: nsIScriptableDateFormat */
47 : #define NS_ISCRIPTABLEDATEFORMAT_IID_STR "0c89efb0-1aae-11d3-9141-006008a6edf6"
48 :
49 : #define NS_ISCRIPTABLEDATEFORMAT_IID \
50 : {0x0c89efb0, 0x1aae, 0x11d3, \
51 : { 0x91, 0x41, 0x00, 0x60, 0x08, 0xa6, 0xed, 0xf6 }}
52 :
53 0 : class NS_NO_VTABLE nsIScriptableDateFormat : public nsISupports {
54 : public:
55 :
56 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCRIPTABLEDATEFORMAT_IID)
57 :
58 : enum {
59 : dateFormatNone = 0,
60 : dateFormatLong = 1,
61 : dateFormatShort = 2,
62 : dateFormatYearMonth = 3,
63 : dateFormatWeekday = 4,
64 : timeFormatNone = 0,
65 : timeFormatSeconds = 1,
66 : timeFormatNoSeconds = 2,
67 : timeFormatSecondsForce24Hour = 3,
68 : timeFormatNoSecondsForce24Hour = 4
69 : };
70 :
71 : /* wstring FormatDateTime (in wstring locale, in long dateFormatSelector, in long timeFormatSelector, in long year, in long month, in long day, in long hour, in long minute, in long second); */
72 : NS_IMETHOD FormatDateTime(const char16_t * locale, int32_t dateFormatSelector, int32_t timeFormatSelector, int32_t year, int32_t month, int32_t day, int32_t hour, int32_t minute, int32_t second, char16_t * *_retval) = 0;
73 :
74 : /* wstring FormatDate (in wstring locale, in long dateFormatSelector, in long year, in long month, in long day); */
75 : NS_IMETHOD FormatDate(const char16_t * locale, int32_t dateFormatSelector, int32_t year, int32_t month, int32_t day, char16_t * *_retval) = 0;
76 :
77 : /* wstring FormatTime (in wstring locale, in long timeFormatSelector, in long hour, in long minute, in long second); */
78 : NS_IMETHOD FormatTime(const char16_t * locale, int32_t timeFormatSelector, int32_t hour, int32_t minute, int32_t second, char16_t * *_retval) = 0;
79 :
80 : };
81 :
82 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptableDateFormat, NS_ISCRIPTABLEDATEFORMAT_IID)
83 :
84 : /* Use this macro when declaring classes that implement this interface. */
85 : #define NS_DECL_NSISCRIPTABLEDATEFORMAT \
86 : NS_IMETHOD FormatDateTime(const char16_t * locale, int32_t dateFormatSelector, int32_t timeFormatSelector, int32_t year, int32_t month, int32_t day, int32_t hour, int32_t minute, int32_t second, char16_t * *_retval) override; \
87 : NS_IMETHOD FormatDate(const char16_t * locale, int32_t dateFormatSelector, int32_t year, int32_t month, int32_t day, char16_t * *_retval) override; \
88 : NS_IMETHOD FormatTime(const char16_t * locale, int32_t timeFormatSelector, int32_t hour, int32_t minute, int32_t second, char16_t * *_retval) override;
89 :
90 : /* Use this macro when declaring the members of this interface when the
91 : class doesn't implement the interface. This is useful for forwarding. */
92 : #define NS_DECL_NON_VIRTUAL_NSISCRIPTABLEDATEFORMAT \
93 : nsresult FormatDateTime(const char16_t * locale, int32_t dateFormatSelector, int32_t timeFormatSelector, int32_t year, int32_t month, int32_t day, int32_t hour, int32_t minute, int32_t second, char16_t * *_retval); \
94 : nsresult FormatDate(const char16_t * locale, int32_t dateFormatSelector, int32_t year, int32_t month, int32_t day, char16_t * *_retval); \
95 : nsresult FormatTime(const char16_t * locale, int32_t timeFormatSelector, int32_t hour, int32_t minute, int32_t second, char16_t * *_retval);
96 :
97 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
98 : #define NS_FORWARD_NSISCRIPTABLEDATEFORMAT(_to) \
99 : NS_IMETHOD FormatDateTime(const char16_t * locale, int32_t dateFormatSelector, int32_t timeFormatSelector, int32_t year, int32_t month, int32_t day, int32_t hour, int32_t minute, int32_t second, char16_t * *_retval) override { return _to FormatDateTime(locale, dateFormatSelector, timeFormatSelector, year, month, day, hour, minute, second, _retval); } \
100 : NS_IMETHOD FormatDate(const char16_t * locale, int32_t dateFormatSelector, int32_t year, int32_t month, int32_t day, char16_t * *_retval) override { return _to FormatDate(locale, dateFormatSelector, year, month, day, _retval); } \
101 : NS_IMETHOD FormatTime(const char16_t * locale, int32_t timeFormatSelector, int32_t hour, int32_t minute, int32_t second, char16_t * *_retval) override { return _to FormatTime(locale, timeFormatSelector, hour, minute, second, _retval); }
102 :
103 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
104 : #define NS_FORWARD_SAFE_NSISCRIPTABLEDATEFORMAT(_to) \
105 : NS_IMETHOD FormatDateTime(const char16_t * locale, int32_t dateFormatSelector, int32_t timeFormatSelector, int32_t year, int32_t month, int32_t day, int32_t hour, int32_t minute, int32_t second, char16_t * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FormatDateTime(locale, dateFormatSelector, timeFormatSelector, year, month, day, hour, minute, second, _retval); } \
106 : NS_IMETHOD FormatDate(const char16_t * locale, int32_t dateFormatSelector, int32_t year, int32_t month, int32_t day, char16_t * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FormatDate(locale, dateFormatSelector, year, month, day, _retval); } \
107 : NS_IMETHOD FormatTime(const char16_t * locale, int32_t timeFormatSelector, int32_t hour, int32_t minute, int32_t second, char16_t * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FormatTime(locale, timeFormatSelector, hour, minute, second, _retval); }
108 :
109 : #if 0
110 : /* Use the code below as a template for the implementation class for this interface. */
111 :
112 : /* Header file */
113 : class nsScriptableDateFormat : public nsIScriptableDateFormat
114 : {
115 : public:
116 : NS_DECL_ISUPPORTS
117 : NS_DECL_NSISCRIPTABLEDATEFORMAT
118 :
119 : nsScriptableDateFormat();
120 :
121 : private:
122 : ~nsScriptableDateFormat();
123 :
124 : protected:
125 : /* additional members */
126 : };
127 :
128 : /* Implementation file */
129 : NS_IMPL_ISUPPORTS(nsScriptableDateFormat, nsIScriptableDateFormat)
130 :
131 : nsScriptableDateFormat::nsScriptableDateFormat()
132 : {
133 : /* member initializers and constructor code */
134 : }
135 :
136 : nsScriptableDateFormat::~nsScriptableDateFormat()
137 : {
138 : /* destructor code */
139 : }
140 :
141 : /* wstring FormatDateTime (in wstring locale, in long dateFormatSelector, in long timeFormatSelector, in long year, in long month, in long day, in long hour, in long minute, in long second); */
142 : NS_IMETHODIMP nsScriptableDateFormat::FormatDateTime(const char16_t * locale, int32_t dateFormatSelector, int32_t timeFormatSelector, int32_t year, int32_t month, int32_t day, int32_t hour, int32_t minute, int32_t second, char16_t * *_retval)
143 : {
144 : return NS_ERROR_NOT_IMPLEMENTED;
145 : }
146 :
147 : /* wstring FormatDate (in wstring locale, in long dateFormatSelector, in long year, in long month, in long day); */
148 : NS_IMETHODIMP nsScriptableDateFormat::FormatDate(const char16_t * locale, int32_t dateFormatSelector, int32_t year, int32_t month, int32_t day, char16_t * *_retval)
149 : {
150 : return NS_ERROR_NOT_IMPLEMENTED;
151 : }
152 :
153 : /* wstring FormatTime (in wstring locale, in long timeFormatSelector, in long hour, in long minute, in long second); */
154 : NS_IMETHODIMP nsScriptableDateFormat::FormatTime(const char16_t * locale, int32_t timeFormatSelector, int32_t hour, int32_t minute, int32_t second, char16_t * *_retval)
155 : {
156 : return NS_ERROR_NOT_IMPLEMENTED;
157 : }
158 :
159 : /* End of implementation class template. */
160 : #endif
161 :
162 :
163 : #endif /* __gen_nsIScriptableDateFormat_h__ */
|