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