jshin,

one thing to keep in mind is the fact that xpcom isn't supposed to know about URIs. since you probably need to use necko methods to get an input stream to the URI, it might make sense to put this NS_ function in nsNetUtil.h.

darin




Jungshik Shin wrote:


I'm wondering what others think of adding the following method to nsIPersistentProperties.
(http://lxr.mozilla.org/seamonkey/source/xpcom/ds/nsIPersistentProperties2.idl)



void loadFromURISpec (in AUTF8String aSpec)


While working on bug 208213 (http://bugzilla.mozilla.org/show_bug.cgi?id=208213),
I realized that the following pattern is used in several places (mostly under gfx but also
under layout/mathml) :


1. get a url with a const string (url spec)
2. get an input stream
3. create an instance of nsIPer...Prop.
4. load from the input stream

See, for instance,

http://lxr.mozilla.org/seamonkey/source/gfx/src/mac/nsMacUnicodeFontInfo.cpp#481


(or http://lxr.mozilla.org/seamonkey/search?string=nsIPersistentProperties)


If not a method in the interface, how abuot NS_LodPeristenPropertiesFromURI?

Any opinion?

Jungshik





Reply via email to