|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAbstractItemObj
VisibilityItem
An SSI item object representing a set of "visibility settings." The
difference between the types of data stored in this type of item and those
stored in PrivacyItem
is very fine; in fact, in this author's
opinion, they should be combined.
Note that this class is only used to store data and that changes to this
object are not reflected on the server without sending the changes to the
server with a ModifyItemsCmd
.
Field Summary | |
static long |
MASK_SHOW_IDLE_TIME
A visibility settings flag indicating that the user's idle time should be visible to other AIM users. |
static long |
MASK_SHOW_TYPING
A visibility settings flag indicating that the user's typing status should be visible to other users. |
Constructor Summary | |
VisibilityItem(int id,
long flags)
Creates a new visibility settings item object with the given SSI item ID and the given set of visibility flags. |
|
VisibilityItem(int id,
long flags,
TlvChain extraTlvs)
Creates a new visibility settings item object with the given SSI item ID and the given set of visibility flags. |
|
VisibilityItem(SsiItem item)
Creates a new visibility settings item object generated from from the data in the given SSI item block. |
|
VisibilityItem(VisibilityItem other)
Creates a new visibility settings item object with the same properties as the given item object. |
Method Summary | |
int |
getId()
Returns the SSI item ID of this visibility settings item. |
long |
getVisFlags()
Returns the set of visibility flags. |
void |
setVisFlags(long flags)
Sets the user's visibility flags. |
SsiItem |
toSsiItem()
Returns an SsiItem that represents this item object. |
java.lang.String |
toString()
|
Methods inherited from class AbstractItemObj |
addExtraTlvs, copyExtraTlvs, generateItem, generateSsiItems, getExtraTlvs |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final long MASK_SHOW_IDLE_TIME
public static final long MASK_SHOW_TYPING
SendTypingNotification
,
Constant Field ValuesConstructor Detail |
public VisibilityItem(SsiItem item)
item
- a visibility settings SSI itempublic VisibilityItem(VisibilityItem other)
other
- a visibility settings item object to copypublic VisibilityItem(int id, long flags)
id
- the SSI item ID for this itemflags
- the set of visibility flags, like MASK_SHOW_IDLE_TIME
| MASK_SHOW_TYPING
public VisibilityItem(int id, long flags, TlvChain extraTlvs)
id
- the SSI item ID for this itemflags
- the set of visibility flags, like MASK_SHOW_IDLE_TIME
| MASK_SHOW_TYPING
extraTlvs
- a list of extra TLV's to store in this itemMethod Detail |
public final int getId()
public final long getVisFlags()
MASK_SHOW_IDLE_TIME
and MASK_SHOW_TYPING
. To
check for a specific flag, you could use code resembling the following:
if ((visItem.getVisFlags() & VisibilityItem.MASK_SHOW_TYPING) { System.out.println("We should send typing notifications to buddies!"); }
public final void setVisFlags(long flags)
getVisFlags()
for details
on this value's meaning.
flags
- this item's new visibility flags, like MASK_SHOW_IDLE_TIME
| MASK_SHOW_TYPING
public SsiItem toSsiItem()
SsiItemObj
SsiItem
that represents this item object.
SsiItem
that represents this item objectpublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |