|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPacket
com.voiceclearly.api.chat.GooglePresence
public class GooglePresence
Represents Google Talk presence packets.
| Nested Class Summary | |
|---|---|
static class |
GooglePresence.Mode
An enum to represent the presence mode. |
static class |
GooglePresence.Type
A enum to represent the presecence type. |
| Constructor Summary | |
|---|---|
GooglePresence(GooglePresence.Type type)
Creates a presence update. |
|
GooglePresence(GooglePresence.Type type,
java.lang.String status,
int priority,
GooglePresence.Mode mode)
Creates a presence update with type, status, priority, and mode. |
|
| Method Summary | |
|---|---|
GooglePresence.Mode |
getMode()
Returns the mode of the presence update |
int |
getPriority()
Returns the priority of the presence |
java.lang.String |
getStatus()
Returns the status message of the user |
GooglePresence.Type |
getType()
Returns the type of this presence packet. |
boolean |
isAvailable()
Returns true if the user is available (online) and false if the user is unavailable (offline) |
boolean |
isAway()
Returns true if the presence type is available and the presence mode is away, extended away, or dnd (do not disturb). |
void |
setLanguage(java.lang.String language)
Sets the xml:lang of this Presence. |
void |
setMode(GooglePresence.Mode mode)
Sets the mode of the presence update. |
void |
setPriority(int priority)
Sets the priority of the presence. |
void |
setStatus(java.lang.String status)
Sets the status message of the presence update. |
void |
setType(GooglePresence.Type type)
Sets the type of the presence packet. |
java.lang.String |
toString()
|
java.lang.String |
toXML()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GooglePresence(GooglePresence.Type type)
type - the type.
public GooglePresence(GooglePresence.Type type,
java.lang.String status,
int priority,
GooglePresence.Mode mode)
type - the type.status - a text message describing the presence update.priority - the priority of this presence update.mode - the mode| Method Detail |
|---|
public boolean isAvailable()
public boolean isAway()
public GooglePresence.Type getType()
public void setType(GooglePresence.Type type)
type - the type of the presence packet.public java.lang.String getStatus()
public void setStatus(java.lang.String status)
status - the status message.public int getPriority()
public void setPriority(int priority)
priority - the priority of the presence.
java.lang.IllegalArgumentException - if the priority is outside the valid range.public GooglePresence.Mode getMode()
public void setMode(GooglePresence.Mode mode)
mode - the mode.public void setLanguage(java.lang.String language)
language - the xml:lang of this Presence.public java.lang.String toXML()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||