BookmarkParser parser; parser.Init(nsnull, mInner);
nsresult rv; nsCOMPtr<nsIRDFResource> bookmark;
nsBookmarksService::AddBookmark(const char *aURI, const PRUnichar *aOptionalTitle){	// XXX For the moment, just add it as a child of	// BookmarksRoot. Constructing a parser object to do this is so	// gross. We need to factor AddBookmark() into its own little	// routine or something.	BookmarkParser parser;	parser.Init(nsnull, mInner);	nsresult rv;	nsCOMPtr<nsIRDFContainer> container;	rv = nsComponentManager::CreateInstance(kRDFContainerCID,						nsnull,						nsIRDFContainer::GetIID(),						getter_AddRefs(container));	if (NS_FAILED(rv)) return rv;	rv = container->Init(mInner, kNC_BookmarksRoot);	if (NS_FAILED(rv)) return rv;	// convert the current date/time from microseconds (PRTime) to seconds	PRTime		now64 = PR_Now(), million;	LL_I2L(million, PR_USEC_PER_SEC);	LL_DIV(now64, now64, million);	PRInt32		now32;	LL_L2I(now32, now64);	rv = parser.AddBookmark(container, aURI, aOptionalTitle, now32,				0L, 0L, nsnull, kNC_Bookmark, nsnull);	if (NS_FAILED(rv)) return rv;	mDirty = PR_TRUE;	return(NS_OK);}