2014-09-19 07:53:05 +00:00
|
|
|
/* 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_IccInfo_h
|
|
|
|
#define mozilla_dom_IccInfo_h
|
|
|
|
|
|
|
|
#include "MozIccInfoBinding.h"
|
|
|
|
#include "nsIIccInfo.h"
|
|
|
|
#include "nsWrapperCache.h"
|
|
|
|
|
|
|
|
class nsPIDOMWindow;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2015-03-18 18:48:52 +00:00
|
|
|
class IccInfo : public nsISupports
|
2014-09-19 07:53:05 +00:00
|
|
|
, public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(IccInfo)
|
|
|
|
|
|
|
|
explicit IccInfo(nsPIDOMWindow* aWindow);
|
|
|
|
|
|
|
|
void
|
|
|
|
Update(nsIIccInfo* aInfo);
|
|
|
|
|
|
|
|
nsPIDOMWindow*
|
|
|
|
GetParentObject() const
|
|
|
|
{
|
|
|
|
return mWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
// WrapperCache
|
|
|
|
virtual JSObject*
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 14:13:33 +00:00
|
|
|
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
|
2014-09-19 07:53:05 +00:00
|
|
|
|
|
|
|
// WebIDL interface
|
|
|
|
Nullable<IccType>
|
|
|
|
GetIccType() const;
|
|
|
|
|
|
|
|
void
|
|
|
|
GetIccid(nsAString& aIccId) const;
|
|
|
|
|
|
|
|
void
|
|
|
|
GetMcc(nsAString& aMcc) const;
|
|
|
|
|
|
|
|
void
|
|
|
|
GetMnc(nsAString& aMnc) const;
|
|
|
|
|
|
|
|
void
|
|
|
|
GetSpn(nsAString& aSpn) const;
|
|
|
|
|
|
|
|
bool
|
|
|
|
IsDisplayNetworkNameRequired() const;
|
|
|
|
|
|
|
|
bool
|
|
|
|
IsDisplaySpnRequired() const;
|
|
|
|
|
|
|
|
protected:
|
2014-11-25 00:34:19 +00:00
|
|
|
virtual ~IccInfo() {}
|
2014-09-19 07:53:05 +00:00
|
|
|
|
2015-03-18 18:48:52 +00:00
|
|
|
protected:
|
2014-09-19 07:53:05 +00:00
|
|
|
nsCOMPtr<nsPIDOMWindow> mWindow;
|
2015-03-18 18:48:52 +00:00
|
|
|
nsCOMPtr<nsIIccInfo> mIccInfo;
|
2014-09-19 07:53:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class GsmIccInfo MOZ_FINAL : public IccInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
2015-03-18 18:48:52 +00:00
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(GsmIccInfo, IccInfo)
|
2014-09-19 07:53:05 +00:00
|
|
|
|
|
|
|
explicit GsmIccInfo(nsPIDOMWindow* aWindow);
|
|
|
|
|
|
|
|
void
|
|
|
|
Update(nsIGsmIccInfo* aInfo);
|
|
|
|
|
|
|
|
// WrapperCache
|
|
|
|
virtual JSObject*
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 14:13:33 +00:00
|
|
|
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
|
2014-09-19 07:53:05 +00:00
|
|
|
|
|
|
|
// MozCdmaIccInfo WebIDL
|
|
|
|
void
|
|
|
|
GetMsisdn(nsAString& aMsisdn) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
~GsmIccInfo() {}
|
|
|
|
|
2015-03-18 18:48:52 +00:00
|
|
|
private:
|
|
|
|
nsCOMPtr<nsIGsmIccInfo> mGsmIccInfo;
|
2014-09-19 07:53:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CdmaIccInfo MOZ_FINAL : public IccInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
2015-03-18 18:48:52 +00:00
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CdmaIccInfo, IccInfo)
|
2014-09-19 07:53:05 +00:00
|
|
|
|
|
|
|
explicit CdmaIccInfo(nsPIDOMWindow* aWindow);
|
|
|
|
|
|
|
|
void
|
|
|
|
Update(nsICdmaIccInfo* aInfo);
|
|
|
|
|
|
|
|
// WrapperCache
|
|
|
|
virtual JSObject*
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 14:13:33 +00:00
|
|
|
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
|
2014-09-19 07:53:05 +00:00
|
|
|
|
|
|
|
// MozCdmaIccInfo WebIDL
|
|
|
|
void
|
|
|
|
GetMdn(nsAString& aMdn) const;
|
|
|
|
|
|
|
|
int32_t
|
|
|
|
PrlVersion() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
~CdmaIccInfo() {}
|
|
|
|
|
2015-03-18 18:48:52 +00:00
|
|
|
private:
|
|
|
|
nsCOMPtr<nsICdmaIccInfo> mCdmaIccInfo;
|
2014-09-19 07:53:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_IccInfo_h
|
|
|
|
|