com.skype.api
Class Skype

java.lang.Object
  extended by com.skype.ipc.SidRoot
      extended by com.skype.api.Skype
All Implemented Interfaces:
ClientDecodingListener, ClientEncodingListener, ObjectFactoring

public class Skype
extends SidRoot


Nested Class Summary
 class Skype.App2AppGetConnectableUsersResponse
           
 class Skype.App2AppGetStreamsListResponse
           
 class Skype.App2AppReadResponse
           
static class Skype.App2AppStreams
           
static class Skype.AudioDeviceCapabilities
           
 class Skype.FindContactByPstnNumberResponse
           
 class Skype.GetAudioDeviceCapabilitiesResponse
           
 class Skype.GetAvailableOutputDevicesResponse
           
 class Skype.GetAvailableRecordingDevicesResponse
           
 class Skype.GetAvailableVideoDevicesResponse
           
 class Skype.GetIsoCountryInfoResponse
           
 class Skype.GetIsoLanguageInfoResponse
           
 class Skype.GetNrgLevelsResponse
           
static class Skype.IdentityType
           
static class Skype.LeaveReason
           
 class Skype.NormalizeIdentityResponse
           
 class Skype.NormalizePstnWithCountryResponse
           
static class Skype.NormalizeResult
           
static class Skype.OperatingMedia
           
static class Skype.PrepareSoundResult
           
static class Skype.ProxyType
           
static class Skype.QualityTestResult
           
static class Skype.QualityTestType
           
static class Skype.TransferSendfileError
          sync failure reasons when starting a transfer
 class Skype.ValidateAvatarResponse
           
 class Skype.ValidateProfileStringResponse
           
static class Skype.Validateresult
          A value of this type can be returned by one of the following methods (of Skype class): ValidateAvatar, ValidateProfileString, ValidatePassword.
 
Nested classes/interfaces inherited from class com.skype.ipc.SidRoot
SidRoot.EventThread
 
Field Summary
static java.lang.String BEAMFORMER_MIC_SPACING
          Setupkey SETUPKEY_BEAMFORMER_MIC_SPACING type:string
Space-separated array of 1 (in case of 2 microphones) or 2 (in case of 4 microphones) integers.
static java.lang.String DB_STORAGE_QUOTA_KB
          Setupkey SETUPKEY_DB_STORAGE_QUOTA_KB type:int default value:"0"
Use this key to limit the size of the main.db file.
static java.lang.String DISABLE_AEC
          Setupkey SETUPKEY_DISABLE_AEC type:boolean
Disables Skype echo canceller
This setup key is machine-specific and affects all local accounts.
static java.lang.String DISABLE_AGC
          Setupkey SETUPKEY_DISABLE_AGC type:boolean Disables Skype automatic gain controller
This setup key is machine-specific and affects all local accounts.
static java.lang.String DISABLE_AUDIO_DEVICE_PROBING
          Setupkey SETUPKEY_DISABLE_AUDIO_DEVICE_PROBING type:boolean
Disables audio devices probing
This setup key is machine-specific and affects all local accounts.
static java.lang.String DISABLE_DIGITAL_FAR_END_AGC
          Setupkey SETUPKEY_DISABLE_DIGITAL_FAR_END_AGC type:boolean
Disables Skype digital far-end gain controller
This setup key is machine-specific and affects all local accounts.
static java.lang.String DISABLE_DIGITAL_NEAR_END_AGC
          Setupkey SETUPKEY_DISABLE_DIGITAL_NEAR_END_AGC type:boolean
Disables Skype digital near-end gain controller
This setup key is machine-specific and affects all local accounts.
static java.lang.String DISABLE_NOISE_SUPPRESSOR
          Setupkey SETUPKEY_DISABLE_NOISE_SUPPRESSOR type:boolean
Disables Skype noise suppressor
This setup key is machine-specific and affects all local accounts.
static java.lang.String DISABLE_PORT80
          Setupkey SETUPKEY_DISABLE_PORT80 type:int
1 disables listening of alternative ports (80, 443)
This setup key is machine-specific and affects all local accounts.
static java.lang.String DISABLE_UDP
          Setupkey SETUPKEY_DISABLE_UDP type:int
1 disables UDP port binding.
static java.lang.String DISABLED_CODECS
          Setupkey SETUPKEY_DISABLED_CODECS type:string
Space-separated array of disabled codecs
This setup key is machine-specific and affects all local accounts.
static java.lang.String FT_AUTOACCEPT
          Setupkey SETUPKEY_FT_AUTOACCEPT type:int
Controls file transfer auto-accept.
static java.lang.String FT_INCOMING_LIMIT
          Setupkey SETUPKEY_FT_INCOMING_LIMIT type:uint
Number of simultaneous incoming file transfers (per user).
static java.lang.String FT_SAVEPATH
          Setupkey SETUPKEY_FT_SAVEPATH type:string
Full local path to save incoming file transfers (used for AutoAccept feature)
This is account-specific setup key.
static java.lang.String HTTPS_PROXY_ADDR
          Setupkey SETUPKEY_HTTPS_PROXY_ADDR type:string
name:port of HTTP proxy server
This setup key is machine-specific and affects all local accounts.
static java.lang.String HTTPS_PROXY_ENABLE
          Setupkey SETUPKEY_HTTPS_PROXY_ENABLE type:int
Set to 0 for automatic proxy detect, 1 to use proxy config below
This setup key is machine-specific and affects all local accounts.
static java.lang.String HTTPS_PROXY_PWD
          Setupkey SETUPKEY_HTTPS_PROXY_PWD type:string
HTTPS proxy server password (base64 encoded)
This setup key is machine-specific and affects all local accounts.
static java.lang.String HTTPS_PROXY_USER
          Setupkey SETUPKEY_HTTPS_PROXY_USER type:string
HTTPS proxy server username
This setup key is machine-specific and affects all local accounts.
static java.lang.String IDLE_TIME_FOR_AWAY
          Setupkey SETUPKEY_IDLE_TIME_FOR_AWAY type:int
Number of seconds since the last keyboard or mouse activity, after which the online status of currently logged in account should be set to AWAY.
static java.lang.String IDLE_TIME_FOR_NA
          Setupkey SETUPKEY_IDLE_TIME_FOR_NA type:int
The Contact.AVAILABILITY.NOT_AVAILABLE online status has been deprecated.
static java.lang.String LOCALADDRESS
          Setupkey SETUPKEY_LOCALADDRESS type:string
local interface to listen to
This setup key is machine-specific and affects all local accounts.
static java.lang.String PORT
          Setupkey SETUPKEY_PORT type:int
Suggested port number (lib will *try* to use that)
This setup key is machine-specific and affects all local accounts.
static java.lang.String SOCKS_PROXY_ADDR
          Setupkey SETUPKEY_SOCKS_PROXY_ADDR type:string
name:port of SOCKS proxy server
This setup key is machine-specific and affects all local accounts.
static java.lang.String SOCKS_PROXY_ENABLE
          Setupkey SETUPKEY_SOCKS_PROXY_ENABLE type:int
Set to non-zero to enable socks proxy support
This setup key is machine-specific and affects all local accounts.
static java.lang.String SOCKS_PROXY_PWD
          Setupkey SETUPKEY_SOCKS_PROXY_PWD type:string
