gecko/netwerk/base/public/nsIRedirectChannelRegistrar.idl
Ehsan Akhgari 8c296bbcd4 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00

73 lines
2.6 KiB
Plaintext

/* 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"
interface nsIChannel;
interface nsIParentChannel;
/**
* Used on the chrome process as a service to join channel implementation
* and parent IPC protocol side under a unique id. Provides this way a generic
* communication while redirecting to various protocols.
*
* See also nsIChildChannel and nsIParentChannel.
*/
[scriptable, uuid (efa36ea2-5b07-46fc-9534-a5acb8b77b72)]
interface nsIRedirectChannelRegistrar : nsISupports
{
/**
* Register the redirect target channel and obtain a unique ID for that
* channel.
*
* Primarily used in HttpChannelParentListener::AsyncOnChannelRedirect to get
* a channel id sent to the HttpChannelChild being redirected.
*/
uint32_t registerChannel(in nsIChannel channel);
/**
* First, search for the channel registered under the id. If found return
* it. Then, register under the same id the parent side of IPC protocol
* to let it be later grabbed back by the originator of the redirect and
* notifications from the real channel could be forwarded to this parent
* channel.
*
* Primarily used in parent side of an IPC protocol implementation
* in reaction to nsIChildChannel.connectParent(id) called from the child
* process.
*/
nsIChannel linkChannels(in uint32_t id, in nsIParentChannel channel);
/**
* Returns back the channel previously registered under the ID with
* registerChannel method.
*
* Primarilly used in chrome IPC side of protocols when attaching a redirect
* target channel to an existing 'real' channel implementation.
*/
nsIChannel getRegisteredChannel(in uint32_t id);
/**
* Returns the stream listener that shall be attached to the redirect target
* channel, all notification from the redirect target channel will be
* forwarded to this stream listener.
*
* Primarilly used in HttpChannelParentListener::OnRedirectResult callback
* to grab the created parent side of the channel and forward notifications
* to it.
*/
nsIParentChannel getParentChannel(in uint32_t id);
/**
* To not force all channel implementations to support weak reference
* consumers of this service must ensure release of registered channels them
* self. This releases both the real and parent channel registered under
* the id.
*
* Primarilly used in HttpChannelParentListener::OnRedirectResult callback.
*/
void deregisterChannels(in uint32_t id);
};