dom/network/src/TCPServerSocketChild.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #include "mozilla/net/PTCPServerSocketChild.h"
     6 #include "nsITCPServerSocketChild.h"
     7 #include "nsCycleCollectionParticipant.h"
     8 #include "nsCOMPtr.h"
    10 #define TCPSERVERSOCKETCHILD_CID \
    11   { 0x41a77ec8, 0xfd86, 0x409e, { 0xae, 0xa9, 0xaf, 0x2c, 0xa4, 0x07, 0xef, 0x8e } }
    13 class nsITCPServerSocketInternal;
    15 namespace mozilla {
    16 namespace dom {
    18 class TCPServerSocketChildBase : public nsITCPServerSocketChild {
    19 public:
    20   NS_DECL_CYCLE_COLLECTION_CLASS(TCPServerSocketChildBase)
    21   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
    23   void AddIPDLReference();
    24   void ReleaseIPDLReference();
    26 protected:
    27   TCPServerSocketChildBase();
    28   virtual ~TCPServerSocketChildBase();
    30   nsCOMPtr<nsITCPServerSocketInternal> mServerSocket;
    31   bool mIPCOpen;
    32 };
    34 class TCPServerSocketChild : public mozilla::net::PTCPServerSocketChild
    35                            , public TCPServerSocketChildBase
    36 {
    37 public:
    38   NS_DECL_NSITCPSERVERSOCKETCHILD
    39   NS_IMETHOD_(MozExternalRefCountType) Release() MOZ_OVERRIDE;
    41   TCPServerSocketChild();
    42   ~TCPServerSocketChild();
    44   virtual bool RecvCallbackAccept(PTCPSocketChild *socket)  MOZ_OVERRIDE;
    45   virtual bool RecvCallbackError(const nsString& aMessage,
    46                                  const nsString& aFilename,
    47                                  const uint32_t& aLineNumber,
    48                                  const uint32_t& aColumnNumber) MOZ_OVERRIDE;
    49 };
    51 } // namespace dom
    52 } // namespace mozilla

mercurial