From 309d210a335c29dcbda71162478bc9c324862bbd Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Fri, 9 Jul 1999 19:00:31 +0000 Subject: [PATCH] changes to get simple addressbook autocompletion working. not part of the build yet. --- mailnews/addrbook/public/nsIAutoCompleteListener.idl | 2 +- mailnews/addrbook/public/nsIAutoCompleteSession.idl | 2 +- mailnews/addrbook/src/nsAbAutoCompleteSession.cpp | 10 +++++----- mailnews/addrbook/src/nsAbAutoCompleteSession.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mailnews/addrbook/public/nsIAutoCompleteListener.idl b/mailnews/addrbook/public/nsIAutoCompleteListener.idl index a6cfacd8a27..7ab912baee5 100644 --- a/mailnews/addrbook/public/nsIAutoCompleteListener.idl +++ b/mailnews/addrbook/public/nsIAutoCompleteListener.idl @@ -21,6 +21,6 @@ [scriptable, uuid(CA2A6B08-3625-11d3-988E-001083010E9B)] interface nsIAutoCompleteListener : nsISupports { - void OnAutoCompleteResult(in wstring aOriginalString, in wstring aMatch); + void OnAutoCompleteResult(in wstring aDocId, in wstring aOriginalString, in wstring aMatch); }; diff --git a/mailnews/addrbook/public/nsIAutoCompleteSession.idl b/mailnews/addrbook/public/nsIAutoCompleteSession.idl index 1017c362b16..c8b7a1c9c03 100644 --- a/mailnews/addrbook/public/nsIAutoCompleteSession.idl +++ b/mailnews/addrbook/public/nsIAutoCompleteSession.idl @@ -23,6 +23,6 @@ interface nsIAutoCompleteListener; [scriptable, uuid(CA2A6B07-3625-11d3-988E-001083010E9B)] interface nsIAutoCompleteSession : nsISupports { - void AutoComplete(in wstring aSearchString, in nsIAutoCompleteListener aResultListener); + void AutoComplete(in wstring doc_id, in wstring aSearchString, in nsIAutoCompleteListener aResultListener); }; diff --git a/mailnews/addrbook/src/nsAbAutoCompleteSession.cpp b/mailnews/addrbook/src/nsAbAutoCompleteSession.cpp index 9ceacba3a55..ead3e48ab11 100644 --- a/mailnews/addrbook/src/nsAbAutoCompleteSession.cpp +++ b/mailnews/addrbook/src/nsAbAutoCompleteSession.cpp @@ -28,7 +28,7 @@ nsresult NS_NewAbAutoCompleteSession(const nsIID &aIID, void ** aInstancePtrResu { nsAbAutoCompleteSession * abSession = new nsAbAutoCompleteSession(); if (abSession) - return abSession->QueryInterface(nsCOMTypeInfo::GetIID(), aInstancePtrResult); + return abSession->QueryInterface(nsCOMTypeInfo::GetIID(), aInstancePtrResult); else return NS_ERROR_OUT_OF_MEMORY; /* we couldn't allocate the object */ } @@ -36,17 +36,17 @@ nsresult NS_NewAbAutoCompleteSession(const nsIID &aIID, void ** aInstancePtrResu return NS_ERROR_NULL_POINTER; /* aInstancePtrResult was NULL....*/ } -NS_IMPL_ISUPPORTS(nsAbAutoCompleteSession, nsCOMTypeInfo::GetIID()) +NS_IMPL_ISUPPORTS(nsAbAutoCompleteSession, nsCOMTypeInfo::GetIID()) nsAbAutoCompleteSession::nsAbAutoCompleteSession() { - NS_INIT_REFCNT; + NS_INIT_REFCNT(); } nsAbAutoCompleteSession::~nsAbAutoCompleteSession() {} -NS_IMETHODIMP nsAbAutoCompleteSession::AutoComplete(const PRUnichar *aSearchString, nsIAutoCompleteListener *aResultListener) +NS_IMETHODIMP nsAbAutoCompleteSession::AutoComplete(const PRUnichar *aDocId, const PRUnichar *aSearchString, nsIAutoCompleteListener *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... @@ -54,7 +54,7 @@ NS_IMETHODIMP nsAbAutoCompleteSession::AutoComplete(const PRUnichar *aSearchStri nsresult rv = NS_OK; nsString2 searchResult("Scott MacGregor "); if (aResultListener) - rv = aResultListener->OnAutoCompleteResult(aSearchString, searchResult.GetUnicode()); + rv = aResultListener->OnAutoCompleteResult(aDocId, aSearchString, searchResult.GetUnicode()); else rv = NS_ERROR_NULL_POINTER; diff --git a/mailnews/addrbook/src/nsAbAutoCompleteSession.h b/mailnews/addrbook/src/nsAbAutoCompleteSession.h index e5acb304c2a..4647557023e 100644 --- a/mailnews/addrbook/src/nsAbAutoCompleteSession.h +++ b/mailnews/addrbook/src/nsAbAutoCompleteSession.h @@ -31,7 +31,7 @@ public: nsAbAutoCompleteSession(); virtual ~nsAbAutoCompleteSession(); - NS_IMETHOD AutoComplete(const PRUnichar *aSearchString, nsIAutoCompleteListener *aResultListener); + NS_IMETHOD AutoComplete(const PRUnichar *aDocId, const PRUnichar *aSearchString, nsIAutoCompleteListener *aResultListener); protected: nsCOMPtr m_resultListener;