nsCOMPtr <nsIFolder> serverFolder; rv = server->GetRootFolder(getter_AddRefs(serverFolder)); if(NS_FAILED(rv)) return PR_TRUE;
char *serverUri; rv = server->GetServerURI(&serverUri); if (NS_FAILED(rv)) return PR_TRUE;    nsCOMPtr<nsIRDFResource> serverResource; rv = rdf->GetResource(serverUri, getter_AddRefs(serverResource)); PL_strfree(serverUri); if (NS_FAILED(rv)) return PR_TRUE;    nsCOMPtr <nsIFolder> serverFolder = do_QueryInterface(serverResource); if (serverFolder) server->SetRootFolder(serverFolder);
nsMsgAccountManagerDataSource::createServerResources(nsISupports *element,                                                     void *data){  nsresult rv;  // get parameters out of the data argument  serverCreationParams *params = (serverCreationParams*)data;  nsCOMPtr<nsISupportsArray> servers = dont_QueryInterface(params->serverArray);  nsCOMPtr<nsIRDFService> rdf = dont_QueryInterface(params->rdfService);  // the server itself is in the element argument  nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(element, &rv);  if (NS_FAILED(rv)) return PR_TRUE;	nsCOMPtr <nsIFolder> serverFolder;	rv = server->GetRootFolder(getter_AddRefs(serverFolder));	if(NS_FAILED(rv)) return PR_TRUE;  // add the resource to the array  nsCOMPtr<nsIRDFResource> serverResource = do_QueryInterface(serverFolder);	if(!serverResource)		return PR_TRUE;  rv = servers->AppendElement(serverResource);  if (NS_FAILED(rv)) return PR_TRUE;    return PR_TRUE;}