Public Types | Public Member Functions

Account Class Reference

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. More...

#include <skype-embedded_2.h>

List of all members.

Public Types

enum  { MODULE_ID = 5 }
enum  PROPERTY {
  P_STATUS = 70,
  P_PWDCHANGESTATUS,
  P_LOGOUTREASON = 73,
  P_COMMITSTATUS = 78,
  P_SUGGESTED_SKYPENAME = 72,
  P_SKYPEOUT_BALANCE_CURRENCY = 74,
  P_SKYPEOUT_BALANCE,
  P_SKYPEOUT_PRECISION = 804,
  P_SKYPEIN_NUMBERS = 76,
  P_CBLSYNCSTATUS = 79,
  P_OFFLINE_CALLFORWARD = 77,
  P_CHAT_POLICY = 160,
  P_SKYPE_CALL_POLICY,
  P_PSTN_CALL_POLICY,
  P_AVATAR_POLICY,
  P_BUDDYCOUNT_POLICY,
  P_TIMEZONE_POLICY,
  P_WEBPRESENCE_POLICY,
  P_PHONENUMBERS_POLICY = 168,
  P_VOICEMAIL_POLICY,
  P_PARTNER_OPTEDOUT = 773,
  P_SERVICE_PROVIDER_INFO = 800,
  P_REGISTRATION_TIMESTAMP,
  P_NR_OF_OTHER_INSTANCES,
  P_SKYPENAME = 4,
  P_FULLNAME,
  P_BIRTHDAY = 7,
  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_PROFILE_TIMESTAMP,
  P_MOOD_TEXT = 26,
  P_TIMEZONE,
  P_NROF_AUTHED_BUDDIES,
  P_AVAILABILITY = 34,
  P_AVATAR_IMAGE = 37,
  P_AVATAR_TIMESTAMP = 182,
  P_MOOD_TIMESTAMP,
  P_RICH_MOOD_TEXT = 205
}
enum  STATUS {
  LOGGED_OUT = 1,
  LOGGED_OUT_AND_PWD_SAVED,
  CONNECTING_TO_P2P,
  CONNECTING_TO_SERVER,
  LOGGING_IN,
  INITIALIZING,
  LOGGED_IN,
  LOGGING_OUT
}
enum  CBLSYNCSTATUS {
  CBL_INITIALIZING = 0,
  CBL_INITIAL_SYNC_PENDING,
  CBL_SYNC_PENDING,
  CBL_SYNC_IN_PROGRESS,
  CBL_IN_SYNC,
  CBL_SYNC_FAILED,
  CBL_REMOTE_SYNC_PENDING
}
enum  LOGOUTREASON {
  LOGOUT_CALLED = 1,
  HTTPS_PROXY_AUTH_FAILED,
  SOCKS_PROXY_AUTH_FAILED,
  P2P_CONNECT_FAILED,
  SERVER_CONNECT_FAILED,
  SERVER_OVERLOADED,
  DB_IN_USE,
  INVALID_SKYPENAME,
  INVALID_EMAIL,
  UNACCEPTABLE_PASSWORD,
  SKYPENAME_TAKEN,
  REJECTED_AS_UNDERAGE,
  NO_SUCH_IDENTITY,
  INCORRECT_PASSWORD,
  TOO_MANY_LOGIN_ATTEMPTS,
  PASSWORD_HAS_CHANGED,
  PERIODIC_UIC_UPDATE_FAILED,
  DB_DISK_FULL,
  DB_IO_ERROR,
  DB_CORRUPT,
  DB_FAILURE,
  INVALID_APP_ID,
  APP_ID_FAILURE,
  UNSUPPORTED_VERSION
}
enum  PWDCHANGESTATUS {
  PWD_OK = 0,
  PWD_CHANGING,
  PWD_INVALID_OLD_PASSWORD,
  PWD_SERVER_CONNECT_FAILED,
  PWD_OK_BUT_CHANGE_SUGGESTED,
  PWD_MUST_DIFFER_FROM_OLD,
  PWD_INVALID_NEW_PWD,
  PWD_MUST_LOG_IN_TO_CHANGE
}
enum  COMMITSTATUS {
  COMMITTED = 1,
  COMMITTING_TO_SERVER,
  COMMIT_FAILED
}
enum  CHATPOLICY {
  EVERYONE_CAN_ADD = 0,
  BUDDIES_OR_AUTHORIZED_CAN_ADD = 2
}
enum  SKYPECALLPOLICY {
  EVERYONE_CAN_CALL = 0,
  BUDDIES_OR_AUTHORIZED_CAN_CALL = 2
}
enum  PSTNCALLPOLICY {
  ALL_NUMBERS_CAN_CALL = 0,
  DISCLOSED_NUMBERS_CAN_CALL,
  BUDDY_NUMBERS_CAN_CALL
}
enum  AVATARPOLICY {
  BUDDIES_OR_AUTHORIZED_CAN_SEE = 0,
  EVERYONE_CAN_SEE = 2
}
enum  BUDDYCOUNTPOLICY {
  DISCLOSE_TO_AUTHORIZED = 0,
  DISCLOSE_TO_NOONE
}
enum  TIMEZONEPOLICY {
  TZ_AUTOMATIC = 0,
  TZ_MANUAL,
  TZ_UNDISCLOSED
}
enum  WEBPRESENCEPOLICY {
  WEBPRESENCE_DISABLED = 0,
  WEBPRESENCE_ENABLED
}
enum  PHONENUMBERSPOLICY {
  PHONENUMBERS_VISIBLE_FOR_BUDDIES = 0,
  PHONENUMBERS_VISIBLE_FOR_EVERYONE
}
enum  VOICEMAILPOLICY {
  VOICEMAIL_ENABLED = 0,
  VOICEMAIL_DISABLED
}
enum  CAPABILITYSTATUS {
  NO_CAPABILITY = 0,
  CAPABILITY_EXISTS,
  FIRST_EXPIRY_WARNING,
  SECOND_EXPIRY_WARNING,
  FINAL_EXPIRY_WARNING
}
typedef AccountRef Ref
typedef AccountRefs Refs

