public abstract class AbstractOperationSetAvatar<T extends ProtocolProviderService> extends java.lang.Object implements OperationSetAvatar
OperationSetAvatar
in order to
make it easier for implementers to provide complete solutions while focusing
on implementation-specific details.Modifier | Constructor and Description |
---|---|
protected |
AbstractOperationSetAvatar(T parentProvider,
OperationSetServerStoredAccountInfo accountInfoOpSet,
int maxWidth,
int maxHeight,
int maxSize) |
Modifier and Type | Method and Description |
---|---|
void |
addAvatarListener(AvatarListener listener)
Registers a listener that would receive events upon avatar changes.
|
protected void |
fireAvatarChanged(byte[] newAvatar)
Notifies all registered listeners of the new event.
|
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
|
protected AbstractOperationSetAvatar(T parentProvider, OperationSetServerStoredAccountInfo accountInfoOpSet, int maxWidth, int maxHeight, int maxSize)
public int getMaxWidth()
OperationSetAvatar
getMaxWidth
in interface OperationSetAvatar
public int getMaxHeight()
OperationSetAvatar
getMaxHeight
in interface OperationSetAvatar
public int getMaxSize()
OperationSetAvatar
getMaxSize
in interface OperationSetAvatar
public byte[] getAvatar()
OperationSetAvatar
getAvatar
in interface OperationSetAvatar
public void setAvatar(byte[] avatar)
OperationSetAvatar
setAvatar
in interface OperationSetAvatar
avatar
- the new avatarpublic void addAvatarListener(AvatarListener listener)
OperationSetAvatar
addAvatarListener
in interface OperationSetAvatar
listener
- a AvatarListener that would receive events upon avatar
changes.public void removeAvatarListener(AvatarListener listener)
OperationSetAvatar
removeAvatarListener
in interface OperationSetAvatar
listener
- the AvatarListener to removeprotected void fireAvatarChanged(byte[] newAvatar)
newAvatar
- the new avatar
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.