do_GetService(kAddrBookSessionCID, &rv);
do_GetService(NS_ADDRBOOKSESSION_CONTRACTID, &rv);
nsresult DIR_DeleteServerFromList(DIR_Server *server){	if (!server)		return NS_ERROR_NULL_POINTER;	nsresult rv = NS_OK;	nsFileSpec* dbPath = nsnull;	nsCOMPtr<nsIAddrBookSession> abSession = 	         do_GetService(kAddrBookSessionCID, &rv); 	if(NS_SUCCEEDED(rv))		abSession->GetUserProfileDirectory(&dbPath);		if (dbPath)	{		nsCOMPtr<nsIAddrDatabase> database;		(*dbPath) += server->fileName;		// close file before delete it		nsCOMPtr<nsIAddrDatabase> addrDBFactory = 		         do_GetService(kAddressBookDBCID, &rv);		if (NS_SUCCEEDED(rv) && addrDBFactory)			rv = addrDBFactory->Open(dbPath, PR_FALSE, getter_AddRefs(database), PR_TRUE);		if (database)  /* database exists */		{			database->ForceClosed();			dbPath->Delete(PR_FALSE);		}    delete dbPath;		nsVoidArray *dirList = DIR_GetDirectories();		DIR_SetServerPosition(dirList, server, DIR_POS_DELETE);		DIR_DeleteServer(server);		rv = NS_OK;		nsCOMPtr<nsIPref> pPref(do_GetService(NS_PREF_CONTRACTID, &rv)); 		if (NS_FAILED(rv) || !pPref) 			return NS_ERROR_FAILURE;		pPref->SavePrefFile(nsnull);		return NS_OK;	}	return NS_ERROR_NULL_POINTER;}