mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 02:31:41 +00:00
Switching xpfe components to use XPIDL
This commit is contained in:
parent
46b4880bb1
commit
8ecbd24288
@ -497,7 +497,7 @@ sub BuildClientDist()
|
||||
InstallFromManifest(":mozilla:xpfe:components:public:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
|
||||
# find
|
||||
InstallFromManifest(":mozilla:xpfe:components:find:public:MANIFEST", "$distdirectory:xpfe:components");
|
||||
InstallFromManifest(":mozilla:xpfe:components:find:public:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
|
||||
# history
|
||||
InstallFromManifest(":mozilla:xpfe:components:history:public:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
@ -509,11 +509,13 @@ sub BuildClientDist()
|
||||
InstallFromManifest(":mozilla:xpfe:components:prefwindow:public:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
|
||||
# sample
|
||||
InstallFromManifest(":mozilla:xpfe:components:sample:public:MANIFEST", "$distdirectory:xpfe:components");
|
||||
InstallFromManifest(":mozilla:xpfe:components:sample:public:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
# ucth
|
||||
InstallFromManifest(":mozilla:xpfe:components:ucth:public:MANIFEST", "$distdirectory:xpfe:components");
|
||||
InstallFromManifest(":mozilla:xpfe:components:ucth:public:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
# xfer
|
||||
InstallFromManifest(":mozilla:xpfe:components:xfer:public:MANIFEST", "$distdirectory:xpfe:components");
|
||||
InstallFromManifest(":mozilla:xpfe:components:xfer:public:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
|
||||
BuildIDLProject(":mozilla:xpfe:components:macbuild:mozcompsIDL.mcp", "mozcomps");
|
||||
|
||||
# XPAPPS
|
||||
InstallFromManifest(":mozilla:xpfe:AppCores:public:MANIFEST", "$distdirectory:xpfe:");
|
||||
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
nsIFindComponent.h
|
||||
|
@ -23,9 +23,14 @@ srcdir = @srcdir@
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXPORTS = \
|
||||
nsIFindComponent.h \
|
||||
$(NULL)
|
||||
|
||||
XPIDL_MODULE=mozfind
|
||||
|
||||
XPIDLSRCS=\
|
||||
nsIFindComponent.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!gmake
|
||||
#!nmake
|
||||
#
|
||||
# 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
|
||||
@ -21,7 +21,13 @@ MODULE=xpfe\components
|
||||
|
||||
DEPTH=..\..\..\..
|
||||
|
||||
EXPORTS=nsIFindComponent.h \
|
||||
EXPORTS=\
|
||||
$(NULL)
|
||||
|
||||
XPIDL_MODULE=mozfind
|
||||
|
||||
XPIDLSRCS=\
|
||||
.\nsIFindComponent.idl \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
@ -1,122 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* 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 __nsIFindComponent_h
|
||||
#define __nsIFindComponent_h
|
||||
|
||||
#include "nsIAppShellComponent.h"
|
||||
|
||||
class nsIWebShell;
|
||||
class nsIEditor;
|
||||
|
||||
// a6cf90ee-15b3-11d2-932e-00805f8add32
|
||||
#define NS_IFINDCOMPONENT_IID \
|
||||
{ 0xa6cf90ee, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} };
|
||||
#define NS_IFINDCOMPONENT_PROGID NS_IAPPSHELLCOMPONENT_PROGID "/find"
|
||||
#define NS_IFINDCOMPONENT_CLASSNAME "Mozilla Find Component"
|
||||
|
||||
/*----------------------------- nsIFindComponent -------------------------------
|
||||
| This file describes the interface for Mozilla's pluggable "find" component |
|
||||
| that provides the implementation of the browser's "find in document" |
|
||||
| function (and perhaps will be generalized to support similar searching in |
|
||||
| other contexts). |
|
||||
| |
|
||||
| The component itself is a singleton (one per executing application). To |
|
||||
| handle searching on a per-document basis, this interface supplies a |
|
||||
| CreateContext() function that creates a search context (generally, on a |
|
||||
| per document, and thus per-browser-window, basis). |
|
||||
| |
|
||||
| The component itself will "remember" the last string searched (via any |
|
||||
| context). This way, a search in a new context (browser window) will be |
|
||||
| able to search for the same string (by default). |
|
||||
| |
|
||||
| Clients (e.g., the browser window object) will generally use this interface |
|
||||
| in this manner: |
|
||||
| 1. Hold a reference to the singleton "find component". |
|
||||
| 2. On initial search, ask that component to create a search "context." |
|
||||
| 3. Reset the context whenever the underlying web shell changes (but since |
|
||||
| a browser will usually reuse a single web shell, this won't be of |
|
||||
| concern except in obscure cases). |
|
||||
| 4. Forward "find" and "find next" requests to the component, along |
|
||||
| with the appropriate search context object. |
|
||||
| 5. Release() the search context object and the find component when the |
|
||||
| browser window closes. |
|
||||
------------------------------------------------------------------------------*/
|
||||
struct nsIFindComponent : public nsIAppShellComponent {
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR( NS_IFINDCOMPONENT_IID )
|
||||
|
||||
/*---------------------------- CreateContext -------------------------------
|
||||
| Create a "search context" for the given document. Subsequent Find and |
|
||||
| FindNext requests that provide the returned search context will find |
|
||||
| the appropriate search string in aWebShell. |
|
||||
| |
|
||||
| The editor that's passed in is only required for replace. If you pass |
|
||||
| in a read-only webshell, then pass nsnull for the editor. |
|
||||
| |
|
||||
| The result is of the xpcom equivalent of an opaque type. It's true type |
|
||||
| is defined by the implementation of this interface. Clients ought never |
|
||||
| have to do QueryInterface to convert this to something more elaborate. |
|
||||
| Clients do have to call Release() when they're no longer interested in |
|
||||
| this search context. |
|
||||
--------------------------------------------------------------------------*/
|
||||
NS_IMETHOD CreateContext( nsIWebShell *aWebShell, nsIEditor* aEditor,
|
||||
nsISupports **aResult ) = 0;
|
||||
|
||||
/*--------------------------------- Find -----------------------------------
|
||||
| Finds the "first" occurrence of a string in the given search context |
|
||||
| (i.e., document). |
|
||||
| |
|
||||
| Please note that you don't provide the string to search for! |
|
||||
| |
|
||||
| This might seem odd, but that's the way it's designed. Prompting the |
|
||||
| user for the string (and for various search options such as "ignore |
|
||||
| case" and "search backward") is up to the implementation of this |
|
||||
| component. |
|
||||
--------------------------------------------------------------------------*/
|
||||
NS_IMETHOD Find( nsISupports *aContext, PRBool *aDidFind) = 0;
|
||||
|
||||
/*--------------------------------- Replace -----------------------------------
|
||||
| Replace the currently selected text. It is intended that the string used |
|
||||
| for replacement is sourced internally to the component (e.g. from a |
|
||||
| search/replace dialog). |
|
||||
| |
|
||||
| Returns an error if the current context does not allow replacement. |
|
||||
| |
|
||||
--------------------------------------------------------------------------*/
|
||||
NS_IMETHOD Replace( nsISupports *aContext ) = 0;
|
||||
|
||||
/*------------------------------- FindNext ---------------------------------
|
||||
| Finds the next occurrence (of the previously searched for string) in |
|
||||
| the given search context (document). |
|
||||
| |
|
||||
| If no previous Find has been performed with this context, then the |
|
||||
| find component will use the last find performed for any context. |
|
||||
--------------------------------------------------------------------------*/
|
||||
NS_IMETHOD FindNext( nsISupports *aContext, PRBool *aDidFind) = 0;
|
||||
|
||||
/*----------------------------- ResetContext -------------------------------
|
||||
| Reset the given search context to search a new web shell. Generally, |
|
||||
| this will be the equivalent of calling Release() on the old context and |
|
||||
| then creating a new one for aNewWebShell. |
|
||||
--------------------------------------------------------------------------*/
|
||||
NS_IMETHOD ResetContext( nsISupports *aContext, nsIEditor* aEditor,
|
||||
nsIWebShell *aNewWebShell ) = 0;
|
||||
|
||||
}; // nsIFindComponent
|
||||
|
||||
|
||||
#endif
|
@ -702,8 +702,9 @@ nsFindComponent::FindNext(nsISupports *aContext, PRBool *aDidFind)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFindComponent::ResetContext( nsISupports *aContext, nsIEditor* aEditor,
|
||||
nsIWebShell *aNewWebShell )
|
||||
nsFindComponent::ResetContext( nsISupports *aContext,
|
||||
nsIWebShell *aNewWebShell,
|
||||
nsIEditor* aEditor )
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
if ( aContext && aNewWebShell ) {
|
||||
|
@ -39,11 +39,7 @@ public:
|
||||
NS_DECL_IAPPSHELLCOMPONENT
|
||||
|
||||
// This class implements the nsIFindComponent interface functions.
|
||||
NS_IMETHOD CreateContext(nsIWebShell *aWebShell, nsIEditor* aEditor, nsISupports **aResult);
|
||||
NS_IMETHOD Find(nsISupports *aContext, PRBool *aDidFind);
|
||||
NS_IMETHOD Replace(nsISupports *aContext);
|
||||
NS_IMETHOD FindNext(nsISupports *aContext, PRBool *aDidFind);
|
||||
NS_IMETHOD ResetContext(nsISupports *aContext, nsIEditor* aEditor, nsIWebShell *aNewWebShell);
|
||||
NS_DECL_IFINDCOMPONENT
|
||||
|
||||
// "Context" for this implementation.
|
||||
class Context : public nsISupports
|
||||
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
nsISampleAppShellComponent.h
|
||||
|
@ -23,9 +23,14 @@ srcdir = @srcdir@
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXPORTS = \
|
||||
nsISampleAppShellComponent.h \
|
||||
$(NULL)
|
||||
|
||||
XPIDL_MODULE=mozsampl
|
||||
|
||||
XPIDLSRCS=\
|
||||
nsISampleAppShellComponent.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -22,7 +22,12 @@ MODULE=xpfe\components
|
||||
DEPTH=..\..\..\..
|
||||
|
||||
EXPORTS=\
|
||||
nsISampleAppShellComponent.h \
|
||||
$(NULL)
|
||||
|
||||
XPIDL_MODULE=mozsampl
|
||||
|
||||
XPIDLSRCS=\
|
||||
.\nsISampleAppShellComponent.idl \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
@ -1,56 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* 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 __nsISampleAppShellComponent_h
|
||||
#define __nsISampleAppShellComponent_h
|
||||
|
||||
#include "nsIAppShellComponent.h"
|
||||
|
||||
/* a6cf90fe-15b3-11d2-932e-00805f8add32 */
|
||||
#define NS_ISAMPLEAPPSHELLCOMPONENT_IID \
|
||||
{ 0xa6cf90fe, 0x15b3, 0x11d2, { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } }
|
||||
#define NS_ISAMPLEAPPSHELLCOMPONENT_PROGID NS_IAPPSHELLCOMPONENT_PROGID "/sample"
|
||||
#define NS_ISAMPLEAPPSHELLCOMPONENT_CLASSNAME "Mozilla Sample App Shell Component"
|
||||
|
||||
/*------------------------ nsISampleAppShellComponent --------------------------
|
||||
| This file describes the interface for a sample "application shell |
|
||||
| component." |
|
||||
| |
|
||||
| The sample component demonstrates most of what you need to know to |
|
||||
| implement your own appshell components. In addition, it provides some |
|
||||
| facilities for testing XUL dialogs. |
|
||||
| |
|
||||
| You don't need to put those in your component! |
|
||||
------------------------------------------------------------------------------*/
|
||||
struct nsISampleAppShellComponent : public nsIAppShellComponent {
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR( NS_ISAMPLEAPPSHELLCOMPONENT_IID )
|
||||
|
||||
/*---------------------------- DoDialogTests -------------------------------
|
||||
| Displays a dialog from which you can click buttons to perform these |
|
||||
| dialogs tests: |
|
||||
| o Non-modal dialog from C++ |
|
||||
| o Non-modal dialog from JavaScript |
|
||||
| o Modal dialog from C++ |
|
||||
| o Modal dialog from JavaScript |
|
||||
--------------------------------------------------------------------------*/
|
||||
NS_IMETHOD DoDialogTests() = 0;
|
||||
}; // nsISampleAppShellComponent
|
||||
|
||||
#define NS_DECL_ISAMPLEAPPSHELLCOMPONENT \
|
||||
NS_IMETHOD DoDialogTests();
|
||||
|
||||
#endif
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
nsIUnknownContentTypeHandler.h
|
||||
|
@ -23,9 +23,14 @@ srcdir = @srcdir@
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXPORTS = \
|
||||
nsIUnknownContentTypeHandler.h \
|
||||
$(NULL)
|
||||
|
||||
XPIDL_MODULE=mozucth
|
||||
|
||||
XPIDLSRCS=\
|
||||
nsIUnknownContentTypeHandler.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -22,7 +22,12 @@ MODULE=xpfe\components
|
||||
DEPTH=..\..\..\..
|
||||
|
||||
EXPORTS=\
|
||||
nsIUnknownContentTypeHandler.h \
|
||||
$(NULL)
|
||||
|
||||
XPIDL_MODULE=mozucth
|
||||
|
||||
XPIDLSRCS=\
|
||||
.\nsIUnknownContentTypeHandler.idl \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
@ -1,61 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* 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 __nsIUnknownContentTypeHandler_h
|
||||
#define __nsIUnknownContentTypeHandler_h
|
||||
|
||||
#include "nsIAppShellComponent.h"
|
||||
|
||||
class nsIURL;
|
||||
class nsIDocumentLoader;
|
||||
|
||||
// a6cf90ef-15b3-11d2-932e-00805f8add32
|
||||
#define NS_IUNKNOWNCONTENTTYPEHANDLER_IID \
|
||||
{ 0xa6cf90ef, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
|
||||
#define NS_IUNKNOWNCONTENTTYPEHANDLER_PROGID NS_IAPPSHELLCOMPONENT_PROGID "/unknownContentType"
|
||||
#define NS_IUNKNOWNCONTENTTYPEHANDLER_CLASSNAME "Mozilla Unknown Content-Type Handler Component"
|
||||
|
||||
/*----------------------- nsIUnknownContentTypeHandler -------------------------
|
||||
| This file describes the interface for Mozilla's "unknown content-type |
|
||||
| handler" component. This component is notified whenever the browser |
|
||||
| encounters data of some unknown content (mime) type. |
|
||||
| |
|
||||
| This component provides one component-specific member function: |
|
||||
| HandleUnknownContentType. This method's areguments include: |
|
||||
| o the URL at which the content resides |
|
||||
| o the content-type |
|
||||
| o the window that encountered the unknown content. |
|
||||
| |
|
||||
| The expected response by implementors of this interface is to display a |
|
||||
| dialog prompting the user for direction on how to handle the content |
|
||||
| (e.g., download it, pick an application to use to view it, etc.) and then |
|
||||
| carry out that request (perhaps with assistance from other components). |
|
||||
------------------------------------------------------------------------------*/
|
||||
struct nsIUnknownContentTypeHandler : public nsIAppShellComponent {
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR( NS_IUNKNOWNCONTENTTYPEHANDLER_IID )
|
||||
|
||||
NS_IMETHOD HandleUnknownContentType( nsIURL *aURL,
|
||||
const char *aContentType,
|
||||
nsIDocumentLoader *aDocLoader ) = 0;
|
||||
}; // nsIUnknownContentTypeHandler
|
||||
|
||||
#define NS_DECL_IUNKNOWNCONTENTTYPEHANDLER \
|
||||
NS_IMETHOD HandleUnknownContentType( nsIURL *aURL, \
|
||||
const char *aContentType, \
|
||||
nsIDocumentLoader *aDocLoader );
|
||||
|
||||
#endif
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
nsIStreamTransfer.h
|
||||
|
@ -23,9 +23,14 @@ srcdir = @srcdir@
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXPORTS = \
|
||||
nsIStreamTransfer.h \
|
||||
$(NULL)
|
||||
|
||||
XPIDL_MODULE=mozxfer
|
||||
|
||||
XPIDLSRCS=\
|
||||
nsIStreamTransfer.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!gmake
|
||||
#!nmake
|
||||
#
|
||||
# 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
|
||||
@ -22,7 +22,12 @@ MODULE=xpfe\components
|
||||
DEPTH=..\..\..\..
|
||||
|
||||
EXPORTS=\
|
||||
nsIStreamTransfer.h \
|
||||
$(NULL)
|
||||
|
||||
XPIDL_MODULE=mozxfer
|
||||
|
||||
XPIDLSRCS=\
|
||||
.\nsIStreamTransfer.idl \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
@ -1,63 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* 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 __nsIStreamTransfer_h
|
||||
#define __nsIStreamTransfer_h
|
||||
|
||||
#include "nsIAppShellComponent.h"
|
||||
|
||||
class nsIURL;
|
||||
|
||||
/* a6cf90f0-15b3-11d2-932e-00805f8add32 */
|
||||
#define NS_ISTREAMTRANSFER_IID \
|
||||
{ 0xa6cf90f0, 0x15b3, 0x11d2, { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } }
|
||||
#define NS_ISTREAMTRANSFER_PROGID NS_IAPPSHELLCOMPONENT_PROGID "/xfer"
|
||||
#define NS_ISTREAMTRANSFER_CLASSNAME "Mozilla Stream Transfer Component"
|
||||
|
||||
/*----------------------------- nsIStreamTransfer ------------------------------
|
||||
| This file describes Mozilla's general-purpose "stream transfer" component. |
|
||||
| This component is used to display a progress dialog while performing any of |
|
||||
| a variety of different "stream transfers." |
|
||||
| |
|
||||
| Basically, this component transfers data from an input stream to an |
|
||||
| output stream while displaying a progress dialog. The component also |
|
||||
| offers some standard implementations of commonly-used input and output |
|
||||
| stream handlers (such as prompting for a destination file, writing the |
|
||||
| input stream to an output file, loading an input URL, etc.). |
|
||||
| |
|
||||
| Select the appropriate transfer function depending on your requirements. |
|
||||
| |
|
||||
| Note that all methods are "asynchronous" in that they return before the |
|
||||
| stream transfer is completed. The result generally indicates only whether |
|
||||
| or not the stream transfer was successfully initiated. |
|
||||
------------------------------------------------------------------------------*/
|
||||
struct nsIStreamTransfer : public nsIAppShellComponent {
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR( NS_ISTREAMTRANSFER_IID )
|
||||
|
||||
/*-------------------- SelectFileAndTransferLocation -----------------------
|
||||
| Prompt the user for a destination file and then transfer the data using |
|
||||
| the argument URL as source to that file, while showing a progress |
|
||||
| dialog. |
|
||||
--------------------------------------------------------------------------*/
|
||||
NS_IMETHOD SelectFileAndTransferLocation( nsIURL *aURL ) = 0;
|
||||
|
||||
}; // nsIStreamTransfer
|
||||
|
||||
#define NS_DECL_ISTREAMTRANSFER \
|
||||
NS_IMETHOD SelectFileAndTransferLocation( nsIURL *aURL );
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user