Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Interface OperationSetAvatar

All Superinterfaces:
OperationSet
All Known Implementing Classes:
AbstractOperationSetAvatar, OperationSetAvatarIcqImpl, OperationSetAvatarJabberImpl, OperationSetAvatarMsnImpl, OperationSetAvatarSipImpl

public interface OperationSetAvatar
extends OperationSet

This interface is an extension of the operation set, meant to be implemented by protocols that support user avatar.

Author:
Damien Roth

Method Summary
 void addAvatarListener(AvatarListener listener)
          Registers a listener that would receive events upon avatar changes.
 byte[] getAvatar()
          Returns the current avatar of this protocol.
 int getMaxHeight()
          Returns the maximum height of the avatar.
 int getMaxSize()
          Returns the maximum size of the avatar.
 int getMaxWidth()
          Returns the maximum width of the avatar.
 void removeAvatarListener(AvatarListener listener)
          Removes the specified group change listener so that it won't receive any further events.
 void setAvatar(byte[] avatar)
          Defines a new avatar for this protocol
 

Method Detail

getMaxWidth

int getMaxWidth()
Returns the maximum width of the avatar. This method should return 0 (zero) if there is no maximum width.

Returns:
the maximum width of the avatar

getMaxHeight

int getMaxHeight()
Returns the maximum height of the avatar. This method should return 0 (zero) if there is no maximum height.

Returns:
the maximum height of the avatar

getMaxSize

int getMaxSize()
Returns the maximum size of the avatar. This method should return 0 (zero) if there is no maximum size.

Returns:
the maximum size of the avatar

setAvatar

void setAvatar(byte[] avatar)
Defines a new avatar for this protocol

Parameters:
avatar - the new avatar

getAvatar

byte[] getAvatar()
Returns the current avatar of this protocol. May return null if the account has no avatar

Returns:
avatar's bytes or null if no avatar set

addAvatarListener

void addAvatarListener(AvatarListener listener)
Registers a listener that would receive events upon avatar changes.

Parameters:
listener - a AvatarListener that would receive events upon avatar changes.

removeAvatarListener

void removeAvatarListener(AvatarListener listener)
Removes the specified group change listener so that it won't receive any further events.

Parameters:
listener - the AvatarListener to remove

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.