Public Member Functions

virtual ~Account ()
AccountRef ref ()
bool GetStatusWithProgress (STATUS &status, uint &progress)
bool Login (const Contact::AVAILABILITY setAvailabilityTo=Contact::UNKNOWN)
bool LoginWithPassword (const Sid::String &password, const bool savePwd=false, const bool saveDataLocally=true)
bool Register (const Sid::String &password, const bool savePwd=false, const bool saveDataLocally=true, const Sid::String email="", const bool allowSpam=false)
bool Logout (const bool clearSavedPwd=false)
bool ChangePassword (const Sid::String &oldPassword, const Sid::String &newPassword, const bool savePwd=false)
bool SetPasswordSaved (const bool &savePwd)
bool SetServersideIntProperty (const int &propKey, const uint &value)
bool SetServersideStrProperty (const int &propKey, const Sid::String &value)
bool CancelServerCommit ()
bool SetIntProperty (const int &propKey, const uint &value)
bool SetStrProperty (const int &propKey, const Sid::String &value)
bool SetBinProperty (const int &propKey, const Sid::Binary &value)
bool SetAvailability (const Contact::AVAILABILITY &availability)
bool SetStandby (const bool &standby)
bool GetCapabilityStatus (const Contact::CAPABILITY &capability, CAPABILITYSTATUS &status, uint &expiryTimestamp)
bool GetSkypenameHash (Sid::String &skypenameHash)
bool GetVerifiedEmail (Sid::String &email)
bool GetVerifiedCompany (Sid::String &company)
bool Delete ()
bool GetPropStatus (STATUS &status)
bool GetPropPwdchangestatus (PWDCHANGESTATUS &pwdchangestatus)
bool GetPropLogoutreason (LOGOUTREASON &logoutreason)
bool GetPropCommitstatus (COMMITSTATUS &commitstatus)
bool GetPropSuggestedSkypename (Sid::String &suggested_skypename)
bool GetPropSkypeoutBalanceCurrency (Sid::String &skypeout_balance_currency)
bool GetPropSkypeoutBalance (uint &skypeout_balance)
bool GetPropSkypeoutPrecision (uint &skypeout_precision)
bool GetPropSkypeinNumbers (Sid::String &skypein_numbers)
bool GetPropCblsyncstatus (CBLSYNCSTATUS &cblsyncstatus)
bool GetPropOfflineCallforward (Sid::String &offline_callforward)
bool GetPropChatPolicy (CHATPOLICY &chat_policy)
bool GetPropSkypeCallPolicy (SKYPECALLPOLICY &skype_call_policy)
bool GetPropPstnCallPolicy (PSTNCALLPOLICY &pstn_call_policy)
bool GetPropAvatarPolicy (AVATARPOLICY &avatar_policy)
bool GetPropBuddycountPolicy (BUDDYCOUNTPOLICY &buddycount_policy)
bool GetPropTimezonePolicy (TIMEZONEPOLICY &timezone_policy)
bool GetPropWebpresencePolicy (WEBPRESENCEPOLICY &webpresence_policy)
bool GetPropPhonenumbersPolicy (PHONENUMBERSPOLICY &phonenumbers_policy)
bool GetPropVoicemailPolicy (VOICEMAILPOLICY &voicemail_policy)
bool GetPropPartnerOptedout (Sid::String &partner_optedout)
bool GetPropServiceProviderInfo (Sid::String &service_provider_info)
bool GetPropRegistrationTimestamp (uint &registration_timestamp)
bool GetPropNrOfOtherInstances (uint &nr_of_other_instances)
bool GetPropSkypename (Sid::String &skypename)
bool GetPropFullname (Sid::String &fullname)
bool GetPropBirthday (uint &birthday)
bool GetPropGender (uint &gender)
bool GetPropLanguages (Sid::String &languages)
bool GetPropCountry (Sid::String &country)
bool GetPropProvince (Sid::String &province)
bool GetPropCity (Sid::String &city)
bool GetPropPhoneHome (Sid::String &phone_home)
bool GetPropPhoneOffice (Sid::String &phone_office)
bool GetPropPhoneMobile (Sid::String &phone_mobile)
bool GetPropEmails (Sid::String &emails)
bool GetPropHomepage (Sid::String &homepage)
bool GetPropAbout (Sid::String &about)
bool GetPropProfileTimestamp (uint &profile_timestamp)
bool GetPropMoodText (Sid::String &mood_text)
bool GetPropTimezone (uint &timezone)
bool GetPropNrofAuthedBuddies (uint &nrof_authed_buddies)
bool GetPropAvailability (Contact::AVAILABILITY &availability)
bool GetPropAvatarImage (Sid::Binary &avatar_image)
bool GetPropAvatarTimestamp (uint &avatar_timestamp)
bool GetPropMoodTimestamp (uint &mood_timestamp)
bool GetPropRichMoodText (Sid::String &rich_mood_text)

