1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/telephony/ipc/TelephonyChild.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,93 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef mozilla_dom_telephony_TelephonyChild_h 1.10 +#define mozilla_dom_telephony_TelephonyChild_h 1.11 + 1.12 +#include "mozilla/dom/telephony/TelephonyCommon.h" 1.13 +#include "mozilla/dom/telephony/PTelephonyChild.h" 1.14 +#include "mozilla/dom/telephony/PTelephonyRequestChild.h" 1.15 +#include "nsITelephonyProvider.h" 1.16 + 1.17 +BEGIN_TELEPHONY_NAMESPACE 1.18 + 1.19 +class TelephonyChild : public PTelephonyChild 1.20 +{ 1.21 +public: 1.22 + TelephonyChild(nsITelephonyListener* aListener); 1.23 + 1.24 +protected: 1.25 + virtual ~TelephonyChild() {} 1.26 + 1.27 + virtual void 1.28 + ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE; 1.29 + 1.30 + virtual PTelephonyRequestChild* 1.31 + AllocPTelephonyRequestChild(const IPCTelephonyRequest& aRequest) MOZ_OVERRIDE; 1.32 + 1.33 + virtual bool 1.34 + DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor) MOZ_OVERRIDE; 1.35 + 1.36 + virtual bool 1.37 + RecvNotifyCallError(const uint32_t& aClientId, const int32_t& aCallIndex, 1.38 + const nsString& aError) MOZ_OVERRIDE; 1.39 + 1.40 + virtual bool 1.41 + RecvNotifyCallStateChanged(const uint32_t& aClientId, 1.42 + const IPCCallStateData& aData) MOZ_OVERRIDE; 1.43 + 1.44 + virtual bool 1.45 + RecvNotifyCdmaCallWaiting(const uint32_t& aClientId, 1.46 + const nsString& aNumber) MOZ_OVERRIDE; 1.47 + 1.48 + virtual bool 1.49 + RecvNotifyConferenceCallStateChanged(const uint16_t& aCallState) MOZ_OVERRIDE; 1.50 + 1.51 + virtual bool 1.52 + RecvNotifyConferenceError(const nsString& aName, 1.53 + const nsString& aMessage) MOZ_OVERRIDE; 1.54 + 1.55 + virtual bool 1.56 + RecvNotifySupplementaryService(const uint32_t& aClientId, 1.57 + const int32_t& aCallIndex, 1.58 + const uint16_t& aNotification) MOZ_OVERRIDE; 1.59 + 1.60 +private: 1.61 + nsCOMPtr<nsITelephonyListener> mListener; 1.62 +}; 1.63 + 1.64 +class TelephonyRequestChild : public PTelephonyRequestChild 1.65 +{ 1.66 +public: 1.67 + TelephonyRequestChild(nsITelephonyListener* aListener, 1.68 + nsITelephonyCallback* aCallback); 1.69 + 1.70 +protected: 1.71 + virtual ~TelephonyRequestChild() {} 1.72 + 1.73 + virtual void 1.74 + ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE; 1.75 + 1.76 + virtual bool 1.77 + Recv__delete__(const IPCTelephonyResponse& aResponse) MOZ_OVERRIDE; 1.78 + 1.79 + virtual bool 1.80 + RecvNotifyEnumerateCallState(const uint32_t& aClientId, 1.81 + const IPCCallStateData& aData) MOZ_OVERRIDE; 1.82 + 1.83 + virtual bool 1.84 + RecvNotifyDialError(const nsString& aError) MOZ_OVERRIDE; 1.85 + 1.86 + virtual bool 1.87 + RecvNotifyDialSuccess() MOZ_OVERRIDE; 1.88 + 1.89 +private: 1.90 + nsCOMPtr<nsITelephonyListener> mListener; 1.91 + nsCOMPtr<nsITelephonyCallback> mCallback; 1.92 +}; 1.93 + 1.94 +END_TELEPHONY_NAMESPACE 1.95 + 1.96 +#endif // mozilla_dom_telephony_TelephonyChild_h