|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.skype.api.SkypeObject
com.skype.api.Contact
public class Contact
Address book entry. Encapsulates methods like GetType, GetIdentity, GetAvatar, SendAuthRequest, OpenConversation etc. Single contact can have additional phone numbers attached to it (ASSIGNED_PHONE1 .. ASSIGNED_PHONE3). Note that in the context of a conversation, Contacts are represented by Participant objects. Contact member functions all return a Boolean indicating the success (true) or failure (false) of processing the request itself (transport, runtime availability, and so forth)?not the success or failure of its associated functionality. For example, Contact.IsMemberOf returns true if it was able to make a determination, and its result parameter reflects whether this Contact is a member of the target group. Similarly, Contact.IsMemberOf returns false if it was unable to make a determination, and the value of its result parameter is undefined.
| Nested Class Summary | |
|---|---|
static class |
Contact.AUTHLEVEL
Describes the recognized relational states between a local account and a remote contact. |
static class |
Contact.AVAILABILITY
Describes the superset list of possible Account and Contact online statuses. |
static class |
Contact.CAPABILITY
This enumerator is used by both Contact and Account objects. |
static class |
Contact.CAPABILITYSTATUS
List of possible states of each of the Contact class CAPABILITY items. |
static interface |
Contact.ContactListener
|
static class |
Contact.EXTRA_AUTHREQ_FIELDS
|
class |
Contact.GetAvatarResult
|
static class |
Contact.PROPERTY
Properties of the Contact class |
static class |
Contact.TYPE
Same as with CAPABILITY, enumerator is used by both Contact and Account objects. |
| Field Summary |
|---|
| Fields inherited from class com.skype.api.SkypeObject |
|---|
mObjectId, mPropCache, skype |
| Constructor Summary | |
|---|---|
Contact(int oid,
Skype skype)
|
|
| Method Summary | |
|---|---|
Contact.GetAvatarResult |
GetAvatar()
Returns Conrtact's avatar image (JPG). |
byte[] |
GetBinProperty(Contact.PROPERTY prop)
|
boolean |
GetBooleanProperty(Contact.PROPERTY prop)
|
Contact.CAPABILITYSTATUS |
GetCapabilityStatus(Contact.CAPABILITY capability,
boolean queryServer)
Retrieves a Contact.Capability value. |
java.lang.String |
GetIdentity()
|
int |
GetIntProperty(Contact.PROPERTY prop)
|
java.lang.Object |
GetPropertyAsEnum(int propid)
|
java.lang.String |
GetStrProperty(Contact.PROPERTY prop)
|
Contact.TYPE |
GetType()
Getter method for the TYPE property. |
java.lang.String |
GetVerifiedCompany()
returns verified-by-Skype company for this contact if exists and verifiable |
java.lang.String |
GetVerifiedEmail()
returns verified-by-Skype e-mail for this contact if exists and verifiable |
void |
GiveDisplayName(java.lang.String name)
sets CONTACT_GIVEN_DISPLAYNAME. |
boolean |
HasAuthorizedMe()
the contact has accepted my auth request |
boolean |
HasCapability(Contact.CAPABILITY capability,
boolean queryServer)
Retrieves a Contact.Capability value. |
void |
IgnoreAuthRequest()
Rejects and removes a pending authorization request from this Contact. |
boolean |
IsMemberOf(ContactGroup group)
Checks whether the contact is member of a contact group given in group reference argument. |
boolean |
IsMemberOfHardwiredGroup(ContactGroup.TYPE groupType)
Checks whether the contact is member of a pre-defined contact group given in the TYPE argument (type for this property comes from the ContactGroup class). |
static int |
moduleID()
|
Conversation |
OpenConversation()
Retrieves a dialog conversation with the Contact. |
void |
RefreshProfile()
Refreshes all properties, capabilities, and statuses associated with this Contact from p2p/CBL, and sets P_REFRESHING to true for the duration. |
void |
SendAuthRequest(java.lang.String message,
int extras_bitmask)
Sends a contact authorization request to this user. |
void |
SetBlocked(boolean blocked,
boolean abuse)
Blocks or unblocks any further incoming communication attempts from this contact. |
void |
SetBuddyStatus(boolean isMyBuddy,
boolean syncAuth)
Adds or removes this Contact from the ALL_BUDDIES hardwired group. |
void |
SetPhoneNumber(int num,
java.lang.String label,
java.lang.String number)
Sets the three P_ASSIGNED_PHONEx and P_ASSIGNED_PHONEx_LABEL properties, where x reflects the value of num. |
| Methods inherited from class com.skype.api.SkypeObject |
|---|
close, getOid |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Contact(int oid,
Skype skype)
| Method Detail |
|---|
public static final int moduleID()
public java.lang.Object GetPropertyAsEnum(int propid)
GetPropertyAsEnum in class SkypeObjectpublic java.lang.String GetStrProperty(Contact.PROPERTY prop)
public int GetIntProperty(Contact.PROPERTY prop)
public boolean GetBooleanProperty(Contact.PROPERTY prop)
public byte[] GetBinProperty(Contact.PROPERTY prop)
public Contact.TYPE GetType()
public java.lang.String GetIdentity()
public Contact.GetAvatarResult GetAvatar()
public java.lang.String GetVerifiedEmail()
public java.lang.String GetVerifiedCompany()
public boolean IsMemberOf(ContactGroup group)
group - The target contact group public boolean IsMemberOfHardwiredGroup(ContactGroup.TYPE groupType)
groupType - The type designator of the target pre-defined contact group. For example, specify this parameter as ContactGroup.TYPE.RECENTLY_CONTACTED_CONTACTS to determine if you've had a recent conversation with this Contact.
public void SetBlocked(boolean blocked,
boolean abuse)
blocked - abuse - Optional parameter to report abuse by this Skype user when blocking this Contact. Note that you can specifiy this parameter as true only when blocking a Contact. Defaults to false if omitted. public void IgnoreAuthRequest()
public void GiveDisplayName(java.lang.String name)
name -
public void SetBuddyStatus(boolean isMyBuddy,
boolean syncAuth)
isMyBuddy - syncAuth - This argument is deprecated and should not be used.
public void SendAuthRequest(java.lang.String message,
int extras_bitmask)
message - Text that typically introduces the requesting user and details the reason for the authorization request. This text will be set as Message.P_BODY_XML property of the notification Message the remote user will receive upon getting the authortization request. While this can be the empty string, it cannot be null. extras_bitmask - Indicates additional information to include with this authorization request: public boolean HasAuthorizedMe()
public void SetPhoneNumber(int num,
java.lang.String label,
java.lang.String number)
num - The property pair being set, which must be in the range 0..3 label - The label text for the property being set number - The phone number for the property being set public Conversation OpenConversation()
public boolean HasCapability(Contact.CAPABILITY capability,
boolean queryServer)
capability - The target capability queryServer -
public Contact.CAPABILITYSTATUS GetCapabilityStatus(Contact.CAPABILITY capability,
boolean queryServer)
capability - The target capability, see Contact.Capability enumerator. queryServer - public void RefreshProfile()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||