SOCKS proxy server password (base64 encoded)
This setup key is machine-specific and affects all local accounts.
static java.lang.String SOCKS_PROXY_USER
          Setupkey SETUPKEY_SOCKS_PROXY_USER type:string
SOCKS proxy server username
This setup key is machine-specific and affects all local accounts.
 
Fields inherited from class com.skype.ipc.SidRoot
mSidDecoder, mSidEncoder, mSidTimestamp
 
Constructor Summary
Skype()
           
 
Method Summary
 boolean app2AppConnect(java.lang.String appname, java.lang.String skypename)
          The App2AppConnect connect result does not mean the connection was immediately established.
 boolean app2AppCreate(java.lang.String appname)
          App2AppCreate method constructs a local instance of an App2App application.
 boolean app2AppDatagram(java.lang.String appname, java.lang.String stream, byte[] data)
          Sends a datagram to the remote party specified in the stream argument.
 boolean app2AppDelete(java.lang.String appname)
          Disconnects and deletes the App2App application.
 boolean app2AppDisconnect(java.lang.String appname, java.lang.String stream)
          Disconnects an App2App stream.
 Skype.App2AppGetConnectableUsersResponse app2AppGetConnectableUsers(java.lang.String appname)
          App2AppGetConnectableUsers returns a list of currently online contacts.
 Skype.App2AppGetStreamsListResponse app2AppGetStreamsList(java.lang.String appname, Skype.App2AppStreams listType)
          Takes application ID and list type filter and returns a stringlist with streamID's that pass the filter.
 Skype.App2AppReadResponse app2AppRead(java.lang.String appname, java.lang.String stream)
          Reads data from the specified stream.
 boolean app2AppWrite(java.lang.String appname, java.lang.String stream, byte[] data)
          Sends a stream packet to the remote party specified in the stream argument.
 ContactSearch createBasicContactSearch(java.lang.String text)
          searches skypenames, aliases, fullnames, emails.
 Conversation createConference()
          Creates a new empty conversation object and returns a reference to it.
 ContactSearch createContactSearch()
          Creates a blank contact search object, in which you can add your custom search terms.
 ContactGroup createCustomContactGroup()
          Creates a new empty contact group object and returns a reference to it.
 ContactSearch createIdentitySearch(java.lang.String identity)
          searches skypenames and aliases.
 Sms createOutgoingSms()
          creates an OUTGOING/COMPOSING SMS message * @return sms
 void delete(java.lang.String key)
          delete
 void displayVideoDeviceTuningDialog(java.lang.String deviceName, java.lang.String devicePath)
          displayVideoDeviceTuningDialog
 Skype.FindContactByPstnNumberResponse findContactByPstnNumber(java.lang.String number)
          findContactByPstnNumber
 Account getAccount(java.lang.String identity)
          Retrieves an Account object by Skype name (identity).
 AccountListener getAccountListener()
           
 Skype.GetAudioDeviceCapabilitiesResponse getAudioDeviceCapabilities(java.lang.String deviceHandle)
          The uint argument returns AUDIODEVICE_CAPABILITIES (declared in Skype class) * @param deviceHandle
 Skype.GetAvailableOutputDevicesResponse getAvailableOutputDevices()
          This method returns a table in form of three string lists of equal lengths.
 Skype.GetAvailableRecordingDevicesResponse getAvailableRecordingDevices()
          This method returns a table in form of three string lists of equal length.
 Skype.GetAvailableVideoDevicesResponse getAvailableVideoDevices()
          This method returns a table in form of two string lists of equal length and an uint argument that returns the count of items i both lists.
 byte[] getBin(java.lang.String key)
          This is used for retrieving local setup keys of type binary.
 Contact getContact(java.lang.String identity)
          Returns a Contact object reference.
 ContactGroupListener getContactGroupListener()
           
 ContactListener getContactListener()
           
 ContactSearchListener getContactSearchListener()
           
 Contact.Type getContactType(java.lang.String identity)
          analyzes the identity for contact type * @param identity
 Conversation getConversationByBlob(java.lang.String joinBlob, boolean alsoJoin)
          Retrieves a Conversation object by Public Conversation BLOB.
 Conversation getConversationByIdentity(java.lang.String convoIdentity)
          Returns reference tp conversation object by conversation ID string (equivalent of old chat ID).
 Conversation getConversationByParticipants(java.lang.String[] participantIdentities, boolean createIfNonExisting, boolean ignoreBookmarkedOrNamed)
          myself not included * @param participantIdentities
 Conversation[] getConversationList(Conversation.ListType type)
          Returns a list of Conversation objects by Conversation.LIST_TYPE filter.
 ConversationListener getConversationListener()
           
 ContactGroup[] getCustomContactGroups()
          Returns a list of custom contact group references, i.e.
 java.lang.String getDefaultAccountName()
          return most recently used account that has pwd saved.
 java.lang.String[] getExistingAccounts()
          Returns a list of possible profiles used before on this machine * @return accountNameList
 Voicemail getGreeting(java.lang.String skypeName)
          getGreeting
 ContactGroup getHardwiredContactGroup(ContactGroup.Type type)
          Takes TYPE argument (TYPE comes from ContactGroup class) and returns reference to the corresponding hardwired contact group.
 Skype.IdentityType getIdentityType(java.lang.String identity)
          This takes skypename or a phone number string as argument and returns corresponding identity type (SKYPE, SKYPE_MYSELF, PSTN, etc.) * @param identity
 int getInt(java.lang.String key)
          This is used for retrieving local setup keys of type int.
 java.lang.String getIsoCountryCodeByPhoneNo(java.lang.String number)
          Returns 2-letter country code based on PSTN number.
 Skype.GetIsoCountryInfoResponse getIsoCountryInfo()
          Returns three string lists and one int array, containing 2-letter country code, country name, dialing prefix and example dial string (not available for all items).
 Skype.GetIsoLanguageInfoResponse getIsoLanguageInfo()
          Returns two string lists.
 Message getMessageByGuid(byte[] guid)
          Retrieves a Message object by the P_GUID property (globally unique ID, same for all the participants of the conversation, in which this message occured).
 Message[] getMessageListByType(Message.Type type, boolean latestPerConvOnly, int fromTimestampInc, int toTimestampExc)
          Returns all messages of the given type * @param type Type of messages requested.
 MessageListener getMessageListener()
           
 int getMicVolume()
          Returns value of microphone volume setting (0..100).
 Skype.GetNrgLevelsResponse getNrgLevels()
          Returns current audio stream volume for both playback and microphone streams.
 int[] getOptimalAgeRanges()
          list of (min,max) pairs * @return rangeList
 ParticipantListener getParticipantListener()
           
 Video getPreviewVideo(Video.MediaType type, java.lang.String deviceName, java.lang.String devicePath)
          Warning: Will be deprecated soon * @param type
 SkypeListener getSkypeListener()
           
 SmsListener getSmsListener()
           
 int getSpeakerVolume()
          Returns value of audio playback volume setting (0..100).
 java.lang.String getStr(java.lang.String key)
          This is used for retrieving local setup keys of type string.
 java.lang.String[] getSubKeys(java.lang.String key)
          getSubKeys
 java.lang.String getSuggestedSkypename(java.lang.String fullname)
          suggest a nice skypename to go with given fullname * @param fullname
 TransferListener getTransferListener()
           
 int getUnixTimestamp()
          Returns the time as used in SkypeKit, in the form of a Unix timestamp (number of seconds since 1.1.1970).
 int getUsedPort()
          port that lib ended up listening.
 java.lang.String getVersionString()
          returns the runtime version as a string * @return version
 VideoListener getVideoListener()
           
 VoicemailListener getVoicemailListener()
           
 boolean hasVideoDeviceCapability(java.lang.String deviceName, java.lang.String devicePath, Video.VideoDeviceCapability cap)
          Queries whether the given video device has a specific Video.VIDEO_DEVICE_CAPABILITY.
 boolean identitiesMatch(java.lang.String identityA, java.lang.String identityB)
          compares two identities to see if they match * @param identityA
 boolean isDefined(java.lang.String key)
          Returns true if the given setup key is defined in local setup.
 boolean isMicrophoneMuted()
          Returns true in &muted argument if the currently selected microphone is muted.
 boolean isSpeakerMuted()
          Returns true in &muted argument if the currently selected playback device is muted.
 void muteMicrophone(boolean mute)
          Sets currently selected microphone mute status according to argument.
 void muteSpeakers(boolean mute)
          Sets currently selected playback device mute status according to argument.
 Skype.NormalizeIdentityResponse normalizeIdentity(java.lang.String original, boolean isNewSkypeName)
          This method is deprecated.
 Skype.NormalizePstnWithCountryResponse normalizePstnWithCountry(java.lang.String original, int countryPrefix)
          NormalizePSTNWithCountry checks if the phone number starts with + if it doesn't, it prefixes the output with +XXX (where XXX is the country code).
 void playStart(int soundid, byte[] sound, boolean loop, boolean useCallOutDevice)
          Takes audio data that comes from the sound argument and mixes it into playback or notification device, depending on the value passed in the useCallOutDevice argument.
 Skype.PrepareSoundResult playStartFromFile(int soundid, java.lang.String datafile, boolean loop, boolean useCallOutDevice)
          playStartFromFile
 void playStop(int soundid)
          Stops playback of the soundfile.
 void registerAccountListener(AccountListener listener)
           
 void registerContactGroupListener(ContactGroupListener listener)
           
 void registerContactListener(ContactListener listener)
           
 void registerContactSearchListener(ContactSearchListener listener)
           
 void registerConversationListener(ConversationListener listener)
           
 void registerMessageListener(MessageListener listener)
           
 void registerParticipantListener(ParticipantListener listener)
           
 void registerSkypeListener(SkypeListener listener)
           
 void registerSmsListener(SmsListener listener)
           
 void registerTransferListener(TransferListener listener)
           
 void registerVideoListener(VideoListener listener)
           
 void registerVoicemailListener(VoicemailListener listener)
           
 Sms requestConfirmationCode(Sms.ConfirmType type, java.lang.String number)
          creates and sends a CONFIRMATION_CODE_REQUEST message this sends a confirmation code to the number provided * @param type
 void selectSoundDevices(java.lang.String callInDevice, java.lang.String callOutDevice, java.lang.String waveOutDevice)
          Sets audio devices given in arguments as active audio devices.
 void setBin(java.lang.String key, byte[] value)
          This is used for setting local setup keys of type binary.
 void setInt(java.lang.String key, int value)
          This is used for setting local setup keys of type int.
 void setMicVolume(int volume)
          This method is for setting the microphone volume level.
 void setOperatingMedia(Skype.OperatingMedia media, int maxUplinkBps, int maxDownlinkBps)
          setOperatingMedia
 void setSpeakerVolume(int volume)
          This method is for setting speaker volume.
 void setStr(java.lang.String key, java.lang.String value)
          This is used for setting local setup keys of type string.