Detailed Description

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;

Examples:

tutorial_1.cpp, tutorial_10.cpp, tutorial_11.cpp, tutorial_12.cpp, tutorial_13.cpp, tutorial_14.cpp, tutorial_15.cpp, tutorial_16.cpp, tutorial_2.cpp, tutorial_3.cpp, tutorial_4.cpp, tutorial_5.cpp, tutorial_6.cpp, tutorial_7.cpp, tutorial_8.cpp, and tutorial_9.cpp.

Definition at line 2601 of file skype-embedded_2.h.


Member Typedef Documentation

Definition at line 2610 of file skype-embedded_2.h.

Definition at line 2611 of file skype-embedded_2.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
MODULE_ID 

Definition at line 2612 of file skype-embedded_2.h.

Recognized 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.

Enumerator:
BUDDIES_OR_AUTHORIZED_CAN_SEE 

Only authorized remote users can see this user's avatar image

EVERYONE_CAN_SEE 

Everyone can see this user's avatar image, once the contact/account avatar property has been synchronized during a direct session. The avatar image may also become viewable on some Skype Web-based services.

Definition at line 2824 of file skype-embedded_2.h.

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. 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 );

Enumerator:
DISCLOSE_TO_AUTHORIZED 

Authorized remote users can retrieve the number of this user's authorized contacts (Contact::P_NROF_AUTHED_BUDDIES)

DISCLOSE_TO_NOONE 

No remote user - regardless their authorization status - can retrieve the number of this user's authorized contacts. Account::GetPropNrofAuthedBuddies and Contact::GetPropNrofAuthedBuddies will always return 0

Definition at line 2830 of file skype-embedded_2.h.

Account 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.

Enumerator:
NO_CAPABILITY 

Capability is not supported by the currently logged in SkypeKit client.

CAPABILITY_EXISTS 

Capability is supported by the currently logged in SkypeKit client.

FIRST_EXPIRY_WARNING 

Support for this capability ends this month (within 30 days)

SECOND_EXPIRY_WARNING 

Support for this capability ends this week (within 7 days)

FINAL_EXPIRY_WARNING 

Support for this capability ends today

