зеркало из https://github.com/mozilla/gecko-dev.git
NS_DECL_NSIFOO spam for nsIRequest, nsIChannel, nsIStreamListener, nsIStreamObserver, all from netwerk/
convert manual interface method declarations in implementation class to NS_DECL_NSIFOO macro.
This commit is contained in:
Родитель
2ba747b8f3
Коммит
17cdc659d1
|
@ -96,10 +96,10 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
#ifdef NECKO
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
#else
|
||||
NS_IMETHOD OnStartRequest(nsIURI* aURL, const char *aContentType);
|
||||
NS_IMETHOD OnProgress(nsIURI* aURL, PRUint32 aProgress, PRUint32 aProgressMax);
|
||||
|
|
|
@ -117,10 +117,10 @@ public:
|
|||
|
||||
#ifdef NECKO
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
||||
void SetKeepPumpingData(nsIChannel* channel, nsISupports* context) {
|
||||
NS_IF_RELEASE(mChannel);
|
||||
|
|
|
@ -245,11 +245,13 @@ friend class CTokenHandler;
|
|||
// nsIProgressEventSink methods:
|
||||
NS_IMETHOD OnProgress(nsIChannel* channel, nsISupports* context, PRUint32 Progress, PRUint32 ProgressMax);
|
||||
NS_IMETHOD OnStatus(nsIChannel* channel, nsISupports* context, const PRUnichar* aMmsg);
|
||||
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
||||
#else
|
||||
NS_IMETHOD GetBindInfo(nsIURI* aURL, nsStreamBindingInfo* aInfo);
|
||||
NS_IMETHOD OnProgress(nsIURI* aURL, PRUint32 Progress, PRUint32 ProgressMax);
|
||||
|
|
|
@ -64,10 +64,10 @@ public:
|
|||
|
||||
#ifdef NECKO
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
#else
|
||||
// nsIStreamListener
|
||||
NS_IMETHOD OnStartRequest(nsIURI* aURL, const char *aContentType);
|
||||
|
|
|
@ -96,10 +96,10 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
#ifdef NECKO
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
#else
|
||||
NS_IMETHOD OnStartRequest(nsIURI* aURL, const char *aContentType);
|
||||
NS_IMETHOD OnProgress(nsIURI* aURL, PRUint32 aProgress, PRUint32 aProgressMax);
|
||||
|
|
|
@ -37,10 +37,11 @@ public:
|
|||
//nsICopyMessageStreamListener
|
||||
NS_IMETHOD Init(nsIMsgFolder *srcFolder, nsICopyMessageListener *destination, nsISupports *listenerData);
|
||||
|
||||
//nsIStreamListener implementation
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel * aChannel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_IMETHOD OnStartRequest(nsIChannel * aChannel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel * aChannel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
// nsIStreamObserver
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsICopyMessageListener> mDestination;
|
||||
|
|
|
@ -49,14 +49,12 @@ public:
|
|||
NS_IMETHOD FireURLRequest(nsIURI *aURL, nsOutputFileStream *fOut,
|
||||
nsAttachSaveCompletionCallback cb, void *tagData);
|
||||
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel * aChannel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
|
||||
|
||||
// Methods for nsIStreamObserver
|
||||
NS_IMETHOD OnStartRequest(nsIChannel * aChannel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel * aChannel, nsISupports *ctxt, nsresult aStatus, const PRUnichar* aMsg);
|
||||
|
||||
// Methods for nsIStreamListener
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
||||
// Methods for nsIStreamObserver
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
private:
|
||||
nsOutputFileStream *mOutStream; // the output file stream
|
||||
|
|
|
@ -163,9 +163,8 @@ public:
|
|||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// we suppport the nsIStreamListener interface
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel * aChannel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_IMETHOD OnStartRequest(nsIChannel * aChannel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel * aChannel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
||||
void SetDB (nsIMsgDatabase *mailDB) {m_mailDB = dont_QueryInterface(mailDB); }
|
||||
char *GetMailboxName() {return m_mailboxName;}
|
||||
|
|
|
@ -188,9 +188,8 @@ public:
|
|||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// we suppport the nsIStreamListener interface --> primarily to test copy, move and delete
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel * aChannel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_IMETHOD OnStartRequest(nsIChannel * aChannel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel * aChannel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// End of nsIStreamListenerSupport
|
||||
|
|
|
@ -64,10 +64,10 @@ public:
|
|||
|
||||
#ifdef NECKO
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
#else
|
||||
// nsIStreamListener
|
||||
NS_IMETHOD OnStartRequest(nsIURI* aURL, const char *aContentType);
|
||||
|
|
|
@ -64,10 +64,10 @@ public:
|
|||
|
||||
#ifdef NECKO
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
#else
|
||||
// nsIStreamListener
|
||||
NS_IMETHOD OnStartRequest(nsIURI* aURL, const char *aContentType);
|
||||
|
|
|
@ -30,12 +30,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel,
|
||||
nsISupports* context);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel,
|
||||
nsISupports* context,
|
||||
nsresult aStatus,
|
||||
const PRUnichar* aMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsAsyncStreamObserver methods:
|
||||
nsAsyncStreamObserver(nsIEventQueue* aEventQ)
|
||||
|
|
|
@ -30,26 +30,10 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIRequest methods:
|
||||
NS_IMETHOD IsPending(PRBool *result);
|
||||
NS_IMETHOD Cancel(void);
|
||||
NS_IMETHOD Suspend(void);
|
||||
NS_IMETHOD Resume(void);
|
||||
NS_DECL_NSIREQUEST
|
||||
|
||||
// nsIChannel methods:
|
||||
NS_IMETHOD GetURI(nsIURI * *aURI);
|
||||
NS_IMETHOD OpenInputStream(PRUint32 startPosition, PRInt32 readCount,
|
||||
nsIInputStream **_retval);
|
||||
NS_IMETHOD OpenOutputStream(PRUint32 startPosition, nsIOutputStream **_retval);
|
||||
NS_IMETHOD AsyncRead(PRUint32 startPosition, PRInt32 readCount,
|
||||
nsISupports *ctxt, nsIStreamListener *listener);
|
||||
NS_IMETHOD AsyncWrite(nsIInputStream *fromStream, PRUint32 startPosition,
|
||||
PRInt32 writeCount, nsISupports *ctxt,
|
||||
nsIStreamObserver *observer);
|
||||
NS_IMETHOD GetLoadAttributes(nsLoadFlags *aLoadAttributes);
|
||||
NS_IMETHOD SetLoadAttributes(nsLoadFlags aLoadAttributes);
|
||||
NS_IMETHOD GetContentType(char * *aContentType);
|
||||
NS_IMETHOD GetLoadGroup(nsILoadGroup * *aLoadGroup);
|
||||
NS_IMETHOD SetLoadGroup(nsILoadGroup * aLoadGroup);
|
||||
NS_DECL_NSICHANNEL
|
||||
|
||||
// nsInputStreamChannel methods:
|
||||
nsInputStreamChannel();
|
||||
|
|
|
@ -33,47 +33,11 @@ public:
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// nsIRequest methods:
|
||||
|
||||
/* boolean IsPending (); */
|
||||
NS_IMETHOD IsPending(PRBool *result);
|
||||
|
||||
/* void Cancel (); */
|
||||
NS_IMETHOD Cancel();
|
||||
|
||||
/* void Suspend (); */
|
||||
NS_IMETHOD Suspend();
|
||||
|
||||
/* void Resume (); */
|
||||
NS_IMETHOD Resume();
|
||||
NS_DECL_NSIREQUEST
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// nsILoadGroup methods:
|
||||
|
||||
/* void Init (in nsIStreamObserver observer, in nsILoadGroup parent); */
|
||||
NS_IMETHOD Init(nsIStreamObserver *observer, nsILoadGroup *parent);
|
||||
|
||||
/* attribute unsigned long DefaultLoadAttributes; */
|
||||
NS_IMETHOD GetDefaultLoadAttributes(PRUint32 *aDefaultLoadAttributes);
|
||||
NS_IMETHOD SetDefaultLoadAttributes(PRUint32 aDefaultLoadAttributes);
|
||||
|
||||
/* void AddChannel (in nsIChannel channel, in nsISupports ctxt); */
|
||||
NS_IMETHOD AddChannel(nsIChannel *channel, nsISupports* ctxt);
|
||||
|
||||
/* void RemoveChannel (in nsIChannel channel, in nsISupports ctxt); */
|
||||
NS_IMETHOD RemoveChannel(nsIChannel *channel, nsISupports* ctxt,
|
||||
nsresult status, const PRUnichar *errorMsg);
|
||||
|
||||
/* readonly attribute nsISimpleEnumerator Channels; */
|
||||
NS_IMETHOD GetChannels(nsISimpleEnumerator * *aChannels);
|
||||
|
||||
/* void AddSubGroup (in nsILoadGroup group); */
|
||||
NS_IMETHOD AddSubGroup(nsILoadGroup *group);
|
||||
|
||||
/* void RemoveSubGroup (in nsILoadGroup group); */
|
||||
NS_IMETHOD RemoveSubGroup(nsILoadGroup *group);
|
||||
|
||||
/* readonly attribute nsISimpleEnumerator SubGroups; */
|
||||
NS_IMETHOD GetSubGroups(nsISimpleEnumerator * *aSubGroups);
|
||||
NS_DECL_NSILOADGROUP
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// nsLoadGroup methods:
|
||||
|
|
|
@ -109,27 +109,10 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIRequest methods:
|
||||
NS_IMETHOD IsPending(PRBool *result);
|
||||
NS_IMETHOD Cancel(void);
|
||||
NS_IMETHOD Suspend(void);
|
||||
NS_IMETHOD Resume(void);
|
||||
NS_DECL_NSIREQUEST
|
||||
|
||||
// nsIChannel methods:
|
||||
NS_IMETHOD GetURI(nsIURI * *aURL);
|
||||
NS_IMETHOD OpenInputStream(PRUint32 startPosition, PRInt32 readCount, nsIInputStream **_retval);
|
||||
NS_IMETHOD OpenOutputStream(PRUint32 startPosition, nsIOutputStream **_retval);
|
||||
NS_IMETHOD AsyncRead(PRUint32 startPosition, PRInt32 readCount,
|
||||
nsISupports *ctxt,
|
||||
nsIStreamListener *listener);
|
||||
NS_IMETHOD AsyncWrite(nsIInputStream *fromStream,
|
||||
PRUint32 startPosition, PRInt32 writeCount,
|
||||
nsISupports *ctxt,
|
||||
nsIStreamObserver *observer);
|
||||
NS_IMETHOD GetLoadAttributes(PRUint32 *aLoadAttributes);
|
||||
NS_IMETHOD SetLoadAttributes(PRUint32 aLoadAttributes);
|
||||
NS_IMETHOD GetContentType(char * *aContentType);
|
||||
NS_IMETHOD GetLoadGroup(nsILoadGroup * *aLoadGroup);
|
||||
NS_IMETHOD SetLoadGroup(nsILoadGroup * aLoadGroup);
|
||||
NS_DECL_NSICHANNEL
|
||||
|
||||
// nsIBufferObserver methods:
|
||||
NS_IMETHOD OnFull (nsIBuffer* aBuffer);
|
||||
|
|
|
@ -30,16 +30,10 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports* context);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports* context,
|
||||
nsresult aStatus,
|
||||
const PRUnichar* aMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports* context,
|
||||
nsIInputStream *aIStream,
|
||||
PRUint32 aSourceOffset,
|
||||
PRUint32 aLength);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
||||
// nsSyncStreamListener methods:
|
||||
nsSyncStreamListener()
|
||||
|
|
|
@ -46,10 +46,7 @@ class nsDNSRequest : public nsIRequest
|
|||
nsDNSLookup* mHostNameLookup;
|
||||
|
||||
// nsIRequest methods:
|
||||
NS_IMETHOD IsPending(PRBool *result);
|
||||
NS_IMETHOD Cancel(void);
|
||||
NS_IMETHOD Suspend(void);
|
||||
NS_IMETHOD Resume(void);
|
||||
NS_DECL_NSIREQUEST
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -60,100 +60,15 @@ public:
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIRequest:
|
||||
|
||||
/* boolean IsPending (); */
|
||||
NS_IMETHOD IsPending(PRBool *result);
|
||||
|
||||
/* void Cancel (); */
|
||||
NS_IMETHOD Cancel();
|
||||
|
||||
/* void Suspend (); */
|
||||
NS_IMETHOD Suspend();
|
||||
|
||||
/* void Resume (); */
|
||||
NS_IMETHOD Resume();
|
||||
NS_DECL_NSIREQUEST
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIChannel:
|
||||
|
||||
/* readonly attribute nsIURI URI; */
|
||||
NS_IMETHOD GetURI(nsIURI * *aURI);
|
||||
|
||||
/* nsIInputStream OpenInputStream (); */
|
||||
NS_IMETHOD OpenInputStream(PRUint32 startPosition, PRInt32 count, nsIInputStream **_retval);
|
||||
|
||||
/* nsIOutputStream OpenOutputStream (); */
|
||||
NS_IMETHOD OpenOutputStream(PRUint32 startPosition, nsIOutputStream **_retval);
|
||||
|
||||
/* void AsyncRead (in unsigned long startPosition, in long readCount, in nsISupports ctxt, in nsIStreamListener listener); */
|
||||
NS_IMETHOD AsyncRead(PRUint32 startPosition, PRInt32 readCount, nsISupports *ctxt, nsIStreamListener *listener);
|
||||
|
||||
/* void AsyncWrite (in nsIInputStream fromStream, in unsigned long startPosition, in long writeCount, in nsISupports ctxt, in nsIStreamObserver observer); */
|
||||
NS_IMETHOD AsyncWrite(nsIInputStream *fromStream, PRUint32 startPosition, PRInt32 writeCount, nsISupports *ctxt, nsIStreamObserver *observer);
|
||||
|
||||
/* attribute boolean LoadQuiet; */
|
||||
NS_IMETHOD GetLoadAttributes(PRUint32 *aLoadAttributes);
|
||||
NS_IMETHOD SetLoadAttributes(PRUint32 aLoadAttributes);
|
||||
|
||||
/* readonly attribute string ContentType; */
|
||||
NS_IMETHOD GetContentType(char * *aContentType);
|
||||
|
||||
NS_IMETHOD GetLoadGroup(nsILoadGroup * *aLoadGroup);
|
||||
NS_IMETHOD SetLoadGroup(nsILoadGroup * aLoadGroup);
|
||||
NS_DECL_NSICHANNEL
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIFileChannel:
|
||||
|
||||
/* readonly attribute PRTime CreationDate; */
|
||||
NS_IMETHOD GetCreationDate(PRTime *aCreationDate);
|
||||
|
||||
/* readonly attribute PRTime ModDate; */
|
||||
NS_IMETHOD GetModDate(PRTime *aModDate);
|
||||
|
||||
/* readonly attribute unsigned long FileSize; */
|
||||
NS_IMETHOD GetFileSize(PRUint32 *aFileSize);
|
||||
|
||||
/* readonly attribute nsIFileChannel Parent; */
|
||||
NS_IMETHOD GetParent(nsIFileChannel * *aParent);
|
||||
|
||||
/* readonly attribute nsISimpleEnumerator Children; */
|
||||
NS_IMETHOD GetChildren(nsISimpleEnumerator * *aChildren);
|
||||
|
||||
/* readonly attribute string NativePath; */
|
||||
NS_IMETHOD GetNativePath(char * *aNativePath);
|
||||
|
||||
/* boolean Exists (); */
|
||||
NS_IMETHOD Exists(PRBool *_retval);
|
||||
|
||||
/* void Create (); */
|
||||
NS_IMETHOD Create();
|
||||
|
||||
/* void Delete (); */
|
||||
NS_IMETHOD Delete();
|
||||
|
||||
/* void MoveFrom (in nsIURI src); */
|
||||
NS_IMETHOD MoveFrom(nsIURI *src);
|
||||
|
||||
/* void CopyFrom (in nsIURI src); */
|
||||
NS_IMETHOD CopyFrom(nsIURI *src);
|
||||
|
||||
/* boolean IsDirectory (); */
|
||||
NS_IMETHOD IsDirectory(PRBool *_retval);
|
||||
|
||||
/* boolean IsFile (); */
|
||||
NS_IMETHOD IsFile(PRBool *_retval);
|
||||
|
||||
/* boolean IsLink (); */
|
||||
NS_IMETHOD IsLink(PRBool *_retval);
|
||||
|
||||
/* nsIFileChannel ResolveLink (); */
|
||||
NS_IMETHOD ResolveLink(nsIFileChannel **_retval);
|
||||
|
||||
/* string MakeUniqueFileName (in string baseName); */
|
||||
NS_IMETHOD MakeUniqueFileName(const char *baseName, char **_retval);
|
||||
|
||||
/* void Execute (in string args); */
|
||||
NS_IMETHOD Execute(const char *args);
|
||||
NS_DECL_NSIFILECHANNEL
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// nsIRunnable methods:
|
||||
|
|
|
@ -43,46 +43,19 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIRequest methods:
|
||||
NS_IMETHOD IsPending(PRBool *result);
|
||||
NS_IMETHOD Cancel();
|
||||
NS_IMETHOD Suspend();
|
||||
NS_IMETHOD Resume();
|
||||
NS_DECL_NSIREQUEST
|
||||
|
||||
// nsIChannel methods:
|
||||
NS_IMETHOD GetURI(nsIURI * *aURL);
|
||||
NS_IMETHOD OpenInputStream(PRUint32 startPosition, PRInt32 readCount, nsIInputStream **_retval);
|
||||
NS_IMETHOD OpenOutputStream(PRUint32 startPosition, nsIOutputStream **_retval);
|
||||
NS_IMETHOD AsyncRead(PRUint32 startPosition,
|
||||
PRInt32 readCount,
|
||||
nsISupports *ctxt,
|
||||
nsIStreamListener *listener);
|
||||
NS_IMETHOD AsyncWrite(nsIInputStream *fromStream,
|
||||
PRUint32 startPosition,
|
||||
PRInt32 writeCount,
|
||||
nsISupports *ctxt,
|
||||
nsIStreamObserver *observer);
|
||||
NS_IMETHOD GetLoadAttributes(PRUint32 *aLoadAttributes);
|
||||
NS_IMETHOD SetLoadAttributes(PRUint32 aLoadAttributes);
|
||||
NS_IMETHOD GetContentType(char * *aContentType);
|
||||
NS_IMETHOD GetLoadGroup(nsILoadGroup * *aLoadGroup);
|
||||
NS_IMETHOD SetLoadGroup(nsILoadGroup * aLoadGroup);
|
||||
NS_DECL_NSICHANNEL
|
||||
|
||||
// nsIFTPChannel methods:
|
||||
NS_IMETHOD Get(void);
|
||||
NS_IMETHOD Put(void);
|
||||
NS_IMETHOD SetStreamListener(nsIStreamListener* aListener);
|
||||
NS_DECL_NSIFTPCHANNEL
|
||||
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports* context);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports* context,
|
||||
nsresult aStatus,
|
||||
const PRUnichar* aMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports* context,
|
||||
nsIInputStream *aIStream,
|
||||
PRUint32 aSourceOffset,
|
||||
PRUint32 aLength);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
||||
// nsFTPChannel methods:
|
||||
nsFTPChannel();
|
||||
|
|
|
@ -58,45 +58,13 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIRequest methods:
|
||||
NS_IMETHOD IsPending(PRBool *result);
|
||||
NS_IMETHOD Cancel();
|
||||
NS_IMETHOD Suspend();
|
||||
NS_IMETHOD Resume();
|
||||
NS_DECL_NSIREQUEST
|
||||
|
||||
// nsIChannel methods:
|
||||
NS_IMETHOD GetURI(nsIURI * *aURL);
|
||||
NS_IMETHOD OpenInputStream(PRUint32 startPosition, PRInt32 readCount, nsIInputStream **_retval);
|
||||
NS_IMETHOD OpenOutputStream(PRUint32 startPosition, nsIOutputStream **_retval);
|
||||
NS_IMETHOD AsyncRead(PRUint32 startPosition, PRInt32 readCount,
|
||||
nsISupports *ctxt,
|
||||
nsIStreamListener *listener);
|
||||
NS_IMETHOD AsyncWrite(nsIInputStream *fromStream,
|
||||
PRUint32 startPosition,
|
||||
PRInt32 writeCount,
|
||||
nsISupports *ctxt,
|
||||
nsIStreamObserver *observer);
|
||||
NS_IMETHOD GetLoadAttributes(PRUint32 *aLoadAttributes);
|
||||
NS_IMETHOD SetLoadAttributes(PRUint32 aLoadAttributes);
|
||||
NS_IMETHOD GetContentType(char * *aContentType);
|
||||
NS_IMETHOD GetLoadGroup(nsILoadGroup * *aLoadGroup);
|
||||
NS_IMETHOD SetLoadGroup(nsILoadGroup * aLoadGroup);
|
||||
NS_DECL_NSICHANNEL
|
||||
|
||||
// nsIHTTPChannel methods:
|
||||
NS_IMETHOD GetRequestHeader(nsIAtom *headerName, char **_retval);
|
||||
NS_IMETHOD SetRequestHeader(nsIAtom *headerName, const char *value);
|
||||
NS_IMETHOD GetRequestHeaderEnumerator(nsISimpleEnumerator** aResult);
|
||||
NS_IMETHOD SetRequestMethod(PRUint32 method);
|
||||
|
||||
NS_IMETHOD GetResponseHeader(nsIAtom *headerName, char **_retval);
|
||||
NS_IMETHOD GetResponseHeaderEnumerator(nsISimpleEnumerator** aResult);
|
||||
|
||||
NS_IMETHOD SetPostDataStream(nsIInputStream *i_postStream);
|
||||
NS_IMETHOD GetPostDataStream(nsIInputStream **o_postStream);
|
||||
|
||||
NS_IMETHOD GetResponseStatus(PRUint32 *aResponseStatus);
|
||||
NS_IMETHOD GetResponseString(char * *aResponseString);
|
||||
NS_IMETHOD GetEventSink(nsIHTTPEventSink* *eventSink);
|
||||
NS_IMETHOD GetResponseDataListener(nsIStreamListener* *aListener);
|
||||
NS_DECL_NSIHTTPCHANNEL
|
||||
|
||||
// nsHTTPChannel methods:
|
||||
nsresult Init();
|
||||
|
|
|
@ -68,16 +68,10 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIStreamObserver functions
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports* context);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports* context,
|
||||
nsresult aStatus,
|
||||
const PRUnichar* aMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIRequest methods:
|
||||
NS_IMETHOD IsPending(PRBool *result);
|
||||
NS_IMETHOD Cancel();
|
||||
NS_IMETHOD Suspend();
|
||||
NS_IMETHOD Resume();
|
||||
NS_DECL_NSIREQUEST
|
||||
|
||||
// Finally our own methods...
|
||||
/*
|
||||
|
|
|
@ -63,17 +63,10 @@ public:
|
|||
TestConsumer();
|
||||
|
||||
// stream listener methods
|
||||
NS_IMETHOD OnDataAvailable(nsISupports* context,
|
||||
nsIInputStream *aIStream,
|
||||
PRUint32 aSourceOffset,
|
||||
PRUint32 aLength);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
||||
// stream observer methods
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports* context);
|
||||
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports* context,
|
||||
nsresult aStatus,
|
||||
nsIString* aMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
protected:
|
||||
~TestConsumer();
|
||||
|
|
|
@ -47,12 +47,10 @@ public:
|
|||
NS_IMETHOD GetNumCharsRead(PRInt32* aNumBytes);
|
||||
|
||||
// nsIStreamObserver methods
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt,
|
||||
nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
||||
#if 0
|
||||
NS_IMETHOD GetBindInfo(nsIURI* aURL, nsStreamBindingInfo* aInfo);
|
||||
|
|
|
@ -245,11 +245,13 @@ friend class CTokenHandler;
|
|||
// nsIProgressEventSink methods:
|
||||
NS_IMETHOD OnProgress(nsIChannel* channel, nsISupports* context, PRUint32 Progress, PRUint32 ProgressMax);
|
||||
NS_IMETHOD OnStatus(nsIChannel* channel, nsISupports* context, const PRUnichar* aMmsg);
|
||||
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
||||
#else
|
||||
NS_IMETHOD GetBindInfo(nsIURI* aURL, nsStreamBindingInfo* aInfo);
|
||||
NS_IMETHOD OnProgress(nsIURI* aURL, PRUint32 Progress, PRUint32 ProgressMax);
|
||||
|
|
|
@ -85,10 +85,10 @@ public:
|
|||
|
||||
#ifdef NECKO
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
#else
|
||||
// stream observer
|
||||
|
||||
|
|
|
@ -128,10 +128,10 @@ public:
|
|||
|
||||
#ifdef NECKO
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
#else
|
||||
// stream observer
|
||||
|
||||
|
|
|
@ -138,17 +138,13 @@ public:
|
|||
|
||||
#ifdef NECKO
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status,
|
||||
const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt, nsIInputStream *inStr,
|
||||
PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
||||
// nsIProgressEventSink methods:
|
||||
NS_IMETHOD OnProgress(nsIChannel* channel, nsISupports *ctxt, PRUint32 aProgress, PRUint32 aProgressMax);
|
||||
NS_IMETHOD OnStatus(nsIChannel* channel, nsISupports *ctxt, const PRUnichar *aMsg);
|
||||
NS_DECL_NSIPROGRESSEVENTSINK
|
||||
#else
|
||||
nsresult Stop(void);
|
||||
|
||||
|
|
|
@ -138,17 +138,13 @@ public:
|
|||
|
||||
#ifdef NECKO
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status,
|
||||
const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt, nsIInputStream *inStr,
|
||||
PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
||||
// nsIProgressEventSink methods:
|
||||
NS_IMETHOD OnProgress(nsIChannel* channel, nsISupports *ctxt, PRUint32 aProgress, PRUint32 aProgressMax);
|
||||
NS_IMETHOD OnStatus(nsIChannel* channel, nsISupports *ctxt, const PRUnichar *aMsg);
|
||||
NS_DECL_NSIPROGRESSEVENTSINK
|
||||
#else
|
||||
nsresult Stop(void);
|
||||
|
||||
|
|
|
@ -99,15 +99,11 @@ public:
|
|||
NS_METHOD CreateAnonymousResource(const nsString& aPrefixURI, nsCOMPtr<nsIRDFResource>* aResult);
|
||||
|
||||
#ifdef NECKO
|
||||
// nsIStreamObserver
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status,
|
||||
const PRUnichar *errorMsg);
|
||||
|
||||
// nsIStreamObserver
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt,
|
||||
nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
#else
|
||||
// stream observer
|
||||
|
||||
|
|
|
@ -54,13 +54,13 @@ public:
|
|||
|
||||
#ifdef NECKO
|
||||
// nsIProgressEventSink methods:
|
||||
NS_IMETHOD OnProgress(nsIChannel* channel, nsISupports* context, PRUint32 Progress, PRUint32 ProgressMax);
|
||||
NS_IMETHOD OnStatus(nsIChannel* channel, nsISupports* context, const PRUnichar* aMmsg);
|
||||
NS_DECL_NSIPROGRESSEVENTSINK
|
||||
|
||||
// nsIStreamObserver methods:
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener methods:
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
#else
|
||||
NS_IMETHOD GetBindInfo(nsIURI* aURL, nsStreamBindingInfo* aInfo) { return NS_ERROR_NOT_IMPLEMENTED; }
|
||||
NS_IMETHOD OnDataAvailable(nsIURI* aURL, nsIInputStream *aIStream, PRUint32 aLength);
|
||||
|
|
|
@ -66,14 +66,10 @@ class nsXPInstallManager : public nsIXPINotifier,
|
|||
|
||||
#ifdef NECKO
|
||||
// nsIStreamObserver
|
||||
NS_IMETHOD OnStartRequest(nsIChannel* channel, nsISupports *ctxt);
|
||||
NS_IMETHOD OnStopRequest(nsIChannel* channel, nsISupports *ctxt,
|
||||
nsresult status, const PRUnichar *errorMsg);
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsIStreamListener
|
||||
NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports *ctxt,
|
||||
nsIInputStream *inStr,
|
||||
PRUint32 sourceOffset,
|
||||
PRUint32 count);
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
#else
|
||||
// IStreamListener methods
|
||||
NS_IMETHOD GetBindInfo(nsIURI* aURL, nsStreamBindingInfo* info);
|
||||
|
|
Загрузка…
Ссылка в новой задаче