|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.skype.ipc.SidObject
com.skype.api.Contact
public final class Contact
Address book entry. Encapsulates methods like 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 class |
Contact.ExtraAuthReqFields
|
class |
Contact.GetAvatarResponse
|
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. |
| Fields inherited from class com.skype.ipc.SidObject |
|---|
mSidCached, mSidOid, mSidRoot, mSidTimestamp |
| Constructor Summary | |
|---|---|
Contact(int oid,
SidRoot root)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getAbout()
arbitrary introductory text |
java.lang.String |
getAssignedComment()
change via Contact.AssignComment() |
java.lang.String |
getAssignedPhone1()
Office phone no. |
java.lang.String |
getAssignedPhone1Label()
Value "1" in this property will be translated as "Office" by Skype Windows desktop client, according to UI language settings |
java.lang.String |
getAssignedPhone2()
Mobile phone no. |
java.lang.String |
getAssignedPhone2Label()
Value "2" in this property will be translated as "Mobile" by Skype Windows desktop client, according to UI language settings |
java.lang.String |
getAssignedPhone3()
"Other phone no. |
java.lang.String |
getAssignedPhone3Label()
Value "3" in this property will be translated as "Other" by Skype Windows desktop client, according to UI language settings |
int |
getAuthRequestCount()
for contacts that have CONTACT_RECEIVED_AUTHREQUEST, how many times in a row they have requested it without positive answer |
int |
getAuthRequestTimestamp()
timestamp of last received auth-request |
Contact.Availability |
getAvailability()
Contact.AVAILABILITY |
Contact.GetAvatarResponse |
getAvatar()
Returns Conrtact's avatar image (JPG). |
byte[] |
getAvatarImage()
Contact avatar pictures are in JPG format. |
int |
getAvatarTimestamp()
UNIX timestamp of when current avatar was set |
int |
getBirthday()
integer of YYYYMMDD format |
byte[] |
getCapabilities()
binary tag that can be queried via Contact.HasCapability() |
Contact.Capabilitystatus |
getCapabilityStatus(Contact.Capability capability,
boolean queryServer)
Retrieves a Contact.Capability value. |
java.lang.String |
getCity()
|
java.lang.String |
getCountry()
ISO country code |
java.lang.String |
getDisplayName()
always set (assigned by lib by looking at various fields) |
java.lang.String |
getEmails()
will be hashed before advertising/querying, space separated |
java.lang.String |
getFullName()
|
int |
getGender()
1-male, 2-female |
Contact.AuthLevel |
getGivenAuthLevel()
Contact.AUTHLEVEL, change via Contact.GiveAuthlevel() |
java.lang.String |
getGivenDisplayName()
change via Contact.GiveDisplayname() |
java.lang.String |
getHomepage()
|
java.lang.String |
getIdentity()
getIdentity |
java.lang.String |
getIpCountry()
ISO country code assigned by the IP |
java.lang.String |
getLanguages()
ISO language code list, space separated |
int |
getLastOnlineTimestamp()
X timestamp of last successful ping to that user |
int |
getLastUsedTimestamp()
UNIX timestamp of last outbound session (call, chat, FT, etc) |
java.lang.String |
getMoodText()
Personal mood message (visible to authorized users only). |
int |
getMoodTimestamp()
NOT SET FOR CONTACTS. |
int |
getNrofAuthedBuddies()
count of this user's authorized contacts |
java.lang.String |
getPhoneHome()
This corresponds to the Account.P_PHONE_HOME property. |
java.lang.String |
getPhoneMobile()
This corresponds to the Account.P_PHONE_MOBILE property. |
java.lang.String |
getPhoneOffice()
This corresponds to the Account.P_PHONE_OFFICE property. |
int |
getPopularityOrd()
Contact's order by presence popularity |
int |
getProfileTimestamp()
UNIX timestamp of last profile change |
java.lang.String |
getPropertyAsString(Contact.Property prop)
|
java.lang.String |
getPropertyAsString(int prop)
|
java.lang.String |
getProvince()
|
java.lang.String |
getPstnNumber()
|
java.lang.String |
getReceivedAuthRequest()
set if the contact is waiting to be authorized. |
boolean |
getRefreshing()
true if querying additional information from p2p or server |
java.lang.String |
getRichMoodText()
XML version of personal mood text |
java.lang.String |
getSkypeName()
defined if it is a SKYPE contact |
int |
getTimezone()
24*3600+diff_to_UTC_in_seconds. |
Contact.Type |
getType()
|
java.lang.String |
getVerifiedCompany()
returns verified-by-Skype company for this contact if exists and verifiable * @return company |
java.lang.String |
getVerifiedEmail()
returns verified-by-Skype e-mail for this contact if exists and verifiable * @return email |
void |
giveDisplayName(java.lang.String name)
sets CONTACT_GIVEN_DISPLAYNAME. |
boolean |
hasAuthorizedMe()
the contact has accepted my auth request * @return result |
protected boolean |
hasCached()
|
boolean |
hasCapability(Contact.Capability capability,
boolean queryServer)
Retrieves a Contact.Capability value. |
void |
ignoreAuthRequest()
Rejects and removes a pending authorization request from this Contact. |
void |
invalidateCache(PropertyEnumConverting property)
invalidateCache: the next time the property is get, it will be querried to the runtime, meanwhile it can be discarded. |
protected boolean |
isCached(PropertyEnumConverting property)
|
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). |
Contact |
mgetInfo()
multiget the following properties - P_AVAILABILITY - P_DISPLAY_NAME |
static Contact[] |
mgetInfo(Contact[] objects)
multiget the following properties for a list of Contact - P_AVAILABILITY - P_DISPLAY_NAME |
Contact |
mgetProfile()
multiget the following properties - P_SKYPE_NAME - P_PSTN_NUMBER - P_FULL_NAME - P_MOOD_TEXT - P_EMAILS - P_PHONE_HOME - P_PHONE_OFFICE - P_PHONE_MOBILE - P_BIRTHDAY - P_GENDER - P_LANGUAGES - P_COUNTRY - P_PROVINCE - P_CITY - P_HOMEPAGE - P_ABOUT - P_TIMEZONE |
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 extrasBitmask)
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. |
byte[] |
sidGetBinaryProperty(PropertyEnumConverting prop)
|
boolean |
sidGetBoolProperty(PropertyEnumConverting prop)
|
EnumConverting |
sidGetEnumProperty(PropertyEnumConverting prop)
|
int |
sidGetIntProperty(PropertyEnumConverting prop)
|
java.lang.String |
sidGetStringProperty(PropertyEnumConverting prop)
|
SidGetResponding |
sidMultiGet(Contact.Property[] requested)
generic multiget of a list of Property |
static SidGetResponding[] |
sidMultiGet(Contact.Property[] requested,
Contact[] objects)
generic multiget of list of Property for a list of Contact |
protected void |
sidOnChangedProperty(int propertyId,
int value,
java.lang.String svalue)
|
void |
sidSetProperty(PropertyEnumConverting prop,
byte[] newValue)
|
void |
sidSetProperty(PropertyEnumConverting prop,
int newValue)
|
void |
sidSetProperty(PropertyEnumConverting prop,
java.lang.String newValue)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Contact.Type mType
public java.lang.String mSkypeName
public java.lang.String mPstnNumber
public java.lang.String mFullName
public int mBirthday
public int mGender
public java.lang.String mLanguages
public java.lang.String mCountry
public java.lang.String mProvince
public java.lang.String mCity
public java.lang.String mPhoneHome
public java.lang.String mPhoneOffice
public java.lang.String mPhoneMobile
public java.lang.String mEmails
public java.lang.String mHomepage
public java.lang.String mAbout
public byte[] mAvatarImage
public java.lang.String mMoodText
public java.lang.String mRichMoodText
public int mTimezone
public byte[] mCapabilities
public int mProfileTimestamp
public int mNrofAuthedBuddies
public java.lang.String mIpCountry
public int mAvatarTimestamp
public int mMoodTimestamp
public java.lang.String mReceivedAuthRequest
public int mAuthRequestTimestamp
public int mLastOnlineTimestamp
public Contact.Availability mAvailability
public java.lang.String mDisplayName
public boolean mRefreshing
public Contact.AuthLevel mGivenAuthLevel
public java.lang.String mGivenDisplayName
public java.lang.String mAssignedComment
public int mLastUsedTimestamp
public int mAuthRequestCount
public java.lang.String mAssignedPhone1
public java.lang.String mAssignedPhone1Label
public java.lang.String mAssignedPhone2
public java.lang.String mAssignedPhone2Label
public java.lang.String mAssignedPhone3
public java.lang.String mAssignedPhone3Label
public int mPopularityOrd
| Constructor Detail |
|---|
public Contact(int oid,
SidRoot root)
| Method Detail |
|---|
public java.lang.String getIdentity()
public Contact.GetAvatarResponse getAvatar()
public java.lang.String getVerifiedEmail()
public java.lang.String getVerifiedCompany()
public boolean isMemberOf(ContactGroup group)
public boolean isMemberOfHardwiredGroup(ContactGroup.Type groupType)
public void setBlocked(boolean blocked,
boolean abuse)
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)
public void setBuddyStatus(boolean isMyBuddy,
boolean syncAuth)
syncAuth - This argument is deprecated and should not be used.
public void sendAuthRequest(java.lang.String message,
int extrasBitmask)
extrasBitmask - Indicates additional information to include with this authorization request:
- 0 (zero): do not include any additional information
- SEND_VERIFIED_EMAIL: include the requestor's verified e-mail address
- SEND_VERIFIED_COMPANY: include verified information regarding the requestor's company
- SEND_VERIFIED_EMAIL + SEND_VERIFIED_COMPANY: include both e-mail and company informationpublic 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..3label - The label text for the property being setnumber - The phone number for the property being setpublic Conversation openConversation()
public boolean hasCapability(Contact.Capability capability,
boolean queryServer)
public Contact.Capabilitystatus getCapabilityStatus(Contact.Capability capability,
boolean queryServer)
queryServer - - true: obtains the data from the p2p network/server, and sets P_REFRESHING to true for the duration
- false: obtains the data from the local client
public void refreshProfile()
public SidGetResponding sidMultiGet(Contact.Property[] requested)
requested - the list of requested properties of Contact
public static SidGetResponding[] sidMultiGet(Contact.Property[] requested,
Contact[] objects)
requested - the list of requested properties
public Contact mgetInfo()
public static Contact[] mgetInfo(Contact[] objects)
objects - targets of the request
public Contact mgetProfile()
public Contact.Type getType()
public java.lang.String getSkypeName()
public java.lang.String getPstnNumber()
public java.lang.String getFullName()
public int getBirthday()
public int getGender()
public java.lang.String getLanguages()
public java.lang.String getCountry()
public java.lang.String getProvince()
public java.lang.String getCity()
public java.lang.String getPhoneHome()
public java.lang.String getPhoneOffice()
public java.lang.String getPhoneMobile()
public java.lang.String getEmails()
public java.lang.String getHomepage()
public java.lang.String getAbout()
public byte[] getAvatarImage()
public java.lang.String getMoodText()
public java.lang.String getRichMoodText()
public int getTimezone()
public byte[] getCapabilities()
public int getProfileTimestamp()
public int getNrofAuthedBuddies()
public java.lang.String getIpCountry()
public int getAvatarTimestamp()
public int getMoodTimestamp()
public java.lang.String getReceivedAuthRequest()
public int getAuthRequestTimestamp()
public int getLastOnlineTimestamp()
public Contact.Availability getAvailability()
public java.lang.String getDisplayName()
public boolean getRefreshing()
public Contact.AuthLevel getGivenAuthLevel()
public java.lang.String getGivenDisplayName()
public java.lang.String getAssignedComment()
public int getLastUsedTimestamp()
public int getAuthRequestCount()
public java.lang.String getAssignedPhone1()
public java.lang.String getAssignedPhone1Label()
public java.lang.String getAssignedPhone2()
public java.lang.String getAssignedPhone2Label()
public java.lang.String getAssignedPhone3()
public java.lang.String getAssignedPhone3Label()
public int getPopularityOrd()
public java.lang.String sidGetStringProperty(PropertyEnumConverting prop)
sidGetStringProperty in interface SidGetRespondingsidGetStringProperty in class SidObjectpublic boolean sidGetBoolProperty(PropertyEnumConverting prop)
sidGetBoolProperty in interface SidGetRespondingsidGetBoolProperty in class SidObjectpublic int sidGetIntProperty(PropertyEnumConverting prop)
sidGetIntProperty in interface SidGetRespondingsidGetIntProperty in class SidObjectpublic EnumConverting sidGetEnumProperty(PropertyEnumConverting prop)
sidGetEnumProperty in interface SidGetRespondingsidGetEnumProperty in class SidObjectpublic byte[] sidGetBinaryProperty(PropertyEnumConverting prop)
sidGetBinaryProperty in interface SidGetRespondingsidGetBinaryProperty in class SidObjectpublic java.lang.String getPropertyAsString(int prop)
public java.lang.String getPropertyAsString(Contact.Property prop)
protected void sidOnChangedProperty(int propertyId,
int value,
java.lang.String svalue)
sidOnChangedProperty in class SidObject
public void sidSetProperty(PropertyEnumConverting prop,
java.lang.String newValue)
sidSetProperty in interface SidGetRespondingsidSetProperty in class SidObject
public void sidSetProperty(PropertyEnumConverting prop,
int newValue)
sidSetProperty in interface SidGetRespondingsidSetProperty in class SidObject
public void sidSetProperty(PropertyEnumConverting prop,
byte[] newValue)
sidSetProperty in interface SidGetRespondingsidSetProperty in class SidObjectpublic void invalidateCache(PropertyEnumConverting property)
invalidateCache in class SidObjectproperty - the property to be invalidatedprotected boolean isCached(PropertyEnumConverting property)
isCached in class SidObjectprotected boolean hasCached()
hasCached in class SidObjectpublic int moduleId()
moduleId in class SidObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||