Definition at line 2889 of file skype-embedded_2.h.

Recognized 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.

Enumerator:
CBL_INITIALIZING 

status is not clear (yet)

CBL_INITIAL_SYNC_PENDING 

first sync with empty profile

CBL_SYNC_PENDING 

Account properties are considered to be out of sync with CBL - attempt at synchronization is imminent. You might wish to wait with updating UI components that display the data that is about to change anyway.

CBL_SYNC_IN_PROGRESS 

CBL synchronization is currently taking place.

CBL_IN_SYNC 

Account properties are up-to-date.

CBL_SYNC_FAILED 

CBL sync has. Another attempt will be made after several minutes. If a second attempt also fails, subsequent attempts at synchronization will be made at ever increasing intervals.

CBL_REMOTE_SYNC_PENDING 

we have received a hint that there is a remote data change in CBL

Definition at line 2693 of file skype-embedded_2.h.

Recognized 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

Enumerator:
EVERYONE_CAN_ADD 

Unauthorized contacts can initiate text chat.

BUDDIES_OR_AUTHORIZED_CAN_ADD 

Only authorized contacts can initiate chat (default policy).

Definition at line 2805 of file skype-embedded_2.h.

The 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.

Enumerator:
COMMITTED 

No pending updates to the server.

COMMITTING_TO_SERVER 

Update to the server in progress.

COMMIT_FAILED 

Server update has failed.

Definition at line 2794 of file skype-embedded_2.h.

Recognized 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.

Enumerator:
LOGOUT_CALLED 

manual logout (or unknown reason from previous session)

HTTPS_PROXY_AUTH_FAILED 

sync errors at login/registration

SOCKS_PROXY_AUTH_FAILED 

sync errors at login/registration

P2P_CONNECT_FAILED 

sync errors at login/registration

SERVER_CONNECT_FAILED 

sync errors at login/registration

SERVER_OVERLOADED 

sync errors at login/registration

DB_IN_USE 

sync errors at login/registration

INVALID_SKYPENAME 

sync errors at registration

INVALID_EMAIL 

sync errors at registration

UNACCEPTABLE_PASSWORD 

sync errors at registration

SKYPENAME_TAKEN 

sync errors at registration

REJECTED_AS_UNDERAGE 

sync errors at registration

NO_SUCH_IDENTITY 

sync errors at login

INCORRECT_PASSWORD 

sync errors at login

TOO_MANY_LOGIN_ATTEMPTS 

sync errors at login

PASSWORD_HAS_CHANGED 

async errors (can happen anytime while logged in)

PERIODIC_UIC_UPDATE_FAILED 

async errors (can happen anytime while logged in)

DB_DISK_FULL 

async errors (can happen anytime while logged in)

DB_IO_ERROR 

async errors (can happen anytime while logged in)

DB_CORRUPT 

async errors (can happen anytime while logged in)

DB_FAILURE 

deprecated (superceded by more detailed DB_* errors)

INVALID_APP_ID 

platform sdk

APP_ID_FAILURE 

platform sdk

UNSUPPORTED_VERSION 

forced upgrade/discontinuation

Definition at line 2704 of file skype-embedded_2.h.

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). Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntProperty

Enumerator:
PHONENUMBERS_VISIBLE_FOR_BUDDIES 

Only authorized contacts can see the phone numbers.

PHONENUMBERS_VISIBLE_FOR_EVERYONE 

Everyone can see the phone numbers.

Definition at line 2849 of file skype-embedded_2.h.

Properties of the Account class

Enumerator:
P_STATUS 

Account::STATUS, type: STATUS

P_PWDCHANGESTATUS 

Account::PWDCHANGESTATUS, type: PWDCHANGESTATUS

P_LOGOUTREASON 

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.
, type: LOGOUTREASON

P_COMMITSTATUS 

Account::COMMITSTATUS, type: COMMITSTATUS

P_SUGGESTED_SKYPENAME 

suggested skypenames, semi-colon separated. present if logoutreason==SKYPENAME_TAKEN, type: Sid::String

P_SKYPEOUT_BALANCE_CURRENCY 

'EUR', 'USD', etc., type: Sid::String

P_SKYPEOUT_BALANCE 

balance in 'cents', type: uint

P_SKYPEOUT_PRECISION 

decimal points in ACCOUNT_SKYPEOUT_BALANCE, type: uint

P_SKYPEIN_NUMBERS 

space-separated list of skypein numbers, type: Sid::String

