gecko-dev/netwerk/protocol/http/public/nsIHTTPProtocolHandler.idl

62 строки
1.9 KiB
Plaintext

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsIProtocolHandler.idl"
interface nsIInputStream;
[scriptable, uuid(ad1d53ae-3e25-11d3-8cd3-0060b0fc14a3)]
interface nsIHTTPProtocolHandler : nsIProtocolHandler
{
const unsigned long ENCODE_NORMAL = 0;
const unsigned long ENCODE_ADD_CRLF = (1 << 0);
const unsigned long ENCODE_QUOTE_LINES = (1 << 1);
/**
*
*/
nsIInputStream NewEncodeStream(in nsIInputStream rawStream,
in unsigned long encodeFlags);
/**
*
*/
nsIInputStream NewDecodeStream(in nsIInputStream encodedStream,
in unsigned long encodeFlags);
/**
*
*/
nsIInputStream NewPostDataStream(in boolean isFile,
in string data,
in unsigned long encodeFlags);
};
%{C++
//Possible errors
#define NS_ERROR_BAD_REQUEST NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 200)
#define NS_ERROR_BUSY NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 201)
// Create (or get) HTTP Handler
extern NS_METHOD NS_CreateOrGetHTTPHandler(nsIHTTPProtocolHandler* *o_HTTPHandler);
%}