Switch flag notifications to work on a message instead of a generic parameter b=226270 r+sr=bienvenu

This commit is contained in:
neil%parkwaycc.co.uk 2004-12-23 21:08:20 +00:00
Родитель 719adf8457
Коммит a25c1e6222
13 изменённых файлов: 18 добавлений и 19 удалений

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

@ -40,10 +40,11 @@
interface nsIMsgFolder;
interface nsIRDFResource;
interface nsIMsgDBHdr;
typedef unsigned long folderListenerNotifyFlagValue;
[scriptable, uuid(d4ff86da-1dd1-11b2-a6f6-9fcd348bcc34)]
[scriptable, uuid(1c8e6a86-ae35-4c95-8e43-b2e98d6d1574)]
interface nsIFolderListener : nsISupports {
const folderListenerNotifyFlagValue added = 0x1;
void OnItemAdded(in nsIRDFResource parentItem,
@ -78,7 +79,7 @@ interface nsIFolderListener : nsISupports {
in wstring newValue);
const folderListenerNotifyFlagValue propertyFlagChanged = 0x40;
void OnItemPropertyFlagChanged(in nsISupports item,
void OnItemPropertyFlagChanged(in nsIMsgDBHdr item,
in nsIAtom property,
in unsigned long oldFlag,
in unsigned long newFlag);

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

@ -71,7 +71,7 @@ typedef long nsMsgBiffState;
// enumerated type for determining if a message has been replied to, forwarded, etc.
typedef long nsMsgDispositionState;
[scriptable, uuid(85e39ff0-b248-11d2-b7ef-00805f05ffa5)]
[scriptable, uuid(a7555ae2-78a4-40ed-b49f-744ad42b6f2d)]
interface nsIMsgFolder : nsICollection {
const nsMsgBiffState nsMsgBiffState_NewMail = 0; // User has new mail waiting.
@ -446,7 +446,7 @@ const nsMsgBiffState nsMsgBiffState_Unknown = 2; // We dunno whether there is ne
void NotifyBoolPropertyChanged(in nsIAtom property,
in boolean oldValue,
in boolean newValue);
void NotifyPropertyFlagChanged(in nsISupports item,
void NotifyPropertyFlagChanged(in nsIMsgDBHdr item,
in nsIAtom property,
in unsigned long oldValue,
in unsigned long newValue);

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

@ -118,7 +118,7 @@ nsMessengerOS2Integration::OnItemRemoved(nsIRDFResource *, nsISupports *)
}
NS_IMETHODIMP
nsMessengerOS2Integration::OnItemPropertyFlagChanged(nsISupports *item, nsIAtom *property, PRUint32 oldFlag, PRUint32 newFlag)
nsMessengerOS2Integration::OnItemPropertyFlagChanged(nsIMsgDBHdr *item, nsIAtom *property, PRUint32 oldFlag, PRUint32 newFlag)
{
return NS_OK;
}

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

@ -735,7 +735,7 @@ void nsMessengerWinIntegration::RevertToNonUnicodeShellAPI()
}
NS_IMETHODIMP
nsMessengerWinIntegration::OnItemPropertyFlagChanged(nsISupports *item, nsIAtom *property, PRUint32 oldFlag, PRUint32 newFlag)
nsMessengerWinIntegration::OnItemPropertyFlagChanged(nsIMsgDBHdr *item, nsIAtom *property, PRUint32 oldFlag, PRUint32 newFlag)
{
nsresult rv = NS_OK;

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

@ -3111,7 +3111,7 @@ NS_IMETHODIMP nsMsgAccountManager::OnItemUnicharPropertyChanged(nsIRDFResource *
}
NS_IMETHODIMP nsMsgAccountManager::OnItemPropertyFlagChanged(nsISupports *item, nsIAtom *property, PRUint32 oldFlag, PRUint32 newFlag)
NS_IMETHODIMP nsMsgAccountManager::OnItemPropertyFlagChanged(nsIMsgDBHdr *item, nsIAtom *property, PRUint32 oldFlag, PRUint32 newFlag)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

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

@ -1290,7 +1290,7 @@ nsMsgAccountManagerDataSource::OnItemRemoved(nsIRDFResource *, nsISupports *)
}
nsresult
nsMsgAccountManagerDataSource::OnItemPropertyFlagChanged(nsISupports *, nsIAtom *, PRUint32, PRUint32)
nsMsgAccountManagerDataSource::OnItemPropertyFlagChanged(nsIMsgDBHdr *, nsIAtom *, PRUint32, PRUint32)
{
return NS_OK;
}

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

@ -997,7 +997,7 @@ nsMsgFolderDataSource::OnItemBoolPropertyChanged(nsIRDFResource *resource,
}
NS_IMETHODIMP
nsMsgFolderDataSource::OnItemPropertyFlagChanged(nsISupports *item,
nsMsgFolderDataSource::OnItemPropertyFlagChanged(nsIMsgDBHdr *item,
nsIAtom *property,
PRUint32 oldFlag,
PRUint32 newFlag)

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

@ -193,7 +193,7 @@ nsMsgMailSession::OnItemBoolPropertyChanged(nsIRDFResource *item,
}
NS_IMETHODIMP
nsMsgMailSession::OnItemPropertyFlagChanged(nsISupports *item,
nsMsgMailSession::OnItemPropertyFlagChanged(nsIMsgDBHdr *item,
nsIAtom *property,
PRUint32 oldValue,
PRUint32 newValue)

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

@ -267,7 +267,7 @@ nsStatusBarBiffManager::OnItemUnicharPropertyChanged(nsIRDFResource *item, nsIAt
}
NS_IMETHODIMP
nsStatusBarBiffManager::OnItemPropertyFlagChanged(nsISupports *item, nsIAtom *property, PRUint32 oldFlag, PRUint32 newFlag)
nsStatusBarBiffManager::OnItemPropertyFlagChanged(nsIMsgDBHdr *item, nsIAtom *property, PRUint32 oldFlag, PRUint32 newFlag)
{
return NS_OK;
}

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

@ -586,7 +586,7 @@ nsresult nsMsgDBFolder::ReadDBFolderInfo(PRBool force)
}
nsresult nsMsgDBFolder::SendFlagNotifications(nsISupports *item, PRUint32 oldFlags, PRUint32 newFlags)
nsresult nsMsgDBFolder::SendFlagNotifications(nsIMsgDBHdr *item, PRUint32 oldFlags, PRUint32 newFlags)
{
nsresult rv = NS_OK;
@ -831,9 +831,7 @@ NS_IMETHODIMP nsMsgDBFolder::OnHdrChange(nsIMsgDBHdr *aHdrChanged, PRUint32 aOld
{
if(aHdrChanged)
{
nsCOMPtr<nsISupports> msgSupports(do_QueryInterface(aHdrChanged));
if(msgSupports)
SendFlagNotifications(msgSupports, aOldFlags, aNewFlags);
SendFlagNotifications(aHdrChanged, aOldFlags, aNewFlags);
UpdateSummaryTotals(PR_TRUE);
}
@ -4429,7 +4427,7 @@ nsMsgDBFolder::NotifyBoolPropertyChanged(nsIAtom* property,
}
nsresult
nsMsgDBFolder::NotifyPropertyFlagChanged(nsISupports *item, nsIAtom *property,
nsMsgDBFolder::NotifyPropertyFlagChanged(nsIMsgDBHdr *item, nsIAtom *property,
PRUint32 oldValue, PRUint32 newValue)
{
PRInt32 i;

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

@ -130,7 +130,7 @@ protected:
virtual nsresult ReadDBFolderInfo(PRBool force);
virtual nsresult FlushToFolderCache();
virtual nsresult GetDatabase(nsIMsgWindow *aMsgWindow) = 0;
virtual nsresult SendFlagNotifications(nsISupports *item, PRUint32 oldFlags, PRUint32 newFlags);
virtual nsresult SendFlagNotifications(nsIMsgDBHdr *item, PRUint32 oldFlags, PRUint32 newFlags);
nsresult CheckWithNewMessagesStatus(PRBool messageAdded);
nsresult OnHdrAddedOrDeleted(nsIMsgDBHdr *hdrChanged, PRBool added);
nsresult CreateFileSpecForDB(const char *userLeafName, nsFileSpec &baseDir, nsIFileSpec **dbFileSpec);

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

@ -483,7 +483,7 @@ NS_IMETHODIMP nsLocalUndoFolderListener::OnItemUnicharPropertyChanged(nsIRDFReso
return NS_OK;
}
NS_IMETHODIMP nsLocalUndoFolderListener::OnItemPropertyFlagChanged(nsISupports *item, nsIAtom *property, PRUint32 oldFlag, PRUint32 newFlag)
NS_IMETHODIMP nsLocalUndoFolderListener::OnItemPropertyFlagChanged(nsIMsgDBHdr *item, nsIAtom *property, PRUint32 oldFlag, PRUint32 newFlag)
{
return NS_OK;
}

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

@ -353,7 +353,7 @@ NS_IMETHODIMP nsRssIncomingServer::OnItemUnicharPropertyChanged(nsIRDFResource *
}
NS_IMETHODIMP nsRssIncomingServer::OnItemPropertyFlagChanged(nsISupports *item, nsIAtom *property, PRUint32 oldFlag, PRUint32 newFlag)
NS_IMETHODIMP nsRssIncomingServer::OnItemPropertyFlagChanged(nsIMsgDBHdr *item, nsIAtom *property, PRUint32 oldFlag, PRUint32 newFlag)
{
return NS_ERROR_NOT_IMPLEMENTED;
}