P_CBLSYNCSTATUS 

Account::CBLSYNCSTATUS, type: CBLSYNCSTATUS

P_OFFLINE_CALLFORWARD 

space-separated list of 'begSecond,endSecond,identity' tokens, type: Sid::String

P_CHAT_POLICY 

Server-side account property, use SetServerside*Property() to set, type: CHATPOLICY

P_SKYPE_CALL_POLICY 

Server-side account property, use SetServerside*Property() to set, type: SKYPECALLPOLICY

P_PSTN_CALL_POLICY 

Server-side account property, use SetServerside*Property() to set, type: PSTNCALLPOLICY

P_AVATAR_POLICY 

Server-side account property, use SetServerside*Property() to set, type: AVATARPOLICY

P_BUDDYCOUNT_POLICY 

Server-side account property, use SetServerside*Property() to set, type: BUDDYCOUNTPOLICY

P_TIMEZONE_POLICY 

Server-side account property, use SetServerside*Property() to set, type: TIMEZONEPOLICY

P_WEBPRESENCE_POLICY 

Server-side account property, use SetServerside*Property() to set, type: WEBPRESENCEPOLICY

P_PHONENUMBERS_POLICY 

Server-side account property, use SetServerside*Property() to set, type: PHONENUMBERSPOLICY

P_VOICEMAIL_POLICY 

Server-side account property, use SetServerside*Property() to set, type: VOICEMAILPOLICY

P_PARTNER_OPTEDOUT 

Alerts: opted out partner id's, space separated, type: Sid::String

P_SERVICE_PROVIDER_INFO 

service information if the user is a paid service provider, type: Sid::String

P_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)
, type: uint

P_NR_OF_OTHER_INSTANCES 

number of times this user is logged in from other computers, type: uint

P_SKYPENAME 

type: Sid::String

P_FULLNAME 

type: Sid::String

P_BIRTHDAY 

YYYYMMDD, type: uint

P_GENDER 

1-male, 2-female, type: uint

P_LANGUAGES 

ISO language codes, space-separated, type: Sid::String

P_COUNTRY 

ISO country code, type: Sid::String

P_PROVINCE 

type: Sid::String

P_CITY 

type: Sid::String

P_PHONE_HOME 

NB! string not integer, type: Sid::String

P_PHONE_OFFICE 

type: Sid::String

P_PHONE_MOBILE 

type: Sid::String

P_EMAILS 

This 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.
, type: Sid::String

P_HOMEPAGE 

type: Sid::String

P_ABOUT 

arbitrary introductory text, type: Sid::String

P_PROFILE_TIMESTAMP 

UNIX timestamp of last profile change, type: uint

P_MOOD_TEXT 

Personal mood text (visible to authorised users only). Max length 300 bytes.
, type: Sid::String

P_TIMEZONE 

24*3600+diff_to_UTC_in_seconds. nb! changes with DST, type: uint

P_NROF_AUTHED_BUDDIES 

Count of this user's authorized contacts.
, type: uint

P_AVAILABILITY 

Contact::AVAILABILITY, type: Contact::AVAILABILITY

P_AVATAR_IMAGE 

Account 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.
, type: Sid::Binary

P_AVATAR_TIMESTAMP 

UNIX timestamp of when current avatar was set, type: uint

P_MOOD_TIMESTAMP 

UNIX timestamp of when current mood was set, type: uint

P_RICH_MOOD_TEXT 

XML version of CONTACT_MOOD_TEXT. Max length 1000 bytes.
, type: Sid::String

Definition at line 2626 of file skype-embedded_2.h.

Recognized 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

Enumerator:
ALL_NUMBERS_CAN_CALL 

All incoming PSTN calls are accepted.

DISCLOSED_NUMBERS_CAN_CALL 

Only PSTN calls that report caller ID are accepted.

BUDDY_NUMBERS_CAN_CALL 

Only calls from PSTN numbers found in local contact list are accepted.

Definition at line 2817 of file skype-embedded_2.h.

Recognized 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.

  • PWD_CHANGING - consider displaying an "in progress" indicator and continue polling
  • PWD_OK - consider displaying an updated indicator and stop polling
  • PWD_OK_BUT_CHANGE_SUGGESTED - consider displaying an updated indicator, along with a recommendation to change again to a stronger password.
Enumerator:
PWD_OK 

Password change succeeded.

PWD_CHANGING 

