зеркало из https://github.com/mozilla/gecko-dev.git
First whack at various external module apis.
This commit is contained in:
Родитель
b4f15664bc
Коммит
287e938586
|
@ -0,0 +1,40 @@
|
|||
/* -*- Mode: IDL; tab-width: 4; 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.
|
||||
*/
|
||||
|
||||
/* The internal networking library http outgoing interface. External modules
|
||||
* desiring to receive notification of internal http events implement this
|
||||
* interface, and pass it into the nsINetModuleMgr Register and Unregister
|
||||
* methods.
|
||||
*
|
||||
* All calls are asyncronous.
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(8D9430E0-0FB4-11d3-9DE6-0010A4053FD0)]
|
||||
interface nsIHttpNotify : nsISupports {
|
||||
// Once all http headers have been downloaded and parsed out of the
|
||||
// stream, this method is called.
|
||||
//
|
||||
// ARGUMENTS:
|
||||
// aHeaders: All http headers (as defined in
|
||||
// http://www.w3.org/Protocols/HTTP/1.0/spec.html#Message-Headers)
|
||||
//
|
||||
// RETURNS: nsresult
|
||||
void OnHeaders(in string aHeaders);
|
||||
};
|
|
@ -0,0 +1,45 @@
|
|||
/* -*- Mode: IDL; tab-width: 4; 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 "nsISupports.idl"
|
||||
|
||||
/* The nsINetAppNegotiater interface provides an api that allows dialogs
|
||||
* to be thrown outside of netlib (perhaps on another thread).
|
||||
* When dialogs would
|
||||
* be thrown on another thread, NSPR syncronous events are used.
|
||||
* All the Async* calls are asyncronous calls.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(8D9430E1-0FB4-11d3-9DE6-0010A4053FD0)]
|
||||
interface nsINetAppNegotiater : nsISupports {
|
||||
// Causes a modal dialog to be thrown.
|
||||
//
|
||||
// ARGUMENTS:
|
||||
// aIUsername: a username, if any.
|
||||
// aOUsername: a new username.
|
||||
// aPassword: a password.
|
||||
//
|
||||
// RETURNS: nsresult
|
||||
void DlgPromptUsernamePassword(in string aIUsername, out string aOUsername, out string aPassword);
|
||||
|
||||
// Initializes a progress Dialog.
|
||||
void AsyncProgressInit();
|
||||
|
||||
// Updates status.
|
||||
void AsyncProgress();
|
||||
};
|
|
@ -0,0 +1,62 @@
|
|||
/* -*- Mode: IDL; tab-width: 4; 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.
|
||||
*/
|
||||
|
||||
/* The nsINetModuleMgr singleton service allows external module to register
|
||||
* themselves with the networking library to receive events they want to
|
||||
* receive.
|
||||
*
|
||||
* An external module that is interested in being notified when a particular
|
||||
* networking level event occurs would register with this service, and
|
||||
* implement the appropriate interface(s) that correspond to the events they
|
||||
* want to receive. These interfaces are defined by networking internal
|
||||
* components (for example, http would define a notification interface that
|
||||
* the external cookies module would implement).
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(ff9ead40-0ef2-11d3-9de6-0010a4053fd0)]
|
||||
interface nsINetModuleMgr : nsISupports {
|
||||
|
||||
// Register the external module to receive notifications.
|
||||
//
|
||||
// ARGUMENTS:
|
||||
// aComponent: The internal component that the external module wants to monitor.
|
||||
// aEventQueue: The event queue to receive the events.
|
||||
// aNotify: The external module interface methods to be called when an event is fired.
|
||||
//
|
||||
// RETURNS: nsresult
|
||||
void RegisterModule(in string aComponent, in nsIEventQueue* aEventQueue, in nsINetNotify aNotify);
|
||||
|
||||
// Unregister the external module. Removes the nsINetModuleMgr binding between
|
||||
// internal component and external module.
|
||||
//
|
||||
// ARGUMENTS:
|
||||
// aComponent: The internal component being monitored.
|
||||
// aNotify: The external modules notification module.
|
||||
//
|
||||
// RETURNS: nsresult
|
||||
void UnregisterModule(in string aComponent, in nsINetNotify aNotify);
|
||||
|
||||
// Enumerates all the registered modules for the specified component.
|
||||
//
|
||||
// ARGUMENTS:
|
||||
// aComponent: the component to get all the notifiers for.
|
||||
// aNotifiers: the array of notifiers.
|
||||
void EnumerateModules(in string aComponent, out nsINetNotify* ** aNotifiers);
|
||||
};
|
Загрузка…
Ссылка в новой задаче