Bumping manifests a=b2g-bump
[gecko.git] / dom / network / TCPServerSocketChild.h
blob84cbd5816712ef1fd7ae8826e92460dad0118c1d
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;
34 class TCPServerSocketChild : public mozilla::net::PTCPServerSocketChild
35 , public TCPServerSocketChildBase
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;
51 } // namespace dom
52 } // namespace mozilla