michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_dom_telephony_TelephonyChild_h michael@0: #define mozilla_dom_telephony_TelephonyChild_h michael@0: michael@0: #include "mozilla/dom/telephony/TelephonyCommon.h" michael@0: #include "mozilla/dom/telephony/PTelephonyChild.h" michael@0: #include "mozilla/dom/telephony/PTelephonyRequestChild.h" michael@0: #include "nsITelephonyProvider.h" michael@0: michael@0: BEGIN_TELEPHONY_NAMESPACE michael@0: michael@0: class TelephonyChild : public PTelephonyChild michael@0: { michael@0: public: michael@0: TelephonyChild(nsITelephonyListener* aListener); michael@0: michael@0: protected: michael@0: virtual ~TelephonyChild() {} michael@0: michael@0: virtual void michael@0: ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE; michael@0: michael@0: virtual PTelephonyRequestChild* michael@0: AllocPTelephonyRequestChild(const IPCTelephonyRequest& aRequest) MOZ_OVERRIDE; michael@0: michael@0: virtual bool michael@0: DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor) MOZ_OVERRIDE; michael@0: michael@0: virtual bool michael@0: RecvNotifyCallError(const uint32_t& aClientId, const int32_t& aCallIndex, michael@0: const nsString& aError) MOZ_OVERRIDE; michael@0: michael@0: virtual bool michael@0: RecvNotifyCallStateChanged(const uint32_t& aClientId, michael@0: const IPCCallStateData& aData) MOZ_OVERRIDE; michael@0: michael@0: virtual bool michael@0: RecvNotifyCdmaCallWaiting(const uint32_t& aClientId, michael@0: const nsString& aNumber) MOZ_OVERRIDE; michael@0: michael@0: virtual bool michael@0: RecvNotifyConferenceCallStateChanged(const uint16_t& aCallState) MOZ_OVERRIDE; michael@0: michael@0: virtual bool michael@0: RecvNotifyConferenceError(const nsString& aName, michael@0: const nsString& aMessage) MOZ_OVERRIDE; michael@0: michael@0: virtual bool michael@0: RecvNotifySupplementaryService(const uint32_t& aClientId, michael@0: const int32_t& aCallIndex, michael@0: const uint16_t& aNotification) MOZ_OVERRIDE; michael@0: michael@0: private: michael@0: nsCOMPtr mListener; michael@0: }; michael@0: michael@0: class TelephonyRequestChild : public PTelephonyRequestChild michael@0: { michael@0: public: michael@0: TelephonyRequestChild(nsITelephonyListener* aListener, michael@0: nsITelephonyCallback* aCallback); michael@0: michael@0: protected: michael@0: virtual ~TelephonyRequestChild() {} michael@0: michael@0: virtual void michael@0: ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE; michael@0: michael@0: virtual bool michael@0: Recv__delete__(const IPCTelephonyResponse& aResponse) MOZ_OVERRIDE; michael@0: michael@0: virtual bool michael@0: RecvNotifyEnumerateCallState(const uint32_t& aClientId, michael@0: const IPCCallStateData& aData) MOZ_OVERRIDE; michael@0: michael@0: virtual bool michael@0: RecvNotifyDialError(const nsString& aError) MOZ_OVERRIDE; michael@0: michael@0: virtual bool michael@0: RecvNotifyDialSuccess() MOZ_OVERRIDE; michael@0: michael@0: private: michael@0: nsCOMPtr mListener; michael@0: nsCOMPtr mCallback; michael@0: }; michael@0: michael@0: END_TELEPHONY_NAMESPACE michael@0: michael@0: #endif // mozilla_dom_telephony_TelephonyChild_h