|
|||||||||
| 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.Account
public 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 interface |
Account.AccountListener
|
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.GetCapabilityStatusResult
|
class |
Account.GetStatusWithProgressResult
|
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. |
| Field Summary |
|---|
| Fields inherited from class com.skype.api.SkypeObject |
|---|
mObjectId, mPropCache, skype |
| Constructor Summary | |
|---|---|
Account(int oid,
Skype skype)
|
|
| 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. |
byte[] |
GetBinProperty(Account.PROPERTY prop)
|
boolean |
GetBooleanProperty(Account.PROPERTY prop)
|
Account.GetCapabilityStatusResult |
GetCapabilityStatus(Contact.CAPABILITY capability)
Returns state of a given account capability. |
int |
GetIntProperty(Account.PROPERTY prop)
|
java.lang.Object |
GetPropertyAsEnum(int propid)
|
java.lang.String |
GetSkypenameHash()
Response is empty when called with an inactive or invalid account |
Account.GetStatusWithProgressResult |
GetStatusWithProgress()
This is a legacy method. |
java.lang.String |
GetStrProperty(Account.PROPERTY prop)
|
java.lang.String |
GetVerifiedCompany()
returns verified-by-Skype company for this account if exists and verifiable |
java.lang.String |
GetVerifiedEmail()
returns verified-by-Skype e-mail for this account if exists and verifiable |
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. |
static 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 |
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. |
| 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 Account(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(Account.PROPERTY prop)
public int GetIntProperty(Account.PROPERTY prop)
public boolean GetBooleanProperty(Account.PROPERTY prop)
public byte[] GetBinProperty(Account.PROPERTY prop)
public Account.GetStatusWithProgressResult 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 - 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 - 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)
clearSavedPwd -
public void ChangePassword(java.lang.String oldPassword,
java.lang.String newPassword,
boolean savePwd)
oldPassword - "Current password string (plaintext) for this accountnewPassword - New password string (plaintext) for this accountsavePwd - public void SetPasswordSaved(boolean savePwd)
savePwd -
public void SetServersideIntProperty(int propKey,
int value)
propKey - value -
public void SetServersideStrProperty(int propKey,
java.lang.String value)
propKey - value - public void CancelServerCommit()
public void SetIntProperty(int propKey,
int value)
propKey - value -
public void SetStrProperty(int propKey,
java.lang.String value)
propKey - value -
public void SetBinProperty(int propKey,
byte[] value)
propKey - value - public void SetAvailability(Contact.AVAILABILITY availability)
availability - only subset of all contact availabilities allowedpublic void SetStandby(boolean standby)
standby - public Account.GetCapabilityStatusResult GetCapabilityStatus(Contact.CAPABILITY capability)
capability -
public java.lang.String GetSkypenameHash()
public java.lang.String GetVerifiedEmail()
public java.lang.String GetVerifiedCompany()
public void Delete()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||