diff options
Diffstat (limited to 'comm/chat/components/public/imIUserStatusInfo.idl')
-rw-r--r-- | comm/chat/components/public/imIUserStatusInfo.idl | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/comm/chat/components/public/imIUserStatusInfo.idl b/comm/chat/components/public/imIUserStatusInfo.idl new file mode 100644 index 0000000000..dba07c3190 --- /dev/null +++ b/comm/chat/components/public/imIUserStatusInfo.idl @@ -0,0 +1,55 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "nsISupports.idl" +#include "nsIObserver.idl" + +//forward declarations +interface nsIFile; +interface nsIFileURL; + +[scriptable, uuid(817918fa-1f4b-4254-9cdb-f906da91c45d)] +interface imIUserStatusInfo: nsISupports { + + readonly attribute AUTF8String statusText; + + // See imIStatusInfo for the values. + readonly attribute short statusType; + + /** + * Set the user's current status (e.g. available or away). + * + * When called with the status type STATUS_UNSET, only the status + * message will be changed. + * + * @param aStatus the new status to use. Only works with STATUS_OFFLINE, + * STATUS_UNAVAILABLE, STATUS_AWAY, STATUS_AVAILABLE and STATUS_INVISIBLE. + * @param aMessage the new status message. Ignored when aStatus is STATUS_OFFLINE. + */ + void setStatus(in short aStatus, in AUTF8String aMessage); + + /** + * Sets the user icon, or removes it if null is passed as a parameter. + * + * Calling this will fire a user-icon-changed notification. + */ + void setUserIcon(in nsIFile aIconFile); + + /** + * Returns the location of the current user icon, or null if no icon is set. + */ + nsIFileURL getUserIcon(); + + /* The setter will fire a user-display-name-changed notification. */ + attribute AUTF8String displayName; + + void addObserver(in nsIObserver aObserver); + void removeObserver(in nsIObserver aObserver); + /* Observers will receive the following notifications: + * status-changed (when either the status type or text has changed) + * user-icon-changed + * user-display-name-changed + * idle-time-changed + */ +}; |