2014-10-15 06:50:00 +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_TelephonyDialCallback_h
|
|
|
|
#define mozilla_dom_TelephonyDialCallback_h
|
|
|
|
|
|
|
|
#include "Telephony.h"
|
2014-11-11 09:15:31 +00:00
|
|
|
#include "mozilla/dom/MMICall.h"
|
2014-10-15 06:50:00 +00:00
|
|
|
#include "mozilla/dom/MozMobileConnectionBinding.h"
|
|
|
|
#include "mozilla/dom/Promise.h"
|
|
|
|
#include "mozilla/dom/ToJSValue.h"
|
|
|
|
#include "mozilla/dom/telephony/TelephonyCallback.h"
|
|
|
|
#include "nsAutoPtr.h"
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsITelephonyService.h"
|
|
|
|
#include "nsJSUtils.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
|
|
|
|
class nsPIDOMWindow;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
namespace telephony {
|
|
|
|
|
|
|
|
class TelephonyDialCallback MOZ_FINAL : public TelephonyCallback,
|
|
|
|
public nsITelephonyDialCallback
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
NS_DECL_NSITELEPHONYDIALCALLBACK
|
|
|
|
|
|
|
|
TelephonyDialCallback(nsPIDOMWindow* aWindow, Telephony* aTelephony,
|
|
|
|
Promise* aPromise, uint32_t aServiceId);
|
|
|
|
|
|
|
|
NS_FORWARD_NSITELEPHONYCALLBACK(TelephonyCallback::)
|
|
|
|
|
|
|
|
private:
|
|
|
|
~TelephonyDialCallback() {}
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
NotifyDialMMISuccess(JSContext* aCx, const MozMMIResult& aResult);
|
|
|
|
|
|
|
|
|
|
|
|
nsCOMPtr<nsPIDOMWindow> mWindow;
|
|
|
|
nsRefPtr<Telephony> mTelephony;
|
|
|
|
uint32_t mServiceId;
|
|
|
|
|
|
|
|
nsString mServiceCode;
|
2014-11-11 09:15:31 +00:00
|
|
|
nsRefPtr<MMICall> mMMICall;
|
2014-10-15 06:50:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace telephony
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_TelephonyDialCallback_h
|