protected  SidObject sidCreateObject(int modId, int oid)
           
 void sidDispatchEvent(int modId, int evId, Decoding decoder)
           
 SidObject[] sidGetObjects(int modId, int size)
           
 boolean start()
          start
 void startMonitoringQuality(java.lang.String withUser, boolean excludeNetworkTest)
          startMonitoringQuality
 void startRecordingTest(boolean recordAndPlaybackData)
          startRecordingTest
 Skype.QualityTestResult stopMonitoringQuality(java.lang.String withUser, boolean justStop)
          stopMonitoringQuality
 void stopRecordingTest()
          stopRecordingTest
 Sms submitConfirmationCode(java.lang.String number, java.lang.String code)
          creates and sends a CONFIRMATION_CODE_SUBMIT message this authorizes the number with the server for the purpose given in RequestConfirmationCode * @param number
 void unRegisterAccountListener(AccountListener listener)
           
 void unRegisterContactGroupListener(ContactGroupListener listener)
           
 void unRegisterContactListener(ContactListener listener)
           
 void unRegisterContactSearchListener(ContactSearchListener listener)
           
 void unRegisterConversationListener(ConversationListener listener)
           
 void unRegisterMessageListener(MessageListener listener)
           
 void unRegisterParticipantListener(ParticipantListener listener)
           
 void unRegisterSkypeListener(SkypeListener listener)
           
 void unRegisterSmsListener(SmsListener listener)
           
 void unRegisterTransferListener(TransferListener listener)
           
 void unRegisterVideoListener(VideoListener listener)
           
 void unRegisterVoicemailListener(VoicemailListener listener)
           
 Skype.ValidateAvatarResponse validateAvatar(byte[] value)
          validateAvatar
 Skype.Validateresult validatePassword(java.lang.String username, java.lang.String password)
          This method is for pre-validating account passwords before account creation or password change.
 Skype.ValidateProfileStringResponse validateProfileString(int propKey, java.lang.String strValue, boolean forRegistration)
          This method should be used for validating skypenames before registering new accounts, if the propKey is set to SKYPENAME (Contact class) and forRegistration argument is set to true.
 java.lang.String videoCommand(java.lang.String command)
          Avaible to Video Engines using the Video RTP API * @param command
 java.lang.String voiceCommand(java.lang.String command)
          NB! This command only works if its implemented in external audiohost (RTP or PCM host).
 
Methods inherited from class com.skype.ipc.SidRoot
flushCache, getConnectionListener, init, registerConnectionListener, sidBeginMultiGet, sidDecodeEventTarget, sidDoGetRequest, sidDoRequest, sidDoRequest, sidGetObject, sidGetObjectIfPresent, sidOnFatalError, sidOnGetRequestEncoded, sidOnGetResponseDecoded, sidOnOneWayRequestEncoded, sidOnRequestEncoded, sidOnResponseDecoded, sidPollEvent, sidRemove, sidWantRead, stop, unRegisterConnectionListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DB_STORAGE_QUOTA_KB

public static final java.lang.String DB_STORAGE_QUOTA_KB
Setupkey SETUPKEY_DB_STORAGE_QUOTA_KB type:int default value:"0"
Use this key to limit the size of the main.db file. Value is in KB. Quota are disabled by default.

NB! This setup key only limits the size of the main database files. It does not include size of sqlite temporary files, such as rollback journals. Sometimes even if this quota is set, the total size of db files on storage can grow more than than the set limit, for short period of time.

