dom/telephony/ipc/TelephonyParent.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     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_TelephonyParent_h
     7 #define mozilla_dom_telephony_TelephonyParent_h
     9 #include "mozilla/dom/telephony/TelephonyCommon.h"
    10 #include "mozilla/dom/telephony/PTelephonyParent.h"
    11 #include "mozilla/dom/telephony/PTelephonyRequestParent.h"
    12 #include "nsITelephonyProvider.h"
    14 BEGIN_TELEPHONY_NAMESPACE
    16 class TelephonyParent : public PTelephonyParent
    17                       , public nsITelephonyListener
    18 {
    19 public:
    20   NS_DECL_ISUPPORTS
    21   NS_DECL_NSITELEPHONYLISTENER
    23   TelephonyParent();
    25 protected:
    26   virtual ~TelephonyParent() {}
    28   virtual void
    29   ActorDestroy(ActorDestroyReason why);
    31   virtual bool
    32   RecvPTelephonyRequestConstructor(PTelephonyRequestParent* aActor, const IPCTelephonyRequest& aRequest) MOZ_OVERRIDE;
    34   virtual PTelephonyRequestParent*
    35   AllocPTelephonyRequestParent(const IPCTelephonyRequest& aRequest) MOZ_OVERRIDE;
    37   virtual bool
    38   DeallocPTelephonyRequestParent(PTelephonyRequestParent* aActor) MOZ_OVERRIDE;
    40   virtual bool
    41   Recv__delete__() MOZ_OVERRIDE;
    43   virtual bool
    44   RecvRegisterListener() MOZ_OVERRIDE;
    46   virtual bool
    47   RecvUnregisterListener() MOZ_OVERRIDE;
    49   virtual bool
    50   RecvHangUpCall(const uint32_t& aClientId, const uint32_t& aCallIndex) MOZ_OVERRIDE;
    52   virtual bool
    53   RecvAnswerCall(const uint32_t& aClientId, const uint32_t& aCallIndex) MOZ_OVERRIDE;
    55   virtual bool
    56   RecvRejectCall(const uint32_t& aClientId, const uint32_t& aCallIndex) MOZ_OVERRIDE;
    58   virtual bool
    59   RecvHoldCall(const uint32_t& aClientId, const uint32_t& aCallIndex) MOZ_OVERRIDE;
    61   virtual bool
    62   RecvResumeCall(const uint32_t& aClientId, const uint32_t& aCallIndex) MOZ_OVERRIDE;
    64   virtual bool
    65   RecvConferenceCall(const uint32_t& aClientId) MOZ_OVERRIDE;
    67   virtual bool
    68   RecvSeparateCall(const uint32_t& aClientId, const uint32_t& callIndex) MOZ_OVERRIDE;
    70   virtual bool
    71   RecvHoldConference(const uint32_t& aClientId) MOZ_OVERRIDE;
    73   virtual bool
    74   RecvResumeConference(const uint32_t& aClientId) MOZ_OVERRIDE;
    76   virtual bool
    77   RecvStartTone(const uint32_t& aClientId, const nsString& aTone) MOZ_OVERRIDE;
    79   virtual bool
    80   RecvStopTone(const uint32_t& aClientId) MOZ_OVERRIDE;
    82   virtual bool
    83   RecvGetMicrophoneMuted(bool* aMuted) MOZ_OVERRIDE;
    85   virtual bool
    86   RecvSetMicrophoneMuted(const bool& aMuted) MOZ_OVERRIDE;
    88   virtual bool
    89   RecvGetSpeakerEnabled(bool* aEnabled) MOZ_OVERRIDE;
    91   virtual bool
    92   RecvSetSpeakerEnabled(const bool& aEnabled) MOZ_OVERRIDE;
    94 private:
    95   bool mActorDestroyed;
    96   bool mRegistered;
    97 };
    99 class TelephonyRequestParent : public PTelephonyRequestParent
   100                              , public nsITelephonyListener
   101                              , public nsITelephonyCallback
   102 {
   103   friend class TelephonyParent;
   105 public:
   106   NS_DECL_ISUPPORTS
   107   NS_DECL_NSITELEPHONYLISTENER
   108   NS_DECL_NSITELEPHONYCALLBACK
   110 protected:
   111   TelephonyRequestParent();
   112   virtual ~TelephonyRequestParent() {}
   114   virtual void
   115   ActorDestroy(ActorDestroyReason why);
   117 private:
   118   bool mActorDestroyed;
   120   bool
   121   DoRequest(const EnumerateCallsRequest& aRequest);
   123   bool
   124   DoRequest(const DialRequest& aRequest);
   125 };
   127 END_TELEPHONY_NAMESPACE
   129 #endif /* mozilla_dom_telephony_TelephonyParent_h */

mercurial