Password change is in progress.

PWD_INVALID_OLD_PASSWORD 

Old password was incorrect.

PWD_SERVER_CONNECT_FAILED 

Failed to verify password because of no connection to server.

PWD_OK_BUT_CHANGE_SUGGESTED 

Password was set but server didn't like it much.

PWD_MUST_DIFFER_FROM_OLD 

New password was exactly the same as old one.

PWD_INVALID_NEW_PWD 

The new password was unacceptable. (too short, too simple, etc.)

PWD_MUST_LOG_IN_TO_CHANGE 

Account was currently not logged in.

Definition at line 2758 of file skype-embedded_2.h.

Recognized 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.

Enumerator:
EVERYONE_CAN_CALL 

Skype calls accepted from unauthorized contacts.

BUDDIES_OR_AUTHORIZED_CAN_CALL 

Skype calls not accepted from unauthorized contacts.

Definition at line 2811 of file skype-embedded_2.h.

Enumerator:
LOGGED_OUT 
LOGGED_OUT_AND_PWD_SAVED 

the account is logged out, but password is not needed for re-login

CONNECTING_TO_P2P 

connecting to P2P network

CONNECTING_TO_SERVER 

connecting to login server

LOGGING_IN 

waiting for response from server

INITIALIZING 

response OK. initialising account-specific lib structures

LOGGED_IN 

alright, we're good to go!

LOGGING_OUT 

Logout() has been called but not processed yet

Definition at line 2676 of file skype-embedded_2.h.

Recognized 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.

Enumerator:
TZ_AUTOMATIC 

Account's timezone setting is determined automatically.

TZ_MANUAL 

Account's timezone setting is set manually.

TZ_UNDISCLOSED 

Remote users will have no idea what your local time is.

Definition at line 2836 of file skype-embedded_2.h.

Recognized 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.

Enumerator:
VOICEMAIL_ENABLED 

Incoming voicemails enabled.

VOICEMAIL_DISABLED 

Incoming voicemails disabled.

Definition at line 2855 of file skype-embedded_2.h.

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. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntPropertyserver-side.

Enumerator:
WEBPRESENCE_DISABLED 

Disable displaying online status on web for this account.

WEBPRESENCE_ENABLED 

Enable displaying online status on web for this account.

Definition at line 2843 of file skype-embedded_2.h.


Constructor & Destructor Documentation

Account::~Account (  )  [virtual]

Definition at line 1368 of file skype-embedded_2.cpp.


Member Function Documentation

bool Account::CancelServerCommit (  ) 

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.

bool Account::ChangePassword ( const Sid::String &  oldPassword,
const Sid::String &  newPassword,
const bool  savePwd = false 
)

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.

Parameters:
oldPassword "Current password string (plaintext) for this account
newPassword New password string (plaintext) for this account
savePwd 
  • 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)
bool Account::Delete (  ) 

Deletes all account data stored locally. Does not remove any account data from the server!

bool Account::GetCapabilityStatus ( const Contact::CAPABILITY capability,
CAPABILITYSTATUS status,
uint &  expiryTimestamp 
)

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.

bool Account::GetPropAbout ( Sid::String &  about  ) 

Account::P_ABOUT property get accessor

bool Account::GetPropAvailability ( Contact::AVAILABILITY availability  ) 

Account::P_AVAILABILITY property get accessor

bool Account::GetPropAvatarImage ( Sid::Binary &  avatar_image  ) 

Account::P_AVATAR_IMAGE property get accessor

bool Account::GetPropAvatarPolicy ( AVATARPOLICY avatar_policy  ) 

Account::P_AVATAR_POLICY property get accessor

bool Account::GetPropAvatarTimestamp ( uint &  avatar_timestamp  ) 

Account::P_AVATAR_TIMESTAMP property get accessor

bool Account::GetPropBirthday ( uint &  birthday  ) 

Account::P_BIRTHDAY property get accessor

bool Account::GetPropBuddycountPolicy ( BUDDYCOUNTPOLICY buddycount_policy  ) 

Account::P_BUDDYCOUNT_POLICY property get accessor

bool Account::GetPropCblsyncstatus ( CBLSYNCSTATUS cblsyncstatus  ) 

Account::P_CBLSYNCSTATUS property get accessor

bool Account::GetPropChatPolicy ( CHATPOLICY chat_policy  ) 

Account::P_CHAT_POLICY property get accessor