Because of this, as a rule of thumb, you should set this setup key to approximately half of actual available storage space.

If the storage limit is exceeded (or the database file just runs out of available storage), the currently logged in account will be forcibily logged out, with P_LOGOUT_REASON set to DB_IO_ERROR.

This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

DISABLED_CODECS

public static final java.lang.String DISABLED_CODECS
Setupkey SETUPKEY_DISABLED_CODECS type:string
Space-separated array of disabled codecs
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

DISABLE_AEC

public static final java.lang.String DISABLE_AEC
Setupkey SETUPKEY_DISABLE_AEC type:boolean
Disables Skype echo canceller
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

DISABLE_NOISE_SUPPRESSOR

public static final java.lang.String DISABLE_NOISE_SUPPRESSOR
Setupkey SETUPKEY_DISABLE_NOISE_SUPPRESSOR type:boolean
Disables Skype noise suppressor
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

DISABLE_AGC

public static final java.lang.String DISABLE_AGC
Setupkey SETUPKEY_DISABLE_AGC type:boolean Disables Skype automatic gain controller
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

DISABLE_DIGITAL_NEAR_END_AGC

public static final java.lang.String DISABLE_DIGITAL_NEAR_END_AGC
Setupkey SETUPKEY_DISABLE_DIGITAL_NEAR_END_AGC type:boolean
Disables Skype digital near-end gain controller
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

DISABLE_DIGITAL_FAR_END_AGC

public static final java.lang.String DISABLE_DIGITAL_FAR_END_AGC
Setupkey SETUPKEY_DISABLE_DIGITAL_FAR_END_AGC type:boolean
Disables Skype digital far-end gain controller
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

BEAMFORMER_MIC_SPACING

public static final java.lang.String BEAMFORMER_MIC_SPACING
Setupkey SETUPKEY_BEAMFORMER_MIC_SPACING type:string
Space-separated array of 1 (in case of 2 microphones) or 2 (in case of 4 microphones) integers. SAL beamforming currently only supports 2 and 4-microphone configurations. The values represent the spacing between microphones (in millimeters).
In case of 2-microphone setup, Only the first value is used.

In case of 4-microphone setup, The first value is the distance between inner pair of microphones. The second value is the distance between inner pair of microphones and the outer pair. Like this:

Let the microphones be on straight line, A B C D.
Microphones B and C form the inner pair, while A and D form the outer pair.
The first value in the setup string would be distance between B and C.
The second value would be distance between A and B (which is the same as distance between C and D).

With 4-mic setup, you will need to use two channels. The inner pair should go to one channel (left) and the outer pair should go to another (right).

This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

DISABLE_AUDIO_DEVICE_PROBING

public static final java.lang.String DISABLE_AUDIO_DEVICE_PROBING
Setupkey SETUPKEY_DISABLE_AUDIO_DEVICE_PROBING type:boolean
Disables audio devices probing
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

FT_AUTOACCEPT

public static final java.lang.String FT_AUTOACCEPT
Setupkey SETUPKEY_FT_AUTOACCEPT type:int
Controls file transfer auto-accept.
- 0 - off
- 1 - on
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

FT_SAVEPATH

public static final java.lang.String FT_SAVEPATH
Setupkey SETUPKEY_FT_SAVEPATH type:string
Full local path to save incoming file transfers (used for AutoAccept feature)
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

FT_INCOMING_LIMIT

public static final java.lang.String FT_INCOMING_LIMIT
Setupkey SETUPKEY_FT_INCOMING_LIMIT type:uint
Number of simultaneous incoming file transfers (per user). Value 0 means no limitation.
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

IDLE_TIME_FOR_AWAY

public static final java.lang.String IDLE_TIME_FOR_AWAY
Setupkey SETUPKEY_IDLE_TIME_FOR_AWAY type:int
Number of seconds since the last keyboard or mouse activity, after which the online status of currently logged in account should be set to AWAY. See Account.SetAvailability method for more information.
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

IDLE_TIME_FOR_NA

public static final java.lang.String IDLE_TIME_FOR_NA
Setupkey SETUPKEY_IDLE_TIME_FOR_NA type:int
The Contact.AVAILABILITY.NOT_AVAILABLE online status has been deprecated. This setup key is no longer in use.

See Also:
Constant Field Values

PORT

public static final java.lang.String PORT
Setupkey SETUPKEY_PORT type:int
Suggested port number (lib will *try* to use that)
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

HTTPS_PROXY_ENABLE

public static final java.lang.String HTTPS_PROXY_ENABLE
Setupkey SETUPKEY_HTTPS_PROXY_ENABLE type:int
Set to 0 for automatic proxy detect, 1 to use proxy config below
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

HTTPS_PROXY_ADDR

public static final java.lang.String HTTPS_PROXY_ADDR
Setupkey SETUPKEY_HTTPS_PROXY_ADDR type:string
name:port of HTTP proxy server
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

HTTPS_PROXY_USER

public static final java.lang.String HTTPS_PROXY_USER
Setupkey SETUPKEY_HTTPS_PROXY_USER type:string
HTTPS proxy server username
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

HTTPS_PROXY_PWD

public static final java.lang.String HTTPS_PROXY_PWD
Setupkey SETUPKEY_HTTPS_PROXY_PWD type:string
HTTPS proxy server password (base64 encoded)
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

SOCKS_PROXY_ENABLE

public static final java.lang.String SOCKS_PROXY_ENABLE
Setupkey SETUPKEY_SOCKS_PROXY_ENABLE type:int
Set to non-zero to enable socks proxy support
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

SOCKS_PROXY_ADDR

public static final java.lang.String SOCKS_PROXY_ADDR
Setupkey SETUPKEY_SOCKS_PROXY_ADDR type:string
name:port of SOCKS proxy server
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

SOCKS_PROXY_USER

public static final java.lang.String SOCKS_PROXY_USER
Setupkey SETUPKEY_SOCKS_PROXY_USER type:string
SOCKS proxy server username
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

SOCKS_PROXY_PWD

public static final java.lang.String SOCKS_PROXY_PWD
Setupkey SETUPKEY_SOCKS_PROXY_PWD type:string
SOCKS proxy server password (base64 encoded)
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

LOCALADDRESS

public static final java.lang.String LOCALADDRESS
Setupkey SETUPKEY_LOCALADDRESS type:string
local interface to listen to
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

DISABLE_PORT80

public static final java.lang.String DISABLE_PORT80
Setupkey SETUPKEY_DISABLE_PORT80 type:int
1 disables listening of alternative ports (80, 443)
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

DISABLE_UDP

public static final java.lang.String DISABLE_UDP
Setupkey SETUPKEY_DISABLE_UDP type:int
1 disables UDP port binding. should be set before connect
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values
Constructor Detail

Skype

public Skype()
Method Detail

start

public boolean start()
start

Specified by:
start in class SidRoot
Returns:
started

getVersionString

public java.lang.String getVersionString()
returns the runtime version as a string * @return version


getUnixTimestamp

public int getUnixTimestamp()
Returns the time as used in SkypeKit, in the form of a Unix timestamp (number of seconds since 1.1.1970). If the local system time is incorrect my more than one year, the time provided by the Skype network will be provided, which is correct. Therefore this function can be used to adjust the system time if set incorrectly (e.g. if set to 1.1.1970). * @return timestamp


