mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 843452 - Part 1-1: WEBIDL changes for MobileConnection IPDL. r=hsinyi,smaug
This commit is contained in:
parent
3c3cde7d59
commit
b41a1daeb2
@ -1,8 +1,8 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=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/. */
|
||||
* 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 "DOMMMIError.h"
|
||||
#include "mozilla/dom/DOMMMIErrorBinding.h"
|
||||
@ -37,19 +37,3 @@ DOMMMIError::WrapObject(JSContext* aCx)
|
||||
{
|
||||
return DOMMMIErrorBinding::Wrap(aCx, this);
|
||||
}
|
||||
|
||||
// WebIDL interface
|
||||
|
||||
/* static */ already_AddRefed<DOMMMIError>
|
||||
DOMMMIError::Constructor(const GlobalObject& aGlobal,
|
||||
const nsAString& aServiceCode,
|
||||
const nsAString& aName,
|
||||
const nsAString& aMessage,
|
||||
const Nullable<int16_t>& aInfo,
|
||||
ErrorResult& aRv) {
|
||||
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aGlobal.GetAsSupports());
|
||||
nsRefPtr<DOMMMIError> error = new DOMMMIError(window, aName, aMessage,
|
||||
aServiceCode, aInfo);
|
||||
|
||||
return error.forget();
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=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/. */
|
||||
* 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_MmiError_h
|
||||
#define mozilla_dom_MmiError_h
|
||||
@ -26,10 +26,6 @@ public:
|
||||
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
|
||||
// WebIDL interface
|
||||
static already_AddRefed<DOMMMIError>
|
||||
Constructor(const GlobalObject& aGlobal, const nsAString& aServiceCode,
|
||||
const nsAString& aName, const nsAString& aMessage,
|
||||
const Nullable<int16_t>& aInfo, ErrorResult& aRv);
|
||||
|
||||
void
|
||||
GetServiceCode(nsString& aServiceCode) const
|
||||
|
@ -45,29 +45,6 @@ MobileNetworkInfo::WrapObject(JSContext* aCx)
|
||||
return MozMobileNetworkInfoBinding::Wrap(aCx, this);
|
||||
}
|
||||
|
||||
// WebIDL interface
|
||||
|
||||
/* static */ already_AddRefed<MobileNetworkInfo>
|
||||
MobileNetworkInfo::Constructor(const GlobalObject& aGlobal,
|
||||
const nsAString& aShortName,
|
||||
const nsAString& aLongName,
|
||||
const nsAString& aMcc,
|
||||
const nsAString& aMnc,
|
||||
const nsAString& aState,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aGlobal.GetAsSupports());
|
||||
nsRefPtr<MobileNetworkInfo> info = new MobileNetworkInfo(window);
|
||||
|
||||
info->mShortName.Assign(aShortName);
|
||||
info->mLongName.Assign(aLongName);
|
||||
info->mMcc.Assign(aMcc);
|
||||
info->mMnc.Assign(aMnc);
|
||||
info->mState.Assign(aState);
|
||||
|
||||
return info.forget();
|
||||
}
|
||||
|
||||
// nsIMobileNetworkInfo
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -40,12 +40,6 @@ public:
|
||||
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
|
||||
// WebIDL interface
|
||||
static already_AddRefed<MobileNetworkInfo>
|
||||
Constructor(const GlobalObject& aGlobal, const nsAString& aShortName,
|
||||
const nsAString& aLongName, const nsAString& aMcc,
|
||||
const nsAString& aMnc, const nsAString& aState,
|
||||
ErrorResult& aRv);
|
||||
|
||||
Nullable<MobileNetworkState>
|
||||
GetState() const
|
||||
{
|
||||
|
@ -4,11 +4,7 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
[Pref="dom.mobileconnection.enabled",
|
||||
Constructor(DOMString serviceCode,
|
||||
DOMString name,
|
||||
optional DOMString message = "",
|
||||
optional short? additionalInformation = null)]
|
||||
[Pref="dom.mobileconnection.enabled"]
|
||||
interface DOMMMIError : DOMError {
|
||||
[Constant]
|
||||
readonly attribute DOMString serviceCode;
|
||||
|
@ -665,21 +665,27 @@ dictionary MozMMIResult
|
||||
* request. The UI is supposed to handle the localization of the strings
|
||||
* associated with this string key.
|
||||
*/
|
||||
DOMString serviceCode;
|
||||
DOMString serviceCode = "";
|
||||
|
||||
/**
|
||||
* String key containing the status message of the associated MMI request.
|
||||
* The UI is supposed to handle the localization of the strings associated
|
||||
* with this string key.
|
||||
*/
|
||||
DOMString statusMessage;
|
||||
DOMString statusMessage = "";
|
||||
|
||||
/**
|
||||
* Some MMI requests like call forwarding or PIN/PIN2/PUK/PUK2 related
|
||||
* requests provide extra information along with the status message, this
|
||||
* information can be a number, a string key or an array of string keys.
|
||||
* information can be a number, an array of string keys or an array of
|
||||
* MozCallForwardingOptions.
|
||||
*
|
||||
* And it should be
|
||||
* (unsigned short or sequence<DOMString> or sequence<MozCallForwardingOptions>)
|
||||
* But we cannot yet use sequences as union member types (please see bug 767924)
|
||||
* ,so we use object here.
|
||||
*/
|
||||
any additionalInformation;
|
||||
(unsigned short or object) additionalInformation;
|
||||
};
|
||||
|
||||
dictionary MozClirStatus
|
||||
|
@ -4,9 +4,7 @@
|
||||
|
||||
enum MobileNetworkState {"available", "connected", "forbidden"};
|
||||
|
||||
[Pref="dom.mobileconnection.enabled",
|
||||
ChromeConstructor(DOMString? shortName, DOMString? longName, DOMString? mcc,
|
||||
DOMString? mnc, DOMString? state)]
|
||||
[Pref="dom.mobileconnection.enabled"]
|
||||
interface MozMobileNetworkInfo
|
||||
{
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user