Bumping manifests a=b2g-bump
[gecko.git] / dom / telephony / ipc / TelephonyChild.h
blob4bb358db0307ac6adb2f7b63a0739764d92ac249
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 "nsITelephonyService.h"
14 BEGIN_TELEPHONY_NAMESPACE
16 class TelephonyIPCService;
18 class TelephonyChild : public PTelephonyChild
20 public:
21 TelephonyChild(TelephonyIPCService* aService);
23 protected:
24 virtual ~TelephonyChild();
26 virtual void
27 ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
29 virtual PTelephonyRequestChild*
30 AllocPTelephonyRequestChild(const IPCTelephonyRequest& aRequest) MOZ_OVERRIDE;
32 virtual bool
33 DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor) MOZ_OVERRIDE;
35 virtual bool
36 RecvNotifyCallError(const uint32_t& aClientId, const int32_t& aCallIndex,
37 const nsString& aError) MOZ_OVERRIDE;
39 virtual bool
40 RecvNotifyCallStateChanged(const uint32_t& aClientId,
41 const IPCCallStateData& aData) MOZ_OVERRIDE;
43 virtual bool
44 RecvNotifyCdmaCallWaiting(const uint32_t& aClientId,
45 const IPCCdmaWaitingCallData& aData) MOZ_OVERRIDE;
47 virtual bool
48 RecvNotifyConferenceCallStateChanged(const uint16_t& aCallState) MOZ_OVERRIDE;
50 virtual bool
51 RecvNotifyConferenceError(const nsString& aName,
52 const nsString& aMessage) MOZ_OVERRIDE;
54 virtual bool
55 RecvNotifySupplementaryService(const uint32_t& aClientId,
56 const int32_t& aCallIndex,
57 const uint16_t& aNotification) MOZ_OVERRIDE;
59 private:
60 nsRefPtr<TelephonyIPCService> mService;
63 class TelephonyRequestChild : public PTelephonyRequestChild
65 public:
66 TelephonyRequestChild(nsITelephonyListener* aListener,
67 nsITelephonyCallback* aCallback);
69 protected:
70 virtual ~TelephonyRequestChild() {}
72 virtual void
73 ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
75 virtual bool
76 Recv__delete__(const IPCTelephonyResponse& aResponse) MOZ_OVERRIDE;
78 virtual bool
79 RecvNotifyEnumerateCallState(const uint32_t& aClientId,
80 const IPCCallStateData& aData) MOZ_OVERRIDE;
82 private:
83 bool
84 DoResponse(const SuccessResponse& aResponse);
86 bool
87 DoResponse(const ErrorResponse& aResponse);
89 bool
90 DoResponse(const DialResponseCallSuccess& aResponse);
92 nsCOMPtr<nsITelephonyListener> mListener;
93 nsCOMPtr<nsITelephonyCallback> mCallback;
96 END_TELEPHONY_NAMESPACE
98 #endif // mozilla_dom_telephony_TelephonyChild_h