Public Member Functions

nsIDBChangeListener Interface Reference

These callbacks are provided to allow listeners to the message database to update their status when changes occur. More...

import "nsIDBChangeListener.idl";

Inheritance diagram for nsIDBChangeListener:

List of all members.

Public Member Functions

void onHdrFlagsChanged (in nsIMsgDBHdr aHdrChanged, in unsigned long aOldFlags, in unsigned long aNewFlags, in nsIDBChangeListener aInstigator)
 Callback when message flags are changed.
void onHdrDeleted (in nsIMsgDBHdr aHdrChanged, in nsMsgKey aParentKey, in long aFlags, in nsIDBChangeListener aInstigator)
 Callback when message is marked as deleted.
void onHdrAdded (in nsIMsgDBHdr aHdrChanged, in nsMsgKey aParentKey, in long aFlags, in nsIDBChangeListener aInstigator)
 Callback when message is added.
void onParentChanged (in nsMsgKey aKeyChanged, in nsMsgKey oldParent, in nsMsgKey newParent, in nsIDBChangeListener aInstigator)
 Callback when message parrent is changed.
void onAnnouncerGoingAway (in nsIDBChangeAnnouncer instigator)
 Callback when announcer is going away.
void onReadChanged (in nsIDBChangeListener aInstigator)
 Callback when read flag is changed.
void onJunkScoreChanged (in nsIDBChangeListener aInstigator)
 Callback used in case when "junkscore" property is changed.
void onHdrPropertyChanged (in nsIMsgDBHdr aHdrToChange, in PRBool aPreChange, inout PRUint32 aStatus, in nsIDBChangeListener aInstigator)
 Callback used in the general case where any field may have changed.
void onEvent (in nsIMsgDatabase aDB, in string aEvent)
 Generic notification for extensibility.

Detailed Description

These callbacks are provided to allow listeners to the message database to update their status when changes occur.


Member Function Documentation

void nsIDBChangeListener::onAnnouncerGoingAway ( in nsIDBChangeAnnouncer  instigator  ) 

Callback when announcer is going away.

This is good place to release strong pointers to announcer.

Parameters:
instigator Object that initiated the change. Can be null.
void nsIDBChangeListener::onEvent ( in nsIMsgDatabase  aDB,
in string  aEvent 
)

Generic notification for extensibility.

Common events should be documented here so we have a hope of keeping the documentation up to date. Current events are: "DBOpened" - When a pending listener becomes real. This can happen when the existing db is force closed and a new one opened. Only registered pending listeners are notified.

Parameters:
aDB the db for this event.
aEvent type of event.
void nsIDBChangeListener::onHdrAdded ( in nsIMsgDBHdr  aHdrChanged,
in nsMsgKey  aParentKey,
in long  aFlags,
in nsIDBChangeListener  aInstigator 
)

Callback when message is added.

Parameters:
aHdrChanged The message header that is added.
aParentKey Parent key of message.
aFlags Flags that new message will have.
aInstigator Object that initiated the change. Can be null.
void nsIDBChangeListener::onHdrDeleted ( in nsIMsgDBHdr  aHdrChanged,
in nsMsgKey  aParentKey,
in long  aFlags,
in nsIDBChangeListener  aInstigator 
)

Callback when message is marked as deleted.

Parameters:
aHdrChanged The message header that is going to be deleted.
aParentKey Key of parent.
aFlags Flags that message has before delete.
aInstigator Object that initiated the change. Can be null.
void nsIDBChangeListener::onHdrFlagsChanged ( in nsIMsgDBHdr  aHdrChanged,
in unsigned long  aOldFlags,
in unsigned long  aNewFlags,
in nsIDBChangeListener  aInstigator 
)

Callback when message flags are changed.

Parameters:
aHdrChanged The changed header.
aOldFlags Message flags prior to change.
aNewFlags Message flags after change.
aInstigator Object that initiated the change.
void nsIDBChangeListener::onHdrPropertyChanged ( in nsIMsgDBHdr  aHdrToChange,
in PRBool  aPreChange,
inout PRUint32  aStatus,
in nsIDBChangeListener  aInstigator 
)

Callback used in the general case where any field may have changed.

OnHdrPropertyChanged is called twice per change. On the first call, aPreChange is true, and aStatus is undefined. OnHdrPropertyChanged saves any required status in aStatus (such as a filter match). The calling function stores the value of aStatus, changes the header aHdrToChange, then calls OnHdrPropertyChanged again with aPreChange false. On this second call, the stored value of aStatus is provided, so that any changes may be noted.

Parameters:
aHdrToChange the message header that is changing.
aPreChange true on first call before change, false on second call after change
aStatus storage location provided by calling routine for status
aInstigator object that initiated the change
void nsIDBChangeListener::onJunkScoreChanged ( in nsIDBChangeListener  aInstigator  ) 

Callback used in case when "junkscore" property is changed.

Parameters:
aInstigator Object that initiated the change. Can be null.
void nsIDBChangeListener::onParentChanged ( in nsMsgKey  aKeyChanged,
in nsMsgKey  oldParent,
in nsMsgKey  newParent,
in nsIDBChangeListener  aInstigator 
)

Callback when message parrent is changed.

Parent is changed when message is deleted or moved.

Parameters:
aKeyChanged The message key that parent key was changed.
oldParent Old parent key.
newParent New parent key.
aInstigator Object that initiated the change. Can be null.
void nsIDBChangeListener::onReadChanged ( in nsIDBChangeListener  aInstigator  ) 

Callback when read flag is changed.

Parameters:
aInstigator Object that initiated the change. Can be null.

The documentation for this interface was generated from the following file: