nsIRDFService, is it available for C++ XPCOM?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

nsIRDFService, is it available for C++ XPCOM?

juan.f.gamez
I am trying to do something simple here. I have a working C++ XPCOM
component that all it needs to do is manipulate FireFox's bookmarks.
Why is it to obscure to find a way to do this. I have searched and
searched about this topic to not avail.

I don't even understand why nsIBookmarksService.idl (or .h) is not in
gecko SDK (I have 1.8.0.4). It is defintely avialable in JS but not C
+
+.  I also read about using RDF services; but that is also not clear
(or available in C++).


1) How can I do such a simple thing as creating a bookmark or
removing
a bookmark?
or
2) How can do something like below for a C++XPCOM (given that
nsIRDFService is not present in the gecko SDK):

const rsce = Components.classes["@mozilla.org/rdf/rdf-service;1"].
   getService(Components.interfaces.nsIRDFService);
var tFolder = rsce.GetResource("NC:BookmarksRoot");
bmarks.createBookmarkInContainer("Name", "http://xyz.com", "xyz.com",
"description", "UTF-8", null, tFolder, null);


Thanks much.

_______________________________________________
dev-tech-rdf mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-rdf
Reply | Threaded
Open this post in threaded view
|

Re: nsIRDFService, is it available for C++ XPCOM?

Neil-4
[hidden email] wrote:

>I don't even understand why nsIBookmarksService.idl (or .h) is not in gecko SDK (I have 1.8.0.4).
>
If you compile your own Firefox then you'll get all the .idl files used
in that version, not just the SDK, but then there's no guarantee that
your component will work in other versions without recompiling.

--
Warning: May contain traces of nuts.
_______________________________________________
dev-tech-rdf mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-rdf