Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsISound.idl
3 : */
4 :
5 : #ifndef __gen_nsISound_h__
6 : #define __gen_nsISound_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 : class nsIURL; /* forward declaration */
18 :
19 :
20 : /* starting interface: nsISound */
21 : #define NS_ISOUND_IID_STR "c3c28d92-a17f-43df-976d-4eeae6f995fc"
22 :
23 : #define NS_ISOUND_IID \
24 : {0xc3c28d92, 0xa17f, 0x43df, \
25 : { 0x97, 0x6d, 0x4e, 0xea, 0xe6, 0xf9, 0x95, 0xfc }}
26 :
27 0 : class NS_NO_VTABLE nsISound : public nsISupports {
28 : public:
29 :
30 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISOUND_IID)
31 :
32 : /* void play (in nsIURL aURL); */
33 : NS_IMETHOD Play(nsIURL *aURL) = 0;
34 :
35 : /* void playSystemSound (in AString soundAlias); */
36 : NS_IMETHOD PlaySystemSound(const nsAString & soundAlias) = 0;
37 :
38 : /* void beep (); */
39 : NS_IMETHOD Beep(void) = 0;
40 :
41 : /* void init (); */
42 : NS_IMETHOD Init(void) = 0;
43 :
44 : enum {
45 : EVENT_NEW_MAIL_RECEIVED = 0U,
46 : EVENT_ALERT_DIALOG_OPEN = 1U,
47 : EVENT_CONFIRM_DIALOG_OPEN = 2U,
48 : EVENT_PROMPT_DIALOG_OPEN = 3U,
49 : EVENT_SELECT_DIALOG_OPEN = 4U,
50 : EVENT_MENU_EXECUTE = 5U,
51 : EVENT_MENU_POPUP = 6U,
52 : EVENT_EDITOR_MAX_LEN = 7U
53 : };
54 :
55 : /* void playEventSound (in unsigned long aEventId); */
56 : NS_IMETHOD PlayEventSound(uint32_t aEventId) = 0;
57 :
58 : };
59 :
60 : NS_DEFINE_STATIC_IID_ACCESSOR(nsISound, NS_ISOUND_IID)
61 :
62 : /* Use this macro when declaring classes that implement this interface. */
63 : #define NS_DECL_NSISOUND \
64 : NS_IMETHOD Play(nsIURL *aURL) override; \
65 : NS_IMETHOD PlaySystemSound(const nsAString & soundAlias) override; \
66 : NS_IMETHOD Beep(void) override; \
67 : NS_IMETHOD Init(void) override; \
68 : NS_IMETHOD PlayEventSound(uint32_t aEventId) override;
69 :
70 : /* Use this macro when declaring the members of this interface when the
71 : class doesn't implement the interface. This is useful for forwarding. */
72 : #define NS_DECL_NON_VIRTUAL_NSISOUND \
73 : nsresult Play(nsIURL *aURL); \
74 : nsresult PlaySystemSound(const nsAString & soundAlias); \
75 : nsresult Beep(void); \
76 : nsresult Init(void); \
77 : nsresult PlayEventSound(uint32_t aEventId);
78 :
79 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
80 : #define NS_FORWARD_NSISOUND(_to) \
81 : NS_IMETHOD Play(nsIURL *aURL) override { return _to Play(aURL); } \
82 : NS_IMETHOD PlaySystemSound(const nsAString & soundAlias) override { return _to PlaySystemSound(soundAlias); } \
83 : NS_IMETHOD Beep(void) override { return _to Beep(); } \
84 : NS_IMETHOD Init(void) override { return _to Init(); } \
85 : NS_IMETHOD PlayEventSound(uint32_t aEventId) override { return _to PlayEventSound(aEventId); }
86 :
87 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
88 : #define NS_FORWARD_SAFE_NSISOUND(_to) \
89 : NS_IMETHOD Play(nsIURL *aURL) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Play(aURL); } \
90 : NS_IMETHOD PlaySystemSound(const nsAString & soundAlias) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PlaySystemSound(soundAlias); } \
91 : NS_IMETHOD Beep(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Beep(); } \
92 : NS_IMETHOD Init(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(); } \
93 : NS_IMETHOD PlayEventSound(uint32_t aEventId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PlayEventSound(aEventId); }
94 :
95 : #if 0
96 : /* Use the code below as a template for the implementation class for this interface. */
97 :
98 : /* Header file */
99 : class nsSound : public nsISound
100 : {
101 : public:
102 : NS_DECL_ISUPPORTS
103 : NS_DECL_NSISOUND
104 :
105 : nsSound();
106 :
107 : private:
108 : ~nsSound();
109 :
110 : protected:
111 : /* additional members */
112 : };
113 :
114 : /* Implementation file */
115 : NS_IMPL_ISUPPORTS(nsSound, nsISound)
116 :
117 : nsSound::nsSound()
118 : {
119 : /* member initializers and constructor code */
120 : }
121 :
122 : nsSound::~nsSound()
123 : {
124 : /* destructor code */
125 : }
126 :
127 : /* void play (in nsIURL aURL); */
128 : NS_IMETHODIMP nsSound::Play(nsIURL *aURL)
129 : {
130 : return NS_ERROR_NOT_IMPLEMENTED;
131 : }
132 :
133 : /* void playSystemSound (in AString soundAlias); */
134 : NS_IMETHODIMP nsSound::PlaySystemSound(const nsAString & soundAlias)
135 : {
136 : return NS_ERROR_NOT_IMPLEMENTED;
137 : }
138 :
139 : /* void beep (); */
140 : NS_IMETHODIMP nsSound::Beep()
141 : {
142 : return NS_ERROR_NOT_IMPLEMENTED;
143 : }
144 :
145 : /* void init (); */
146 : NS_IMETHODIMP nsSound::Init()
147 : {
148 : return NS_ERROR_NOT_IMPLEMENTED;
149 : }
150 :
151 : /* void playEventSound (in unsigned long aEventId); */
152 : NS_IMETHODIMP nsSound::PlayEventSound(uint32_t aEventId)
153 : {
154 : return NS_ERROR_NOT_IMPLEMENTED;
155 : }
156 :
157 : /* End of implementation class template. */
158 : #endif
159 :
160 :
161 : /**
162 : * NS_SYSSOUND_* can be used for playSystemSound but they are obsolete.
163 : * Use nsISound::playEventSound instead.
164 : */
165 : #define NS_SYSSOUND_PREFIX NS_LITERAL_STRING("_moz_")
166 : #define NS_SYSSOUND_MAIL_BEEP NS_LITERAL_STRING("_moz_mailbeep")
167 : #define NS_SYSSOUND_ALERT_DIALOG NS_LITERAL_STRING("_moz_alertdialog")
168 : #define NS_SYSSOUND_CONFIRM_DIALOG NS_LITERAL_STRING("_moz_confirmdialog")
169 : #define NS_SYSSOUND_PROMPT_DIALOG NS_LITERAL_STRING("_moz_promptdialog")
170 : #define NS_SYSSOUND_SELECT_DIALOG NS_LITERAL_STRING("_moz_selectdialog")
171 : #define NS_SYSSOUND_MENU_EXECUTE NS_LITERAL_STRING("_moz_menucommand")
172 : #define NS_SYSSOUND_MENU_POPUP NS_LITERAL_STRING("_moz_menupopup")
173 : #define NS_IsMozAliasSound(aSoundAlias) \
174 : StringBeginsWith(aSoundAlias, NS_SYSSOUND_PREFIX)
175 :
176 : #endif /* __gen_nsISound_h__ */
|