if (serverFolder) { nsXPIDLString serverName; server->GetPrettyName(getter_Copies(serverName)); serverFolder->SetPrettyName(NS_CONST_CAST(PRUnichar*, (const PRUnichar*)serverName)); }
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;  if (serverFolder) {    nsXPIDLString serverName;    server->GetPrettyName(getter_Copies(serverName));    serverFolder->SetPrettyName(NS_CONST_CAST(PRUnichar*,                                              (const PRUnichar*)serverName));  }  // 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;}