|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSnacCommand
SearchCommand
SearchBuddiesCmd
A SNAC command used to search for buddies by directory information, email
address, or chat interests. Normally responded-to with a SearchResultsCmd
.
SearchResultsCmd
0x0f
, command 0x02
Field Summary | |
static int |
TYPE_BY_DIRINFO
A search type indicating a search based on directory information. |
static int |
TYPE_BY_EMAIL_OR_INTEREST
A search type indicating a search based on email address or a chat interests. |
Fields inherited from class SearchCommand |
CMD_INTERESTS, CMD_INTERESTS_REQ, CMD_RESULTS, CMD_SEARCH, FAMILY_INFO, FAMILY_SEARCH |
Fields inherited from class SnacCommand |
SNACFLAG_DEFAULT |
Constructor Summary | |
|
SearchBuddiesCmd(int type,
java.lang.String email,
java.lang.String interest,
DirInfo dirInfo)
Creates a new outgoing buddy search command with the given properties. |
protected |
SearchBuddiesCmd(SnacPacket packet)
Generates a new buddy search command from the given incoming SNAC packet. |
Method Summary | |
static SearchBuddiesCmd |
createSearchByDirInfoCmd(DirInfo dirInfo)
Creates a new outgoing buddy search command for buddies matching the given (non- null ) fields in the given block of directory
information. |
static SearchBuddiesCmd |
createSearchByEmailCmd(java.lang.String email)
Creates a new outgoing buddy search command for buddies with the given email address. |
static SearchBuddiesCmd |
createSearchByInterestCmd(java.lang.String interest)
Creates a new outgoing buddy search command for buddies with the given chat interest. |
DirInfo |
getDirInfo()
Returns the set of directory information being searched for, if any. |
java.lang.String |
getEmail()
Returns the email address being searched for, if any. |
java.lang.String |
getInterest()
Returns the chat interest being searched for, if any. |
int |
getSearchType()
Returns the type of search being performed. |
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 SnacCommand |
getCommand, getFamily, getFlag1, getFlag2 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int TYPE_BY_DIRINFO
public static final int TYPE_BY_EMAIL_OR_INTEREST
Constructor Detail |
protected SearchBuddiesCmd(SnacPacket packet)
packet
- an incoming buddy search packetpublic SearchBuddiesCmd(int type, java.lang.String email, java.lang.String interest, DirInfo dirInfo)
email
,
interest
, and dirInfo
should be
non-null
, as AOL's servers only allow you to perform
a search based on one of the three fields. See createSearchByEmailCmd(java.lang.String)
, createSearchByInterestCmd(java.lang.String)
, and createSearchByDirInfoCmd(net.kano.joscar.snaccmd.DirInfo)
for more intuitive factory methods.
type
- the type of search to perform, like TYPE_BY_DIRINFO
email
- an email address to search for, or null
for
noneinterest
- a chat interest to search for, or null
for
nonedirInfo
- a set of directory information to search for, or
null
for noneMethod Detail |
public static SearchBuddiesCmd createSearchByEmailCmd(java.lang.String email)
email
- the email address to search for
public static SearchBuddiesCmd createSearchByInterestCmd(java.lang.String interest)
interest
- the name of the chat interest to search for, like
"Travel"
public static SearchBuddiesCmd createSearchByDirInfoCmd(DirInfo dirInfo)
null
) fields in the given block of directory
information. Note that as few as one or as many as all of the fields of
the given directory information block can be filled in; these will be
the only ones used in the search.
dirInfo
- the directory information whose matches should be found
public final int getSearchType()
TYPE_BY_DIRINFO
and TYPE_BY_EMAIL_OR_INTEREST
.
public final java.lang.String getEmail()
public final java.lang.String getInterest()
public final DirInfo getDirInfo()
public void writeData(java.io.OutputStream out) throws java.io.IOException
SnacCommand
writeData
in class SnacCommand
out
- the stream to which to write the SNAC data
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 |