|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSnacFamilyInfo
A data structure containing information about a specific SNAC family. SNAC
families and the formats of their commands can change over time, so the
client and server send "versions" of each family supported so that the server
can incorporate new commands and new formats of existing commands without
affecting clients which are not (yet) equipped to handle them.
All SNAC family information data provided in joscar simply mimics the
behavior of AOL's Instant Messenger client for Windows. As a developer you
are not expected (and certainly not required) to understand what the fields
of this class are for, or what they mean; for the most part, I don't know
what they signify either. Once again, they are just copied from WinAIM.
Constructor Summary | |
SnacFamilyInfo(int family,
int version)
Creates a new SNAC family version information block with the given SNAC family and family version. |
|
SnacFamilyInfo(int family,
int version,
int toolID,
int toolVersion)
Creates a new SNAC family information block with the given properties. |
Method Summary | |
int |
getFamily()
Returns the code of the SNAC family that this object describes. |
int |
getToolID()
Returns the "tool ID" being used for this SNAC family's operations. |
int |
getToolVersion()
Returns the version of the "tool" being used for this SNAC family's operations. |
int |
getVersion()
Returns the version of the associated SNAC family supported. |
long |
getWritableLength()
Returns the length of the data that was or will be written in a call to write . |
protected static SnacFamilyInfo |
readSnacFamilyInfo(ByteBlock block)
Returns a SNAC family information block read from the given block of data. |
java.lang.String |
toString()
|
void |
write(java.io.OutputStream out)
Writes a representation of this object to the given stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SnacFamilyInfo(int family, int version)
-1
. Using this constructor is equivalent to
calling new
SnacFamilyInfo(family, version, -1, -1)
.
family
- the SNAC familyversion
- the version of the SNAC family supportedpublic SnacFamilyInfo(int family, int version, int toolID, int toolVersion)
family
- the SNAC family codeversion
- the version of the SNAC family supportedtoolID
- a number representing the "tool" usedtoolVersion
- the version of the "tool" being usedMethod Detail |
protected static SnacFamilyInfo readSnacFamilyInfo(ByteBlock block)
block
- a block of data containing SNAC family information
public final int getFamily()
public final int getVersion()
public final int getToolID()
public final int getToolVersion()
public long getWritableLength()
Writable
write
. The value returned by this method must not
change after its first invocation.
getWritableLength
in interface Writable
write
public void write(java.io.OutputStream out) throws java.io.IOException
Writable
getWritableLength
.
write
in interface Writable
out
- the stream to which to write
java.io.IOException
- if an I/O error occurspublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |