mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1722668 - Expose nsFileStream via the component manager; r=necko-reviewers,dragana,jari
Differential Revision: https://phabricator.services.mozilla.com/D123773
This commit is contained in:
parent
d78c89f78e
commit
d730017508
@ -901,6 +901,14 @@ nsSafeFileOutputStream::Finish() {
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsFileStream
|
||||
|
||||
nsresult nsFileStream::Create(nsISupports* aOuter, REFNSIID aIID,
|
||||
void** aResult) {
|
||||
NS_ENSURE_NO_AGGREGATION(aOuter);
|
||||
|
||||
RefPtr<nsFileStream> stream = new nsFileStream();
|
||||
return stream->QueryInterface(aIID, aResult);
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(nsFileStream, nsFileStreamBase, nsIInputStream,
|
||||
nsIOutputStream, nsIFileStream)
|
||||
|
||||
|
@ -258,6 +258,8 @@ class nsFileStream : public nsFileStreamBase,
|
||||
public nsIOutputStream,
|
||||
public nsIFileStream {
|
||||
public:
|
||||
static nsresult Create(nsISupports* aOuter, REFNSIID aIID, void** aResult);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIFILESTREAM
|
||||
NS_FORWARD_NSIINPUTSTREAM(nsFileStreamBase::)
|
||||
|
@ -142,6 +142,12 @@ Classes = [
|
||||
'legacy_constructor': 'nsFileOutputStream::Create',
|
||||
'headers': ['nsFileStreams.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{648705e9-757a-4d4b-a5bF-0248e512c309}',
|
||||
'contract_ids': ['@mozilla.org/network/file-stream;1'],
|
||||
'legacy_constructor': 'nsFileStream::Create',
|
||||
'headers': ['nsFileStreams.h'],
|
||||
},
|
||||
{
|
||||
'name': 'HttpActivityDistributor',
|
||||
'cid': '{15629ada-a41c-4a09-961f-6553cd60b1a2}',
|
||||
|
@ -342,6 +342,14 @@
|
||||
} \
|
||||
}
|
||||
|
||||
#define NS_LOCALFILESTREAM_CONTRACTID "@mozilla.org/network/file-stream;1"
|
||||
#define NS_LOCALFILESTREAM_CID \
|
||||
{ /* 648705e9-757a-4d4b-a5bF-0248e512c309 */ \
|
||||
0x648705e9, 0x757a, 0x4d4b, { \
|
||||
0xa5, 0xbF, 0x02, 0x48, 0xe5, 0x12, 0xc3, 0x09 \
|
||||
} \
|
||||
}
|
||||
|
||||
#define NS_BUFFEREDINPUTSTREAM_CONTRACTID \
|
||||
"@mozilla.org/network/buffered-input-stream;1"
|
||||
#define NS_BUFFEREDINPUTSTREAM_CID \
|
||||
|
Loading…
Reference in New Issue
Block a user