| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
skypekit.Cached --+
|
skypekit.Object --+
|
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;
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:
| Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
| Static Methods | |||
|
|||
|
Inherited from |
|||
| Class Variables | |
event_handlers =
|
|
propid2label =
|
|
module_id = 5
|
|
STATUS = LOGGED_OUT |
|
CBLSYNCSTATUS = Recognized values for the P_CBLSYNCSTATUS property. |
|
LOGOUTREASON = Recognized values for the Account::P_LOGOUTREASON. |
|
PWDCHANGESTATUS = Recognized values for the P_PWDCHANGESTATUS property that provides information on whether a password change succeeded or failed, giving detailed failure reason. |
|
COMMITSTATUS = The list of possible values of Account class COMMITSTATUS property. |
|
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. |
|
SKYPECALLPOLICY = Recognized values for the P_SKYPECALLPOLICY property that controls acceptance of incoming Skype calls. |
|
PSTNCALLPOLICY = Recognized values for the P_PSTNCALLPOLICY property that controls whether (and from whom) this account accepts incoming PSTN calls. |
|
AVATARPOLICY = Recognized values for the P_AVATAR_POLICY property that controls whether remote contacts can view local account's avatar image. |
|
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. |
|
TIMEZONEPOLICY = Recognized values for the P_TIMEZONEPOLICY property that sets the rules for timezone offset so remote clients can determine your local time. |
|
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. |
|
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). |
|
VOICEMAILPOLICY = Recognized values for the P_VOICEMAILPOLICY property that controls acceptance of incoming voicemail messages. |
|
CAPABILITYSTATUS = Account capabability statuses are possible values of Contact class CAPABILITY enumerator, when that enumerator is used in context of account. |
|
P_STATUS = 70
|
|
P_PWDCHANGESTATUS = 71
|
|
P_LOGOUTREASON = 73
|
|
P_COMMITSTATUS = 78
|
|
P_SUGGESTED_SKYPENAME = 72
|
|
P_SKYPEOUT_BALANCE_CURRENCY = 74
|
|
P_SKYPEOUT_BALANCE = 75
|
|
P_SKYPEOUT_PRECISION = 804
|
|
P_SKYPEIN_NUMBERS = 76
|
|
P_CBLSYNCSTATUS = 79
|
|
P_OFFLINE_CALLFORWARD = 77
|
|
P_CHAT_POLICY = 160
|
|
P_SKYPE_CALL_POLICY = 161
|
|
P_PSTN_CALL_POLICY = 162
|
|
P_AVATAR_POLICY = 163
|
|
P_BUDDYCOUNT_POLICY = 164
|
|
P_TIMEZONE_POLICY = 165
|
|
P_WEBPRESENCE_POLICY = 166
|
|
P_PHONENUMBERS_POLICY = 168
|
|
P_VOICEMAIL_POLICY = 169
|
|
P_PARTNER_OPTEDOUT = 773
|
|
P_SERVICE_PROVIDER_INFO = 800
|
|
P_REGISTRATION_TIMESTAMP = 801
|
|
P_NR_OF_OTHER_INSTANCES = 802
|
|
P_SKYPENAME = 4
|
|
P_FULLNAME = 5
|
|
P_BIRTHDAY = 7
|
|
P_GENDER = 8
|
|
P_LANGUAGES = 9
|
|
P_COUNTRY = 10
|
|
P_PROVINCE = 11
|
|
P_CITY = 12
|
|
P_PHONE_HOME = 13
|
|
P_PHONE_OFFICE = 14
|
|
P_PHONE_MOBILE = 15
|
|
P_EMAILS = 16
|
|
P_HOMEPAGE = 17
|
|
P_ABOUT = 18
|
|
P_PROFILE_TIMESTAMP = 19
|
|
P_MOOD_TEXT = 26
|
|
P_TIMEZONE = 27
|
|
P_NROF_AUTHED_BUDDIES = 28
|
|
P_AVAILABILITY = 34
|
|
P_AVATAR_IMAGE = 37
|
|
P_AVATAR_TIMESTAMP = 182
|
|
P_MOOD_TIMESTAMP = 183
|
|
P_RICH_MOOD_TEXT = 205
|
|
|
Inherited from |
|
| Instance Variables | |
|
Inherited from |
| Properties | |
|
status Account::STATUS |
|
|
pwdchangestatus Account::PWDCHANGESTATUS |
|
|
logoutreason This property should only be examined when Account::P_STATUS is LOGGED_OUT or LOGGED_OUT_AND_PWD_SAVED. |
|
|
commitstatus Account::COMMITSTATUS |
|
|
suggested_skypename suggested skypenames, semi-colon separated. |
|
|
skypeout_balance_currency 'EUR', 'USD', etc. |
|
|
skypeout_balance balance in 'cents' |
|
|
skypeout_precision decimal points in ACCOUNT_SKYPEOUT_BALANCE |
|
|
skypein_numbers space-separated list of skypein numbers |
|
|
cblsyncstatus Account::CBLSYNCSTATUS |
|
|
offline_callforward space-separated list of 'begSecond,endSecond,identity' tokens |
|
|
chat_policy Server-side account property, use SetServerside*Property() to set |
|
|
skype_call_policy Server-side account property, use SetServerside*Property() to set |
|
|
pstn_call_policy Server-side account property, use SetServerside*Property() to set |
|
|
avatar_policy Server-side account property, use SetServerside*Property() to set |
|
|
buddycount_policy Server-side account property, use SetServerside*Property() to set |
|
|
timezone_policy Server-side account property, use SetServerside*Property() to set |
|
|
webpresence_policy Server-side account property, use SetServerside*Property() to set |
|
|
phonenumbers_policy Server-side account property, use SetServerside*Property() to set |
|
|
voicemail_policy Server-side account property, use SetServerside*Property() to set |
|
|
partner_optedout Alerts: opted out partner id's, space separated |
|
|
service_provider_info service information if the user is a paid service provider |
|
|
registration_timestamp NB! Unlike your common UNIX timestamps, the registration_timestamp is special, as it counts MINUTES rather than seconds, from Epoch (January 1, 1970) |
|
|
nr_of_other_instances number of times this user is logged in from other computers |
|
| skypename | |
| fullname | |
|
birthday YYYYMMDD |
|
|
gender 1-male, 2-female |
|
|
languages ISO language codes, space-separated |
|
|
country ISO country code |
|
| province | |
| city | |
|
phone_home NB! string not integer |
|
| phone_office | |
| phone_mobile | |
|
emails This is a string property, that contains space-separated list of email addresses. |
|
| homepage | |
|
about arbitrary introductory text |
|
|
profile_timestamp UNIX timestamp of last profile change |
|
|
mood_text Personal mood text (visible to authorised users only). |
|
|
timezone 24*3600+diff_to_UTC_in_seconds. |
|
|
nrof_authed_buddies Count of this user's authorized contacts. |
|
|
availability Contact::AVAILABILITY |
|
|
avatar_image Account avatar picture can be set with Account::SetBinProperty method. |
|
|
avatar_timestamp UNIX timestamp of when current avatar was set |
|
|
mood_timestamp UNIX timestamp of when current mood was set |
|
|
rich_mood_text XML version of CONTACT_MOOD_TEXT. |
|
|
Inherited from |
|
| Method Details |
actual constructor
|
str(x)
|
No description available. Return values:
|
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. To find out whether there is an auto-login enabled account available, you can use Skype::GetDefaultAccountName to retrieve the skypename of that account. You can then get an Account instance for login by invoking Skype::GetAccount. If no accounts with stored login credentials are available (GetDefaultAccountName returns an empty string), then you will have to prompt the user for account name and password and then use LoginWithPassword. Account name field in the UI can be pre-populated with strings retrieved with Skype::GetExistingAccounts Arguments:
|
Login in an account by specifying its password. To retrieve an account instance for login, invoke Skype::GetAccount. Arguments:
|
This command can be used to create a new Skype account, based on the Account object. When successful, this command will also log in with the newly created account. If the new account registration was not successful, Account status property will change to LOGGED_OUT. A common reason for registration failures is that the an account with that name already exists. In that case, Account LOGOUT_REASON will be set to SKYPENAME_TAKEN. Also, Account SUGGESTED_SKYPENAME property will be set to a list of similar but still available skypenames that could be used instead. The property will contain up to 5 semicolon-separated alternative skypenames. In if no suggested skypenames were available, then this property will contain an empty string. NB! You should pre-validate your P_SKYPENAME value and any email string (Skype::ValidateProfileString) prior to invoking this method. Arguments:
|
Logs out current account. Note that calling this on client application exit is optional. Arguments:
|
Changes this account's password. Returns false if the change failed. NB! You should pre-validate your password strings (Skype::ValidatePassword) and ensure that they are different prior to invoking this method. Arguments:
|
save or clear credentials for auto-login whilst already logged in Arguments:
|
Setter for integer (and enum) server-side properties. For a list of writeable server-side properties, see the detailed description of the Account class. Arguments:
|
Setter for String server-side properties. For a list of writeable server-side properties, see the detailed description of the Account class. Arguments:
|
Cancels an attempt to commit a server-side P_XXX_POLICY or the P_OFFLINE_CALLFORWARD server-side property. Invoking this cancellation only makes sense whilst the P_COMMITTSTATUS is in COMMITTING_TO_SERVER state. |
Setter for integer properties. For a list of writeable account profile properties, see the detailed description of the Account class. Arguments:
|
Setter for String properties. For a list of writeable account profile properties, see the detailed description of the Account class. NB! You should pre-validate your about and mood message strings (Skype::ValidateProfileString) prior to invoking this method. Arguments:
|
Setter for BLOB properties, such as its avatar image. For a list of writeable account profile properties, see the detailed description of the Account class. NB! You should pre-validate your avatar image (Skype::ValidateAvatar) prior to invoking this method. Arguments:
|
Sets online status of the currently logged in account to one of the values from Contact class AVAILABILITY enumerator. Arguments:
|
Transitions the availability of this account's associated user, who is assumed to be logged in. Arguments:
|
Returns state of a given account capability. Takes Contact class CAPABILITY property as input argument and returns its state and expiration timestamp where appropriate. For example (C++ wrapper, with other wrappers the syntax may vary but the idea is the same) MyAccount.GetCapabilityStatus(Contact::CAPABILITY_SKYPEOUT, Cap, T); will return Account::CAPABILITY_EXISTS if local account has SkypeOut enabled. Arguments:
Return values:
|
Response is empty when called with an inactive or invalid account Return values:
|
returns verified-by-Skype e-mail for this account if exists and verifiable Return values: |
returns verified-by-Skype company for this account if exists and verifiable Return values:
|
Deletes all account data stored locally. Does not remove any account data from the server! |
| Class Variable Details |
propid2label
|
STATUS
|
CBLSYNCSTATUSRecognized values for the P_CBLSYNCSTATUS property. CBL stands for Central Buddy List. In principle, this property and its states can be ignored by most UI developers. However, it can help to optimize UI buildup and behaviour, particularly in case of limited resources (such as mobile devices). CBL is used to backup your contact list, contact groups, and profile information, and also used to synchronize this information with other Skype instances of your account (i.e. on another device). CBL sync can occur both during login and during normal operation. Note that CBL synchronization does not take place immediately after an Account property is changed. A delay between the first property change and CBL sync initiation enables the client to accumulate changes and do the synchronization in bulk. Clients with limited resources might want to wait for CBL_IN_SYNC status before generating their UI's contact list representation. Otherwise it might be forced to redraw the contact list multiple times, as new updates get retrieved from the server-side. Similarly, applications that modify an account's mood message might want to know when the P_MOOD_TEXT or P_RICH_MOOD_TEXT property is synchronized to the server. Note that this sync is only for CBL and other logged in instances of the same account - other contacts will receive the mood message update directly.
|
LOGOUTREASONRecognized values for the Account::P_LOGOUTREASON. Note that this property should only be examined when Account::P_STATUS is LOGGED_OUT or LOGGED_OUT_AND_PWD_SAVED. That is, you should not monitor changes to this property in Account::OnChange callback, other than after already having checked that P_STATUS property has appropriate value. The reason for this is that the LOGOUTREASON does not get reset before the next login attempt. For example: if a user tried to log in with a wrong password, the LOGOUTREASON gets set to INCORRECT_PASSWORD. Now, if the user tries to log in again, and yet again submits an incorrect password, the value of the LOGOUTREASON does not change anymore, because it already is set to INCORRECT_PASSWORD. Consequently, Account::OnChange will not fire in this case.
|
PWDCHANGESTATUSRecognized values for the P_PWDCHANGESTATUS property that provides information on whether a password change succeeded or failed, giving detailed failure reason. After successful return from the Change Password method, clients should monitor the P_PWDCHANGESTATUS property changes.
|
COMMITSTATUSThe list of possible values of Account class COMMITSTATUS property. Note that this property and its values have nothing to do with (automatic) CBL synchronization. Rather, the COMMITSTATUS reflects commit status to account's server side properties initiated with calls to Account class SetServersideIntProperty and Account class SetServersideStrProperty methods. After those methods, your client UI may want to wait until the COMMITSTATUS becomes COMMITTING_TO_SERVER followed by COMMITTED and inform the user if the value becomes COMMIT_FAILED. SetServerside<type>Property methods are used for writing privacy policy related and call forwarding related Account properties to the server. Unlike CBL synchronization, those updates are executed immediately.
|
CHATPOLICYRecognized values for the P_CHAT_POLICY property that controls whether non-authorized users can initiate text chat with the currently logged in account. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntProperty
|
SKYPECALLPOLICYRecognized values for the P_SKYPECALLPOLICY property that controls acceptance of incoming Skype calls. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntPropertyserver-side.
|
PSTNCALLPOLICYRecognized values for the P_PSTNCALLPOLICY property that controls whether (and from whom) this account accepts incoming PSTN calls. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntProperty
|
AVATARPOLICYRecognized values for the P_AVATAR_POLICY property that controls whether remote contacts can view local account's avatar image. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntPropertyserver-side. Note that setting account's AVATAR_POLICY to BUDDIES_OR_AUTHORIZED_CAN_SEE does not guarantee that remote users will be able to immediately retrieve the avatar picture via corresponding Contact object. Avatar changes propagate between clients only when direct sessions between clients are established. Direct sessions are established during live sessions or whilst online contacts are engaged in chat.
|
BUDDYCOUNTPOLICYRecognized 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. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntProperty, like this: account->SetServersideIntProperty(Account::P_BUDDYCOUNT_POLICY, Account::DISCLOSE_TO_AUTHORIZED); account->SetServersideIntProperty(Account::P_BUDDYCOUNT_POLICY, Account::DISCLOSE_TO_NOONE );
|
TIMEZONEPOLICYRecognized values for the P_TIMEZONEPOLICY property that sets the rules for timezone offset so remote clients can determine your local time. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntPropertyserver-side.
|
WEBPRESENCEPOLICYRecognized 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. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntPropertyserver-side.
|
PHONENUMBERSPOLICYRecognized 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). Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntProperty
|
VOICEMAILPOLICYRecognized values for the P_VOICEMAILPOLICY property that controls acceptance of incoming voicemail messages. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntPropertyserver-side.
|
CAPABILITYSTATUSAccount capabability statuses are possible values of Contact class CAPABILITY enumerator, when that enumerator is used in context of account. Compared to Contact class CAPABILITYSTATUS enums, Account class CAPABILITYSTATUS has additional items for subscription expiration warnings.
|
| Property Details |
statusAccount::STATUS
|
pwdchangestatusAccount::PWDCHANGESTATUS
|
logoutreasonThis property should only be examined when Account::P_STATUS is LOGGED_OUT or LOGGED_OUT_AND_PWD_SAVED. That is, you should not monitor changes to this property in Account::OnChange callback, other than after already having checked that P_STATUS property has appropriate value. The reason for this is that the LOGOUTREASON does not get reset before the next login attempt. For example: if a user tried to log in with a wrong password, the LOGOUTREASON gets set to INCORRECT_PASSWORD. Now, if the user tries to log in again, and yet again submits an incorrect password, the value of the LOGOUTREASON does not change anymore, because it already is set to INCORRECT_PASSWORD. Consequently, Account::OnChange will not fire in this case.
|
commitstatusAccount::COMMITSTATUS
|
suggested_skypenamesuggested skypenames, semi-colon separated. present if logoutreason==SKYPENAME_TAKEN
|
skypeout_balance_currency'EUR', 'USD', etc.
|
skypeout_balancebalance in 'cents'
|
skypeout_precisiondecimal points in ACCOUNT_SKYPEOUT_BALANCE
|
skypein_numbersspace-separated list of skypein numbers
|
cblsyncstatusAccount::CBLSYNCSTATUS
|
offline_callforwardspace-separated list of 'begSecond,endSecond,identity' tokens
|
chat_policyServer-side account property, use SetServerside*Property() to set
|
skype_call_policyServer-side account property, use SetServerside*Property() to set
|
pstn_call_policyServer-side account property, use SetServerside*Property() to set
|
avatar_policyServer-side account property, use SetServerside*Property() to set
|
buddycount_policyServer-side account property, use SetServerside*Property() to set
|
timezone_policyServer-side account property, use SetServerside*Property() to set
|
webpresence_policyServer-side account property, use SetServerside*Property() to set
|
phonenumbers_policyServer-side account property, use SetServerside*Property() to set
|
voicemail_policyServer-side account property, use SetServerside*Property() to set
|
partner_optedoutAlerts: opted out partner id's, space separated
|
service_provider_infoservice information if the user is a paid service provider
|
registration_timestampNB! Unlike your common UNIX timestamps, the registration_timestamp is special, as it counts MINUTES rather than seconds, from Epoch (January 1, 1970)
|
nr_of_other_instancesnumber of times this user is logged in from other computers
|
skypename
|
fullname
|
birthdayYYYYMMDD
|
gender1-male, 2-female
|
languagesISO language codes, space-separated
|
countryISO country code
|
province
|
city
|
phone_homeNB! string not integer
|
phone_office
|
phone_mobile
|
emailsThis is a string property, that contains space-separated list of email addresses. When surfacing this property in your UI, you will need to take into account that there may be more than one email addresses in this property (i.e. split the value at spaces and display them as list). Similarly, when modifying this property with SetStrProperty method, your editor should allow editing of component email addresses separately and add them all up again, before submitting back to the account.
|
homepage
|
aboutarbitrary introductory text
|
profile_timestampUNIX timestamp of last profile change
|
mood_textPersonal mood text (visible to authorised users only). Max length 300 bytes.
|
timezone24*3600+diff_to_UTC_in_seconds. nb! changes with DST
|
nrof_authed_buddiesCount of this user's authorized contacts.
|
availabilityContact::AVAILABILITY
|
avatar_imageAccount avatar picture can be set with Account::SetBinProperty method. The contact avatar picture is limited to max 96x96 pixels and 32000 bytes. If the submitted avatar picture exceeds either of these size limits, it is the responsibility of your client to scale the image down to appropriate size. The avatar pictures have to be in JPG format. A SkypeKit client can enable the user to set the Account avatar in other picture formats, in which case the picture should be converted to JPG before submitting it. In any case, the avatar picture should be pre-validated with the Skype::ValidateAvatar method.
|
avatar_timestampUNIX timestamp of when current avatar was set
|
mood_timestampUNIX timestamp of when current mood was set
|
rich_mood_textXML version of CONTACT_MOOD_TEXT. Max length 1000 bytes.
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Fri Jan 27 18:21:13 2012 | http://epydoc.sourceforge.net |