diff --git a/mailnews/base/search/public/nsIMsgSearchSession.idl b/mailnews/base/search/public/nsIMsgSearchSession.idl index 45e8d47315a..a6a34d7404f 100644 --- a/mailnews/base/search/public/nsIMsgSearchSession.idl +++ b/mailnews/base/search/public/nsIMsgSearchSession.idl @@ -47,7 +47,8 @@ interface nsIMsgSearchSession : nsISupports { void AddSearchTermArray (in nsISupportsArray searchTerms); - void CreateSearchTerm (out nsIMsgSearchTerm searchTerm); + nsIMsgSearchTerm createTerm (); + void appendTerm(in nsIMsgSearchTerm term); void RegisterListener (in nsIMsgSearchNotify listener); void UnregisterListener (in nsIMsgSearchNotify listener); diff --git a/mailnews/base/search/src/nsMsgSearchSession.cpp b/mailnews/base/search/src/nsMsgSearchSession.cpp index ab1e8df699b..e88485a1082 100644 --- a/mailnews/base/search/src/nsMsgSearchSession.cpp +++ b/mailnews/base/search/src/nsMsgSearchSession.cpp @@ -72,6 +72,14 @@ nsMsgSearchSession::AddSearchTerm(nsMsgSearchAttribValue attrib, return NS_OK; } +NS_IMETHODIMP +nsMsgSearchSession::AppendTerm(nsIMsgSearchTerm *aTerm) +{ + NS_ENSURE_ARG_POINTER(aTerm); + NS_ENSURE_TRUE(m_termList, NS_ERROR_NOT_INITIALIZED); + return m_termList->AppendElement(aTerm); +} + NS_IMETHODIMP nsMsgSearchSession::AddSearchTermArray(nsISupportsArray *searchTerms) { @@ -80,7 +88,7 @@ nsMsgSearchSession::AddSearchTermArray(nsISupportsArray *searchTerms) } NS_IMETHODIMP -nsMsgSearchSession::CreateSearchTerm(nsIMsgSearchTerm **aResult) +nsMsgSearchSession::CreateTerm(nsIMsgSearchTerm **aResult) { nsMsgSearchTerm *term = new nsMsgSearchTerm; NS_ENSURE_TRUE(term, NS_ERROR_OUT_OF_MEMORY);