nsCOMPtr<nsIMsgFolder> srcFolder; nsCOMPtr<nsISupportsArray> folderArray;  srcFolder = do_QueryInterface(srcResource); if(!srcFolder) return NS_ERROR_NO_INTERFACE;  nsCOMPtr<nsISupports> srcFolderSupports(do_QueryInterface(srcFolder)); if(srcFolderSupports) argumentArray->InsertElementAt(srcFolderSupports, 0);  rv = NS_NewISupportsArray(getter_AddRefs(folderArray)); NS_ENSURE_SUCCESS(rv, rv);  folderArray->AppendElement(dstResource); if (isMove) rv = DoCommand(database, NS_LITERAL_CSTRING(NC_RDF_MOVE), folderArray, argumentArray); else rv = DoCommand(database, NS_LITERAL_CSTRING(NC_RDF_COPY), folderArray, argumentArray); return rv;
rv = DoCommand(database, isMove ? (char *)NC_RDF_MOVE : (char *)NC_RDF_COPY, folderArray, argumentArray); return rv;
nsMessenger::CopyMessages(nsIRDFCompositeDataSource *database,                          nsIRDFResource *srcResource, // folder						              nsIRDFResource *dstResource,                          nsISupportsArray *argumentArray, // nsIMessages                          PRBool isMove){	nsresult rv;  NS_ENSURE_ARG_POINTER(srcResource);  NS_ENSURE_ARG_POINTER(dstResource);  NS_ENSURE_ARG_POINTER(argumentArray);	  nsCOMPtr<nsIMsgFolder> srcFolder;  nsCOMPtr<nsISupportsArray> folderArray;      srcFolder = do_QueryInterface(srcResource);  if(!srcFolder)    return NS_ERROR_NO_INTERFACE;    nsCOMPtr<nsISupports> srcFolderSupports(do_QueryInterface(srcFolder));  if(srcFolderSupports)    argumentArray->InsertElementAt(srcFolderSupports, 0);  rv = NS_NewISupportsArray(getter_AddRefs(folderArray));  NS_ENSURE_SUCCESS(rv, rv);    folderArray->AppendElement(dstResource);  if (isMove)    rv = DoCommand(database, NS_LITERAL_CSTRING(NC_RDF_MOVE), folderArray, argumentArray);  else    rv = DoCommand(database, NS_LITERAL_CSTRING(NC_RDF_COPY), folderArray, argumentArray);  return rv;}