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/PTelephonyChild.h"
|
|
|
|
#include "mozilla/dom/telephony/PTelephonyRequestChild.h"
|
2015-01-08 11:33:51 +03:00
|
|
|
#include "mozilla/dom/telephony/TelephonyCommon.h"
|
|
|
|
#include "nsITelephonyCallInfo.h"
|
2014-06-03 18:15:25 +04:00
|
|
|
#include "nsITelephonyService.h"
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
BEGIN_TELEPHONY_NAMESPACE
|
|
|
|
|
2014-06-03 18:15:25 +04:00
|
|
|
class TelephonyIPCService;
|
2014-05-08 22:41:58 +04:00
|
|
|
|
2013-09-07 10:19:53 +04:00
|
|
|
class TelephonyChild : public PTelephonyChild
|
|
|
|
{
|
|
|
|
public:
|
2014-09-02 02:26:43 +04:00
|
|
|
explicit TelephonyChild(TelephonyIPCService* aService);
|
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
|
2015-03-21 19:28:04 +03:00
|
|
|
ActorDestroy(ActorDestroyReason aWhy) override;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
virtual PTelephonyRequestChild*
|
2015-03-21 19:28:04 +03:00
|
|
|
AllocPTelephonyRequestChild(const IPCTelephonyRequest& aRequest) override;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
virtual bool
|
2015-03-21 19:28:04 +03:00
|
|
|
DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor) override;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
virtual bool
|
2013-10-31 16:05:51 +04:00
|
|
|
RecvNotifyCallError(const uint32_t& aClientId, const int32_t& aCallIndex,
|
2015-03-21 19:28:04 +03:00
|
|
|
const nsString& aError) override;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
virtual bool
|
2015-04-24 13:10:37 +03:00
|
|
|
RecvNotifyCallStateChanged(nsTArray<nsITelephonyCallInfo*>&& aAllInfo) override;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
virtual bool
|
2013-10-31 16:05:51 +04:00
|
|
|
RecvNotifyCdmaCallWaiting(const uint32_t& aClientId,
|
2015-03-21 19:28:04 +03:00
|
|
|
const IPCCdmaWaitingCallData& aData) override;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
virtual bool
|
2015-03-21 19:28:04 +03:00
|
|
|
RecvNotifyConferenceCallStateChanged(const uint16_t& aCallState) override;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
2013-10-28 10:43:14 +04:00
|
|
|
virtual bool
|
|
|
|
RecvNotifyConferenceError(const nsString& aName,
|
2015-03-21 19:28:04 +03:00
|
|
|
const nsString& aMessage) override;
|
2013-10-28 10:43:14 +04:00
|
|
|
|
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,
|
2015-03-21 19:28:04 +03:00
|
|
|
const uint16_t& aNotification) override;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
private:
|
2014-06-03 18:15:30 +04:00
|
|
|
nsRefPtr<TelephonyIPCService> mService;
|
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
|
2015-03-21 19:28:04 +03:00
|
|
|
ActorDestroy(ActorDestroyReason aWhy) override;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
virtual bool
|
2015-03-21 19:28:04 +03:00
|
|
|
Recv__delete__(const IPCTelephonyResponse& aResponse) override;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
|
|
|
virtual bool
|
2015-03-21 19:28:04 +03:00
|
|
|
RecvNotifyEnumerateCallState(nsITelephonyCallInfo* const& aInfo) override;
|
2013-09-07 10:19:53 +04:00
|
|
|
|
2014-09-22 09:35:00 +04:00
|
|
|
virtual bool
|
2015-03-21 19:28:04 +03:00
|
|
|
RecvNotifyDialMMI(const nsString& aServiceCode) override;
|
2014-09-22 09:35:00 +04:00
|
|
|
|
2014-09-22 09:34:00 +04:00
|
|
|
private:
|
|
|
|
bool
|
2014-10-15 10:50:00 +04:00
|
|
|
DoResponse(const SuccessResponse& aResponse);
|
|
|
|
|
|
|
|
bool
|
|
|
|
DoResponse(const ErrorResponse& aResponse);
|
2014-02-27 10:12:30 +04:00
|
|
|
|
2014-09-22 09:34:00 +04:00
|
|
|
bool
|
|
|
|
DoResponse(const DialResponseCallSuccess& aResponse);
|
2014-02-27 10:12:30 +04:00
|
|
|
|
2014-09-22 09:35:00 +04:00
|
|
|
bool
|
|
|
|
DoResponse(const DialResponseMMISuccess& aResponse);
|
|
|
|
|
|
|
|
bool
|
|
|
|
DoResponse(const DialResponseMMIError& aResponse);
|
|
|
|
|
2013-09-07 10:19:53 +04:00
|
|
|
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
|