getHardwiredContactGroup

public ContactGroup getHardwiredContactGroup(ContactGroup.Type type)
Takes TYPE argument (TYPE comes from ContactGroup class) and returns reference to the corresponding hardwired contact group. For example (C++): skype->GetHardwiredContactGroup(ContactGroup.ONLINE_BUDDIES, GroupRef) would return the list of all contacts that are currently online. * @param type

Returns:
contactGroup

getCustomContactGroups

public ContactGroup[] getCustomContactGroups()
Returns a list of custom contact group references, i.e. all contact groups that are not hardwired. * @return groups


createCustomContactGroup

public ContactGroup createCustomContactGroup()
Creates a new empty contact group object and returns a reference to it. The group will then show up in the custom group list that you can get with Skype class GetCustomContactGroups method. Existing contacts can be added to the new group with ContactGroup class AddContact method and a custom name can be given to it with GiveDisplayName method. Note that no check is made for existing of displaynames with the same name - if you wish to force uniqueness in custom group names you will have to check that yourself before creating the group.

Returns:
group

getContactType

public Contact.Type getContactType(java.lang.String identity)
analyzes the identity for contact type * @param identity

Returns:
type

getContact

public Contact getContact(java.lang.String identity)
Returns a Contact object reference. If a matching contact is not found in the existing contact list, a new Contact object will be created. Note that if you pass in a phone number in the identity argument, the type for the newly created Contact will be automatically set to Contact.PSTN (Contact.SKYPE otherwise). * @param identity Either skypename or a phone number

Returns:
contact Returns a contact object.

findContactByPstnNumber

public Skype.FindContactByPstnNumberResponse findContactByPstnNumber(java.lang.String number)
findContactByPstnNumber

Parameters:
number -
Returns:
FindContactByPstnNumberResponse
- found
- contact
- foundInKey type is actually PROPKEY

getIdentityType

public Skype.IdentityType getIdentityType(java.lang.String identity)
This takes skypename or a phone number string as argument and returns corresponding identity type (SKYPE, SKYPE_MYSELF, PSTN, etc.) * @param identity

Returns:
type

identitiesMatch

public boolean identitiesMatch(java.lang.String identityA,
                               java.lang.String identityB)
compares two identities to see if they match * @param identityA

Parameters:
identityB -
Returns:
result

normalizeIdentity

public Skype.NormalizeIdentityResponse normalizeIdentity(java.lang.String original,
                                                         boolean isNewSkypeName)
This method is deprecated. Use ValidateProfileString method instead. * @param original

Parameters:
isNewSkypeName -
Returns:
NormalizeIdentityResponse
- result
- normalized

normalizePstnWithCountry

public Skype.NormalizePstnWithCountryResponse normalizePstnWithCountry(java.lang.String original,
                                                                       int countryPrefix)
NormalizePSTNWithCountry checks if the phone number starts with + if it doesn't, it prefixes the output with +XXX (where XXX is the country code). It also converts letters to numbers based on the standard phone keypad, so that the phone number string 212CALLME1 with country code 372 (Estonia) would be normalized to +3722122255631. If the method cannot normalize the phone number (because it's too long, too short, etc.), it returns an error code in &result. * @param original

Parameters:
countryPrefix -
Returns:
NormalizePstnWithCountryResponse
- result
- normalized

getOptimalAgeRanges

public int[] getOptimalAgeRanges()
list of (min,max) pairs * @return rangeList


createContactSearch

public ContactSearch createContactSearch()
Creates a blank contact search object, in which you can add your custom search terms. For more information how asynchronous contact search works, see ContactSearch class details. * @return search Returns blank ContactSearch object.


createBasicContactSearch

public ContactSearch createBasicContactSearch(java.lang.String text)
searches skypenames, aliases, fullnames, emails. false if not valid * @param text

Returns:
search

createIdentitySearch

public ContactSearch createIdentitySearch(java.lang.String identity)
searches skypenames and aliases. returns 0 or 1 results. false if not valid * @param identity

Returns:
search

createConference

public Conversation createConference()
Creates a new empty conversation object and returns a reference to it. * @return conference


getConversationByIdentity

public Conversation getConversationByIdentity(java.lang.String convoIdentity)
Returns reference tp conversation object by conversation ID string (equivalent of old chat ID). NB! ID here is that of conversation, rather than skypename of dialog partner. If you want to retrieve a conversation object with any particular person, then Skype class GetConversationByParticipants method is what you are looking for. * @param convoIdentity

Returns:
conversation

getConversationByParticipants

public Conversation getConversationByParticipants(java.lang.String[] participantIdentities,
                                                  boolean createIfNonExisting,
                                                  boolean ignoreBookmarkedOrNamed)
myself not included * @param participantIdentities

Parameters:
createIfNonExisting -
ignoreBookmarkedOrNamed -
Returns:
conversation

getConversationByBlob

public Conversation getConversationByBlob(java.lang.String joinBlob,
                                          boolean alsoJoin)
Retrieves a Conversation object by Public Conversation BLOB. Public conversation blobs are globally unique conversation IDs that provide a method for joining conversation without explicitly being added to the conversation by someone already in it. Programmatically, a Conversation BLOB can be retrieved with Conversation.GetJoinBlob method. In Skype desktop clients, the BLOB can be retrieved by typing "/get uri" in a conversation. The conversation can then be joined by people who have somehow received that BLOB. * @param joinBlob The BLOB string.

Parameters:
alsoJoin - If set to true, automatically joins current user into the Conversation.
Returns:
conversation Returns Conversation object if successful.

getConversationList

public Conversation[] getConversationList(Conversation.ListType type)
Returns a list of Conversation objects by Conversation.LIST_TYPE filter. * @param type Filter.

Returns:
conversations List of conversations matching the filter.

getMessageByGuid

public Message getMessageByGuid(byte[] guid)
Retrieves a Message object by the P_GUID property (globally unique ID, same for all the participants of the conversation, in which this message occured). * @param guid Globally unique ID of the message.

Returns:
message Returns a Message object if a match was found.

getMessageListByType

public Message[] getMessageListByType(Message.Type type,
                                      boolean latestPerConvOnly,
                                      int fromTimestampInc,
                                      int toTimestampExc)
Returns all messages of the given type * @param type Type of messages requested. For POSTED_TEXT or POSTED_EMOTE, returns a list with both types

Parameters:
latestPerConvOnly - Whether to return only the most recent message per conversation
fromTimestampInc - Starting timestamp for reqested range, inclusive
toTimestampExc - Ending timestamp for requested range, exclusive
Returns:
messages

getAvailableVideoDevices

public Skype.GetAvailableVideoDevicesResponse getAvailableVideoDevices()
This method returns a table in form of two string lists of equal length and an uint argument that returns the count of items i both lists. The first list contains video recording device handles and the second list descriptive names of those devices. NB! This method requires videortphost to be running, otherwise it will return empty lists. * @return GetAvailableVideoDevicesResponse
- deviceNames
- devicePaths
- count


hasVideoDeviceCapability

public boolean hasVideoDeviceCapability(java.lang.String deviceName,
                                        java.lang.String devicePath,
                                        Video.VideoDeviceCapability cap)
