mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1023148 - Use WebIDL codegen to implement RIL & WiFi events. r=smaug
This commit is contained in:
parent
33b95efab3
commit
45bd978b7c
@ -6,7 +6,6 @@
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsICellBroadcastProvider.idl',
|
||||
'nsIDOMMozCellBroadcastEvent.idl',
|
||||
'nsIDOMMozCellBroadcastMessage.idl',
|
||||
]
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsIDOMEvent.idl"
|
||||
|
||||
interface nsIDOMMozCellBroadcastMessage;
|
||||
|
||||
[scriptable, builtinclass, uuid(f955095f-01e4-4520-b299-7124ec7c63aa)]
|
||||
interface nsIDOMMozCellBroadcastEvent : nsIDOMEvent
|
||||
{
|
||||
//[binaryname(MessageMoz)]
|
||||
readonly attribute nsIDOMMozCellBroadcastMessage message;
|
||||
|
||||
[noscript] void initMozCellBroadcastEvent(in DOMString aType,
|
||||
in boolean aCanBubble,
|
||||
in boolean aCancelable,
|
||||
in nsIDOMMozCellBroadcastMessage aMessage);
|
||||
};
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "CellBroadcast.h"
|
||||
#include "mozilla/dom/MozCellBroadcastBinding.h"
|
||||
#include "nsIDOMMozCellBroadcastEvent.h"
|
||||
#include "mozilla/dom/MozCellBroadcastEvent.h"
|
||||
#include "nsIDOMMozCellBroadcastMessage.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "GeneratedEvents.h"
|
||||
@ -94,13 +94,12 @@ CellBroadcast::WrapObject(JSContext* aCx)
|
||||
NS_IMETHODIMP
|
||||
CellBroadcast::NotifyMessageReceived(nsIDOMMozCellBroadcastMessage* aMessage)
|
||||
{
|
||||
nsCOMPtr<nsIDOMEvent> event;
|
||||
NS_NewDOMMozCellBroadcastEvent(getter_AddRefs(event), this, nullptr, nullptr);
|
||||
MozCellBroadcastEventInit init;
|
||||
init.mBubbles = true;
|
||||
init.mCancelable = false;
|
||||
init.mMessage = aMessage;
|
||||
|
||||
nsCOMPtr<nsIDOMMozCellBroadcastEvent> ce = do_QueryInterface(event);
|
||||
nsresult rv = ce->InitMozCellBroadcastEvent(NS_LITERAL_STRING("received"),
|
||||
true, false, aMessage);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return DispatchTrustedEvent(ce);
|
||||
nsRefPtr<MozCellBroadcastEvent> event =
|
||||
MozCellBroadcastEvent::Constructor(this, NS_LITERAL_STRING("received"), init);
|
||||
return DispatchTrustedEvent(event);
|
||||
}
|
||||
|
@ -831,10 +831,6 @@ EventDispatcher::CreateEvent(EventTarget* aOwner,
|
||||
return NS_NewDOMHashChangeEvent(aDOMEvent, aOwner, aPresContext, nullptr);
|
||||
if (aEventType.LowerCaseEqualsLiteral("customevent"))
|
||||
return NS_NewDOMCustomEvent(aDOMEvent, aOwner, aPresContext, nullptr);
|
||||
if (aEventType.LowerCaseEqualsLiteral("mozsmsevent"))
|
||||
return NS_NewDOMMozSmsEvent(aDOMEvent, aOwner, aPresContext, nullptr);
|
||||
if (aEventType.LowerCaseEqualsLiteral("mozmmsevent"))
|
||||
return NS_NewDOMMozMmsEvent(aDOMEvent, aOwner, aPresContext, nullptr);
|
||||
if (aEventType.LowerCaseEqualsLiteral("storageevent")) {
|
||||
return NS_NewDOMStorageEvent(aDOMEvent, aOwner);
|
||||
}
|
||||
|
@ -6,10 +6,8 @@
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsIDOMMobileMessageManager.idl',
|
||||
'nsIDOMMozMmsEvent.idl',
|
||||
'nsIDOMMozMmsMessage.idl',
|
||||
'nsIDOMMozMobileMessageThread.idl',
|
||||
'nsIDOMMozSmsEvent.idl',
|
||||
'nsIDOMMozSmsMessage.idl',
|
||||
'nsIDOMSmsFilter.idl',
|
||||
'nsIDOMSmsSegmentInfo.idl',
|
||||
|
@ -1,18 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsIDOMEvent.idl"
|
||||
|
||||
interface nsIDOMMozMmsMessage;
|
||||
|
||||
[builtinclass, uuid(b33cc0f2-8886-11e2-9433-eff9a8af9a70)]
|
||||
interface nsIDOMMozMmsEvent : nsIDOMEvent
|
||||
{
|
||||
readonly attribute nsIDOMMozMmsMessage message;
|
||||
|
||||
[noscript] void initMozMmsEvent(in DOMString aType,
|
||||
in boolean aCanBubble,
|
||||
in boolean aCancelable,
|
||||
in nsIDOMMozMmsMessage aMessage);
|
||||
};
|
@ -1,18 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsIDOMEvent.idl"
|
||||
|
||||
interface nsIDOMMozSmsMessage;
|
||||
|
||||
[builtinclass, uuid(f12f9208-0abd-4d95-9a27-93a74b5e47a2)]
|
||||
interface nsIDOMMozSmsEvent : nsIDOMEvent
|
||||
{
|
||||
readonly attribute nsIDOMMozSmsMessage message;
|
||||
|
||||
[noscript] void initMozSmsEvent(in DOMString aType,
|
||||
in boolean aCanBubble,
|
||||
in boolean aCancelable,
|
||||
in nsIDOMMozSmsMessage aMessage);
|
||||
};
|
@ -13,9 +13,9 @@
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/dom/mobilemessage/Constants.h" // For MessageType
|
||||
#include "mozilla/dom/MobileMessageManagerBinding.h"
|
||||
#include "mozilla/dom/MozMmsEvent.h"
|
||||
#include "mozilla/dom/MozMmsMessageBinding.h"
|
||||
#include "nsIDOMMozSmsEvent.h"
|
||||
#include "nsIDOMMozMmsEvent.h"
|
||||
#include "mozilla/dom/MozSmsEvent.h"
|
||||
#include "nsIDOMMozSmsMessage.h"
|
||||
#include "nsIDOMMozMmsMessage.h"
|
||||
#include "nsJSUtils.h"
|
||||
@ -476,27 +476,27 @@ MobileMessageManager::DispatchTrustedSmsEventToSelf(const char* aTopic,
|
||||
const nsAString& aEventName,
|
||||
nsISupports* aMsg)
|
||||
{
|
||||
nsCOMPtr<nsIDOMEvent> event;
|
||||
|
||||
nsCOMPtr<nsIDOMMozSmsMessage> sms = do_QueryInterface(aMsg);
|
||||
if (sms) {
|
||||
NS_NewDOMMozSmsEvent(getter_AddRefs(event), this, nullptr, nullptr);
|
||||
NS_ASSERTION(event, "This should never fail!");
|
||||
MozSmsEventInit init;
|
||||
init.mBubbles = false;
|
||||
init.mCancelable = false;
|
||||
init.mMessage = sms;
|
||||
|
||||
nsCOMPtr<nsIDOMMozSmsEvent> se = do_QueryInterface(event);
|
||||
nsresult rv = se->InitMozSmsEvent(aEventName, false, false, sms);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsRefPtr<MozSmsEvent> event =
|
||||
MozSmsEvent::Constructor(this, aEventName, init);
|
||||
return DispatchTrustedEvent(event);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMMozMmsMessage> mms = do_QueryInterface(aMsg);
|
||||
if (mms) {
|
||||
NS_NewDOMMozMmsEvent(getter_AddRefs(event), this, nullptr, nullptr);
|
||||
NS_ASSERTION(event, "This should never fail!");
|
||||
MozMmsEventInit init;
|
||||
init.mBubbles = false;
|
||||
init.mCancelable = false;
|
||||
init.mMessage = mms;
|
||||
|
||||
nsCOMPtr<nsIDOMMozMmsEvent> se = do_QueryInterface(event);
|
||||
nsresult rv = se->InitMozMmsEvent(aEventName, false, false, mms);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsRefPtr<MozMmsEvent> event =
|
||||
MozMmsEvent::Constructor(this, aEventName, init);
|
||||
return DispatchTrustedEvent(event);
|
||||
}
|
||||
|
||||
|
@ -1,73 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "CallEvent.h"
|
||||
#include "mozilla/dom/CallEventBinding.h"
|
||||
|
||||
#include "TelephonyCall.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
using mozilla::ErrorResult;
|
||||
|
||||
/* static */
|
||||
already_AddRefed<CallEvent>
|
||||
CallEvent::Create(EventTarget* aOwner, const nsAString& aType,
|
||||
TelephonyCall* aCall, bool aCanBubble,
|
||||
bool aCancelable)
|
||||
{
|
||||
nsRefPtr<CallEvent> event = new CallEvent(aOwner, nullptr, nullptr);
|
||||
event->mCall = aCall;
|
||||
event->InitEvent(aType, aCanBubble, aCancelable);
|
||||
return event.forget();
|
||||
}
|
||||
|
||||
JSObject*
|
||||
CallEvent::WrapObject(JSContext* aCx)
|
||||
{
|
||||
return CallEventBinding::Wrap(aCx, this);
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(CallEvent)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(CallEvent, Event)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mCall)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(CallEvent, Event)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCall)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(CallEvent, Event)
|
||||
NS_IMPL_RELEASE_INHERITED(CallEvent, Event)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(CallEvent)
|
||||
NS_INTERFACE_MAP_END_INHERITING(Event)
|
||||
|
||||
// WebIDL
|
||||
|
||||
/* static */
|
||||
already_AddRefed<CallEvent>
|
||||
CallEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType,
|
||||
const CallEventInit& aOptions, ErrorResult& aRv)
|
||||
{
|
||||
nsCOMPtr<EventTarget> target = do_QueryInterface(aGlobal.GetAsSupports());
|
||||
|
||||
if (!target) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsRefPtr<CallEvent> event = Create(target, aType, aOptions.mCall, false, false);
|
||||
|
||||
return event.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<TelephonyCall>
|
||||
CallEvent::GetCall() const
|
||||
{
|
||||
nsRefPtr<TelephonyCall> call = mCall;
|
||||
return call.forget();
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef mozilla_dom_telephony_callevent_h
|
||||
#define mozilla_dom_telephony_callevent_h
|
||||
|
||||
#include "mozilla/dom/Event.h"
|
||||
#include "mozilla/dom/telephony/TelephonyCommon.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
struct CallEventInit;
|
||||
|
||||
class CallEvent MOZ_FINAL : public Event
|
||||
{
|
||||
nsRefPtr<TelephonyCall> mCall;
|
||||
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CallEvent, Event)
|
||||
NS_FORWARD_TO_EVENT
|
||||
|
||||
virtual JSObject*
|
||||
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
|
||||
// WebIDL
|
||||
static already_AddRefed<CallEvent>
|
||||
Constructor(const GlobalObject& aGlobal, const nsAString& aType,
|
||||
const CallEventInit& aOptions, ErrorResult& aRv);
|
||||
|
||||
already_AddRefed<TelephonyCall>
|
||||
GetCall() const;
|
||||
|
||||
static already_AddRefed<CallEvent>
|
||||
Create(EventTarget* aOwner, const nsAString& aType, TelephonyCall* aCall,
|
||||
bool aCanBubble, bool aCancelable);
|
||||
|
||||
private:
|
||||
CallEvent(EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
WidgetEvent* aEvent)
|
||||
: Event(aOwner, aPresContext, aEvent)
|
||||
{
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
virtual ~CallEvent()
|
||||
{ }
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_telephony_callevent_h
|
@ -5,6 +5,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "Telephony.h"
|
||||
#include "mozilla/dom/CallEvent.h"
|
||||
#include "mozilla/dom/TelephonyBinding.h"
|
||||
#include "mozilla/dom/Promise.h"
|
||||
|
||||
@ -21,7 +22,6 @@
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
#include "CallEvent.h"
|
||||
#include "CallsList.h"
|
||||
#include "TelephonyCall.h"
|
||||
#include "TelephonyCallGroup.h"
|
||||
@ -692,7 +692,12 @@ Telephony::DispatchCallEvent(const nsAString& aType,
|
||||
aType.EqualsLiteral("remoteheld") ||
|
||||
aType.EqualsLiteral("remtoeresumed"));
|
||||
|
||||
nsRefPtr<CallEvent> event = CallEvent::Create(this, aType, aCall, false, false);
|
||||
CallEventInit init;
|
||||
init.mBubbles = false;
|
||||
init.mCancelable = false;
|
||||
init.mCall = aCall;
|
||||
|
||||
nsRefPtr<CallEvent> event = CallEvent::Constructor(this, aType, init);
|
||||
|
||||
return DispatchTrustedEvent(event);
|
||||
}
|
||||
|
@ -5,11 +5,11 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "TelephonyCall.h"
|
||||
#include "mozilla/dom/CallEvent.h"
|
||||
#include "mozilla/dom/TelephonyCallBinding.h"
|
||||
|
||||
#include "mozilla/dom/DOMError.h"
|
||||
|
||||
#include "CallEvent.h"
|
||||
#include "Telephony.h"
|
||||
#include "TelephonyCallGroup.h"
|
||||
|
||||
@ -145,7 +145,12 @@ TelephonyCall::DispatchCallEvent(const nsAString& aType,
|
||||
{
|
||||
MOZ_ASSERT(aCall);
|
||||
|
||||
nsRefPtr<CallEvent> event = CallEvent::Create(this, aType, aCall, false, false);
|
||||
CallEventInit init;
|
||||
init.mBubbles = false;
|
||||
init.mCancelable = false;
|
||||
init.mCall = aCall;
|
||||
|
||||
nsRefPtr<CallEvent> event = CallEvent::Constructor(this, aType, init);
|
||||
|
||||
return DispatchTrustedEvent(event);
|
||||
}
|
||||
|
@ -7,8 +7,8 @@
|
||||
#include "TelephonyCallGroup.h"
|
||||
#include "mozilla/dom/TelephonyCallGroupBinding.h"
|
||||
|
||||
#include "CallEvent.h"
|
||||
#include "CallsList.h"
|
||||
#include "mozilla/dom/CallEvent.h"
|
||||
#include "mozilla/dom/CallGroupErrorEvent.h"
|
||||
#include "Telephony.h"
|
||||
|
||||
@ -142,7 +142,12 @@ nsresult
|
||||
TelephonyCallGroup::DispatchCallEvent(const nsAString& aType,
|
||||
TelephonyCall* aCall)
|
||||
{
|
||||
nsRefPtr<CallEvent> event = CallEvent::Create(this, aType, aCall, false, false);
|
||||
CallEventInit init;
|
||||
init.mBubbles = false;
|
||||
init.mCancelable = false;
|
||||
init.mCall = aCall;
|
||||
|
||||
nsRefPtr<CallEvent> event = CallEvent::Constructor(this, aType, init);
|
||||
return DispatchTrustedEvent(event);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,6 @@ XPIDL_SOURCES += [
|
||||
XPIDL_MODULE = 'dom_telephony'
|
||||
|
||||
EXPORTS.mozilla.dom += [
|
||||
'CallEvent.h',
|
||||
'CallsList.h',
|
||||
'Telephony.h',
|
||||
'TelephonyCall.h',
|
||||
@ -26,7 +25,6 @@ EXPORTS.mozilla.dom.telephony += [
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'CallEvent.cpp',
|
||||
'CallsList.cpp',
|
||||
'ipc/TelephonyChild.cpp',
|
||||
'ipc/TelephonyIPCService.cpp',
|
||||
|
@ -7,8 +7,8 @@
|
||||
#include "Voicemail.h"
|
||||
|
||||
#include "mozilla/dom/MozVoicemailBinding.h"
|
||||
#include "mozilla/dom/MozVoicemailEvent.h"
|
||||
#include "nsIDOMMozVoicemailStatus.h"
|
||||
#include "nsIDOMMozVoicemailEvent.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Services.h"
|
||||
@ -164,15 +164,14 @@ Voicemail::GetDisplayName(const Optional<uint32_t>& aServiceId, nsString& aDispl
|
||||
NS_IMETHODIMP
|
||||
Voicemail::NotifyStatusChanged(nsIDOMMozVoicemailStatus* aStatus)
|
||||
{
|
||||
nsCOMPtr<nsIDOMEvent> event;
|
||||
NS_NewDOMMozVoicemailEvent(getter_AddRefs(event), this, nullptr, nullptr);
|
||||
MozVoicemailEventInit init;
|
||||
init.mBubbles = false;
|
||||
init.mCancelable = false;
|
||||
init.mStatus = aStatus;
|
||||
|
||||
nsCOMPtr<nsIDOMMozVoicemailEvent> ce = do_QueryInterface(event);
|
||||
nsresult rv = ce->InitMozVoicemailEvent(NS_LITERAL_STRING("statuschanged"),
|
||||
false, false, aStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return DispatchTrustedEvent(ce);
|
||||
nsRefPtr<MozVoicemailEvent> event =
|
||||
MozVoicemailEvent::Constructor(this, NS_LITERAL_STRING("statuschanged"), init);
|
||||
return DispatchTrustedEvent(event);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -5,7 +5,6 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsIDOMMozVoicemailEvent.idl',
|
||||
'nsIDOMMozVoicemailStatus.idl',
|
||||
'nsIVoicemailProvider.idl',
|
||||
]
|
||||
|
@ -1,23 +0,0 @@
|
||||
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=40: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsIDOMEvent.idl"
|
||||
|
||||
interface nsIDOMMozVoicemailStatus;
|
||||
|
||||
[builtinclass, uuid(63e42e5f-0742-4c8f-bd52-938a7e03d2c9)]
|
||||
interface nsIDOMMozVoicemailEvent : nsIDOMEvent
|
||||
{
|
||||
/**
|
||||
* The voicemail status that caused this event to fire
|
||||
*/
|
||||
readonly attribute nsIDOMMozVoicemailStatus status;
|
||||
|
||||
[noscript] void initMozVoicemailEvent(in DOMString aType,
|
||||
in boolean aCanBubble,
|
||||
in boolean aCancelable,
|
||||
in nsIDOMMozVoicemailStatus aStatus);
|
||||
};
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
interface MozCellBroadcastMessage;
|
||||
|
||||
[Constructor(DOMString type, optional MozCellBroadcastEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h", Pref="dom.cellbroadcast.enabled"]
|
||||
[Constructor(DOMString type, optional MozCellBroadcastEventInit eventInitDict), Pref="dom.cellbroadcast.enabled"]
|
||||
interface MozCellBroadcastEvent : Event
|
||||
{
|
||||
readonly attribute MozCellBroadcastMessage? message;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
interface MozMmsMessage;
|
||||
|
||||
[Constructor(DOMString type, optional MozMmsEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
[Constructor(DOMString type, optional MozMmsEventInit eventInitDict)]
|
||||
interface MozMmsEvent : Event
|
||||
{
|
||||
readonly attribute MozMmsMessage? message;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
interface MozSmsMessage;
|
||||
|
||||
[Constructor(DOMString type, optional MozSmsEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
[Constructor(DOMString type, optional MozSmsEventInit eventInitDict)]
|
||||
interface MozSmsEvent : Event
|
||||
{
|
||||
readonly attribute MozSmsMessage? message;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
interface MozVoicemailStatus;
|
||||
|
||||
[Constructor(DOMString type, optional MozVoicemailEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h", Pref="dom.voicemail.enabled"]
|
||||
[Constructor(DOMString type, optional MozVoicemailEventInit eventInitDict), Pref="dom.voicemail.enabled"]
|
||||
interface MozVoicemailEvent : Event
|
||||
{
|
||||
readonly attribute MozVoicemailStatus? status;
|
||||
|
@ -4,14 +4,32 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional MozWifiConnectionInfoEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
[Constructor(DOMString type, optional MozWifiConnectionInfoEventInit eventInitDict)]
|
||||
interface MozWifiConnectionInfoEvent : Event
|
||||
{
|
||||
[Throws]
|
||||
/**
|
||||
* Network object with an SSID field.
|
||||
*/
|
||||
readonly attribute any network;
|
||||
|
||||
/**
|
||||
* Strength of the signal to network, in dBm between -55 and -100 dBm.
|
||||
*/
|
||||
readonly attribute short signalStrength;
|
||||
|
||||
/**
|
||||
* Relative signal strength between 0 and 100.
|
||||
*/
|
||||
readonly attribute short relSignalStrength;
|
||||
|
||||
/**
|
||||
* Link speed in Mb/s.
|
||||
*/
|
||||
readonly attribute long linkSpeed;
|
||||
|
||||
/**
|
||||
* IP address in the dotted quad format.
|
||||
*/
|
||||
readonly attribute DOMString? ipAddress;
|
||||
};
|
||||
|
||||
|
@ -281,7 +281,7 @@ interface MozWifiManager : EventTarget {
|
||||
|
||||
/**
|
||||
* A connectionInformation object with the same information found in an
|
||||
* nsIDOMMozWifiConnectionInfoEvent (but without the network).
|
||||
* MozWifiConnectionInfoEvent (but without the network).
|
||||
* If we are not currently connected to a network, this will be null.
|
||||
*/
|
||||
readonly attribute MozWifiConnectionInfo? connectionInformation;
|
||||
@ -293,8 +293,8 @@ interface MozWifiManager : EventTarget {
|
||||
|
||||
/**
|
||||
* State notification listeners. These all take an
|
||||
* nsIDOMMozWifiStatusChangeEvent with the new status and a network (which
|
||||
* may be null).
|
||||
* MozWifiStatusChangeEvent with the new status and a network (which may be
|
||||
* null).
|
||||
*
|
||||
* The possible statuses are:
|
||||
* - connecting: Fires when we start the process of connecting to a
|
||||
|
@ -5,10 +5,12 @@
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional MozWifiP2pStatusChangeEventInit eventInitDict),
|
||||
HeaderFile="GeneratedEventClasses.h",
|
||||
Func="Navigator::HasWifiManagerSupport"]
|
||||
interface MozWifiP2pStatusChangeEvent : Event
|
||||
{
|
||||
/**
|
||||
* The mac address of the peer whose status has just changed.
|
||||
*/
|
||||
readonly attribute DOMString peerAddress;
|
||||
};
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional MozWifiStationInfoEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
[Constructor(DOMString type, optional MozWifiStationInfoEventInit eventInitDict)]
|
||||
interface MozWifiStationInfoEvent : Event
|
||||
{
|
||||
/**
|
||||
|
@ -4,11 +4,19 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional MozWifiStatusChangeEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
[Constructor(DOMString type, optional MozWifiStatusChangeEventInit eventInitDict)]
|
||||
interface MozWifiStatusChangeEvent : Event
|
||||
{
|
||||
[Throws]
|
||||
/**
|
||||
* Network object with a SSID field describing the network affected by
|
||||
* this change. This might be null.
|
||||
*/
|
||||
readonly attribute any network;
|
||||
|
||||
/**
|
||||
* String describing the current status of the wifi manager. See above for
|
||||
* the possible values.
|
||||
*/
|
||||
readonly attribute DOMString? status;
|
||||
};
|
||||
|
||||
|
@ -42,7 +42,6 @@ WEBIDL_FILES = [
|
||||
'BiquadFilterNode.webidl',
|
||||
'Blob.webidl',
|
||||
'BrowserElementDictionaries.webidl',
|
||||
'CallEvent.webidl',
|
||||
'CallsList.webidl',
|
||||
'CameraCapabilities.webidl',
|
||||
'CameraControl.webidl',
|
||||
@ -533,9 +532,7 @@ WEBIDL_FILES += [
|
||||
'ElementReplaceEvent.webidl',
|
||||
'HashChangeEvent.webidl',
|
||||
'MozApplicationEvent.webidl',
|
||||
'MozMmsEvent.webidl',
|
||||
'MozSettingsEvent.webidl',
|
||||
'MozSmsEvent.webidl',
|
||||
'PageTransitionEvent.webidl',
|
||||
'PopStateEvent.webidl',
|
||||
'PopupBlockedEvent.webidl',
|
||||
@ -571,7 +568,6 @@ if CONFIG['MOZ_B2G_RIL']:
|
||||
'DOMMMIError.webidl',
|
||||
'IccCardLockError.webidl',
|
||||
'MozCellBroadcast.webidl',
|
||||
'MozCellBroadcastEvent.webidl',
|
||||
'MozIcc.webidl',
|
||||
'MozIccManager.webidl',
|
||||
'MozMobileCellInfo.webidl',
|
||||
@ -580,7 +576,6 @@ if CONFIG['MOZ_B2G_RIL']:
|
||||
'MozMobileConnectionInfo.webidl',
|
||||
'MozMobileNetworkInfo.webidl',
|
||||
'MozVoicemail.webidl',
|
||||
'MozVoicemailEvent.webidl',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_NFC']:
|
||||
@ -599,12 +594,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
||||
'MozNetworkStatsInterface.webidl',
|
||||
'MozSpeakerManager.webidl',
|
||||
'MozWifiCapabilities.webidl',
|
||||
'MozWifiConnectionInfoEvent.webidl',
|
||||
'MozWifiManager.webidl',
|
||||
'MozWifiP2pManager.webidl',
|
||||
'MozWifiP2pStatusChangeEvent.webidl',
|
||||
'MozWifiStationInfoEvent.webidl',
|
||||
'MozWifiStatusChangeEvent.webidl',
|
||||
]
|
||||
else:
|
||||
WEBIDL_FILES += [
|
||||
@ -630,6 +621,7 @@ if not CONFIG['MOZ_DISABLE_CRYPTOLEGACY']:
|
||||
GENERATED_EVENTS_WEBIDL_FILES = [
|
||||
'AutocompleteErrorEvent.webidl',
|
||||
'BlobEvent.webidl',
|
||||
'CallEvent.webidl',
|
||||
'CallGroupErrorEvent.webidl',
|
||||
'CFStateChangeEvent.webidl',
|
||||
'DataErrorEvent.webidl',
|
||||
@ -644,7 +636,9 @@ GENERATED_EVENTS_WEBIDL_FILES = [
|
||||
'MozContactChangeEvent.webidl',
|
||||
'MozEmergencyCbModeEvent.webidl',
|
||||
'MozInterAppMessageEvent.webidl',
|
||||
'MozMmsEvent.webidl',
|
||||
'MozOtaStatusEvent.webidl',
|
||||
'MozSmsEvent.webidl',
|
||||
'MozStkCommandEvent.webidl',
|
||||
'ProgressEvent.webidl',
|
||||
'RTCDataChannelEvent.webidl',
|
||||
@ -679,6 +673,20 @@ if CONFIG['MOZ_B2G_BT']:
|
||||
'BluetoothStatusChangedEvent.webidl',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_B2G_RIL']:
|
||||
GENERATED_EVENTS_WEBIDL_FILES += [
|
||||
'MozCellBroadcastEvent.webidl',
|
||||
'MozVoicemailEvent.webidl',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
||||
GENERATED_EVENTS_WEBIDL_FILES += [
|
||||
'MozWifiConnectionInfoEvent.webidl',
|
||||
'MozWifiP2pStatusChangeEvent.webidl',
|
||||
'MozWifiStationInfoEvent.webidl',
|
||||
'MozWifiStatusChangeEvent.webidl',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_BUILD_APP'] in ['browser', 'xulrunner']:
|
||||
WEBIDL_FILES += [
|
||||
'BrowserFeedWriter.webidl',
|
||||
|
@ -5,10 +5,6 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsIDOMMozWifiConnectionInfoEvent.idl',
|
||||
'nsIDOMMozWifiP2pStatusChangeEvent.idl',
|
||||
'nsIDOMMozWifiStationInfoEvent.idl',
|
||||
'nsIDOMMozWifiStatusChangeEvent.idl',
|
||||
'nsIWifi.idl',
|
||||
'nsIWifiCertService.idl',
|
||||
'nsIWifiService.idl',
|
||||
|
@ -1,45 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsIDOMEvent.idl"
|
||||
|
||||
interface nsIVariant;
|
||||
|
||||
[builtinclass, uuid(627b2102-9605-40e0-a5bf-6d3ac672b328)]
|
||||
interface nsIDOMMozWifiConnectionInfoEvent : nsIDOMEvent
|
||||
{
|
||||
/**
|
||||
* Network object with an SSID field.
|
||||
*/
|
||||
readonly attribute nsIVariant network;
|
||||
|
||||
/**
|
||||
* Strength of the signal to network, in dBm between -55 and -100 dBm.
|
||||
*/
|
||||
readonly attribute short signalStrength;
|
||||
|
||||
/**
|
||||
* Relative signal strength between 0 and 100.
|
||||
*/
|
||||
readonly attribute short relSignalStrength;
|
||||
|
||||
/**
|
||||
* Link speed in Mb/s.
|
||||
*/
|
||||
readonly attribute long linkSpeed;
|
||||
|
||||
/**
|
||||
* IP address in the dotted quad format.
|
||||
*/
|
||||
readonly attribute DOMString ipAddress;
|
||||
|
||||
[noscript] void initMozWifiConnectionInfoEvent(in DOMString aType,
|
||||
in boolean aCanBubble,
|
||||
in boolean aCancelable,
|
||||
in nsIVariant aNetwork,
|
||||
in short signalStrength,
|
||||
in short relSignalStrength,
|
||||
in long linkSpeed,
|
||||
in DOMString ipAddress);
|
||||
};
|
@ -1,19 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsIDOMEvent.idl"
|
||||
|
||||
[builtinclass, uuid(82cad910-2019-11e3-8224-0800200c9a66)]
|
||||
interface nsIDOMMozWifiP2pStatusChangeEvent : nsIDOMEvent
|
||||
{
|
||||
/**
|
||||
* The mac address of the peer whose status has just changed.
|
||||
*/
|
||||
readonly attribute DOMString peerAddress;
|
||||
|
||||
[noscript] void initMozWifiP2pStatusChangeEvent(in DOMString aType,
|
||||
in boolean aCanBubble,
|
||||
in boolean aCancelable,
|
||||
in DOMString aPeerAddress);
|
||||
};
|
@ -1,19 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsIDOMEvent.idl"
|
||||
|
||||
[scriptable, builtinclass, uuid(97dc8040-d5c9-11e3-9c1a-0800200c9a66)]
|
||||
interface nsIDOMMozWifiStationInfoEvent : nsIDOMEvent
|
||||
{
|
||||
/**
|
||||
* The number of wifi stations connected to wifi hotspot.
|
||||
*/
|
||||
readonly attribute short station;
|
||||
|
||||
[noscript] void initMozWifiStationInfoEvent(in DOMString aType,
|
||||
in boolean aCanBubble,
|
||||
in boolean aCancelable,
|
||||
in short station);
|
||||
};
|
@ -1,29 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsIDOMEvent.idl"
|
||||
|
||||
interface nsIVariant;
|
||||
|
||||
[builtinclass, uuid(251252ba-ed8c-47a0-8979-f7652b4d558a)]
|
||||
interface nsIDOMMozWifiStatusChangeEvent : nsIDOMEvent
|
||||
{
|
||||
/**
|
||||
* Network object with a SSID field describing the network affected by
|
||||
* this change. This might be null.
|
||||
*/
|
||||
readonly attribute nsIVariant network;
|
||||
|
||||
/**
|
||||
* String describing the current status of the wifi manager. See above for
|
||||
* the possible values.
|
||||
*/
|
||||
readonly attribute DOMString status;
|
||||
|
||||
[noscript] void initMozWifiStatusChangeEvent(in DOMString aType,
|
||||
in boolean aCanBubble,
|
||||
in boolean aCancelable,
|
||||
in nsIVariant aNetwork,
|
||||
in DOMString aStatus);
|
||||
};
|
@ -21,19 +21,7 @@ simple_events = [
|
||||
'StyleRuleChangeEvent',
|
||||
'StyleSheetChangeEvent',
|
||||
'StyleSheetApplicableStateChangeEvent',
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
'MozWifiP2pStatusChangeEvent',
|
||||
'MozWifiStatusChangeEvent',
|
||||
'MozWifiConnectionInfoEvent',
|
||||
'MozWifiStationInfoEvent',
|
||||
#endif
|
||||
#ifdef MOZ_B2G_RIL
|
||||
'MozCellBroadcastEvent',
|
||||
'MozVoicemailEvent',
|
||||
#endif
|
||||
'ElementReplaceEvent',
|
||||
'MozSmsEvent',
|
||||
'MozMmsEvent',
|
||||
#ifdef MOZ_WEBSPEECH
|
||||
'SpeechSynthesisEvent',
|
||||
#endif
|
||||
|
@ -116,18 +116,8 @@
|
||||
#include "nsIDOMMouseScrollEvent.h"
|
||||
#include "nsIDOMMutationEvent.h"
|
||||
#include "nsIDOMMozApplicationEvent.h"
|
||||
#include "nsIDOMMozMmsEvent.h"
|
||||
#include "nsIDOMMozNamedAttrMap.h"
|
||||
#include "nsIDOMMozSettingsEvent.h"
|
||||
#include "nsIDOMMozSmsEvent.h"
|
||||
#ifdef MOZ_B2G_RIL
|
||||
#include "nsIDOMMozVoicemailEvent.h"
|
||||
#endif
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include "nsIDOMMozWifiConnectionInfoEvent.h"
|
||||
#include "nsIDOMMozWifiStatusChangeEvent.h"
|
||||
#include "nsIDOMMozWifiP2pStatusChangeEvent.h"
|
||||
#endif
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIDOMNodeIterator.h"
|
||||
#include "nsIDOMNotifyPaintEvent.h"
|
||||
@ -285,18 +275,8 @@
|
||||
#include "mozilla/dom/MouseScrollEventBinding.h"
|
||||
#include "mozilla/dom/MutationEventBinding.h"
|
||||
#include "mozilla/dom/MozApplicationEventBinding.h"
|
||||
#include "mozilla/dom/MozMmsEventBinding.h"
|
||||
#include "mozilla/dom/MozNamedAttrMapBinding.h"
|
||||
#include "mozilla/dom/MozSettingsEventBinding.h"
|
||||
#include "mozilla/dom/MozSmsEventBinding.h"
|
||||
#ifdef MOZ_B2G_RIL
|
||||
#include "mozilla/dom/MozVoicemailEventBinding.h"
|
||||
#endif
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include "mozilla/dom/MozWifiConnectionInfoEventBinding.h"
|
||||
#include "mozilla/dom/MozWifiStatusChangeEventBinding.h"
|
||||
#include "mozilla/dom/MozWifiP2pStatusChangeEventBinding.h"
|
||||
#endif
|
||||
#include "mozilla/dom/NodeIteratorBinding.h"
|
||||
#include "mozilla/dom/NodeBinding.h"
|
||||
#include "mozilla/dom/NotifyPaintEventBinding.h"
|
||||
@ -505,18 +485,8 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
|
||||
DEFINE_SHIM(MouseScrollEvent),
|
||||
DEFINE_SHIM(MutationEvent),
|
||||
DEFINE_SHIM(MozApplicationEvent),
|
||||
DEFINE_SHIM(MozMmsEvent),
|
||||
DEFINE_SHIM(MozNamedAttrMap),
|
||||
DEFINE_SHIM(MozSettingsEvent),
|
||||
DEFINE_SHIM(MozSmsEvent),
|
||||
#ifdef MOZ_B2G_RIL
|
||||
DEFINE_SHIM(MozVoicemailEvent),
|
||||
#endif
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
DEFINE_SHIM(MozWifiConnectionInfoEvent),
|
||||
DEFINE_SHIM(MozWifiP2pStatusChangeEvent),
|
||||
DEFINE_SHIM(MozWifiStatusChangeEvent),
|
||||
#endif
|
||||
DEFINE_SHIM(NodeIterator),
|
||||
DEFINE_SHIM(Node),
|
||||
DEFINE_SHIM(NotifyPaintEvent),
|
||||
|
Loading…
Reference in New Issue
Block a user