From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../http/nsIBackgroundChannelRegistrar.idl | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 netwerk/protocol/http/nsIBackgroundChannelRegistrar.idl (limited to 'netwerk/protocol/http/nsIBackgroundChannelRegistrar.idl') diff --git a/netwerk/protocol/http/nsIBackgroundChannelRegistrar.idl b/netwerk/protocol/http/nsIBackgroundChannelRegistrar.idl new file mode 100644 index 0000000000..025dcebf51 --- /dev/null +++ b/netwerk/protocol/http/nsIBackgroundChannelRegistrar.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* 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/. */ + +#include "nsISupports.idl" + +%{ C++ +namespace mozilla { +namespace net { +class HttpBackgroundChannelParent; +class HttpChannelParent; +} +} +%} + +[ptr] native HttpChannelParent(mozilla::net::HttpChannelParent); +[ptr] native HttpBackgroundChannelParent(mozilla::net::HttpBackgroundChannelParent); + +/* + * Registrar for pairing HttpChannelParent and HttpBackgroundChannelParent via + * channel Id. HttpChannelParent::OnBackgroundParentReady and + * HttpBackgroundChannelParent::LinkToChannel will be invoked to notify the + * existence of associated channel object. + */ +[uuid(8acaa9b1-f0c4-4ade-baeb-39b0d4b96e5b)] +interface nsIBackgroundChannelRegistrar : nsISupports +{ + /* + * Link the provided channel parent actor with the given channel Id. + * callbacks will be invoked immediately when the HttpBackgroundChannelParent + * associated with the same channel Id is found. Store the HttpChannelParent + * until a matched linkBackgroundChannel is invoked. + * + * @param aKey the channel Id + * @param aChannel the channel parent actor to be paired + */ + [noscript,notxpcom,nostdcall] void linkHttpChannel(in uint64_t aKey, + in HttpChannelParent aChannel); + + /* + * Link the provided background channel with the given channel Id. + * callbacks will be invoked immediately when the HttpChannelParent associated + * with the same channel Id is found. Store the HttpBackgroundChannelParent + * until a matched linkHttpChannel is invoked. + * + * @param aKey the channel Id + * @param aBgChannel the background channel to be paired + */ + [noscript,notxpcom,nostdcall] void linkBackgroundChannel(in uint64_t aKey, + in HttpBackgroundChannelParent aBgChannel); + + /* + * Delete previous stored HttpChannelParent or HttpBackgroundChannelParent + * if no need to wait for the paired channel object, e.g. background channel + * is destroyed before pairing is completed. + * + * @param aKey the channel Id + */ + [noscript,notxpcom,nostdcall] void deleteChannel(in uint64_t aKey); + +}; -- cgit v1.2.3