michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set sw=2 ts=8 et tw=80 : */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_net_WebSocketChannelParent_h michael@0: #define mozilla_net_WebSocketChannelParent_h michael@0: michael@0: #include "mozilla/net/PWebSocketParent.h" michael@0: #include "mozilla/net/NeckoParent.h" michael@0: #include "nsIInterfaceRequestor.h" michael@0: #include "nsIWebSocketListener.h" michael@0: #include "nsIWebSocketChannel.h" michael@0: #include "nsILoadContext.h" michael@0: #include "nsCOMPtr.h" michael@0: #include "nsString.h" michael@0: michael@0: class nsIAuthPromptProvider; michael@0: michael@0: namespace mozilla { michael@0: namespace net { michael@0: michael@0: class WebSocketChannelParent : public PWebSocketParent, michael@0: public nsIWebSocketListener, michael@0: public nsIInterfaceRequestor michael@0: { michael@0: public: michael@0: NS_DECL_THREADSAFE_ISUPPORTS michael@0: NS_DECL_NSIWEBSOCKETLISTENER michael@0: NS_DECL_NSIINTERFACEREQUESTOR michael@0: michael@0: WebSocketChannelParent(nsIAuthPromptProvider* aAuthProvider, michael@0: nsILoadContext* aLoadContext, michael@0: PBOverrideStatus aOverrideStatus); michael@0: michael@0: private: michael@0: bool RecvAsyncOpen(const URIParams& aURI, michael@0: const nsCString& aOrigin, michael@0: const nsCString& aProtocol, michael@0: const bool& aSecure, michael@0: const uint32_t& aPingInterval, michael@0: const bool& aClientSetPingInterval, michael@0: const uint32_t& aPingTimeout, michael@0: const bool& aClientSetPingTimeout) MOZ_OVERRIDE; michael@0: bool RecvClose(const uint16_t & code, const nsCString & reason) MOZ_OVERRIDE; michael@0: bool RecvSendMsg(const nsCString& aMsg) MOZ_OVERRIDE; michael@0: bool RecvSendBinaryMsg(const nsCString& aMsg) MOZ_OVERRIDE; michael@0: bool RecvSendBinaryStream(const InputStreamParams& aStream, michael@0: const uint32_t& aLength) MOZ_OVERRIDE; michael@0: bool RecvDeleteSelf() MOZ_OVERRIDE; michael@0: michael@0: void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE; michael@0: michael@0: nsCOMPtr mAuthProvider; michael@0: nsCOMPtr mChannel; michael@0: nsCOMPtr mLoadContext; michael@0: bool mIPCOpen; michael@0: michael@0: }; michael@0: michael@0: } // namespace net michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozilla_net_WebSocketChannelParent_h