nsIPromptService.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/components/windowwatcher/public/nsIPromptService.idl
  3. */
  4. #ifndef __gen_nsIPromptService_h__
  5. #define __gen_nsIPromptService_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. class nsIDOMWindow; /* forward declaration */
  14. /* starting interface: nsIPromptService */
  15. #define NS_IPROMPTSERVICE_IID_STR "1630c61a-325e-49ca-8759-a31b16c47aa5"
  16. #define NS_IPROMPTSERVICE_IID \
  17. {0x1630c61a, 0x325e, 0x49ca, \
  18. { 0x87, 0x59, 0xa3, 0x1b, 0x16, 0xc4, 0x7a, 0xa5 }}
  19. /**
  20. * This is the interface to the embeddable prompt service; the service that
  21. * implements nsIPrompt. Its interface is designed to be just nsIPrompt, each
  22. * method modified to take a parent window parameter.
  23. *
  24. * Accesskeys can be attached to buttons and checkboxes by inserting an &
  25. * before the accesskey character in the checkbox message or button title. For
  26. * a real &, use && instead. (A "button title" generally refers to the text
  27. * label of a button.)
  28. *
  29. * One note: in all cases, the parent window parameter can be null. However,
  30. * these windows are all intended to have parents. So when no parent is
  31. * specified, the implementation should try hard to find a suitable foster
  32. * parent.
  33. *
  34. * Implementations are free to choose how they present the various button
  35. * types. For example, while prompts that give the user a choice between OK
  36. * and Cancel are required to return a boolean value indicating whether or not
  37. * the user accepted the prompt (pressed OK) or rejected the prompt (pressed
  38. * Cancel), the implementation of this interface could very well speak the
  39. * prompt to the user instead of rendering any visual user-interface. The
  40. * standard button types are merely idioms used to convey the nature of the
  41. * choice the user is to make.
  42. *
  43. * Because implementations of this interface may loosely interpret the various
  44. * button types, it is advised that text messages passed to these prompts do
  45. * not refer to the button types by name. For example, it is inadvisable to
  46. * tell the user to "Press OK to proceed." Instead, such a prompt might be
  47. * rewritten to ask the user: "Would you like to proceed?"
  48. *
  49. * @status FROZEN
  50. */
  51. class NS_NO_VTABLE nsIPromptService : public nsISupports {
  52. public:
  53. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROMPTSERVICE_IID)
  54. /**
  55. * Puts up an alert dialog with an OK button.
  56. *
  57. * @param aParent
  58. * The parent window or null.
  59. * @param aDialogTitle
  60. * Text to appear in the title of the dialog.
  61. * @param aText
  62. * Text to appear in the body of the dialog.
  63. */
  64. /* void alert (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
  65. NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText) = 0;
  66. /**
  67. * Puts up an alert dialog with an OK button and a labeled checkbox.
  68. *
  69. * @param aParent
  70. * The parent window or null.
  71. * @param aDialogTitle
  72. * Text to appear in the title of the dialog.
  73. * @param aText
  74. * Text to appear in the body of the dialog.
  75. * @param aCheckMsg
  76. * Text to appear with the checkbox.
  77. * @param aCheckState
  78. * Contains the initial checked state of the checkbox when this method
  79. * is called and the final checked state after this method returns.
  80. */
  81. /* void alertCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
  82. NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState) = 0;
  83. /**
  84. * Puts up a dialog with OK and Cancel buttons.
  85. *
  86. * @param aParent
  87. * The parent window or null.
  88. * @param aDialogTitle
  89. * Text to appear in the title of the dialog.
  90. * @param aText
  91. * Text to appear in the body of the dialog.
  92. *
  93. * @return true for OK, false for Cancel
  94. */
  95. /* boolean confirm (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
  96. NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval) = 0;
  97. /**
  98. * Puts up a dialog with OK and Cancel buttons and a labeled checkbox.
  99. *
  100. * @param aParent
  101. * The parent window or null.
  102. * @param aDialogTitle
  103. * Text to appear in the title of the dialog.
  104. * @param aText
  105. * Text to appear in the body of the dialog.
  106. * @param aCheckMsg
  107. * Text to appear with the checkbox.
  108. * @param aCheckState
  109. * Contains the initial checked state of the checkbox when this method
  110. * is called and the final checked state after this method returns.
  111. *
  112. * @return true for OK, false for Cancel
  113. */
  114. /* boolean confirmCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
  115. NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0;
  116. /**
  117. * Button Flags
  118. *
  119. * The following flags are combined to form the aButtonFlags parameter passed
  120. * to confirmEx. See confirmEx for more information on how the flags may be
  121. * combined.
  122. */
  123. /**
  124. * Button Position Flags
  125. */
  126. enum { BUTTON_POS_0 = 1U };
  127. enum { BUTTON_POS_1 = 256U };
  128. enum { BUTTON_POS_2 = 65536U };
  129. /**
  130. * Button Title Flags (used to set the labels of buttons in the prompt)
  131. */
  132. enum { BUTTON_TITLE_OK = 1U };
  133. enum { BUTTON_TITLE_CANCEL = 2U };
  134. enum { BUTTON_TITLE_YES = 3U };
  135. enum { BUTTON_TITLE_NO = 4U };
  136. enum { BUTTON_TITLE_SAVE = 5U };
  137. enum { BUTTON_TITLE_DONT_SAVE = 6U };
  138. enum { BUTTON_TITLE_REVERT = 7U };
  139. enum { BUTTON_TITLE_IS_STRING = 127U };
  140. /**
  141. * Button Default Flags (used to select which button is the default one)
  142. */
  143. enum { BUTTON_POS_0_DEFAULT = 0U };
  144. enum { BUTTON_POS_1_DEFAULT = 16777216U };
  145. enum { BUTTON_POS_2_DEFAULT = 33554432U };
  146. /**
  147. * Causes the buttons to be initially disabled. They are enabled after a
  148. * timeout expires. The implementation may interpret this loosely as the
  149. * intent is to ensure that the user does not click through a security dialog
  150. * too quickly. Strictly speaking, the implementation could choose to ignore
  151. * this flag.
  152. */
  153. enum { BUTTON_DELAY_ENABLE = 67108864U };
  154. /**
  155. * Selects the standard set of OK/Cancel buttons.
  156. */
  157. enum { STD_OK_CANCEL_BUTTONS = 513U };
  158. /**
  159. * Selects the standard set of Yes/No buttons.
  160. */
  161. enum { STD_YES_NO_BUTTONS = 1027U };
  162. /**
  163. * Puts up a dialog with up to 3 buttons and an optional, labeled checkbox.
  164. *
  165. * @param aParent
  166. * The parent window or null.
  167. * @param aDialogTitle
  168. * Text to appear in the title of the dialog.
  169. * @param aText
  170. * Text to appear in the body of the dialog.
  171. * @param aButtonFlags
  172. * A combination of Button Flags.
  173. * @param aButton0Title
  174. * Used when button 0 uses TITLE_IS_STRING
  175. * @param aButton1Title
  176. * Used when button 1 uses TITLE_IS_STRING
  177. * @param aButton2Title
  178. * Used when button 2 uses TITLE_IS_STRING
  179. * @param aCheckMsg
  180. * Text to appear with the checkbox. Null if no checkbox.
  181. * @param aCheckState
  182. * Contains the initial checked state of the checkbox when this method
  183. * is called and the final checked state after this method returns.
  184. *
  185. * @return index of the button pressed.
  186. *
  187. * Buttons are numbered 0 - 2. The implementation can decide whether the
  188. * sequence goes from right to left or left to right. Button 0 is the
  189. * default button unless one of the Button Default Flags is specified.
  190. *
  191. * A button may use a predefined title, specified by one of the Button Title
  192. * Flags values. Each title value can be multiplied by a position value to
  193. * assign the title to a particular button. If BUTTON_TITLE_IS_STRING is
  194. * used for a button, the string parameter for that button will be used. If
  195. * the value for a button position is zero, the button will not be shown.
  196. *
  197. * In general, aButtonFlags is constructed per the following example:
  198. *
  199. * aButtonFlags = (BUTTON_POS_0) * (BUTTON_TITLE_AAA) +
  200. * (BUTTON_POS_1) * (BUTTON_TITLE_BBB) +
  201. * BUTTON_POS_1_DEFAULT;
  202. *
  203. * where "AAA" and "BBB" correspond to one of the button titles.
  204. */
  205. /* PRInt32 confirmEx (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in unsigned long aButtonFlags, in wstring aButton0Title, in wstring aButton1Title, in wstring aButton2Title, in wstring aCheckMsg, inout boolean aCheckState); */
  206. NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval) = 0;
  207. /**
  208. * Puts up a dialog with an edit field and an optional, labeled checkbox.
  209. *
  210. * @param aParent
  211. * The parent window or null.
  212. * @param aDialogTitle
  213. * Text to appear in the title of the dialog.
  214. * @param aText
  215. * Text to appear in the body of the dialog.
  216. * @param aValue
  217. * Contains the default value for the dialog field when this method
  218. * is called (null value is ok). Upon return, if the user pressed
  219. * OK, then this parameter contains a newly allocated string value.
  220. * Otherwise, the parameter's value is unmodified.
  221. * @param aCheckMsg
  222. * Text to appear with the checkbox. If null, check box will not be shown.
  223. * @param aCheckState
  224. * Contains the initial checked state of the checkbox when this method
  225. * is called and the final checked state after this method returns.
  226. *
  227. * @return true for OK, false for Cancel.
  228. */
  229. /* boolean prompt (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aValue, in wstring aCheckMsg, inout boolean aCheckState); */
  230. NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0;
  231. /**
  232. * Puts up a dialog with an edit field, a password field, and an optional,
  233. * labeled checkbox.
  234. *
  235. * @param aParent
  236. * The parent window or null.
  237. * @param aDialogTitle
  238. * Text to appear in the title of the dialog.
  239. * @param aText
  240. * Text to appear in the body of the dialog.
  241. * @param aUsername
  242. * Contains the default value for the username field when this method
  243. * is called (null value is ok). Upon return, if the user pressed OK,
  244. * then this parameter contains a newly allocated string value.
  245. * Otherwise, the parameter's value is unmodified.
  246. * @param aPassword
  247. * Contains the default value for the password field when this method
  248. * is called (null value is ok). Upon return, if the user pressed OK,
  249. * then this parameter contains a newly allocated string value.
  250. * Otherwise, the parameter's value is unmodified.
  251. * @param aCheckMsg
  252. * Text to appear with the checkbox. If null, check box will not be shown.
  253. * @param aCheckState
  254. * Contains the initial checked state of the checkbox when this method
  255. * is called and the final checked state after this method returns.
  256. *
  257. * @return true for OK, false for Cancel.
  258. */
  259. /* boolean promptUsernameAndPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aUsername, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
  260. NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0;
  261. /**
  262. * Puts up a dialog with a password field and an optional, labeled checkbox.
  263. *
  264. * @param aParent
  265. * The parent window or null.
  266. * @param aDialogTitle
  267. * Text to appear in the title of the dialog.
  268. * @param aText
  269. * Text to appear in the body of the dialog.
  270. * @param aPassword
  271. * Contains the default value for the password field when this method
  272. * is called (null value is ok). Upon return, if the user pressed OK,
  273. * then this parameter contains a newly allocated string value.
  274. * Otherwise, the parameter's value is unmodified.
  275. * @param aCheckMsg
  276. * Text to appear with the checkbox. If null, check box will not be shown.
  277. * @param aCheckState
  278. * Contains the initial checked state of the checkbox when this method
  279. * is called and the final checked state after this method returns.
  280. *
  281. * @return true for OK, false for Cancel.
  282. */
  283. /* boolean promptPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
  284. NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0;
  285. /**
  286. * Puts up a dialog box which has a list box of strings from which the user
  287. * may make a single selection.
  288. *
  289. * @param aParent
  290. * The parent window or null.
  291. * @param aDialogTitle
  292. * Text to appear in the title of the dialog.
  293. * @param aText
  294. * Text to appear in the body of the dialog.
  295. * @param aCount
  296. * The length of the aSelectList array parameter.
  297. * @param aSelectList
  298. * The list of strings to display.
  299. * @param aOutSelection
  300. * Contains the index of the selected item in the list when this
  301. * method returns true.
  302. *
  303. * @return true for OK, false for Cancel.
  304. */
  305. /* boolean select (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in PRUint32 aCount, [array, size_is (aCount)] in wstring aSelectList, out long aOutSelection); */
  306. NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval) = 0;
  307. };
  308. /* Use this macro when declaring classes that implement this interface. */
  309. #define NS_DECL_NSIPROMPTSERVICE \
  310. NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText); \
  311. NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState); \
  312. NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval); \
  313. NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \
  314. NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval); \
  315. NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \
  316. NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \
  317. NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \
  318. NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval);
  319. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  320. #define NS_FORWARD_NSIPROMPTSERVICE(_to) \
  321. NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText) { return _to Alert(aParent, aDialogTitle, aText); } \
  322. NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState) { return _to AlertCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState); } \
  323. NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval) { return _to Confirm(aParent, aDialogTitle, aText, _retval); } \
  324. NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to ConfirmCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState, _retval); } \
  325. NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval) { return _to ConfirmEx(aParent, aDialogTitle, aText, aButtonFlags, aButton0Title, aButton1Title, aButton2Title, aCheckMsg, aCheckState, _retval); } \
  326. NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to Prompt(aParent, aDialogTitle, aText, aValue, aCheckMsg, aCheckState, _retval); } \
  327. NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to PromptUsernameAndPassword(aParent, aDialogTitle, aText, aUsername, aPassword, aCheckMsg, aCheckState, _retval); } \
  328. NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to PromptPassword(aParent, aDialogTitle, aText, aPassword, aCheckMsg, aCheckState, _retval); } \
  329. NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval) { return _to Select(aParent, aDialogTitle, aText, aCount, aSelectList, aOutSelection, _retval); }
  330. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  331. #define NS_FORWARD_SAFE_NSIPROMPTSERVICE(_to) \
  332. NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText) { return !_to ? NS_ERROR_NULL_POINTER : _to->Alert(aParent, aDialogTitle, aText); } \
  333. NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState) { return !_to ? NS_ERROR_NULL_POINTER : _to->AlertCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState); } \
  334. NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Confirm(aParent, aDialogTitle, aText, _retval); } \
  335. NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState, _retval); } \
  336. NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmEx(aParent, aDialogTitle, aText, aButtonFlags, aButton0Title, aButton1Title, aButton2Title, aCheckMsg, aCheckState, _retval); } \
  337. NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Prompt(aParent, aDialogTitle, aText, aValue, aCheckMsg, aCheckState, _retval); } \
  338. NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PromptUsernameAndPassword(aParent, aDialogTitle, aText, aUsername, aPassword, aCheckMsg, aCheckState, _retval); } \
  339. NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PromptPassword(aParent, aDialogTitle, aText, aPassword, aCheckMsg, aCheckState, _retval); } \
  340. NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Select(aParent, aDialogTitle, aText, aCount, aSelectList, aOutSelection, _retval); }
  341. #if 0
  342. /* Use the code below as a template for the implementation class for this interface. */
  343. /* Header file */
  344. class nsPromptService : public nsIPromptService
  345. {
  346. public:
  347. NS_DECL_ISUPPORTS
  348. NS_DECL_NSIPROMPTSERVICE
  349. nsPromptService();
  350. private:
  351. ~nsPromptService();
  352. protected:
  353. /* additional members */
  354. };
  355. /* Implementation file */
  356. NS_IMPL_ISUPPORTS1(nsPromptService, nsIPromptService)
  357. nsPromptService::nsPromptService()
  358. {
  359. /* member initializers and constructor code */
  360. }
  361. nsPromptService::~nsPromptService()
  362. {
  363. /* destructor code */
  364. }
  365. /* void alert (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
  366. NS_IMETHODIMP nsPromptService::Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText)
  367. {
  368. return NS_ERROR_NOT_IMPLEMENTED;
  369. }
  370. /* void alertCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
  371. NS_IMETHODIMP nsPromptService::AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState)
  372. {
  373. return NS_ERROR_NOT_IMPLEMENTED;
  374. }
  375. /* boolean confirm (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
  376. NS_IMETHODIMP nsPromptService::Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval)
  377. {
  378. return NS_ERROR_NOT_IMPLEMENTED;
  379. }
  380. /* boolean confirmCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
  381. NS_IMETHODIMP nsPromptService::ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval)
  382. {
  383. return NS_ERROR_NOT_IMPLEMENTED;
  384. }
  385. /* PRInt32 confirmEx (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in unsigned long aButtonFlags, in wstring aButton0Title, in wstring aButton1Title, in wstring aButton2Title, in wstring aCheckMsg, inout boolean aCheckState); */
  386. NS_IMETHODIMP nsPromptService::ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval)
  387. {
  388. return NS_ERROR_NOT_IMPLEMENTED;
  389. }
  390. /* boolean prompt (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aValue, in wstring aCheckMsg, inout boolean aCheckState); */
  391. NS_IMETHODIMP nsPromptService::Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval)
  392. {
  393. return NS_ERROR_NOT_IMPLEMENTED;
  394. }
  395. /* boolean promptUsernameAndPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aUsername, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
  396. NS_IMETHODIMP nsPromptService::PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval)
  397. {
  398. return NS_ERROR_NOT_IMPLEMENTED;
  399. }
  400. /* boolean promptPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
  401. NS_IMETHODIMP nsPromptService::PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval)
  402. {
  403. return NS_ERROR_NOT_IMPLEMENTED;
  404. }
  405. /* boolean select (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in PRUint32 aCount, [array, size_is (aCount)] in wstring aSelectList, out long aOutSelection); */
  406. NS_IMETHODIMP nsPromptService::Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval)
  407. {
  408. return NS_ERROR_NOT_IMPLEMENTED;
  409. }
  410. /* End of implementation class template. */
  411. #endif
  412. #endif /* __gen_nsIPromptService_h__ */