|
|||||||||
| 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.Account
public final class Account
Represents a local account. Encapsulates methods for Skype account creation, login and logout as well as account profile setting properties. NB! Unlike all the other SkypeKit classes, most of the Account class properties are actually read-write. In fact, there are two sorts of Account's read-write properties: server-side properties and local properties. Different setter methods need to be used for those two kinds. The subset of server-side properties consists of all the policy properties (everything with _POLICY suffix) that are all of type int and can be set with SetServersideIntProperty method. There is currently only one server-side string property - OFFLINE_CALLFORWARD which can be set with SetServersideStrProperty setter. The set of writeable account profile properties (local profile) is as follows; - P_FULLNAME, - P_BIRTHDAY, - P_GENDER, - P_LANGUAGES, - P_COUNTRY, - P_PROVINCE, - P_CITY, - P_PHONE_HOME, - P_PHONE_OFFICE, - P_PHONE_MOBILE, - P_EMAILS, - P_HOMEPAGE, - P_ABOUT, - P_MOOD_TEXT, - P_TIMEZONE, - P_AVATAR_IMAGE, - P_RICH_MOOD_TEXT These can be set with SetIntProperty, SetStrProperty and SetBinProperty setter methods. Note that there are special methods for changing account online status (availability) and enabling/disabling auto-login - SetAvailability and SetSavePwd. Note that to set Account properties, you that Account needs to be logged in. Generally, assumption is that the first thing you do with an Account object after you retrieve it with Skype.GetAccount is login, with exception of creating a new account. The Account class has no default constructor and creating an Account instance is not the same as creating a Skype account. To create a Skype account: - obtain an Account instance by invoking Skype.GetAccount. This automatically sets P_SKYPENAME. - set any additional profile-related properties. Skype recommends that you minimally set the following: - their email address so that they can retrieve a lost password (P_EMAILS) - the user's full name (P_FULLNAME) - at least one phone number (P_PHONE_HOME, P_PHONE_HOME, P_PHONE_OFFICE) - invoke Account.Register to actually create the account
| Nested Class Summary | |
|---|---|
static class |
Account.AvatarPolicy
Recognized values for the P_AVATAR_POLICY property that controls whether remote contacts can view local account's avatar image. |
static class |
Account.BuddyCountPolicy
Recognized values for the P_BUDDYCOUNT_POLICY property that controls whether the number of this user's authorized contacts is visible to other users, either through Account.GetPropNrofAuthedBuddies or Contact.GetPropNrofAuthedBuddies when those instances reference this user. |
static class |
Account.CapabilityStatus
Account capabability statuses are possible values of Contact class CAPABILITY enumerator, when that enumerator is used in context of account. |
static class |
Account.CblSyncStatus
Recognized values for the P_CBLSYNCSTATUS property. |
static class |
Account.ChatPolicy
Recognized values for the P_CHAT_POLICY property that controls whether non-authorized users can initiate text chat with the currently logged in account. |
static class |
Account.CommitStatus
The list of possible values of Account class COMMITSTATUS property. |
class |
Account.GetCapabilityStatusResponse
|
class |
Account.GetStatusWithProgressResponse
|
static class |
Account.LogoutReason
Recognized values for the Account.P_LOGOUTREASON. |
static class |
Account.PhoneNumbersPolicy
Recognized values for the P_PHONENUMBERSPOLICY property that controls whether unauthorized remote users can see associated phone numbers in their UI (for reference, see the different phone number tabs in Windows desktop Client contact view). |
static class |
Account.Property
Properties of the Account class |
static class |
Account.PstnCallPolicy
Recognized values for the P_PSTNCALLPOLICY property that controls whether (and from whom) this account accepts incoming PSTN calls. |
static class |
Account.PwdChangeStatus
Recognized values for the P_PWDCHANGESTATUS property that provides information on whether a password change succeeded or failed, giving detailed failure reason. |
static class |
Account.SkypeCallPolicy
Recognized values for the P_SKYPECALLPOLICY property that controls acceptance of incoming Skype calls. |
static class |
Account.Status
|
static class |
Account.TimezonePolicy
Recognized values for the P_TIMEZONEPOLICY property that sets the rules for timezone offset so remote clients can determine your local time. |
static class |
Account.VoicemailPolicy
Recognized values for the P_VOICEMAILPOLICY property that controls acceptance of incoming voicemail messages. |
static class |
Account.WebPresencePolicy
Recognized values for the P_WEBPRESENCEPOLICY property that controls whether your online status (presence) can be seen using the "Skype buttons" ( http://www.skype.com/share/buttons/ ) embedded in web pages. |
| Fields inherited from class com.skype.ipc.SidObject |
|---|
mSidCached, mSidOid, mSidRoot, mSidTimestamp |
| Constructor Summary | |
|---|---|
Account(int oid,
SidRoot root)
|
|
| Method Summary | |
|---|---|
void |
cancelServerCommit()
Cancels an attempt to commit a server-side P_XXX_POLICY or the P_OFFLINE_CALLFORWARD server-side property. |
void |
changePassword(java.lang.String oldPassword,
java.lang.String newPassword,
boolean savePwd)
Changes this account's password. |
void |
delete()
Deletes all account data stored locally. |
java.lang.String |
getAbout()
arbitrary introductory text |
Contact.Availability |
getAvailability()
Contact.AVAILABILITY |
byte[] |
getAvatarImage()
Account avatar picture can be set with Account.SetBinProperty method. |
Account.AvatarPolicy |
getAvatarPolicy()
Server-side account property, use SetServerside*Property() to set |
int |
getAvatarTimestamp()
UNIX timestamp of when current avatar was set |
int |
getBirthday()
YYYYMMDD |
Account.BuddyCountPolicy |
getBuddyCountPolicy()
Server-side account property, use SetServerside*Property() to set |
Account.GetCapabilityStatusResponse |
getCapabilityStatus(Contact.Capability capability)
Returns state of a given account capability. |
Account.CblSyncStatus |
getCblSyncStatus()
Account.CBLSYNCSTATUS |
Account.ChatPolicy |
getChatPolicy()
Server-side account property, use SetServerside*Property() to set |
java.lang.String |
getCity()
|
Account.CommitStatus |
getCommitStatus()
Account.COMMITSTATUS |
java.lang.String |
getCountry()
ISO country code |
java.lang.String |
getEmails()
This is a string property, that contains space-separated list of email addresses. |
java.lang.String |
getFullName()
|
int |
getGender()
1-male, 2-female |
java.lang.String |
getHomepage()
|
java.lang.String |
getLanguages()
ISO language codes, space-separated |
Account.LogoutReason |
getLogoutReason()
This property should only be examined when Account.P_STATUS is LOGGED_OUT or LOGGED_OUT_AND_PWD_SAVED. |
java.lang.String |
getMoodText()
Personal mood text (visible to authorised users only). |
int |
getMoodTimestamp()
UNIX timestamp of when current mood was set |
int |
getNrofAuthedBuddies()
Count of this user's authorized contacts. |
java.lang.String |
getOfflineCallForward()
space-separated list of 'begSecond,endSecond,identity' tokens |
int |
getOtherInstancesCount()
number of times this user is logged in from other computers |
java.lang.String |
getPartnerOptedOut()
Alerts: opted out partner id's, space separated |
java.lang.String |
getPhoneHome()
NB! string not integer |
java.lang.String |
getPhoneMobile()
|
Account.PhoneNumbersPolicy |
getPhoneNumbersPolicy()
Server-side account property, use SetServerside*Property() to set |
java.lang.String |
getPhoneOffice()
|
int |
getProfileTimestamp()
UNIX timestamp of last profile change |
java.lang.String |
getPropertyAsString(Account.Property prop)
|
java.lang.String |
getPropertyAsString(int prop)
|
java.lang.String |
getProvince()
|
Account.PstnCallPolicy |
getPstnCallPolicy()
Server-side account property, use SetServerside*Property() to set |
Account.PwdChangeStatus |
getPwdChangeStatus()
Account.PWDCHANGESTATUS |
int |
getRegistrationTimestamp()
NB! Unlike your common UNIX timestamps, the registration_timestamp is special, as it counts MINUTES rather than seconds, from Epoch (January 1, 1970) |
java.lang.String |
getRichMoodText()
XML version of CONTACT_MOOD_TEXT. |
java.lang.String |
getServiceProviderInfo()
service information if the user is a paid service provider |
Account.SkypeCallPolicy |
getSkypeCallPolicy()
Server-side account property, use SetServerside*Property() to set |
java.lang.String |
getSkypeinNumbers()
space-separated list of skypein numbers |
java.lang.String |
getSkypeName()
|
java.lang.String |
getSkypeNameHash()
Response is empty when called with an inactive or invalid account * @return skypenameHash |
int |
getSkypeoutBalance()
balance in 'cents' |
java.lang.String |
getSkypeoutBalanceCurrency()
'EUR', 'USD', etc. |
int |
getSkypeoutPrecision()
decimal points in ACCOUNT_SKYPEOUT_BALANCE |
Account.Status |
getStatus()
Account.STATUS |
Account.GetStatusWithProgressResponse |
getStatusWithProgress()
getStatusWithProgress |
java.lang.String |
getSuggestedSkypeName()
suggested skypenames, semi-colon separated. |
int |
getTimezone()
24*3600+diff_to_UTC_in_seconds. |
Account.TimezonePolicy |
getTimezonePolicy()
Server-side account property, use SetServerside*Property() to set |
java.lang.String |
getVerifiedCompany()
returns verified-by-Skype company for this account if exists and verifiable * @return company |
java.lang.String |
getVerifiedEmail()
returns verified-by-Skype e-mail for this account if exists and verifiable * @return email |
Account.VoicemailPolicy |
getVoicemailPolicy()
Server-side account property, use SetServerside*Property() to set |
Account.WebPresencePolicy |
getWebPresencePolicy()
Server-side account property, use SetServerside*Property() to set |
protected boolean |
hasCached()
|
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)
|
void |
login(Contact.Availability setAvailabilityTo)
Login an auto-login enabled account (P_STATUS is LOGGED_OUT_AND_PWD_SAVED) and optionally set the availability, for example login in as Contact.DO_NOT_DISTURB. |
void |
loginWithPassword(java.lang.String password,
boolean savePwd,
boolean saveDataLocally)
Login in an account by specifying its password. |
void |
logout(boolean clearSavedPwd)
Logs out current account. |
Account |
mgetProfile()
multiget the following properties - P_SKYPE_NAME - 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()
|
void |
register(java.lang.String password,
boolean savePwd,
boolean saveDataLocally,
java.lang.String email,
boolean allowSpam)
This command can be used to create a new Skype account, based on the Account object. |
void |
setAvailability(Contact.Availability availability)
Sets online status of the currently logged in account to one of the values from Contact class AVAILABILITY enumerator. |
void |
setBinProperty(int propKey,
byte[] value)
Setter for BLOB properties, such as its avatar image. |
void |
setIntProperty(int propKey,
int value)
Setter for integer properties. |
void |
setPasswordSaved(boolean savePwd)
save or clear credentials for auto-login whilst already logged in * @param savePwd |
void |
setServerSideIntProperty(int propKey,
int value)
Setter for integer (and enum) server-side properties. |
void |
setServerSideStrProperty(int propKey,
java.lang.String value)
Setter for String server-side properties. |
void |
setStandby(boolean standby)
Transitions the availability of this account's associated user, who is assumed to be logged in. |
void |
setStrProperty(int propKey,
java.lang.String value)
Setter for String properties. |
byte[] |
sidGetBinaryProperty(PropertyEnumConverting prop)
|
EnumConverting |
sidGetEnumProperty(PropertyEnumConverting prop)
|
int |
sidGetIntProperty(PropertyEnumConverting prop)
|
java.lang.String |
sidGetStringProperty(PropertyEnumConverting prop)
|
SidGetResponding |
sidMultiGet(Account.Property[] requested)
generic multiget of a list of Property |
static SidGetResponding[] |
sidMultiGet(Account.Property[] requested,
Account[] objects)
generic multiget of list of Property for a list of Account |
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 Account.Status mStatus
public Account.PwdChangeStatus mPwdChangeStatus
public Account.LogoutReason mLogoutReason
public Account.CommitStatus mCommitStatus
public java.lang.String mSuggestedSkypeName
public java.lang.String mSkypeoutBalanceCurrency
public int mSkypeoutBalance
public int mSkypeoutPrecision
public java.lang.String mSkypeinNumbers
public Account.CblSyncStatus mCblSyncStatus
public java.lang.String mOfflineCallForward
public Account.ChatPolicy mChatPolicy
public Account.SkypeCallPolicy mSkypeCallPolicy
public Account.PstnCallPolicy mPstnCallPolicy
public Account.AvatarPolicy mAvatarPolicy
public Account.BuddyCountPolicy mBuddyCountPolicy
public Account.TimezonePolicy mTimezonePolicy
public Account.WebPresencePolicy mWebPresencePolicy
public Account.PhoneNumbersPolicy mPhoneNumbersPolicy
public Account.VoicemailPolicy mVoicemailPolicy
public java.lang.String mPartnerOptedOut
public java.lang.String mServiceProviderInfo
public int mRegistrationTimestamp
public int mOtherInstancesCount
public java.lang.String mSkypeName
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 int mProfileTimestamp
public java.lang.String mMoodText
public int mTimezone
public int mNrofAuthedBuddies
public Contact.Availability mAvailability
public byte[] mAvatarImage
public int mAvatarTimestamp
public int mMoodTimestamp
public java.lang.String mRichMoodText
| Constructor Detail |
|---|
public Account(int oid,
SidRoot root)
| Method Detail |
|---|
public Account.GetStatusWithProgressResponse getStatusWithProgress()
public void login(Contact.Availability setAvailabilityTo)
setAvailabilityTo - force this account's initial online status to the specified Contact.AVAILABILITY value.
public void loginWithPassword(java.lang.String password,
boolean savePwd,
boolean saveDataLocally)
password - Password string (plaintext) for this account, which should be pre-validated (Skype.ValidatePassword)savePwd - - true: Saves the password, ensuring that auto-login is enabled.
- false (default): Does not save the password, and so the user might not be able to effect auto-login until they explicitly invoke Account.SetPasswordSaved(true).saveDataLocally - For internal use only.
public void register(java.lang.String password,
boolean savePwd,
boolean saveDataLocally,
java.lang.String email,
boolean allowSpam)
password - Password string (plaintext) for this account, which should be pre-validated (Skype.ValidatePassword)savePwd - - true: Saves the password and enables auto-login.
- false (default): Does not save the password, and the user needs to be prompted for password on the next login attempt.saveDataLocally - For internal use only.email - An email address for retrieving lost passwords and receiving news and information from Skype.allowSpam - enable/disable news and information from Skype being sent to account's e-mail.public void logout(boolean clearSavedPwd)
public void changePassword(java.lang.String oldPassword,
java.lang.String newPassword,
boolean savePwd)
newPassword - New password string (plaintext) for this accountsavePwd - - true: Saves the new password and enables auto-login.
- false (default): Clears any existing saved password and so the user cannot effect auto-login until they explicitly invoke Account.SetPasswordSaved(true)public void setPasswordSaved(boolean savePwd)
public void setServerSideIntProperty(int propKey,
int value)
value -
public void setServerSideStrProperty(int propKey,
java.lang.String value)
value - public void cancelServerCommit()
public void setIntProperty(int propKey,
int value)
value -
public void setStrProperty(int propKey,
java.lang.String value)
value -
public void setBinProperty(int propKey,
byte[] value)
value - public void setAvailability(Contact.Availability availability)
public void setStandby(boolean standby)
public Account.GetCapabilityStatusResponse getCapabilityStatus(Contact.Capability capability)
public java.lang.String getSkypeNameHash()
public java.lang.String getVerifiedEmail()
public java.lang.String getVerifiedCompany()
public void delete()
public SidGetResponding sidMultiGet(Account.Property[] requested)
requested - the list of requested properties of Account
public static SidGetResponding[] sidMultiGet(Account.Property[] requested,
Account[] objects)
requested - the list of requested properties
public Account mgetProfile()
public Account.Status getStatus()
public Account.PwdChangeStatus getPwdChangeStatus()
public Account.LogoutReason getLogoutReason()
public Account.CommitStatus getCommitStatus()
public java.lang.String getSuggestedSkypeName()
public java.lang.String getSkypeoutBalanceCurrency()
public int getSkypeoutBalance()
public int getSkypeoutPrecision()
public java.lang.String getSkypeinNumbers()
public Account.CblSyncStatus getCblSyncStatus()
public java.lang.String getOfflineCallForward()
public Account.ChatPolicy getChatPolicy()
public Account.SkypeCallPolicy getSkypeCallPolicy()
public Account.PstnCallPolicy getPstnCallPolicy()
public Account.AvatarPolicy getAvatarPolicy()
public Account.BuddyCountPolicy getBuddyCountPolicy()
public Account.TimezonePolicy getTimezonePolicy()
public Account.WebPresencePolicy getWebPresencePolicy()
public Account.PhoneNumbersPolicy getPhoneNumbersPolicy()
public Account.VoicemailPolicy getVoicemailPolicy()
public java.lang.String getPartnerOptedOut()
public java.lang.String getServiceProviderInfo()
public int getRegistrationTimestamp()
public int getOtherInstancesCount()
public java.lang.String getSkypeName()
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 int getProfileTimestamp()
public java.lang.String getMoodText()
public int getTimezone()
public int getNrofAuthedBuddies()
public Contact.Availability getAvailability()
public byte[] getAvatarImage()
public int getAvatarTimestamp()
public int getMoodTimestamp()
public java.lang.String getRichMoodText()
public java.lang.String sidGetStringProperty(PropertyEnumConverting prop)
sidGetStringProperty in interface SidGetRespondingsidGetStringProperty 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(Account.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 | ||||||||