зеркало из https://github.com/mozilla/pjs.git
Replace manual method declarations in implementations of xpcom/ interfaces with NS_DECL_NSIFOO.
This commit is contained in:
Родитель
a1c6eb6459
Коммит
b95a2bdd54
|
@ -261,17 +261,9 @@ see the nsIEnumerator for more details*/
|
|||
|
||||
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
|
||||
|
||||
NS_IMETHOD First();
|
||||
NS_DECL_NSIENUMERATOR
|
||||
|
||||
NS_IMETHOD Last();
|
||||
|
||||
NS_IMETHOD Next();
|
||||
|
||||
NS_IMETHOD Prev();
|
||||
|
||||
NS_IMETHOD CurrentItem(nsISupports **aRange);
|
||||
|
||||
NS_IMETHOD IsDone();
|
||||
NS_DECL_NSIBIDIRECTIONALENUMERATOR
|
||||
|
||||
/*END nsIEnumerator interfaces*/
|
||||
/*BEGIN Helper Methods*/
|
||||
|
|
|
@ -2112,10 +2112,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIEnumerator methods:
|
||||
NS_IMETHOD First(void);
|
||||
NS_IMETHOD Next(void);
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem);
|
||||
NS_IMETHOD IsDone(void);
|
||||
NS_DECL_NSIENUMERATOR
|
||||
|
||||
// nsAddrDBEnumerator methods:
|
||||
|
||||
|
|
|
@ -201,25 +201,7 @@ public:
|
|||
nsMessageViewMessageEnumerator(nsIEnumerator *srcEnumerator, PRUint32 showStatus);
|
||||
virtual ~nsMessageViewMessageEnumerator();
|
||||
|
||||
//nsIEnumerator interface
|
||||
/** First will reset the list. will return NS_FAILED if no items
|
||||
*/
|
||||
NS_IMETHOD First(void);
|
||||
|
||||
/** Next will advance the list. will return failed if already at end
|
||||
*/
|
||||
NS_IMETHOD Next(void);
|
||||
|
||||
/** CurrentItem will return the CurrentItem item it will fail if the list is empty
|
||||
* @param aItem return value
|
||||
*/
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem);
|
||||
|
||||
/** return if the collection is at the end. that is the beginning following a call to Prev
|
||||
* and it is the end of the list following a call to next
|
||||
* @param aItem return value
|
||||
*/
|
||||
NS_IMETHOD IsDone(void);
|
||||
NS_DECL_NSIENUMERATOR
|
||||
|
||||
protected:
|
||||
nsresult SetAtNextItem();
|
||||
|
@ -242,25 +224,7 @@ public:
|
|||
nsMessageViewThreadEnumerator(nsIEnumerator *srcEnumerator, nsIMsgFolder *srcFolder);
|
||||
virtual ~nsMessageViewThreadEnumerator();
|
||||
|
||||
//nsIEnumerator interface
|
||||
/** First will reset the list. will return NS_FAILED if no items
|
||||
*/
|
||||
NS_IMETHOD First(void);
|
||||
|
||||
/** Next will advance the list. will return failed if already at end
|
||||
*/
|
||||
NS_IMETHOD Next(void);
|
||||
|
||||
/** CurrentItem will return the CurrentItem item it will fail if the list is empty
|
||||
* @param aItem return value
|
||||
*/
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem);
|
||||
|
||||
/** return if the collection is at the end. that is the beginning following a call to Prev
|
||||
* and it is the end of the list following a call to next
|
||||
* @param aItem return value
|
||||
*/
|
||||
NS_IMETHOD IsDone(void);
|
||||
NS_DECL_NSIENUMERATOR
|
||||
|
||||
protected:
|
||||
nsresult GetMessagesForCurrentThread();
|
||||
|
|
|
@ -48,10 +48,7 @@ public:
|
|||
nsMessageFromMsgHdrEnumerator(){} //Default constructor that does nothing so nsComPtr will work.
|
||||
virtual ~nsMessageFromMsgHdrEnumerator();
|
||||
|
||||
NS_IMETHOD First(void);
|
||||
NS_IMETHOD Next(void);
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem);
|
||||
NS_IMETHOD IsDone(void);
|
||||
NS_DECL_NSIENUMERATOR
|
||||
};
|
||||
|
||||
NS_MSG_BASE nsresult NS_NewMessageFromMsgHdrEnumerator(nsIEnumerator *srcEnumerator,
|
||||
|
|
|
@ -74,11 +74,10 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIBaseStream interface
|
||||
NS_IMETHOD Close(void);
|
||||
NS_DECL_NSIBASESTREAM
|
||||
|
||||
// nsIOutputStream interface
|
||||
NS_IMETHOD Write(const char* aBuf, PRUint32 aCount, PRUint32 *aWriteCount);
|
||||
NS_IMETHOD Flush(void);
|
||||
NS_DECL_NSIOUTPUTSTREAM
|
||||
|
||||
// nsIMsgSendLater support
|
||||
NS_IMETHOD SendUnsentMessages(nsIMsgIdentity *identity,
|
||||
|
|
|
@ -1573,10 +1573,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIEnumerator methods:
|
||||
NS_IMETHOD First(void);
|
||||
NS_IMETHOD Next(void);
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem);
|
||||
NS_IMETHOD IsDone(void);
|
||||
NS_DECL_NSIENUMERATOR
|
||||
|
||||
// nsMsgDBEnumerator methods:
|
||||
typedef nsresult (*nsMsgDBEnumeratorFilter)(nsIMsgDBHdr* hdr, void* closure);
|
||||
|
@ -1750,10 +1747,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIEnumerator methods:
|
||||
NS_IMETHOD First(void);
|
||||
NS_IMETHOD Next(void);
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem);
|
||||
NS_IMETHOD IsDone(void);
|
||||
NS_DECL_NSIENUMERATOR
|
||||
|
||||
// nsMsgDBEnumerator methods:
|
||||
typedef nsresult (*nsMsgDBThreadEnumeratorFilter)(nsIMsgThread* hdr, void* closure);
|
||||
|
|
|
@ -492,10 +492,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIEnumerator methods:
|
||||
NS_IMETHOD First(void);
|
||||
NS_IMETHOD Next(void);
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem);
|
||||
NS_IMETHOD IsDone(void);
|
||||
NS_DECL_NSIENUMERATOR
|
||||
|
||||
// nsMsgThreadEnumerator methods:
|
||||
typedef nsresult (*nsMsgThreadEnumeratorFilter)(nsIMsgDBHdr* hdr, void* closure);
|
||||
|
|
|
@ -1,89 +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 plugin_inst_h_
|
||||
#define plugin_inst_h_
|
||||
|
||||
#include "nsIMimeEmitter.h"
|
||||
#include "nsINetOStream.h"
|
||||
#include "nsINetPluginInstance.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
// The ProgID for message/rfc822 messages
|
||||
#define PROGRAM_ID "message/rfc822"
|
||||
|
||||
// {B21EDB21-D10C-11d2-B373-525400E2D63A}
|
||||
#define NS_INET_PLUGIN_MIME_CID \
|
||||
{ 0xb21edb21, 0xd10c, 0x11d2, \
|
||||
{ 0xb3, 0x73, 0x52, 0x54, 0x0, 0xe2, 0xd6, 0x3a } }
|
||||
|
||||
class MimePluginInstance : public nsINetPluginInstance, public nsINetOStream {
|
||||
public:
|
||||
//static const nsIID& IID() { static nsIID iid = NS_INETPLUGININSTANCE_IID; return iid; }
|
||||
|
||||
MimePluginInstance(void);
|
||||
virtual ~MimePluginInstance(void);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
// from nsINetPluginInstance
|
||||
NS_IMETHOD Initialize(nsINetOStream* out_stream, const char *stream_name);
|
||||
NS_IMETHOD GetMIMEOutput(const char* *result, const char *stream_name);
|
||||
NS_IMETHOD Start(void);
|
||||
NS_IMETHOD Stop(void);
|
||||
NS_IMETHOD Destroy(void);
|
||||
|
||||
//nsINetOStream interface
|
||||
NS_IMETHOD Complete(void);
|
||||
NS_IMETHOD Abort(PRInt32 status);
|
||||
NS_IMETHOD WriteReady(PRUint32 *aReadyCount);
|
||||
|
||||
// nsIOutputStream interface
|
||||
NS_IMETHOD Write(const char *aBuf,
|
||||
PRUint32 aLen,
|
||||
PRUint32 *aWriteLength);
|
||||
NS_IMETHOD Flush(void) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
// nsIBaseStream interface
|
||||
NS_IMETHOD Close(void);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// MimePluginInstance specific methods:
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
NS_IMETHOD InternalCleanup(void);
|
||||
NS_IMETHOD DetermineOutputFormat(const char *url);
|
||||
|
||||
// Counter variable
|
||||
PRInt32 mTotalRead;
|
||||
|
||||
nsINetOStream *mOutStream;
|
||||
void *mBridgeStream;
|
||||
nsCOMPtr<nsIMimeEmitter> mEmitter;
|
||||
|
||||
// Type of output, entire message, header only, body only
|
||||
char *mOutputFormat;
|
||||
PRBool mWrapperOutput; /* Should we output the frame split message display */
|
||||
char *mURL;
|
||||
};
|
||||
|
||||
/* this function will be used by the factory to generate an class access object....*/
|
||||
extern "C" nsresult NS_NewMimePluginInstance(MimePluginInstance **aInstancePtrResult);
|
||||
|
||||
#endif /* plugin_inst_h_ */
|
|
@ -123,10 +123,7 @@ struct nsRegSubtreeEnumerator : public nsIEnumerator {
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// This class implements the nsIEnumerator interface functions.
|
||||
NS_IMETHOD First();
|
||||
NS_IMETHOD Next();
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem);
|
||||
NS_IMETHOD IsDone();
|
||||
NS_DECL_NSIENUMERATOR
|
||||
|
||||
// ctor/dtor
|
||||
nsRegSubtreeEnumerator( HREG hReg, RKEY rKey, PRBool all );
|
||||
|
|
|
@ -396,36 +396,8 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIBaseStream:
|
||||
|
||||
/** Close the stream. */
|
||||
NS_IMETHOD
|
||||
Close(void);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIInputStream:
|
||||
|
||||
/** Return the number of bytes in the stream
|
||||
* @param aLength out parameter to hold the length
|
||||
* of the stream. if an error occurs, the length
|
||||
* will be undefined
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetLength(PRUint32 *aLength);
|
||||
|
||||
/** Read data from the stream.
|
||||
* @param aErrorCode the error code if an error occurs
|
||||
* @param aBuf the buffer into which the data is read
|
||||
* @param aCount the maximum number of bytes to read
|
||||
* @param aReadCount out parameter to hold the number of
|
||||
* bytes read, eof if 0. if an error occurs, the
|
||||
* read count will be undefined
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD
|
||||
Read(char* aBuf, PRUint32 aCount, PRUint32 *aReadCount);
|
||||
NS_DECL_NSIBASESTREAM
|
||||
NS_DECL_NSIINPUTSTREAM
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIPluginInputStream:
|
||||
|
|
|
@ -396,36 +396,8 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIBaseStream:
|
||||
|
||||
/** Close the stream. */
|
||||
NS_IMETHOD
|
||||
Close(void);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIInputStream:
|
||||
|
||||
/** Return the number of bytes in the stream
|
||||
* @param aLength out parameter to hold the length
|
||||
* of the stream. if an error occurs, the length
|
||||
* will be undefined
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetLength(PRUint32 *aLength);
|
||||
|
||||
/** Read data from the stream.
|
||||
* @param aErrorCode the error code if an error occurs
|
||||
* @param aBuf the buffer into which the data is read
|
||||
* @param aCount the maximum number of bytes to read
|
||||
* @param aReadCount out parameter to hold the number of
|
||||
* bytes read, eof if 0. if an error occurs, the
|
||||
* read count will be undefined
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD
|
||||
Read(char* aBuf, PRUint32 aCount, PRUint32 *aReadCount);
|
||||
NS_DECL_NSIBASESTREAM
|
||||
NS_DECL_NSIINPUTSTREAM
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIPluginInputStream:
|
||||
|
|
|
@ -660,6 +660,7 @@ public:
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIBaseStream:
|
||||
NS_DECL_NSIBASESTREAM
|
||||
|
||||
NS_IMETHOD
|
||||
Close(void);
|
||||
|
|
|
@ -41,37 +41,9 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIBaseStream:
|
||||
NS_DECL_NSIBASESTREAM
|
||||
|
||||
/** Close the stream. */
|
||||
NS_IMETHOD
|
||||
Close(void);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIInputStream:
|
||||
|
||||
/** Return the number of bytes in the stream
|
||||
* @param aLength out parameter to hold the length
|
||||
* of the stream. if an error occurs, the length
|
||||
* will be undefined
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetLength(PRInt32 *aLength);
|
||||
|
||||
/** Read data from the stream.
|
||||
* @param aErrorCode the error code if an error occurs
|
||||
* @param aBuf the buffer into which the data is read
|
||||
* @param aOffset the start offset of the data
|
||||
* @param aCount the maximum number of bytes to read
|
||||
* @param aReadCount out parameter to hold the number of
|
||||
* bytes read, eof if 0. if an error occurs, the
|
||||
* read count will be undefined
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD
|
||||
Read(char* aBuf, PRInt32 aOffset, PRInt32 aCount, PRInt32 *aReadCount);
|
||||
NS_DECL_NSIINPUTSTREAM
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIPluginInputStream:
|
||||
|
|
|
@ -27,9 +27,7 @@ public:
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIBaseStream:
|
||||
|
||||
NS_IMETHOD
|
||||
Close(void);
|
||||
NS_DECL_NSIBASESTREAM
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIOutputStream:
|
||||
|
|
|
@ -29,11 +29,10 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIBaseStream methods:
|
||||
NS_IMETHOD Close(void);
|
||||
NS_DECL_NSIBASESTREAM
|
||||
|
||||
// nsIInputStream methods:
|
||||
NS_IMETHOD GetLength(PRUint32 *result);
|
||||
NS_IMETHOD Read(char * buf, PRUint32 count, PRUint32 *result);
|
||||
NS_DECL_NSIINPUTSTREAM
|
||||
|
||||
// nsHTTPEncodeStream methods:
|
||||
nsHTTPEncodeStream();
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.1 (the "MPL"); you may not use this file except in
|
||||
* compliance with the MPL. 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 the Original Code is Alexander. Portions
|
||||
* created by Alexander Larsson are Copyright (C) 1999
|
||||
* Alexander Larsson. All Rights Reserved.
|
||||
*/
|
||||
#ifndef GTKMOZILLAINPUTSTREAM_H
|
||||
#define GTKMOZILLAINPUTSTREAM_H
|
||||
|
||||
#include "nsIInputStream.h"
|
||||
|
||||
class GtkMozillaInputStream : public nsIInputStream {
|
||||
public:
|
||||
GtkMozillaInputStream(void);
|
||||
~GtkMozillaInputStream(void);
|
||||
|
||||
// nsISupports interface
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIInputStream interface
|
||||
NS_IMETHOD GetLength(PRUint32 *aLength);
|
||||
|
||||
NS_IMETHOD Read(char* aBuf, PRUint32 aCount, PRUint32 *aReadCount);
|
||||
|
||||
// nsIBaseStream interface
|
||||
NS_IMETHOD Close(void);
|
||||
|
||||
// Specific interface
|
||||
NS_IMETHOD Fill(const char *buffer, PRUint32 aCount);
|
||||
NS_IMETHOD FillResult(PRUint32 *aReadCount);
|
||||
|
||||
protected:
|
||||
PRUint32 mReadCount;
|
||||
PRUint32 mCount;
|
||||
const char *mBuffer;
|
||||
};
|
||||
|
||||
|
||||
#endif /* GTKMOZILLAINPUTSTREAM_H */
|
|
@ -141,12 +141,8 @@ protected:
|
|||
Enumerator(nsBaseWidget & inParent);
|
||||
virtual ~Enumerator();
|
||||
|
||||
NS_IMETHOD First();
|
||||
NS_IMETHOD Last();
|
||||
NS_IMETHOD Next();
|
||||
NS_IMETHOD Prev();
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem);
|
||||
NS_IMETHOD IsDone();
|
||||
NS_DECL_NSIENUMERATOR
|
||||
NS_DECL_NSIBIDIRECTIONALENUMERATOR
|
||||
|
||||
private:
|
||||
PRUint32 mCurrentPosition;
|
||||
|
|
|
@ -38,7 +38,7 @@ class NS_COM nsSupportsWeakReference : public nsISupportsWeakReference
|
|||
|
||||
inline virtual ~nsSupportsWeakReference();
|
||||
|
||||
NS_IMETHOD GetWeakReference( nsIWeakReference** );
|
||||
NS_DECL_NSISUPPORTSWEAKREFERENCE
|
||||
|
||||
private:
|
||||
friend class nsWeakReference;
|
||||
|
@ -62,8 +62,7 @@ class NS_COM nsWeakReference : public nsIWeakReference
|
|||
NS_IMETHOD QueryInterface( const nsIID&, void** );
|
||||
|
||||
// nsIWeakReference...
|
||||
NS_IMETHOD QueryReferent( const nsIID&, void** );
|
||||
|
||||
NS_DECL_NSIWEAKREFERENCE
|
||||
|
||||
private:
|
||||
friend class nsSupportsWeakReference;
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -123,10 +123,7 @@ struct nsRegSubtreeEnumerator : public nsIEnumerator {
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// This class implements the nsIEnumerator interface functions.
|
||||
NS_IMETHOD First();
|
||||
NS_IMETHOD Next();
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem);
|
||||
NS_IMETHOD IsDone();
|
||||
NS_DECL_NSIENUMERATOR
|
||||
|
||||
// ctor/dtor
|
||||
nsRegSubtreeEnumerator( HREG hReg, RKEY rKey, PRBool all );
|
||||
|
|
|
@ -28,14 +28,10 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIEnumerator methods:
|
||||
NS_IMETHOD First(void);
|
||||
NS_IMETHOD Next(void);
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem);
|
||||
NS_IMETHOD IsDone(void);
|
||||
NS_DECL_NSIENUMERATOR
|
||||
|
||||
// nsIBidirectionalEnumerator methods:
|
||||
NS_IMETHOD Last(void);
|
||||
NS_IMETHOD Prev(void);
|
||||
NS_DECL_NSIBIDIRECTIONALENUMERATOR
|
||||
|
||||
// nsConjoiningEnumerator methods:
|
||||
nsConjoiningEnumerator(nsIEnumerator* first, nsIEnumerator* second);
|
||||
|
@ -190,10 +186,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIEnumerator methods:
|
||||
NS_IMETHOD First(void);
|
||||
NS_IMETHOD Next(void);
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem);
|
||||
NS_IMETHOD IsDone(void);
|
||||
NS_DECL_NSIENUMERATOR
|
||||
|
||||
// nsIntersectionEnumerator methods:
|
||||
nsIntersectionEnumerator(nsIEnumerator* first, nsIEnumerator* second);
|
||||
|
@ -290,10 +283,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIEnumerator methods:
|
||||
NS_IMETHOD First(void);
|
||||
NS_IMETHOD Next(void);
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem);
|
||||
NS_IMETHOD IsDone(void);
|
||||
NS_DECL_NSIENUMERATOR
|
||||
|
||||
// nsUnionEnumerator methods:
|
||||
nsUnionEnumerator(nsIEnumerator* first, nsIEnumerator* second);
|
||||
|
|
|
@ -29,13 +29,8 @@ class nsHashtableEnumerator : public nsIBidirectionalEnumerator
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD First ();
|
||||
NS_IMETHOD Last ();
|
||||
NS_IMETHOD Prev ();
|
||||
NS_IMETHOD Next ();
|
||||
NS_IMETHOD CurrentItem (nsISupports **retval);
|
||||
NS_IMETHOD IsDone ();
|
||||
NS_DECL_NSIENUMERATOR
|
||||
NS_DECL_NSIBIDIRECTIONALENUMERATOR
|
||||
|
||||
public:
|
||||
virtual ~nsHashtableEnumerator ();
|
||||
|
|
|
@ -31,14 +31,10 @@ public:
|
|||
virtual ~nsSupportsArrayEnumerator();
|
||||
|
||||
// nsIEnumerator methods:
|
||||
NS_IMETHOD First();
|
||||
NS_IMETHOD Next();
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem);
|
||||
NS_IMETHOD IsDone();
|
||||
NS_DECL_NSIENUMERATOR
|
||||
|
||||
// nsIBidirectionalEnumerator methods:
|
||||
NS_IMETHOD Last();
|
||||
NS_IMETHOD Prev();
|
||||
NS_DECL_NSIBIDIRECTIONALENUMERATOR
|
||||
|
||||
protected:
|
||||
nsISupportsArray* mArray;
|
||||
|
|
|
@ -25,10 +25,7 @@ class nsSupportsIDImpl : public nsISupportsID
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(nsID **aData);
|
||||
NS_IMETHOD SetData(nsID *aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSID
|
||||
|
||||
nsSupportsIDImpl();
|
||||
virtual ~nsSupportsIDImpl();
|
||||
|
@ -43,10 +40,7 @@ class nsSupportsStringImpl : public nsISupportsString
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(char **aData);
|
||||
NS_IMETHOD SetData(char *aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSSTRING
|
||||
|
||||
nsSupportsStringImpl();
|
||||
virtual ~nsSupportsStringImpl();
|
||||
|
@ -61,10 +55,7 @@ class nsSupportsWStringImpl : public nsISupportsWString
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(PRUnichar **aData);
|
||||
NS_IMETHOD SetData(PRUnichar *aData);
|
||||
NS_IMETHOD toString(PRUnichar **_retval);
|
||||
NS_DECL_NSISUPPORTSWSTRING
|
||||
|
||||
nsSupportsWStringImpl();
|
||||
virtual ~nsSupportsWStringImpl();
|
||||
|
@ -79,10 +70,7 @@ class nsSupportsPRBoolImpl : public nsISupportsPRBool
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(PRBool *aData);
|
||||
NS_IMETHOD SetData(PRBool aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSPRBOOL
|
||||
|
||||
nsSupportsPRBoolImpl();
|
||||
virtual ~nsSupportsPRBoolImpl();
|
||||
|
@ -97,10 +85,7 @@ class nsSupportsPRUint8Impl : public nsISupportsPRUint8
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(PRUint8 *aData);
|
||||
NS_IMETHOD SetData(PRUint8 aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSPRUINT8
|
||||
|
||||
nsSupportsPRUint8Impl();
|
||||
virtual ~nsSupportsPRUint8Impl();
|
||||
|
@ -115,10 +100,7 @@ class nsSupportsPRUint16Impl : public nsISupportsPRUint16
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(PRUint16 *aData);
|
||||
NS_IMETHOD SetData(PRUint16 aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSPRUINT16
|
||||
|
||||
nsSupportsPRUint16Impl();
|
||||
virtual ~nsSupportsPRUint16Impl();
|
||||
|
@ -133,10 +115,7 @@ class nsSupportsPRUint32Impl : public nsISupportsPRUint32
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(PRUint32 *aData);
|
||||
NS_IMETHOD SetData(PRUint32 aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSPRUINT32
|
||||
|
||||
nsSupportsPRUint32Impl();
|
||||
virtual ~nsSupportsPRUint32Impl();
|
||||
|
@ -151,10 +130,7 @@ class nsSupportsPRUint64Impl : public nsISupportsPRUint64
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(PRUint64 *aData);
|
||||
NS_IMETHOD SetData(PRUint64 aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSPRUINT64
|
||||
|
||||
nsSupportsPRUint64Impl();
|
||||
virtual ~nsSupportsPRUint64Impl();
|
||||
|
@ -169,10 +145,7 @@ class nsSupportsPRTimeImpl : public nsISupportsPRTime
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(PRTime *aData);
|
||||
NS_IMETHOD SetData(PRTime aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSPRTIME
|
||||
|
||||
nsSupportsPRTimeImpl();
|
||||
virtual ~nsSupportsPRTimeImpl();
|
||||
|
@ -187,10 +160,7 @@ class nsSupportsCharImpl : public nsISupportsChar
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(char *aData);
|
||||
NS_IMETHOD SetData(char aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSCHAR
|
||||
|
||||
nsSupportsCharImpl();
|
||||
virtual ~nsSupportsCharImpl();
|
||||
|
@ -205,10 +175,7 @@ class nsSupportsPRInt16Impl : public nsISupportsPRInt16
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(PRInt16 *aData);
|
||||
NS_IMETHOD SetData(PRInt16 aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSPRINT16
|
||||
|
||||
nsSupportsPRInt16Impl();
|
||||
virtual ~nsSupportsPRInt16Impl();
|
||||
|
@ -223,10 +190,7 @@ class nsSupportsPRInt32Impl : public nsISupportsPRInt32
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(PRInt32 *aData);
|
||||
NS_IMETHOD SetData(PRInt32 aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSPRINT32
|
||||
|
||||
nsSupportsPRInt32Impl();
|
||||
virtual ~nsSupportsPRInt32Impl();
|
||||
|
@ -241,10 +205,7 @@ class nsSupportsPRInt64Impl : public nsISupportsPRInt64
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(PRInt64 *aData);
|
||||
NS_IMETHOD SetData(PRInt64 aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSPRINT64
|
||||
|
||||
nsSupportsPRInt64Impl();
|
||||
virtual ~nsSupportsPRInt64Impl();
|
||||
|
@ -259,10 +220,7 @@ class nsSupportsFloatImpl : public nsISupportsFloat
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(float *aData);
|
||||
NS_IMETHOD SetData(float aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSFLOAT
|
||||
|
||||
nsSupportsFloatImpl();
|
||||
virtual ~nsSupportsFloatImpl();
|
||||
|
@ -277,10 +235,7 @@ class nsSupportsDoubleImpl : public nsISupportsDouble
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(double *aData);
|
||||
NS_IMETHOD SetData(double aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSDOUBLE
|
||||
|
||||
nsSupportsDoubleImpl();
|
||||
virtual ~nsSupportsDoubleImpl();
|
||||
|
@ -295,10 +250,7 @@ class nsSupportsVoidImpl : public nsISupportsVoid
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetData(const void * *aData);
|
||||
NS_IMETHOD SetData(void * aData);
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_DECL_NSISUPPORTSVOID
|
||||
|
||||
nsSupportsVoidImpl();
|
||||
virtual ~nsSupportsVoidImpl();
|
||||
|
|
|
@ -38,7 +38,7 @@ class NS_COM nsSupportsWeakReference : public nsISupportsWeakReference
|
|||
|
||||
inline virtual ~nsSupportsWeakReference();
|
||||
|
||||
NS_IMETHOD GetWeakReference( nsIWeakReference** );
|
||||
NS_DECL_NSISUPPORTSWEAKREFERENCE
|
||||
|
||||
private:
|
||||
friend class nsWeakReference;
|
||||
|
@ -62,8 +62,7 @@ class NS_COM nsWeakReference : public nsIWeakReference
|
|||
NS_IMETHOD QueryInterface( const nsIID&, void** );
|
||||
|
||||
// nsIWeakReference...
|
||||
NS_IMETHOD QueryReferent( const nsIID&, void** );
|
||||
|
||||
NS_DECL_NSIWEAKREFERENCE
|
||||
|
||||
private:
|
||||
friend class nsSupportsWeakReference;
|
||||
|
|
|
@ -32,14 +32,14 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIBaseStream methods:
|
||||
NS_IMETHOD Close(void);
|
||||
NS_DECL_NSIBASESTREAM
|
||||
|
||||
// nsIOutputStream methods:
|
||||
NS_IMETHOD Write(const char* aBuf, PRUint32 aCount,
|
||||
PRUint32 *aWriteCount);
|
||||
NS_DECL_NSIOUTPUTSTREAM
|
||||
|
||||
// This method isn't in nsIOutputStream...
|
||||
NS_IMETHOD WriteFrom(nsIInputStream* fromStream, PRUint32 aCount,
|
||||
PRUint32 *aWriteCount);
|
||||
NS_IMETHOD Flush(void);
|
||||
|
||||
// nsByteBufferOutputStream methods:
|
||||
nsByteBufferOutputStream(nsByteBufferInputStream* in);
|
||||
|
@ -57,11 +57,10 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIBaseStream methods:
|
||||
NS_IMETHOD Close(void);
|
||||
NS_DECL_NSIBASESTREAM
|
||||
|
||||
// nsIInputStream methods:
|
||||
NS_IMETHOD GetLength(PRUint32 *aLength);
|
||||
NS_IMETHOD Read(char* aBuf, PRUint32 aCount, PRUint32 *aReadCount);
|
||||
NS_DECL_NSIINPUTSTREAM
|
||||
|
||||
// nsIByteBufferInputStream methods:
|
||||
NS_IMETHOD Fill(nsIInputStream* stream, PRUint32 aCount, PRUint32 *aWriteCount);
|
||||
|
|
|
@ -32,147 +32,7 @@ class NS_COM nsFileSpecImpl
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD fromFileSpec(const nsIFileSpec *original);
|
||||
|
||||
NS_IMETHOD GetURLString(char * *aURLString);
|
||||
NS_IMETHOD SetURLString(char * aURLString);
|
||||
|
||||
/* attribute string UnixStyleFilePath; */
|
||||
NS_IMETHOD GetUnixStyleFilePath(char * *aUnixStyleFilePath);
|
||||
NS_IMETHOD SetUnixStyleFilePath(char * aUnixStyleFilePath);
|
||||
|
||||
/* attribute string PersistentDescriptorString; */
|
||||
NS_IMETHOD GetPersistentDescriptorString(char * *aPersistentDescriptorString);
|
||||
NS_IMETHOD SetPersistentDescriptorString(char * aPersistentDescriptorString);
|
||||
|
||||
/* attribute string NativePath; */
|
||||
NS_IMETHOD GetNativePath(char * *aNativePath);
|
||||
NS_IMETHOD SetNativePath(char * aNativePath);
|
||||
|
||||
/* readonly attribute string NSPRPath; */
|
||||
NS_IMETHOD GetNSPRPath(char * *aNSPRPath);
|
||||
|
||||
/* readonly attribute nsresult Error; */
|
||||
NS_IMETHOD error();
|
||||
|
||||
/* boolean isValid (); */
|
||||
NS_IMETHOD isValid(PRBool *_retval);
|
||||
|
||||
/* boolean failed (); */
|
||||
NS_IMETHOD failed(PRBool *_retval);
|
||||
|
||||
/* attribute string LeafName; */
|
||||
NS_IMETHOD GetLeafName(char * *aLeafName);
|
||||
NS_IMETHOD SetLeafName(char * aLeafName);
|
||||
|
||||
/* readonly attribute nsIFileSpec Parent; */
|
||||
NS_IMETHOD GetParent(nsIFileSpec * *aParent);
|
||||
|
||||
/* nsIFileSpec makeUnique (); */
|
||||
NS_IMETHOD makeUnique();
|
||||
|
||||
/* nsIFileSpec makeUniqueWithSuggestedName (in string suggestedName); */
|
||||
NS_IMETHOD makeUniqueWithSuggestedName(const char* inSuggestedLeafName);
|
||||
|
||||
/* readonly attribute unsigned long ModDate; */
|
||||
NS_IMETHOD GetModDate(PRUint32 *aModDate);
|
||||
|
||||
/* boolean modDateChanged (in unsigned long oldStamp); */
|
||||
NS_IMETHOD modDateChanged(PRUint32 oldStamp, PRBool *_retval);
|
||||
|
||||
/* boolean isDirectory (); */
|
||||
NS_IMETHOD isDirectory(PRBool *_retval);
|
||||
|
||||
/* boolean isFile (); */
|
||||
NS_IMETHOD isFile(PRBool *_retval);
|
||||
|
||||
/* boolean exists (); */
|
||||
NS_IMETHOD exists(PRBool *_retval);
|
||||
|
||||
/* boolean isHidden (); */
|
||||
NS_IMETHOD isHidden(PRBool *_retval);
|
||||
|
||||
/* boolean isSymlink (); */
|
||||
NS_IMETHOD isSymlink(PRBool *_retval);
|
||||
|
||||
/* void resolveSymlink (); */
|
||||
NS_IMETHOD resolveSymlink();
|
||||
|
||||
/* readonly attribute unsigned long FileSize; */
|
||||
NS_IMETHOD GetFileSize(PRUint32 *aFileSize);
|
||||
|
||||
/* readonly attribute unsigned long DiskSpaceAvailable; */
|
||||
NS_IMETHOD GetDiskSpaceAvailable(PRUint32 *aDiskSpaceAvailable);
|
||||
|
||||
/* nsIFileSpec AppendRelativeUnixPath (in string relativePath); */
|
||||
NS_IMETHOD AppendRelativeUnixPath(const char *relativePath);
|
||||
|
||||
/* void createDir (); */
|
||||
NS_IMETHOD createDir();
|
||||
|
||||
/* void touch (); */
|
||||
NS_IMETHOD touch();
|
||||
|
||||
/* void rename ([const] in string newLeafName); */
|
||||
NS_IMETHOD rename(const char *newLeafName);
|
||||
|
||||
/* void copyToDir ([const] in nsIFileSpec newParentDir); */
|
||||
NS_IMETHOD copyToDir(const nsIFileSpec *newParentDir);
|
||||
|
||||
/* void moveToDir ([const] in nsIFileSpec newParentDir); */
|
||||
NS_IMETHOD moveToDir(const nsIFileSpec *newParentDir);
|
||||
|
||||
/* void execute ([const] in string args); */
|
||||
NS_IMETHOD execute(const char *args);
|
||||
|
||||
/* void openStreamForReading (); */
|
||||
NS_IMETHOD openStreamForReading();
|
||||
|
||||
/* void openStreamForWriting (); */
|
||||
NS_IMETHOD openStreamForWriting();
|
||||
|
||||
/* void openStreamForReadingAndWriting (); */
|
||||
NS_IMETHOD openStreamForReadingAndWriting();
|
||||
|
||||
/* void close (); */
|
||||
NS_IMETHOD closeStream();
|
||||
|
||||
/* boolean isOpen (); */
|
||||
NS_IMETHOD isStreamOpen(PRBool *_retval);
|
||||
|
||||
NS_IMETHOD GetInputStream(nsIInputStream**);
|
||||
NS_IMETHOD GetOutputStream(nsIOutputStream**);
|
||||
|
||||
NS_IMETHOD GetFileContents(char**);
|
||||
NS_IMETHOD SetFileContents(char*);
|
||||
|
||||
NS_IMETHOD GetFileSpec(nsFileSpec *aFileSpec);
|
||||
NS_IMETHOD setFromFileSpec(const nsFileSpec& aFileSpec);
|
||||
|
||||
/* boolean eof (); */
|
||||
NS_IMETHOD eof(PRBool *_retval);
|
||||
|
||||
NS_IMETHOD read(char** buffer, PRInt32 requestedCount, PRInt32 *_retval);
|
||||
|
||||
NS_IMETHOD readLine(char** line, PRInt32 bufferSize, PRBool *wasTruncated);
|
||||
// Check eof() before each call.
|
||||
// CAUTION: false result only indicates line was truncated
|
||||
// to fit buffer, or an error occurred (OTHER THAN eof).
|
||||
|
||||
|
||||
NS_IMETHOD write(const char* data, PRInt32 requestedCount, PRInt32 *_retval);
|
||||
|
||||
/* void flush (); */
|
||||
NS_IMETHOD flush();
|
||||
|
||||
/* void seek (in long offset); */
|
||||
NS_IMETHOD seek(PRInt32 offset);
|
||||
|
||||
/* long tell (); */
|
||||
NS_IMETHOD tell(PRInt32 *_retval);
|
||||
|
||||
/* void endline (); */
|
||||
NS_IMETHOD endline();
|
||||
NS_DECL_NSIFILESPEC
|
||||
|
||||
//----------------------
|
||||
// COM Cruft
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
[scriptable, uuid(6ccb17a0-e95e-11d1-beae-00805f8a66dc)]
|
||||
interface nsIBaseStream : nsISupports
|
||||
{
|
||||
/** Close the stream. */
|
||||
void Close();
|
||||
};
|
||||
|
||||
|
|
|
@ -31,21 +31,18 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIBaseStream methods:
|
||||
NS_IMETHOD Close(void);
|
||||
NS_DECL_NSIBASESTREAM
|
||||
|
||||
// nsIInputStream methods:
|
||||
NS_IMETHOD GetLength(PRUint32 *aLength);
|
||||
NS_IMETHOD Read(char* aBuf, PRUint32 aCount, PRUint32 *aReadCount);
|
||||
NS_DECL_NSIINPUTSTREAM
|
||||
|
||||
// nsIBufferInputStream methods:
|
||||
NS_IMETHOD GetBuffer(nsIBuffer* *result);
|
||||
NS_IMETHOD Search(const char *forString, PRBool ignoreCase, PRBool *found, PRUint32 *offsetSearchedTo);
|
||||
NS_DECL_NSIBUFFERINPUTSTREAM
|
||||
|
||||
#if 0
|
||||
NS_IMETHOD Fill(const char *buf, PRUint32 count, PRUint32 *_retval);
|
||||
NS_IMETHOD FillFrom(nsIInputStream *inStr, PRUint32 count, PRUint32 *_retval);
|
||||
#endif
|
||||
NS_IMETHOD GetNonBlocking(PRBool *aNonBlocking);
|
||||
NS_IMETHOD SetNonBlocking(PRBool aNonBlocking);
|
||||
|
||||
// nsBufferInputStream methods:
|
||||
nsBufferInputStream(nsIBuffer* buf, PRBool blocking);
|
||||
|
@ -66,18 +63,13 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIBaseStream methods:
|
||||
NS_IMETHOD Close(void);
|
||||
NS_DECL_NSIBASESTREAM
|
||||
|
||||
// nsIOutputStream methods:
|
||||
NS_IMETHOD Write(const char* aBuf, PRUint32 aCount, PRUint32 *aWriteCount);
|
||||
NS_IMETHOD Flush(void);
|
||||
NS_DECL_NSIOUTPUTSTREAM
|
||||
|
||||
// nsIBufferOutputStream methods:
|
||||
NS_IMETHOD GetBuffer(nsIBuffer * *aBuffer);
|
||||
NS_IMETHOD WriteFrom(nsIInputStream* fromStream, PRUint32 aCount,
|
||||
PRUint32 *aWriteCount);
|
||||
NS_IMETHOD GetNonBlocking(PRBool *aNonBlocking);
|
||||
NS_IMETHOD SetNonBlocking(PRBool aNonBlocking);
|
||||
NS_DECL_NSIBUFFEROUTPUTSTREAM
|
||||
|
||||
// nsBufferOutputStream methods:
|
||||
nsBufferOutputStream(nsIBuffer* buf, PRBool blocking);
|
||||
|
|
Загрузка…
Ссылка в новой задаче