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"
10 #define TCPSERVERSOCKETCHILD_CID \
11 { 0x41a77ec8, 0xfd86, 0x409e, { 0xae, 0xa9, 0xaf, 0x2c, 0xa4, 0x07, 0xef, 0x8e } }
13 class nsITCPServerSocketInternal
;
18 class TCPServerSocketChildBase
: public nsITCPServerSocketChild
{
20 NS_DECL_CYCLE_COLLECTION_CLASS(TCPServerSocketChildBase
)
21 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
23 void AddIPDLReference();
24 void ReleaseIPDLReference();
27 TCPServerSocketChildBase();
28 virtual ~TCPServerSocketChildBase();
30 nsCOMPtr
<nsITCPServerSocketInternal
> mServerSocket
;
34 class TCPServerSocketChild
: public mozilla::net::PTCPServerSocketChild
35 , public TCPServerSocketChildBase
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
;
52 } // namespace mozilla