Bug 387557 Rename nsIAbDirFactory::CreateDirectory to nsIAbDirFactory::GetDirectories. r/sr=bienvenu

This commit is contained in:
bugzilla%standard8.demon.co.uk 2007-07-11 15:28:51 +00:00
Родитель 969c358f69
Коммит 2ddb3ddf5e
8 изменённых файлов: 17 добавлений и 44 удалений

Просмотреть файл

@ -88,9 +88,6 @@
#if defined(XP_WIN) && !defined(__MINGW32__)
#include "nsAbOutlookDirFactory.h"
// These two cause windows.h to be included, if not placed after *DirFactory.h
// then this can cause problems with CreateDirectory not being
// defined.
#include "nsAbOutlookDirectory.h"
#include "nsAbOutlookCard.h"
#endif

Просмотреть файл

@ -44,24 +44,18 @@
interface nsIAbDirectory;
interface nsIAbDirectoryProperties;
[scriptable, uuid(C2308606-1DD1-11B2-87D4-85FCA9B1DC08)]
[scriptable, uuid(19125c19-4582-420d-894c-cb3cf10b9eab)]
interface nsIAbDirFactory : nsISupports
{
/**
* Instantiate new top level address book
* directories given some properties.
* More than one directory may be
* returned depending on the implementation
* and integration with the associated address book
* sources
* Get a top level address book directory and sub directories, given some
* properties.
*
* @param aProperties
* nsIAbDirectoryProperties with the properties
* @return
* Enumeration of nsIAbDirectory
* interfaces
* @param aProperties nsIAbDirectoryProperties with the properties
*
* @return Enumeration of nsIAbDirectory interfaces
*/
nsISimpleEnumerator createDirectory(in nsIAbDirectoryProperties aProperties);
nsISimpleEnumerator getDirectories(in nsIAbDirectoryProperties aProperties);
/**
* Delete a top level address book directory

Просмотреть файл

@ -96,7 +96,7 @@ nsresult nsAbBSDirectory::CreateDirectoriesFromFactory(
// Create the directories
nsCOMPtr<nsISimpleEnumerator> newDirEnumerator;
rv = dirFactory->CreateDirectory(aProperties, getter_AddRefs(newDirEnumerator));
rv = dirFactory->GetDirectories(aProperties, getter_AddRefs(newDirEnumerator));
NS_ENSURE_SUCCESS (rv, rv);
// Enumerate through the directories adding them

Просмотреть файл

@ -62,7 +62,7 @@ nsAbLDAPDirFactory::~nsAbLDAPDirFactory()
{
}
NS_IMETHODIMP nsAbLDAPDirFactory::CreateDirectory(nsIAbDirectoryProperties *aProperties,
NS_IMETHODIMP nsAbLDAPDirFactory::GetDirectories(nsIAbDirectoryProperties *aProperties,
nsISimpleEnumerator **aDirectories)
{
NS_ENSURE_ARG_POINTER(aProperties);
@ -72,7 +72,6 @@ NS_IMETHODIMP nsAbLDAPDirFactory::CreateDirectory(nsIAbDirectoryProperties *aPro
nsCString uri;
nsAutoString description;
nsCString prefName;
rv = aProperties->GetDescription(description);
NS_ENSURE_SUCCESS(rv, rv);
@ -80,14 +79,10 @@ NS_IMETHODIMP nsAbLDAPDirFactory::CreateDirectory(nsIAbDirectoryProperties *aPro
rv = aProperties->GetURI(getter_Copies(uri));
NS_ENSURE_SUCCESS(rv, rv);
rv = aProperties->GetPrefName(getter_Copies(prefName));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIRDFService> rdf = do_GetService (NS_RDF_CONTRACTID "/rdf-service;1", &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIRDFResource> resource;
if ((strncmp(uri.get(), "ldap:", 5) == 0) ||
(strncmp(uri.get(), "ldaps:", 6) == 0)) {
nsCString prefName;
@ -123,9 +118,6 @@ NS_IMETHODIMP nsAbLDAPDirFactory::CreateDirectory(nsIAbDirectoryProperties *aPro
nsCOMPtr<nsIAbDirectory> directory(do_QueryInterface(resource, &rv));
NS_ENSURE_SUCCESS(rv, rv);
rv = directory->SetDirPrefId(prefName);
NS_ENSURE_SUCCESS(rv, rv);
return NS_NewSingletonEnumerator(aDirectories, directory);
}

Просмотреть файл

@ -101,8 +101,9 @@ static nsresult RemoveMailListDBListeners (nsIAddrDatabase* database, nsIAbDirec
return NS_OK;
}
NS_IMETHODIMP nsAbMDBDirFactory::CreateDirectory(nsIAbDirectoryProperties *aProperties,
nsISimpleEnumerator **_retval)
NS_IMETHODIMP nsAbMDBDirFactory::GetDirectories(
nsIAbDirectoryProperties *aProperties,
nsISimpleEnumerator **_retval)
{
NS_ENSURE_ARG_POINTER(aProperties);
NS_ENSURE_ARG_POINTER(_retval);

Просмотреть файл

@ -50,8 +50,8 @@
NS_IMPL_ISUPPORTS1(nsAbOSXDirFactory, nsIAbDirFactory)
NS_IMETHODIMP
nsAbOSXDirFactory::CreateDirectory(nsIAbDirectoryProperties *aProperties,
nsISimpleEnumerator **aDirectories)
nsAbOSXDirFactory::GetDirectories(nsIAbDirectoryProperties *aProperties,
nsISimpleEnumerator **aDirectories)
{
NS_ENSURE_ARG_POINTER(aProperties);
NS_ENSURE_ARG_POINTER(aDirectories);

Просмотреть файл

@ -58,15 +58,6 @@ static PRLogModuleInfo* gAbOutlookDirFactoryLog
#define PRINTF(args) PR_LOG(nsAbOutlookDirFactoryLog, PR_LOG_DEBUG, args)
// In case someone is wondering WHY I have to undefine CreateDirectory,
// it's because the windows files winbase.h and wininet.h define this
// to CreateDirectoryA/W (for reasons best left unknown) and with the
// MAPI stuff, I end up including this, which wreaks havoc on my symbol
// table.
#ifdef CreateDirectory
# undef CreateDirectory
#endif // CreateDirectory
NS_IMPL_ISUPPORTS1(nsAbOutlookDirFactory, nsIAbDirFactory)
nsAbOutlookDirFactory::nsAbOutlookDirFactory(void)
@ -94,8 +85,9 @@ static nsresult parseProperties(nsIAbDirectoryProperties *aProperties, nsAbWinTy
return NS_OK;
}
NS_IMETHODIMP nsAbOutlookDirFactory::CreateDirectory(nsIAbDirectoryProperties *aProperties,
nsISimpleEnumerator **aDirectories)
NS_IMETHODIMP nsAbOutlookDirFactory::GetDirectories(
nsIAbDirectoryProperties *aProperties,
nsISimpleEnumerator **aDirectories)
{
NS_ENSURE_ARG_POINTER(aProperties);
NS_ENSURE_ARG_POINTER(aDirectories);

Просмотреть файл

@ -164,9 +164,6 @@
#if defined(XP_WIN) && !defined(__MINGW32__)
#include "nsAbOutlookDirFactory.h"
// These two cause windows.h to be included, if not placed after *DirFactory.h
// then this can cause problems with CreateDirectory not being
// defined.
#include "nsAbOutlookDirectory.h"
#include "nsAbOutlookCard.h"
#endif