Queries whether the given video device has a specific Video.VIDEO_DEVICE_CAPABILITY. Use Skype.GetAvailableVideoDevices method to retrieve sstring lists with available deviceName and devicePath values. * @param deviceName Human readable device name. * @param devicePath Device ID.

Parameters:
cap - Any of the Video.VIDEO_DEVICE_CAPABILITY values.
Returns:
result

displayVideoDeviceTuningDialog

public void displayVideoDeviceTuningDialog(java.lang.String deviceName,
                                           java.lang.String devicePath)
displayVideoDeviceTuningDialog

Parameters:
deviceName -
devicePath -

getPreviewVideo

public Video getPreviewVideo(Video.MediaType type,
                             java.lang.String deviceName,
                             java.lang.String devicePath)
Warning: Will be deprecated soon * @param type

Parameters:
deviceName - name and path to be used only with media type VIDEO
devicePath -
Returns:
video

videoCommand

public java.lang.String videoCommand(java.lang.String command)
Avaible to Video Engines using the Video RTP API * @param command

Returns:
response

startMonitoringQuality

public void startMonitoringQuality(java.lang.String withUser,
                                   boolean excludeNetworkTest)
startMonitoringQuality

Parameters:
withUser - if empty, network test results would reflect status of local node only
excludeNetworkTest -

stopMonitoringQuality

public Skype.QualityTestResult stopMonitoringQuality(java.lang.String withUser,
                                                     boolean justStop)
stopMonitoringQuality

Parameters:
withUser -
justStop -
Returns:
result

getGreeting

public Voicemail getGreeting(java.lang.String skypeName)
getGreeting

Parameters:
skypeName -
Returns:
greeting

playStart

public void playStart(int soundid,
                      byte[] sound,
                      boolean loop,
                      boolean useCallOutDevice)
Takes audio data that comes from the sound argument and mixes it into playback or notification device, depending on the value passed in the useCallOutDevice argument. The sound argument contains the audio data in in follwing format: first 4 bytes of the binary contain the sample rate, followed by 16 bit (mono) samples. The soundid argument is an arbitrary ID that you can pass in and then later use as an argument for Skype class PlayStop method. To mix the audio into playback device stream, set useCallOutDevice to true, to mic it into notification stream, set useCallOutDevice to false. * @param soundid

Parameters:
sound -
loop -
useCallOutDevice -

playStartFromFile

public Skype.PrepareSoundResult playStartFromFile(int soundid,
                                                  java.lang.String datafile,
                                                  boolean loop,
                                                  boolean useCallOutDevice)
playStartFromFile

Parameters:
soundid -
datafile -
loop -
useCallOutDevice -
Returns:
result

playStop

public void playStop(int soundid)
Stops playback of the soundfile. The argument is the same ID you passed in the Skype class StartPlayback method. * @param soundid


startRecordingTest

public void startRecordingTest(boolean recordAndPlaybackData)
startRecordingTest

Parameters:
recordAndPlaybackData -

stopRecordingTest

public void stopRecordingTest()
stopRecordingTest


getAvailableOutputDevices

public Skype.GetAvailableOutputDevicesResponse getAvailableOutputDevices()
This method returns a table in form of three string lists of equal lengths. The first list contains audio output device handles ('hw:0,0', 'hw:0,1', etc.) The second list contains descriptive names of those devices (Ensoniq AudioPCI etc.) The third list contains device product IDs. Note that the values in these lists depend on which audio engine you are running (SAL, PCM, RTP). * @return GetAvailableOutputDevicesResponse
- handleList
- nameList
- productIdList


getAvailableRecordingDevices

public Skype.GetAvailableRecordingDevicesResponse getAvailableRecordingDevices()
This method returns a table in form of three string lists of equal length. The first list contains audio recording device handles ('hw:0,0', 'hw:0,1', etc.) The second list contains descriptive names of those devices (Ensoniq AudioPCI etc.) The third list contains device product IDs. Note that the values in these lists depend on which audio engine you are running (SAL, PCM, RTP). * @return GetAvailableRecordingDevicesResponse *
- handleList
- nameList
- productIdList


selectSoundDevices

public void selectSoundDevices(java.lang.String callInDevice,
                               java.lang.String callOutDevice,
                               java.lang.String waveOutDevice)
Sets audio devices given in arguments as active audio devices. This command selects all three devices - microphone, playback and the notification channel. Valid input values for this method come from the first string list you get back from Skype class GetAvailableOutputDevices (handleList). * @param callInDevice

Parameters:
callOutDevice -
waveOutDevice -

getAudioDeviceCapabilities

public Skype.GetAudioDeviceCapabilitiesResponse getAudioDeviceCapabilities(java.lang.String deviceHandle)
The uint argument returns AUDIODEVICE_CAPABILITIES (declared in Skype class) * @param deviceHandle

Returns:
GetAudioDeviceCapabilitiesResponse
- interfaceString
- capabilities bit set of AUDIODEVICE_CAPABILITIES

getNrgLevels

public Skype.GetNrgLevelsResponse getNrgLevels()
Returns current audio stream volume for both playback and microphone streams. Useful for displaying visual audio indicators in you UI. See also Skype class OnNrgLevelsChange callback that gets fired each time the these values are changed. * @return GetNrgLevelsResponse
- micLevel
- speakerLevel


voiceCommand

public java.lang.String voiceCommand(java.lang.String command)
NB! This command only works if its implemented in external audiohost (RTP or PCM host). The command can be is used for passing custom commands from client UI to the audio implementation. * @param command

Returns:
response

getSpeakerVolume

public int getSpeakerVolume()
Returns value of audio playback volume setting (0..100). * @return volume


setSpeakerVolume

public void setSpeakerVolume(int volume)
This method is for setting speaker volume. It will set the level for Skype digital gain control. Skype audio library will not control gain of audio device itself. * @param volume


getMicVolume

public int getMicVolume()
Returns value of microphone volume setting (0..100). It will return the analog gain of audio device set by Skype AGC. For real-time microphone volume, use GetNrgLevels method or OnNrgLevelsChange callback (both are methods of Skype class). * @return micVolume


setMicVolume

public void setMicVolume(int volume)
This method is for setting the microphone volume level. This does not work when Skype AGC (Automatic Gain Control) is enabled, which it is by default. It is currently impossible to disable AGC, so for now this method is here for purpose of future compatibility. * @param volume


isSpeakerMuted

public boolean isSpeakerMuted()
Returns true in &muted argument if the currently selected playback device is muted. * @return muted


isMicrophoneMuted

public boolean isMicrophoneMuted()
Returns true in &muted argument if the currently selected microphone is muted. * @return muted


muteSpeakers

public void muteSpeakers(boolean mute)
Sets currently selected playback device mute status according to argument. * @param mute


muteMicrophone

public void muteMicrophone(boolean mute)
Sets currently selected microphone mute status according to argument. * @param mute


setOperatingMedia

public void setOperatingMedia(Skype.OperatingMedia media,
                              int maxUplinkBps,
                              int maxDownlinkBps)
setOperatingMedia

Parameters:
media -
maxUplinkBps -
maxDownlinkBps -

requestConfirmationCode

public Sms requestConfirmationCode(Sms.ConfirmType type,
                                   java.lang.String number)
