nsresult DIR_AddNewAddressBook(const PRUnichar *dirName, const char *fileName, PRBool migrating, DIR_Server** pServer)
nsresult DIR_AddNewAddressBook(const PRUnichar *dirName, const char *fileName, PRBool migrating, DirectoryType dirType, DIR_Server** pServer)
nsresult DIR_AddNewAddressBook(const PRUnichar *dirName, const char *fileName, PRBool migrating, DIR_Server** pServer){	DIR_Server * server = (DIR_Server *) PR_Malloc(sizeof(DIR_Server));	DIR_InitServerWithType (server, PABDirectory);	if (!dir_ServerList)		DIR_GetDirServers();	if (dir_ServerList)	{		PRInt32 count = dir_ServerList->Count();		nsString descString(dirName);		PRInt32 unicharLength = descString.Length();		INTL_ConvertFromUnicode(dirName, unicharLength, &server->description);		server->position = count + 1;		if (fileName)			server->fileName = PL_strdup(fileName);		else			DIR_SetFileName(&server->fileName, kMainPersonalAddressBook);		dir_ServerList->AppendElement(server);		if (!migrating) {			DIR_SavePrefsForOneServer(server); 		}#ifdef DEBUG_sspitzer		else {			printf("don't set the prefs, they are already set since this ab was migrated\n");		}#endif		*pServer = server;		// save new address book into pref file 		nsresult rv = NS_OK;		NS_WITH_SERVICE(nsIPref, pPref, kPrefCID, &rv); 		if (NS_FAILED(rv) || !pPref) 			return NS_ERROR_FAILURE;		pPref->SavePrefFile();		return NS_OK;	}	return NS_ERROR_FAILURE;}