mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
add search session to mail news url, not used yet
This commit is contained in:
parent
0435068a83
commit
8700781b1e
@ -125,6 +125,8 @@ NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_MAILNEWS, value)
|
||||
|
||||
#define NS_MSG_ERROR_INVALID_SEARCH_SCOPE NS_MSG_GENERATE_FAILURE(17)
|
||||
|
||||
#define NS_MSG_ERROR_INVALID_SEARCH_TERM NS_MSG_GENERATE_FAILURE(18)
|
||||
|
||||
/* ducarroz: error codes for message compose are defined into compose\src\nsMsgComposeStringBundle.h.
|
||||
Message compose use the same error code space than other mailnews modules. To avoid any
|
||||
conflict, I reserve values between 12500 and 12999 for it.
|
||||
|
@ -29,6 +29,7 @@ interface nsIMsgStatusFeedback;
|
||||
interface nsIMsgIncomingServer;
|
||||
interface nsIMsgWindow;
|
||||
interface nsILoadGroup;
|
||||
interface nsIMsgSearchSession;
|
||||
|
||||
[scriptable, uuid(6CFFCEB0-CB8C-11d2-8065-006008128C4E)]
|
||||
interface nsIMsgMailNewsUrl : nsIURL {
|
||||
@ -62,6 +63,9 @@ interface nsIMsgMailNewsUrl : nsIURL {
|
||||
|
||||
// the load group is computed from the msgWindow
|
||||
readonly attribute nsILoadGroup loadGroup;
|
||||
|
||||
// search session, if we're running a search.
|
||||
attribute nsIMsgSearchSession searchSession;
|
||||
attribute boolean updatingFolder;
|
||||
attribute boolean addToMemoryCache;
|
||||
|
||||
|
@ -101,6 +101,8 @@ nsresult nsMsgMailNewsUrl::SetUrlState(PRBool aRunningUrl, nsresult aExitCode)
|
||||
m_urlListeners->OnStopRunningUrl(this, aExitCode);
|
||||
}
|
||||
}
|
||||
else
|
||||
printf("no listeners in set url state\n");
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -290,6 +292,22 @@ NS_IMETHODIMP nsMsgMailNewsUrl::IsUrlType(PRUint32 type, PRBool *isType)
|
||||
return NS_OK;
|
||||
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgMailNewsUrl::SetSearchSession(nsIMsgSearchSession *aSearchSession)
|
||||
{
|
||||
if (aSearchSession)
|
||||
m_searchSession = do_QueryInterface(aSearchSession);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgMailNewsUrl::GetSearchSession(nsIMsgSearchSession **aSearchSession)
|
||||
{
|
||||
NS_ENSURE_ARG(aSearchSession);
|
||||
*aSearchSession = m_searchSession;
|
||||
NS_IF_ADDREF(*aSearchSession);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// End nsIMsgMailNewsUrl specific support
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "nsIMsgMailNewsUrl.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsILoadGroup.h"
|
||||
|
||||
#include "nsIMsgSearchSession.h"
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Okay, I found that all of the mail and news url interfaces needed to support
|
||||
// several common interfaces (in addition to those provided through nsIURI).
|
||||
@ -62,7 +62,7 @@ protected:
|
||||
nsCOMPtr<nsIMsgStatusFeedback> m_statusFeedback;
|
||||
nsCOMPtr<nsIMsgWindow> m_msgWindow;
|
||||
nsCOMPtr<nsILoadGroup> m_loadGroup;
|
||||
|
||||
nsCOMPtr<nsIMsgSearchSession> m_searchSession;
|
||||
char *m_errorMessage;
|
||||
PRBool m_runningUrl;
|
||||
PRBool m_updatingFolder;
|
||||
|
Loading…
Reference in New Issue
Block a user