creates and sends a CONFIRMATION_CODE_REQUEST message this sends a confirmation code to the number provided * @param type

Parameters:
number -
Returns:
sms

submitConfirmationCode

public Sms submitConfirmationCode(java.lang.String number,
                                  java.lang.String code)
creates and sends a CONFIRMATION_CODE_SUBMIT message this authorizes the number with the server for the purpose given in RequestConfirmationCode * @param number

Parameters:
code -
Returns:
sms

createOutgoingSms

public Sms createOutgoingSms()
creates an OUTGOING/COMPOSING SMS message * @return sms


getAccount

public Account getAccount(java.lang.String identity)
Retrieves an Account object by Skype name (identity). This should normally be one of the first method calls after Skype object initialization. Nearly all the other methods require successful account login in order to work properly. The list of accounts that have been used on the local machine/database can be retrieved with Skype.GetExistingAccounts method. If a matching identity is not found, a new Account object is created. This object can then be used to populate requred fields and then use Account.Register method for new account creation. This method returns false on error. * @param identity Account skypename.

Returns:
account Returns account object if successful.

getExistingAccounts

public java.lang.String[] getExistingAccounts()
Returns a list of possible profiles used before on this machine * @return accountNameList


getDefaultAccountName

public java.lang.String getDefaultAccountName()
return most recently used account that has pwd saved. empty string if none * @return account


getSuggestedSkypename

public java.lang.String getSuggestedSkypename(java.lang.String fullname)
suggest a nice skypename to go with given fullname * @param fullname

Returns:
suggestedName

validateAvatar

public Skype.ValidateAvatarResponse validateAvatar(byte[] value)
validateAvatar

Parameters:
value -
Returns:
ValidateAvatarResponse
- result
- freeBytesLeft

validateProfileString

public Skype.ValidateProfileStringResponse validateProfileString(int propKey,
                                                                 java.lang.String strValue,
                                                                 boolean forRegistration)
This method should be used for validating skypenames before registering new accounts, if the propKey is set to SKYPENAME (Contact class) and forRegistration argument is set to true. If the forRegistration argument is false, only string length check is applied. It is also useful to probe, what the size limits are, for each string property (e.g. 300 characters for moodmessage) * @param propKey

Parameters:
strValue -
forRegistration -
Returns:
ValidateProfileStringResponse
- result
- freeBytesLeft

validatePassword

public Skype.Validateresult validatePassword(java.lang.String username,
                                             java.lang.String password)
This method is for pre-validating account passwords before account creation or password change. The result will return either VALIDATED_OK or one of many possible reasons the password is unacceptable (too short, too simple, etc.) * @param username

Parameters:
password -
Returns:
result

getUsedPort

public int getUsedPort()
port that lib ended up listening. usually equal to SETUPKEY_PORT. 0 if none used (disconnected or binding failed) * @return port


getStr

public java.lang.String getStr(java.lang.String key)
This is used for retrieving local setup keys of type string. For more information, see Defines section in the skype-embedded_2.h * @param key

Returns:
value

getInt

public int getInt(java.lang.String key)
This is used for retrieving local setup keys of type int. For more information, see Defines section in the skype-embedded_2.h * @param key

Returns:
value

getBin

public byte[] getBin(java.lang.String key)
This is used for retrieving local setup keys of type binary. For more information, see Defines section in the skype-embedded_2.h * @param key

Returns:
value

setStr

public void setStr(java.lang.String key,
                   java.lang.String value)
This is used for setting local setup keys of type string. For more information, see Defines section in the skype-embedded_2.h * @param key

Parameters:
value -

setInt

public void setInt(java.lang.String key,
                   int value)
This is used for setting local setup keys of type int. For more information, see Defines section in the skype-embedded_2.h * @param key

Parameters:
value -

setBin

public void setBin(java.lang.String key,
                   byte[] value)
This is used for setting local setup keys of type binary. For more information, see Defines section in the skype-embedded_2.h * @param key

Parameters:
value -

isDefined

public boolean isDefined(java.lang.String key)
Returns true if the given setup key is defined in local setup. For more information, see Defines section in the skype-embedded_2.h * @param key

Returns:
value

delete

public void delete(java.lang.String key)
delete

Parameters:
key -

getSubKeys

public java.lang.String[] getSubKeys(java.lang.String key)
getSubKeys

Parameters:
key -
Returns:
value

getIsoLanguageInfo

public Skype.GetIsoLanguageInfoResponse getIsoLanguageInfo()
Returns two string lists. First of them will contain list of two-letter language codes (ISO 639-1) The second list contains names of corresponding languages. * @return GetIsoLanguageInfoResponse
- languageCodeList
- languageNameList assumes UI has set correct language


getIsoCountryInfo

public Skype.GetIsoCountryInfoResponse getIsoCountryInfo()
Returns three string lists and one int array, containing 2-letter country code, country name, dialing prefix and example dial string (not available for all items). This method does currently return 0 for South Georgia and the South Sandwich Islands. * @return GetIsoCountryInfoResponse
- countryCodeList
- countryNameList assumes UI has set correct language
- countryPrefixList
- countryDialExampleList


getIsoCountryCodeByPhoneNo

public java.lang.String getIsoCountryCodeByPhoneNo(java.lang.String number)
Returns 2-letter country code based on PSTN number. The input argument has to be without + in from of it - '37212345678' will return 'ee' while '+37212345678' will return an empty string. * @param number

Returns:
countryCode

app2AppCreate

