Closed Bug 100172 Opened 23 years ago Closed 23 years ago

need scriptable string stream implementation (must support nsIInputStream)

Categories

(Core :: XPCOM, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla0.9.7

People

(Reporter: darin.moz, Assigned: darin.moz)

References

Details

(Keywords: arch)

Attachments

(1 file, 3 obsolete files)

need scriptable string stream implementation (must support nsIInputStream)
this is needed to support nsIUploadChannel usage via JS.
i filed a similar bug a while back, but can't seem to find it now.  i think this
is urgently needed... as in by mozilla0.9.5.
Keywords: mozilla0.9.5
-> me
Assignee: dougt → darin
Severity: normal → major
Keywords: arch
Priority: -- → P2
Target Milestone: --- → mozilla0.9.5
Attached file nsIStringInputStream.idl (obsolete) —
dougt: can you comment on attachment 50334 [details]? thanks!
Does this interface handle double-byte strings (like Japanese)?
I expected to see wstring.

Where do I get the nsIInputStream from?
looks fine:

use the /** **/ style comments instead of the c++ // comment. 
(unless you know more about doxygen that I do, which is probably the case).

Also, I am not sure what the mantra is regarding CONTRACTID, CLASSNAME, and CID
declarations in an IDL.  Rick, Vidur?
brade: you can only upload bytes to a necko channel... you will have to make
sure that the data is properly encoded before uploading.

dougt:

1- will change to /** **/ comments just to be consistent
2- followed nsILocalFile for an example of how CID, CONTRACTID, and CLASSNAME
are declared in XPCOM
This is probably something that we should freeze soon as many scripters will
begin using it.  
take a look at the bottom of
http://www.mozilla.org/projects/embedding/EmbedInterfaceFreeze.html for
information about what is needed to freeze a component...

-- rick
i'm planning to just implement this interface using the impl's in
nsIStringStream.cpp for now... the nsIStringStream.h C++ api will not be touched.
we will also probably want a nsIStringOutputStream and perhaps a
nsIStringIOStream.  but, perhaps those interfaces are less urgently needed.
*** Bug 100171 has been marked as a duplicate of this bug. ***
-> 0.9.6
Target Milestone: mozilla0.9.5 → mozilla0.9.6
looks like i'm not going to have time for this now -> 0.9.7
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.6 → mozilla0.9.7
Attached patch v1.0 patch (obsolete) — Splinter Review
this patch takes a slightly different approach.. see nsIStringStream.idl
Comment on attachment 58507 [details] [diff] [review]
v1.0 patch

actually, this patch still needs work.. the nsIStringInputStream needs a
factory.
Attachment #58507 - Flags: needs-work+
Blocks: 109960
Attached patch v1.1 final patch (obsolete) — Splinter Review
moving some files around:

nsIStringStream.h   -> nsIStringStream.idl
nsIStringStream.cpp -> nsStringStream.cpp

and created:

nsStringStream.h
Attachment #50334 - Attachment is obsolete: true
Attachment #58507 - Attachment is obsolete: true
Attachment #58776 - Attachment is obsolete: true
Comment on attachment 58784 [details] [diff] [review]
v1.2 added contributors per "cvs log" to renamed files

got an r=dougt via AIM
Attachment #58784 - Flags: review+
Comment on attachment 58784 [details] [diff] [review]
v1.2 added contributors per "cvs log" to renamed files

sr=rpotts@netscape.com
Attachment #58784 - Flags: superreview+
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Blocks: 108966
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: