Rename Addressbook classes nsIAutoCompleteSession & nsIAutoCompleteListener to avoid any conflict with the new autocomplete widget during it's landing. R=mscott.

This commit is contained in:
ducarroz%netscape.com 2000-04-12 06:12:41 +00:00
parent af99b19a63
commit 32b3ac7287
6 changed files with 13 additions and 14 deletions

View File

@ -38,8 +38,8 @@ XPIDLSRCS = \
nsIAddressBook.idl \
nsIAbBase.idl \
nsIAddrBookSession.idl \
nsIAutoCompleteListener.idl \
nsIAutoCompleteSession.idl \
nsIAbAutoCompleteListener.idl \
nsIAbAutoCompleteSession.idl \
nsIAbAddressCollecter.idl \
nsIAbUpgrader.idl \
nsIAddbookUrl.idl \

View File

@ -32,8 +32,8 @@ XPIDLSRCS = \
.\nsIAddrDatabase.idl \
.\nsIAddressBook.idl \
.\nsIAddrBookSession.idl \
.\nsIAutoCompleteSession.idl \
.\nsIAutoCompleteListener.idl \
.\nsIAbAutoCompleteSession.idl \
.\nsIAbAutoCompleteListener.idl \
.\nsIAbAddressCollecter.idl \
.\nsIAbUpgrader.idl \
.\nsIAddbookUrl.idl \

View File

@ -44,7 +44,7 @@ nsresult NS_NewAbAutoCompleteSession(const nsIID &aIID, void ** aInstancePtrResu
{
nsAbAutoCompleteSession * abSession = new nsAbAutoCompleteSession();
if (abSession)
return abSession->QueryInterface(NS_GET_IID(nsIAutoCompleteSession), aInstancePtrResult);
return abSession->QueryInterface(NS_GET_IID(nsIAbAutoCompleteSession), aInstancePtrResult);
else
return NS_ERROR_OUT_OF_MEMORY; /* we couldn't allocate the object */
}
@ -52,7 +52,7 @@ nsresult NS_NewAbAutoCompleteSession(const nsIID &aIID, void ** aInstancePtrResu
return NS_ERROR_NULL_POINTER; /* aInstancePtrResult was NULL....*/
}
NS_IMPL_ISUPPORTS(nsAbAutoCompleteSession, NS_GET_IID(nsIAutoCompleteSession))
NS_IMPL_ISUPPORTS(nsAbAutoCompleteSession, NS_GET_IID(nsIAbAutoCompleteSession))
nsAbAutoCompleteSession::nsAbAutoCompleteSession()
{
@ -172,7 +172,7 @@ NS_IMETHODIMP
nsAbAutoCompleteSession::AutoComplete(nsIMsgIdentity *aIdentity,
nsISupports *aParam,
const PRUnichar *aSearchString,
nsIAutoCompleteListener *aResultListener)
nsIAbAutoCompleteListener *aResultListener)
{
// mscott - right now I'm not even going to bother to make this synchronous...
// I'll beef it up with some test data later but we want to see if this idea works for right now...

View File

@ -23,8 +23,8 @@
#ifndef nsAbAutoCompleteSession_h___
#define nsAbAutoCompleteSession_h___
#include "nsIAutoCompleteSession.h"
#include "nsIAutoCompleteListener.h"
#include "nsIAbAutoCompleteSession.h"
#include "nsIAbAutoCompleteListener.h"
#include "nsIMsgHeaderParser.h"
#include "nsCOMPtr.h"
#include "msgCore.h"
@ -39,11 +39,11 @@ typedef struct
#define MAX_ENTRIES 100
class nsAbAutoCompleteSession : public nsIAutoCompleteSession
class nsAbAutoCompleteSession : public nsIAbAutoCompleteSession
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIAUTOCOMPLETESESSION
NS_DECL_NSIABAUTOCOMPLETESESSION
nsAbAutoCompleteSession();
virtual ~nsAbAutoCompleteSession();
@ -52,7 +52,7 @@ protected:
nsresult PopulateTableWithAB(nsIEnumerator * aABCards); // enumerates through the cards and adds them to the table
PRUnichar* BuildSearchResult(PRUint32 nIndex, nsIMsgHeaderParser* parser);
nsCOMPtr<nsIAutoCompleteListener> m_resultListener;
nsCOMPtr<nsIAbAutoCompleteListener> m_resultListener;
PRBool m_tableInitialized;
nsAbStubEntry m_searchNameCompletionEntryTable[MAX_ENTRIES];
PRInt32 m_numEntries;

View File

@ -38,7 +38,6 @@ var AddressAutoCompleteListener = {
dump("value = " + aItem.value + "\n");
dump("aOriginalString = " + aOriginalString + "\n");
dump("aMatch = " + aMatch + "\n");
aItem.value = aMatch;
aItem.lastValue = aMatch;
}
@ -75,7 +74,7 @@ function AutoCompleteAddress(inputElement)
ac = ac.getService();
}
if (ac) {
ac = ac.QueryInterface(Components.interfaces.nsIAutoCompleteSession);
ac = ac.QueryInterface(Components.interfaces.nsIAbAutoCompleteSession);
}
if (!identityElement)