bool Account::GetPropCity ( Sid::String &  city  ) 

Account::P_CITY property get accessor

bool Account::GetPropCommitstatus ( COMMITSTATUS commitstatus  ) 

Account::P_COMMITSTATUS property get accessor

bool Account::GetPropCountry ( Sid::String &  country  ) 

Account::P_COUNTRY property get accessor

bool Account::GetPropEmails ( Sid::String &  emails  ) 

Account::P_EMAILS property get accessor

bool Account::GetPropFullname ( Sid::String &  fullname  ) 

Account::P_FULLNAME property get accessor

bool Account::GetPropGender ( uint &  gender  ) 

Account::P_GENDER property get accessor

bool Account::GetPropHomepage ( Sid::String &  homepage  ) 

Account::P_HOMEPAGE property get accessor

bool Account::GetPropLanguages ( Sid::String &  languages  ) 

Account::P_LANGUAGES property get accessor

bool Account::GetPropLogoutreason ( LOGOUTREASON logoutreason  ) 

Account::P_LOGOUTREASON property get accessor

bool Account::GetPropMoodText ( Sid::String &  mood_text  ) 

Account::P_MOOD_TEXT property get accessor

bool Account::GetPropMoodTimestamp ( uint &  mood_timestamp  ) 

Account::P_MOOD_TIMESTAMP property get accessor

bool Account::GetPropNrofAuthedBuddies ( uint &  nrof_authed_buddies  ) 

Account::P_NROF_AUTHED_BUDDIES property get accessor

bool Account::GetPropNrOfOtherInstances ( uint &  nr_of_other_instances  ) 

Account::P_NR_OF_OTHER_INSTANCES property get accessor

bool Account::GetPropOfflineCallforward ( Sid::String &  offline_callforward  ) 

Account::P_OFFLINE_CALLFORWARD property get accessor

bool Account::GetPropPartnerOptedout ( Sid::String &  partner_optedout  ) 

Account::P_PARTNER_OPTEDOUT property get accessor

bool Account::GetPropPhoneHome ( Sid::String &  phone_home  ) 

Account::P_PHONE_HOME property get accessor

bool Account::GetPropPhoneMobile ( Sid::String &  phone_mobile  ) 

Account::P_PHONE_MOBILE property get accessor

bool Account::GetPropPhonenumbersPolicy ( PHONENUMBERSPOLICY phonenumbers_policy  ) 

Account::P_PHONENUMBERS_POLICY property get accessor

bool Account::GetPropPhoneOffice ( Sid::String &  phone_office  ) 

Account::P_PHONE_OFFICE property get accessor

bool Account::GetPropProfileTimestamp ( uint &  profile_timestamp  ) 

Account::P_PROFILE_TIMESTAMP property get accessor

bool Account::GetPropProvince ( Sid::String &  province  ) 

Account::P_PROVINCE property get accessor

bool Account::GetPropPstnCallPolicy ( PSTNCALLPOLICY pstn_call_policy  ) 

Account::P_PSTN_CALL_POLICY property get accessor

bool Account::GetPropPwdchangestatus ( PWDCHANGESTATUS pwdchangestatus  ) 

Account::P_PWDCHANGESTATUS property get accessor

bool Account::GetPropRegistrationTimestamp ( uint &  registration_timestamp  ) 

Account::P_REGISTRATION_TIMESTAMP property get accessor

bool Account::GetPropRichMoodText ( Sid::String &  rich_mood_text  ) 

Account::P_RICH_MOOD_TEXT property get accessor

bool Account::GetPropServiceProviderInfo ( Sid::String &  service_provider_info  ) 

Account::P_SERVICE_PROVIDER_INFO property get accessor

bool Account::GetPropSkypeCallPolicy ( SKYPECALLPOLICY skype_call_policy  ) 

Account::P_SKYPE_CALL_POLICY property get accessor

bool Account::GetPropSkypeinNumbers ( Sid::String &  skypein_numbers  ) 

Account::P_SKYPEIN_NUMBERS property get accessor

bool Account::GetPropSkypename ( Sid::String &  skypename  ) 

Account::P_SKYPENAME property get accessor

bool Account::GetPropSkypeoutBalance ( uint &  skypeout_balance  ) 

Account::P_SKYPEOUT_BALANCE property get accessor

bool Account::GetPropSkypeoutBalanceCurrency ( Sid::String &  skypeout_balance_currency  ) 

