net.kano.joscar.snaccmd.ssi
Class SsiRightsCmd
java.lang.Object
SnacCommand
SsiCommand
SsiRightsCmd
- public class SsiRightsCmd
- extends SsiCommand
A SNAC command containing a set of "rights" associated with server-stored
information. Normally sent in response to a SsiRightsRequest
.
- See Also:
SsiRightsRequest
- Source of this SNAC:
- AIM server
- SNAC command type:
- Family
0x13
, command 0x03
Fields inherited from class SsiCommand |
CMD_ACTIVATE, CMD_CREATE_ITEMS, CMD_DATA_CHECK, CMD_DATA_REQ, CMD_DELETE_ITEMS, CMD_MOD_ACK, CMD_MODIFY_ITEMS, CMD_POST_MOD, CMD_PRE_MOD, CMD_RIGHTS, CMD_RIGHTS_REQ, CMD_SSI_DATA, CMD_UNCHANGED, FAMILY_INFO, FAMILY_SSI |
Constructor Summary |
|
SsiRightsCmd(int[] maxima)
Creates a new outgoing SSI rights command with the given list of maxima.
|
protected |
SsiRightsCmd(SnacPacket packet)
Generates a new SSI rights command from the given incoming SNAC packet. |
Method Summary |
int[] |
getMaxima()
Returns a list of maximum numbers of each SSI item type. |
java.lang.String |
toString()
|
void |
writeData(java.io.OutputStream out)
Writes this command's SNAC data block to the given stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SsiRightsCmd
protected SsiRightsCmd(SnacPacket packet)
- Generates a new SSI rights command from the given incoming SNAC packet.
- Parameters:
packet
- an incoming SSI rights packet
SsiRightsCmd
public SsiRightsCmd(int[] maxima)
- Creates a new outgoing SSI rights command with the given list of maxima.
See
getMaxima
for details on the format of the given
array. Note that maxima
can be null
.
- Parameters:
maxima
- a list of maximum numbers of SSI item types
getMaxima
public final int[] getMaxima()
- Returns a list of maximum numbers of each SSI item type. The format of
this array is such that the maximum number of items of type
i
is ssiRightsCmd.getMaxima()[i]
.
Thus, the maximum number of buddies allowed on one's buddy list, where
buddy items are type SsiItem.TYPE_BUDDY
(0x00
), is
ssiRightsCmd.getMaxima()[SsiItem.TYPE_BUDDY]
. You may notice
that AOL's AIM servers will send a list of many more than the eight types
supported by joscar. Some of those types are used for ICQ; others are
undocumented and, as far as I have seen, never used by WinAIM.
- Returns:
- a list of the maximum numbers of items of each item type
writeData
public void writeData(java.io.OutputStream out)
throws java.io.IOException
- Description copied from class:
SnacCommand
- Writes this command's SNAC data block to the given stream. The SNAC data
block is the data after the first ten bytes of a SNAC packet.
- Specified by:
writeData
in class SnacCommand
- Parameters:
out
- the stream to which to write the SNAC data
- Throws:
java.io.IOException
- if an I/O error occurs
toString
public java.lang.String toString()