public boolean app2AppCreate(java.lang.String appname)
App2AppCreate method constructs a local instance of an App2App application. App2App applications are not abstracted in the SkypeKit API as a separate class. Rather, they can be created with App2AppCreate, supplying their name as ID, and then connected to remote parties using App2AppConnect method. App2App portion of the SkypeKit API enables you to implement arbitrary data exchange protocols between Skype clients. Basically, if you are ever tempted to use conversation chat messages for something other than actual human-readable chat - you should consider using your own custom App2App protocol instead. The downside of App2App is that all the participants need to be running a client that supports the same App2App application. Although, it is possible to have one side using a custom SkypeKit client and another side using Skype desktop client - App2App is supported in both, in case of desktop client via Public API - you are still limited to remote side running something that can recognize your protocol and react to connection attempts from your side. To establish connection between each other, all participants need to create their local instances of the application (with the same ID, and then connect to each other. More than one App2App applications can be active in a local client at the same time. Also, more than two clients can be connected with the same application. Once connection is established, you can choose between two communication methods - datagrams and stream read/write methods. Overall, there are not much principal difference between the two. Datagram packet size is limited to 1500 bytes and stream packet size to 32 KB of payload data. Implementation-wise, datagrams are probably somewhat easier to deal with.

Parameters:
appname - Application ID. This ID is used by the rest of the App2App commands to differentiate between applications, should there be more than one app2app applications running on the local system.
Returns:
result Returns true if the app creation was successful. Returns false when an application with the same name already exists in the local system.

app2AppDelete

public boolean app2AppDelete(java.lang.String appname)
Disconnects and deletes the App2App application. * @param appname application ID. * @return result Returns true if the deletion was successful (application with such ID actually existed)


app2AppConnect

public boolean app2AppConnect(java.lang.String appname,
                              java.lang.String skypename)
The App2AppConnect connect result does not mean the connection was immediately established. It will return Ok even if the remote party was offline. The actual connection will be established when both parties have fired App2AppConnect with the same application name, at eachother. At that point, OnApp2AppStreamListChange event will fire for both local and remote party (with listType argument set to ALL_STREAMS) and you can start exchanging data, using either App2App datagrams or App2AppRead App2AppWrite methods. * @param appname Application ID. This needs to match with application ID connecting from the remote side.

Parameters:
skypename - Skype Name of the remote party.
Returns:
result NB! This argument will return true even if the remote party has not yet connected (or is not even online yet) - it merely indicates that the connect command was successfuly processed in runtime. The actual connection success will be indicated when the OnApp2AppStreamListChange event fires, i.e. when App2App stream will be established between connecting parties.

app2AppDisconnect

public boolean app2AppDisconnect(java.lang.String appname,
                                 java.lang.String stream)
Disconnects an App2App stream. This is different from App2AppDelete command in that it enables you to disconnect remote parties selectively - in case there are more than two participants in the App2App stream pool. * @param appname application ID

Parameters:
stream - stream ID.
Returns:
result returns true when the stream disconnect was successful.

app2AppWrite

public boolean app2AppWrite(java.lang.String appname,
                            java.lang.String stream,
                            byte[] data)
Sends a stream packet to the remote party specified in the stream argument. The max size of stream write packet is 32KB. After calling this method, OnApp2AppStreamListChange will fire for both parties. In local ssytem with listType set to SENDING_STREAMS and on remote system with listType set to RECEIVED_STREAMS. This event can be used to read received packets out of the stream. * @param appname application ID

Parameters:
stream - stream ID
data - packet payload
Returns:
result returns true if the call was successful. Note that this does indicate the packet was actually received by remote party.

app2AppDatagram

public boolean app2AppDatagram(java.lang.String appname,
                               java.lang.String stream,
                               byte[] data)
Sends a datagram to the remote party specified in the stream argument. The max size of datagram payload is 1500 bytes. * @param appname application ID - from App2AppCreate

Parameters:
stream - stream ID - either from App2AppGetStreamsList or from OnApp2AppStreamListChange
data - datagram payload (max 1500 bytes)
Returns:
result returns true on method success. Note that this does mean the remote party has actually received your datagram - that sort of feedback, should you want it, is up to you to implement in your custom protocol.

app2AppRead

public Skype.App2AppReadResponse app2AppRead(java.lang.String appname,
                                             java.lang.String stream)
Reads data from the specified stream. This method should be called from the OnApp2AppStreamListChange event callback, when this callback gets fired with listType argument set to RECEIVED_STREAMS. * @param appname application ID

Parameters:
stream - stream ID
Returns:
App2AppReadResponse
- result returns true on method success. Note that this does mean the remote party has actually received your packet - that sort of feedback, should you want it, is up to you to implement in your custom protocol.
- data stream packet payload

app2AppGetConnectableUsers

public Skype.App2AppGetConnectableUsersResponse app2AppGetConnectableUsers(java.lang.String appname)
App2AppGetConnectableUsers returns a list of currently online contacts. It does not return a list of contacts who have an app2app application running. There is currently no way of querying whether an application has been launched on the remote side - other than trying to connect to the remote side and waiting for timeout. NB! if you use App2AppGetConnectableUsers immediately after login - then the online presence of your contact list has not yet updated itself - so this method will most likely return either an empty list or a list with echo123 in it. * @param appname application ID

Returns:
App2AppGetConnectableUsersResponse
- result returns true on method success
- users stringlist with Skype Names of connectable users

app2AppGetStreamsList

public Skype.App2AppGetStreamsListResponse app2AppGetStreamsList(java.lang.String appname,
                                                                 Skype.App2AppStreams listType)
Takes application ID and list type filter and returns a stringlist with streamID's that pass the filter. * @param appname application ID

Parameters:
listType - list type filter
Returns:
App2AppGetStreamsListResponse
- result results true if the method call was successful
- streams string list with stream IDs
- receivedSizes For RECEIVED_STREAMS, contains the number of bytes in each stream waiting to be read

sidDispatchEvent

public void sidDispatchEvent(int modId,
                             int evId,
                             Decoding decoder)
Specified by:
sidDispatchEvent in class SidRoot

registerContactGroupListener

public void registerContactGroupListener(ContactGroupListener listener)

unRegisterContactGroupListener

public void unRegisterContactGroupListener(ContactGroupListener listener)

getContactGroupListener

public ContactGroupListener getContactGroupListener()

registerContactListener

public void registerContactListener(ContactListener listener)

unRegisterContactListener

public void unRegisterContactListener(ContactListener listener)

getContactListener

public ContactListener getContactListener()

registerContactSearchListener

public void registerContactSearchListener(ContactSearchListener listener)

unRegisterContactSearchListener

public void unRegisterContactSearchListener(ContactSearchListener listener)

getContactSearchListener

public ContactSearchListener getContactSearchListener()

registerParticipantListener

public void registerParticipantListener(ParticipantListener listener)

unRegisterParticipantListener

public void unRegisterParticipantListener(ParticipantListener listener)

getParticipantListener

public ParticipantListener getParticipantListener()

registerConversationListener

public void registerConversationListener(ConversationListener listener)

unRegisterConversationListener

public void unRegisterConversationListener(ConversationListener listener)

getConversationListener

public ConversationListener getConversationListener()

registerMessageListener

public void registerMessageListener(MessageListener listener)

unRegisterMessageListener

public void unRegisterMessageListener(MessageListener listener)

getMessageListener

public MessageListener getMessageListener()

registerVideoListener

public void registerVideoListener(VideoListener listener)

unRegisterVideoListener

public void unRegisterVideoListener(VideoListener listener)

getVideoListener

public VideoListener getVideoListener()

registerVoicemailListener

public void registerVoicemailListener(VoicemailListener listener)

unRegisterVoicemailListener

public void unRegisterVoicemailListener(VoicemailListener listener)

getVoicemailListener

public VoicemailListener getVoicemailListener()

registerSmsListener

public void registerSmsListener(SmsListener listener)

unRegisterSmsListener

public void unRegisterSmsListener(SmsListener listener)

getSmsListener

public SmsListener getSmsListener()

registerTransferListener

public void registerTransferListener(TransferListener listener)

unRegisterTransferListener

public void unRegisterTransferListener(TransferListener listener)

getTransferListener

public TransferListener getTransferListener()

registerAccountListener

public void registerAccountListener(AccountListener listener)

unRegisterAccountListener

public void unRegisterAccountListener(AccountListener listener)

getAccountListener

public AccountListener getAccountListener()

registerSkypeListener

public void registerSkypeListener(SkypeListener listener)

unRegisterSkypeListener

public void unRegisterSkypeListener(SkypeListener listener)

getSkypeListener

public SkypeListener getSkypeListener()

sidGetObjects

public SidObject[] sidGetObjects(int modId,
                                 int size)

sidCreateObject

protected SidObject sidCreateObject(int modId,
                                    int oid)
Specified by:
sidCreateObject in class SidRoot


Copyright © 2010, 2011 Skype Technologies. All Rights Reserved.