diff --git a/mozilla/netwerk/base/public/idl/nsINetAppNegotiator.idl b/mozilla/netwerk/base/public/idl/nsINetAppNegotiator.idl new file mode 100644 index 00000000000..d5b2f4666a1 --- /dev/null +++ b/mozilla/netwerk/base/public/idl/nsINetAppNegotiator.idl @@ -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 nsINetAppNegotiator 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 nsINetAppNegotiator : 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(); +}; \ No newline at end of file diff --git a/mozilla/netwerk/base/public/idl/nsINetModRegEntry.idl b/mozilla/netwerk/base/public/idl/nsINetModRegEntry.idl new file mode 100644 index 00000000000..2cb6891e410 --- /dev/null +++ b/mozilla/netwerk/base/public/idl/nsINetModRegEntry.idl @@ -0,0 +1,38 @@ +/* -*- 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. + */ + +/* This interface defines a registry entry for the networking libraries + * external module registry. */ + +#include "nsISupports.idl" + +interface nsINetNotify; +interface nsIEventQueue; + +%{ C++ +// {F126BD90-1472-11d3-A15A-0050041CAF44} +#define NS_NETMODREGENTRY_CID \ +{ 0xf126bd90, 0x1472, 0x11d3, { 0xa1, 0x5a, 0x0, 0x50, 0x4, 0x1c, 0xaf, 0x44 } } +%} + +[scriptable, uuid(9F482BD0-1476-11d3-A15A-0050041CAF44)] +interface nsINetModRegEntry : nsISupports { + readonly attribute nsINetNotify mNotify; + readonly attribute nsIEventQueue mEventQ; + readonly attribute string mTopic; +}; diff --git a/mozilla/netwerk/base/public/idl/nsINetModuleMgr.idl b/mozilla/netwerk/base/public/idl/nsINetModuleMgr.idl new file mode 100644 index 00000000000..511d56378ab --- /dev/null +++ b/mozilla/netwerk/base/public/idl/nsINetModuleMgr.idl @@ -0,0 +1,73 @@ +/* -*- 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" +#include "nsIEnumerator.idl" + +interface nsIEventQueue; +interface nsINetNotify; + +%{ C++ + +// {4EBDAFE0-13BA-11d3-A15A-0050041CAF44} +#define NS_NETMODULEMGR_CID \ +{ 0x4ebdafe0, 0x13ba, 0x11d3, { 0xa1, 0x5a, 0x0, 0x50, 0x4, 0x1c, 0xaf, 0x44 } } +%} + +[scriptable, uuid(ff9ead40-0ef2-11d3-9de6-0010a4053fd0)] +interface nsINetModuleMgr : nsISupports { + + // Register the external module to receive notifications. + // + // ARGUMENTS: + // aTopic: 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 aTopic, in nsIEventQueue aEventQueue, in nsINetNotify aNotify); + + // Unregister the external module. Removes the nsINetModuleMgr binding between + // internal component and external module. + // + // ARGUMENTS: + // aTopic: The internal component being monitored. + // aNotify: The external modules notification module. + // + // RETURNS: nsresult + void UnregisterModule(in string aTopic, in nsIEventQueue aEventQueue, in nsINetNotify aNotify); + + // Enumerates all the registered modules for the specified topic. + // + // ARGUMENTS: + // aTopic: the component to get all the notifiers for. + // aEnumerator: the array of notifiers. + void EnumerateModules(in string aTopic, out nsISimpleEnumerator aEnumerator); +}; \ No newline at end of file diff --git a/mozilla/netwerk/base/public/nsNetModRegEntry.h b/mozilla/netwerk/base/public/nsNetModRegEntry.h new file mode 100644 index 00000000000..c862768aa03 --- /dev/null +++ b/mozilla/netwerk/base/public/nsNetModRegEntry.h @@ -0,0 +1,44 @@ +/* -*- 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. + */ + +#ifndef ___nsNetModRegEntry_h___ +#define ___nsNetModRegEntry_h___ + +#include "nsINetModRegEntry.h" + +class nsNetModRegEntry : nsINetModRegEntry { +public: + // nsISupports + NS_DECL_ISUPPORTS + + // nsINetModRegEntry + NS_IMETHOD GetmNotify(nsINetNotify **aNotify); + NS_IMETHOD GetmEventQ(nsIEventQueue **aEventQ); + NS_IMETHOD GetmTopic(char **aTopic); + + // nsNetModRegEntry + nsNetModRegEntry(char *aTopic, nsIEventQueue *aEventQ, nsINetNotify *aNotify); + ~nsNetModRegEntry(); + +private: + char *mTopic; + nsIEventQueue *mEventQ; + nsINetNotify *mNotify; +}; + +#endif //___nsNetModRegEntry_h___ \ No newline at end of file diff --git a/mozilla/netwerk/base/public/nsNetModuleMgr.h b/mozilla/netwerk/base/public/nsNetModuleMgr.h new file mode 100644 index 00000000000..fc2676e5a69 --- /dev/null +++ b/mozilla/netwerk/base/public/nsNetModuleMgr.h @@ -0,0 +1,46 @@ +/* -*- 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. + */ + +#ifndef ___nsNetModuleMgr_h__ +#define ___nsNetModuleMgr_h__ + +#include "nsINetModuleMgr.h" +#include "prlock.h" +#include "nsISupportsArray.h" + +class nsNetModuleMgr : public nsINetModuleMgr { +public: + // nsISupports + NS_DECL_ISUPPORTS + + // nsINetModuleMgr + NS_IMETHOD RegisterModule(const char *aTopic, nsIEventQueue *aEventQueue, nsINetNotify *aNotify); + NS_IMETHOD UnregisterModule(const char *aTopic, nsIEventQueue *aEventQueue, nsINetNotify *aNotify); + NS_IMETHOD EnumerateModules(const char *aTopic, nsISimpleEnumerator **aEnumerator); + + // nsNetModuleMgr + nsNetModuleMgr(); + ~nsNetModuleMgr(); + +private: + nsISupportsArray *mEntries; + PR_Lock *mLock; +} + + +#endif // ___nsNetModuleMgr_h__ \ No newline at end of file