2013-09-07 10:19:53 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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_TelephonyChild_h
|
|
|
|
#define mozilla_dom_telephony_TelephonyChild_h
|
|
|
|
|
|
|
|
#include "mozilla/dom/telephony/TelephonyCommon.h"
|
|
|
|
#include "mozilla/dom/telephony/PTelephonyChild.h"
|
|
|
|
#include "mozilla/dom/telephony/PTelephonyRequestChild.h"
|
|
|
|
#include "nsITelephonyProvider.h"
|
|
|
|
|
|
|
|
BEGIN_TELEPHONY_NAMESPACE
|
|
|
|
|
2014-05-08 22:41:58 +04:00
|
|
|
class TelephonyIPCProvider;
|
|
|
|
|
2013-09-07 10:19:53 +04:00
|
|
|
class TelephonyChild : public PTelephonyChild
|
|
|
|
{
|
|
|
|
public:
|
2014-05-08 22:41:58 +04:00
|
|
|
TelephonyChild(TelephonyIPCProvider* aProvider);
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
protected:
|
2014-05-08 22:41:58 +04:00
|
|
|
virtual ~TelephonyChild();
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
virtual void
|
|
|
|
ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual PTelephonyRequestChild*
|
2014-02-27 10:12:30 +04:00
|
|
|
AllocPTelephonyRequestChild(const IPCTelephonyRequest& aRequest) MOZ_OVERRIDE;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
virtual bool
|
|
|
|
DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual bool
|
2013-10-31 16:05:51 +04:00
|
|
|
RecvNotifyCallError(const uint32_t& aClientId, const int32_t& aCallIndex,
|
2013-09-07 10:19:53 +04:00
|
|
|
const nsString& aError) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual bool
|
2013-10-31 16:05:51 +04:00
|
|
|
RecvNotifyCallStateChanged(const uint32_t& aClientId,
|
|
|
|
const IPCCallStateData& aData) MOZ_OVERRIDE;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
virtual bool
|
2013-10-31 16:05:51 +04:00
|
|
|
RecvNotifyCdmaCallWaiting(const uint32_t& aClientId,
|
|
|
|
const nsString& aNumber) MOZ_OVERRIDE;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
virtual bool
|
|
|
|
RecvNotifyConferenceCallStateChanged(const uint16_t& aCallState) MOZ_OVERRIDE;
|
|
|
|
|
2013-10-28 10:43:14 +04:00
|
|
|
virtual bool
|
|
|
|
RecvNotifyConferenceError(const nsString& aName,
|
|
|
|
const nsString& aMessage) MOZ_OVERRIDE;
|
|
|
|
|
2013-09-07 10:19:53 +04:00
|
|
|
virtual bool
|
2013-10-31 16:05:51 +04:00
|
|
|
RecvNotifySupplementaryService(const uint32_t& aClientId,
|
|
|
|
const int32_t& aCallIndex,
|
2013-09-07 10:19:53 +04:00
|
|
|
const uint16_t& aNotification) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
private:
|
2014-05-08 22:41:58 +04:00
|
|
|
nsRefPtr<TelephonyIPCProvider> mProvider;
|
2013-09-07 10:19:53 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
class TelephonyRequestChild : public PTelephonyRequestChild
|
|
|
|
{
|
|
|
|
public:
|
2014-02-27 10:12:30 +04:00
|
|
|
TelephonyRequestChild(nsITelephonyListener* aListener,
|
|
|
|
nsITelephonyCallback* aCallback);
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual ~TelephonyRequestChild() {}
|
|
|
|
|
|
|
|
virtual void
|
|
|
|
ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual bool
|
2014-02-27 10:12:30 +04:00
|
|
|
Recv__delete__(const IPCTelephonyResponse& aResponse) MOZ_OVERRIDE;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
virtual bool
|
2013-10-31 16:05:51 +04:00
|
|
|
RecvNotifyEnumerateCallState(const uint32_t& aClientId,
|
|
|
|
const IPCCallStateData& aData) MOZ_OVERRIDE;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
2014-02-27 10:12:30 +04:00
|
|
|
virtual bool
|
|
|
|
RecvNotifyDialError(const nsString& aError) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual bool
|
2014-05-26 21:08:00 +04:00
|
|
|
RecvNotifyDialSuccess(const uint32_t& aCallIndex) MOZ_OVERRIDE;
|
2014-02-27 10:12:30 +04:00
|
|
|
|
2013-09-07 10:19:53 +04:00
|
|
|
private:
|
|
|
|
nsCOMPtr<nsITelephonyListener> mListener;
|
2014-02-27 10:12:30 +04:00
|
|
|
nsCOMPtr<nsITelephonyCallback> mCallback;
|
2013-09-07 10:19:53 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
END_TELEPHONY_NAMESPACE
|
|
|
|
|
|
|
|
#endif // mozilla_dom_telephony_TelephonyChild_h
|