Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_telephony_TelephonyChild_h
7 #define mozilla_dom_telephony_TelephonyChild_h
9 #include "mozilla/dom/telephony/TelephonyCommon.h"
10 #include "mozilla/dom/telephony/PTelephonyChild.h"
11 #include "mozilla/dom/telephony/PTelephonyRequestChild.h"
12 #include "nsITelephonyProvider.h"
14 BEGIN_TELEPHONY_NAMESPACE
16 class TelephonyChild : public PTelephonyChild
17 {
18 public:
19 TelephonyChild(nsITelephonyListener* aListener);
21 protected:
22 virtual ~TelephonyChild() {}
24 virtual void
25 ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
27 virtual PTelephonyRequestChild*
28 AllocPTelephonyRequestChild(const IPCTelephonyRequest& aRequest) MOZ_OVERRIDE;
30 virtual bool
31 DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor) MOZ_OVERRIDE;
33 virtual bool
34 RecvNotifyCallError(const uint32_t& aClientId, const int32_t& aCallIndex,
35 const nsString& aError) MOZ_OVERRIDE;
37 virtual bool
38 RecvNotifyCallStateChanged(const uint32_t& aClientId,
39 const IPCCallStateData& aData) MOZ_OVERRIDE;
41 virtual bool
42 RecvNotifyCdmaCallWaiting(const uint32_t& aClientId,
43 const nsString& aNumber) MOZ_OVERRIDE;
45 virtual bool
46 RecvNotifyConferenceCallStateChanged(const uint16_t& aCallState) MOZ_OVERRIDE;
48 virtual bool
49 RecvNotifyConferenceError(const nsString& aName,
50 const nsString& aMessage) MOZ_OVERRIDE;
52 virtual bool
53 RecvNotifySupplementaryService(const uint32_t& aClientId,
54 const int32_t& aCallIndex,
55 const uint16_t& aNotification) MOZ_OVERRIDE;
57 private:
58 nsCOMPtr<nsITelephonyListener> mListener;
59 };
61 class TelephonyRequestChild : public PTelephonyRequestChild
62 {
63 public:
64 TelephonyRequestChild(nsITelephonyListener* aListener,
65 nsITelephonyCallback* aCallback);
67 protected:
68 virtual ~TelephonyRequestChild() {}
70 virtual void
71 ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
73 virtual bool
74 Recv__delete__(const IPCTelephonyResponse& aResponse) MOZ_OVERRIDE;
76 virtual bool
77 RecvNotifyEnumerateCallState(const uint32_t& aClientId,
78 const IPCCallStateData& aData) MOZ_OVERRIDE;
80 virtual bool
81 RecvNotifyDialError(const nsString& aError) MOZ_OVERRIDE;
83 virtual bool
84 RecvNotifyDialSuccess() MOZ_OVERRIDE;
86 private:
87 nsCOMPtr<nsITelephonyListener> mListener;
88 nsCOMPtr<nsITelephonyCallback> mCallback;
89 };
91 END_TELEPHONY_NAMESPACE
93 #endif // mozilla_dom_telephony_TelephonyChild_h