2011-05-04 17:36:23 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
|
|
|
|
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2011-05-04 17:36:23 +04:00
|
|
|
|
|
|
|
include protocol PNecko;
|
|
|
|
include protocol PBrowser;
|
2016-06-07 12:46:03 +03:00
|
|
|
include protocol PTransportProvider;
|
2017-03-09 16:10:24 +03:00
|
|
|
include IPCStream;
|
2012-08-23 23:33:46 +04:00
|
|
|
include URIParams;
|
2015-02-17 21:09:58 +03:00
|
|
|
include NeckoChannelParams;
|
2011-05-04 17:36:23 +04:00
|
|
|
|
2017-03-09 16:10:24 +03:00
|
|
|
include protocol PFileDescriptorSet; //FIXME: bug #792908
|
2017-03-14 14:28:58 +03:00
|
|
|
include protocol PChildToParentStream; //FIXME: bug #792908
|
2017-03-14 14:29:43 +03:00
|
|
|
include protocol PParentToChildStream; //FIXME: bug #792908
|
2012-09-21 21:26:13 +04:00
|
|
|
|
2013-10-01 23:25:07 +04:00
|
|
|
using class IPC::SerializedLoadContext from "SerializedLoadContext.h";
|
2016-06-07 12:46:03 +03:00
|
|
|
using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
|
2011-05-04 17:36:23 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
|
2016-06-07 12:46:03 +03:00
|
|
|
union OptionalTransportProvider
|
|
|
|
{
|
|
|
|
PTransportProvider;
|
|
|
|
void_t;
|
|
|
|
};
|
|
|
|
|
2011-05-04 17:36:23 +04:00
|
|
|
async protocol PWebSocket
|
|
|
|
{
|
|
|
|
manager PNecko;
|
|
|
|
|
|
|
|
parent:
|
2011-07-05 08:18:33 +04:00
|
|
|
// Forwarded methods corresponding to methods on nsIWebSocketChannel
|
2016-06-07 12:46:03 +03:00
|
|
|
async AsyncOpen(OptionalURIParams aURI,
|
2016-01-27 00:51:53 +03:00
|
|
|
nsCString aOrigin,
|
|
|
|
uint64_t aInnerWindowID,
|
|
|
|
nsCString aProtocol,
|
|
|
|
bool aSecure,
|
|
|
|
// ping values only meaningful if client set them
|
|
|
|
uint32_t aPingInterval,
|
|
|
|
bool aClientSetPingInterval,
|
|
|
|
uint32_t aPingTimeout,
|
|
|
|
bool aClientSetPingTimeout,
|
2016-06-07 12:46:03 +03:00
|
|
|
OptionalLoadInfoArgs aLoadInfoArgs,
|
|
|
|
OptionalTransportProvider aProvider,
|
|
|
|
nsCString aNegotiatedExtensions);
|
2016-01-27 00:51:53 +03:00
|
|
|
async Close(uint16_t code, nsCString reason);
|
|
|
|
async SendMsg(nsCString aMsg);
|
|
|
|
async SendBinaryMsg(nsCString aMsg);
|
2017-03-09 16:10:24 +03:00
|
|
|
async SendBinaryStream(IPCStream aStream, uint32_t aLength);
|
2016-01-27 00:51:53 +03:00
|
|
|
|
|
|
|
async DeleteSelf();
|
2011-05-04 17:36:23 +04:00
|
|
|
|
|
|
|
child:
|
|
|
|
// Forwarded notifications corresponding to the nsIWebSocketListener interface
|
2016-01-27 00:51:53 +03:00
|
|
|
async OnStart(nsCString aProtocol, nsCString aExtensions,
|
|
|
|
nsString aEffectiveURL, bool aEncrypted);
|
|
|
|
async OnStop(nsresult aStatusCode);
|
|
|
|
async OnMessageAvailable(nsCString aMsg);
|
|
|
|
async OnBinaryMessageAvailable(nsCString aMsg);
|
|
|
|
async OnAcknowledge(uint32_t aSize);
|
|
|
|
async OnServerClose(uint16_t code, nsCString aReason);
|
|
|
|
|
|
|
|
async __delete__();
|
2011-05-04 17:36:23 +04:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} //namespace net
|
|
|
|
} //namespace mozilla
|