|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectAbstractChatInfo
Provides a base class for "chat information," which can be sent in two very similar forms. The first form is chat exchange information and the second is chat room information.
| Field Summary | |
static int |
MASK_CAN_PEEK
A mask indicating that one is allowed to view the member list of a chat room without first joining it. |
static int |
MASK_INSTANCING_ALLOWED
At the time of this writing, I am unsure of what this value means. |
static int |
MASK_NAV_ONLY
At the time of this writing, I am unsure of what this value means. |
static int |
MASK_WARNABLE
At the time of this writing, I am unsure of what this value means. |
static int |
PERM_CAN_CREATE_EXCHANGE
A value indicating that creating new exchanges is allowed. |
static int |
PERM_CAN_CREATE_ROOM
A value indicating that creating rooms is allowed on the given exchange. |
static int |
PERM_CANNOT_CREATE_ANYTHING
A value indicating that creating rooms is not allowed on the given exchange. |
static int |
TYPE_FULL
A value indicating that this block is a "full" information block. |
static int |
TYPE_INSTANCE_INFO
A value indicating that this block consists of information about an "instance" of a chat room. |
static int |
TYPE_NAV_INSTANCE_INFO
At the time of this writing, I am unsure of what this value means. |
static int |
TYPE_NAV_SHORT_DESC
At the time of this writing, I am unsure of what this value means. |
static int |
TYPE_SHORT
A value indicating that this block is a "short" information block. |
| Constructor Summary | |
protected |
AbstractChatInfo()
Creates an empty chat information object. |
protected |
AbstractChatInfo(int flags,
java.util.Date creation,
int maxMsgLen,
int maxOccupancy,
java.lang.String name,
short createPerms,
java.lang.String charset1,
java.lang.String language1,
java.lang.String charset2,
java.lang.String language2,
java.lang.String contentType)
Creates a chat information block with the given properties. |
protected |
AbstractChatInfo(java.lang.String name)
Creates a chat information block with the given chat room name and no other properties. |
protected |
AbstractChatInfo(java.lang.String name,
java.lang.String charset1,
java.lang.String language1)
Creates a chat information block with the given properties and a content type of ChatMsg.CONTENTTYPE_DEFAULT. |
protected |
AbstractChatInfo(java.lang.String name,
java.lang.String charset1,
java.lang.String language1,
java.lang.String contentType)
Creates a chat information block with the given properties. |
| Method Summary | |
protected int |
getBaseTlvCount()
Returns the number of TLV's that will be or have been written with a call to writeBaseInfo. |
java.lang.String |
getCharset1()
Returns the first of the two charset values. |
java.lang.String |
getCharset2()
Returns the second of the two charset values. |
java.lang.String |
getContentType()
Returns the content type string contained in this chat information block. |
short |
getCreatePerms()
Returns this chat information block's associated "creation permission" value. |
java.util.Date |
getCreationDate()
Returns the date at which the associated chat room or exchange was created. |
int |
getFlags()
Returns this chat information block's "flags." |
java.lang.String |
getLanguage1()
Returns the first of the two language code values. |
java.lang.String |
getLanguage2()
Returns the second of the two language code values. |
int |
getMaxMsgLen()
Returns the maximum length of a message sent in the associated chat room or rooms on the associated exchange. |
int |
getMaxOccupancy()
Returns the maximum number of members of the associated chat room or of rooms on the associated exchange. |
java.lang.String |
getName()
Returns the name of the associated chat room. |
int |
getSomething()
Returns a code of some sort. |
protected void |
readBaseInfo(TlvChain chain)
Reads AbstractChatInfo fields such as flags, maximum message
length, and room name, from the given TLV chain. |
java.lang.String |
toString()
|
protected void |
writeBaseInfo(java.io.OutputStream out)
Writes a chain of TLV's containing the AbstractChatInfo
fields, presumably to an OSCAR connection. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int TYPE_SHORT
public static final int TYPE_FULL
public static final int TYPE_INSTANCE_INFO
public static final int TYPE_NAV_SHORT_DESC
public static final int TYPE_NAV_INSTANCE_INFO
public static final int PERM_CANNOT_CREATE_ANYTHING
public static final int PERM_CAN_CREATE_ROOM
public static final int PERM_CAN_CREATE_EXCHANGE
public static final int MASK_WARNABLE
public static final int MASK_NAV_ONLY
public static final int MASK_INSTANCING_ALLOWED
public static final int MASK_CAN_PEEK
| Constructor Detail |
protected AbstractChatInfo()
protected AbstractChatInfo(java.lang.String name,
java.lang.String charset1,
java.lang.String language1)
ChatMsg.CONTENTTYPE_DEFAULT.
name - the name of the chat roomcharset1 - the room's associated charsetlanguage1 - the room's associatd language code
protected AbstractChatInfo(java.lang.String name,
java.lang.String charset1,
java.lang.String language1,
java.lang.String contentType)
name - the name of the chat roomcharset1 - the room's associated charsetlanguage1 - the room's associatd language codecontentType - a content type string, like ChatMsg.CONTENTTYPE_DEFAULT or ChatMsg.CONTENTTYPE_SECUREprotected AbstractChatInfo(java.lang.String name)
name - the name of the chat room
protected AbstractChatInfo(int flags,
java.util.Date creation,
int maxMsgLen,
int maxOccupancy,
java.lang.String name,
short createPerms,
java.lang.String charset1,
java.lang.String language1,
java.lang.String charset2,
java.lang.String language2,
java.lang.String contentType)
flags - the block's associated "flags," such as
MASK_CAN_PEEK, or -1 for nonecreation - the room's creation date, or null for nonemaxMsgLen - the maximum message length in a room, or -1
for nonemaxOccupancy - the maximum number of members of a room, or
-1 for nonename - the name of the room, or null for nonecreatePerms - the "creation permissions" of the room, such as
PERM_CANNOT_CREATE_ANYTHING, or -1 for
nonecharset1 - the charset name to place in the first charset block, or
null for nonelanguage1 - the language code (such as "en") to place in the first
language block, or null for nonecharset2 - the charset name to place in the second charset block, or
null for nonelanguage2 - the language code (such as "en") to place in the second
language block, or null for nonecontentType - the "content type" of the chat room, like ChatMsg.CONTENTTYPE_DEFAULT or ChatMsg.CONTENTTYPE_SECURE| Method Detail |
protected final void readBaseInfo(TlvChain chain)
AbstractChatInfo fields such as flags, maximum message
length, and room name, from the given TLV chain.
chain - the TLV chain from which to readprotected final int getBaseTlvCount()
writeBaseInfo.
writeBaseInfo
protected final void writeBaseInfo(java.io.OutputStream out)
throws java.io.IOException
AbstractChatInfo
fields, presumably to an OSCAR connection.
out -
java.io.IOExceptionpublic final int getFlags()
MASK_CAN_PEEK, MASK_INSTANCING_ALLOWED, MASK_NAV_ONLY, and MASK_WARNABLE.
public final java.util.Date getCreationDate()
public final int getMaxMsgLen()
public final int getMaxOccupancy()
public final java.lang.String getName()
public final short getCreatePerms()
PERM_CANNOT_CREATE_ANYTHING, PERM_CAN_CREATE_ROOM, and PERM_CAN_CREATE_EXCHANGE.
public final java.lang.String getCharset1()
getCharset2() is non-null.
public final java.lang.String getLanguage1()
getLanguage2() is non-null.
This is normally a two-character string such as "en" (for English).
public final java.lang.String getCharset2()
getCharset1() is non-null.
public final java.lang.String getLanguage2()
getLanguage1() is non-null.
This is normally a two-character string such as "en" (for English).
public final java.lang.String getContentType()
ChatMsg.CONTENTTYPE_DEFAULT for normal
chat rooms and ChatMsg.CONTENTTYPE_SECURE for secure chat rooms. The
returned value may also be null if no content type string
was sent in this chat information block.
public final int getSomething()
-1
if no such value was included in this chat information block.
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||