Account::P_SKYPEOUT_BALANCE_CURRENCY property get accessor

bool Account::GetPropSkypeoutPrecision ( uint &  skypeout_precision  ) 

Account::P_SKYPEOUT_PRECISION property get accessor

bool Account::GetPropStatus ( STATUS status  ) 

Account::P_STATUS property get accessor

bool Account::GetPropSuggestedSkypename ( Sid::String &  suggested_skypename  ) 

Account::P_SUGGESTED_SKYPENAME property get accessor

bool Account::GetPropTimezone ( uint &  timezone  ) 

Account::P_TIMEZONE property get accessor

bool Account::GetPropTimezonePolicy ( TIMEZONEPOLICY timezone_policy  ) 

Account::P_TIMEZONE_POLICY property get accessor

bool Account::GetPropVoicemailPolicy ( VOICEMAILPOLICY voicemail_policy  ) 

Account::P_VOICEMAIL_POLICY property get accessor

bool Account::GetPropWebpresencePolicy ( WEBPRESENCEPOLICY webpresence_policy  ) 

Account::P_WEBPRESENCE_POLICY property get accessor

bool Account::GetSkypenameHash ( Sid::String &  skypenameHash  ) 

Response is empty when called with an inactive or invalid account

bool Account::GetStatusWithProgress ( STATUS status,
uint &  progress 
)
Parameters:
status Current value of this account's P_STATUS property
progress This argument returns 0.
bool Account::GetVerifiedCompany ( Sid::String &  company  ) 

returns verified-by-Skype company for this account if exists and verifiable

bool Account::GetVerifiedEmail ( Sid::String &  email  ) 

returns verified-by-Skype e-mail for this account if exists and verifiable

bool Account::Login ( const Contact::AVAILABILITY  setAvailabilityTo = Contact::UNKNOWN  ) 

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

Parameters:
setAvailabilityTo force this account's initial online status to the specified Contact::AVAILABILITY value.
bool Account::LoginWithPassword ( const Sid::String &  password,
const bool  savePwd = false,
const bool  saveDataLocally = true 
)


Login in an account by specifying its password. To retrieve an account instance for login, invoke Skype::GetAccount.

Parameters:
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.
bool Account::Logout ( const bool  clearSavedPwd = false  ) 

Logs out current account. Note that calling this on client application exit is optional.

Parameters:
clearSavedPwd 
  • true: Clears any saved password use with auto-login and so disables auto-login until you explicitly invoke Account::SetPasswordSaved(true).
  • false (default): Does not clear any saved password and so does not affect existing auto-login behavior.
AccountRef Account::ref (  )  [inline]

Definition at line 2613 of file skype-embedded_2.h.

bool Account::Register ( const Sid::String &  password,
const bool  savePwd = false,
const bool  saveDataLocally = true,
const Sid::String  email = "",
const bool  allowSpam = false 
)

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.

Parameters:
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.
bool Account::SetAvailability ( const Contact::AVAILABILITY availability  ) 

Sets online status of the currently logged in account to one of the values from Contact class AVAILABILITY enumerator.

Parameters:
availability only subset of all contact availabilities allowed
bool Account::SetBinProperty ( const int &  propKey,
const Sid::Binary &  value 
)

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.

bool Account::SetIntProperty ( const int &  propKey,
const uint &  value 
)

Setter for integer properties. For a list of writeable account profile properties, see the detailed description of the Account class.

bool Account::SetPasswordSaved ( const bool &  savePwd  ) 

save or clear credentials for auto-login whilst already logged in

bool Account::SetServersideIntProperty ( const int &  propKey,
const uint &  value 
)

Setter for integer (and enum) server-side properties. For a list of writeable server-side properties, see the detailed description of the Account class.

bool Account::SetServersideStrProperty ( const int &  propKey,
const Sid::String &  value 
)

Setter for String server-side properties. For a list of writeable server-side properties, see the detailed description of the Account class.

bool Account::SetStandby ( const bool &  standby  ) 

Transitions the availability of this account's associated user, who is assumed to be logged in.

Parameters:
standby 
  • true: Saves the user's current availability, then sets it to CONTACT::AVAILABILITY.OFFLINE
  • false: Reconnects the user and restores their previous availability
bool Account::SetStrProperty ( const int &  propKey,
const Sid::String &  value 
)

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.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

(c) Skype Technologies S.A. Confidential/Proprietary

Last updated: Fri Jan 27 2012