com.skype.tutorial.util
Class MySkype

java.lang.Object
  extended by com.skype.ipc.RootObject
      extended by com.skype.api.Skype
          extended by com.skype.tutorial.util.MySkype
All Implemented Interfaces:
com.skype.ipc.EventHandler

public class MySkype
extends com.skype.api.Skype

Tutorials-specific extension of Skype that overrides nothing. However, this sub-class:

Since:
1.0
Author:
Andrea Drane (ported/refactored from existing C++ tutorial code)

Nested Class Summary
 
Nested classes/interfaces inherited from class com.skype.api.Skype
com.skype.api.Skype.AUDIODEVICE_CAPABILITIES, com.skype.api.Skype.ErrorListener, com.skype.api.Skype.FindContactByPstnNumberResult, com.skype.api.Skype.GetAudioDeviceCapabilitiesResult, com.skype.api.Skype.GetAvailableOutputDevicesResult, com.skype.api.Skype.GetAvailableRecordingDevicesResult, com.skype.api.Skype.GetAvailableVideoDevicesResult, com.skype.api.Skype.GetISOCountryInfoResult, com.skype.api.Skype.GetISOLanguageInfoResult, com.skype.api.Skype.GetNrgLevelsResult, com.skype.api.Skype.IDENTITYTYPE, com.skype.api.Skype.NormalizeIdentityResult, com.skype.api.Skype.NormalizePSTNWithCountryResult, com.skype.api.Skype.NORMALIZERESULT, com.skype.api.Skype.PREPARESOUNDRESULT, com.skype.api.Skype.PROXYTYPE, com.skype.api.Skype.SkypeListener, com.skype.api.Skype.TRANSFER_SENDFILE_ERROR, com.skype.api.Skype.ValidateAvatarResult, com.skype.api.Skype.ValidateProfileStringResult, com.skype.api.Skype.VALIDATERESULT
 
Field Summary
static java.lang.String MY_CLASS_TAG_PFX
          Info/Debug console output message prefix/identifier tag prefix.
static java.lang.String myTutorialTag
          Info/Debug console output message prefix/identifier tag.
 java.lang.String streamName
          Datagram stream ID, used by Tutorial 11.
 
Fields inherited from class com.skype.api.Skype
BEAMFORMER_MIC_SPACING, DISABLE_AEC, DISABLE_AGC, DISABLE_DIGITAL_FAR_END_AGC, DISABLE_DIGITAL_NEAR_END_AGC, DISABLE_NOISE_SUPPRESSOR, DISABLE_PORT80, DISABLE_UDP, DISABLED_CODECS, FT_AUTOACCEPT, FT_INCOMING_LIMIT, FT_SAVEPATH, HTTPS_PROXY_ADDR, HTTPS_PROXY_ENABLE, HTTPS_PROXY_PWD, HTTPS_PROXY_USER, IDLE_TIME_FOR_AWAY, IDLE_TIME_FOR_NA, listeners, listeners_base, LOCALADDRESS, object_list, object_list_base, PORT, SOCKS_PROXY_ADDR, SOCKS_PROXY_ENABLE, SOCKS_PROXY_PWD, SOCKS_PROXY_USER
 
Fields inherited from class com.skype.ipc.RootObject
errorListener
 
Constructor Summary
MySkype()
          Default constructor.
MySkype(java.lang.String tutorialTag)
          Tutorial constructor.
 
Method Summary
 com.skype.api.Skype.NormalizeIdentityResult GetNormalizationStr(java.lang.String pstn)
          Normalizes a phone number and indicates that operation's success/failure.
 boolean SetupAudioDevices(int micIdx, int spkrIdx)
          Assigns active input and output devices from among those available.
 
Methods inherited from class com.skype.api.Skype
Close, CreateBasicContactSearch, CreateConference, CreateContactSearch, CreateCustomContactGroup, CreateIdentitySearch, CreateOutgoingSms, Delete, DisplayVideoDeviceTuningDialog, FindContactByPstnNumber, FlushObjects, GetAccount, GetAudioDeviceCapabilities, GetAvailableOutputDevices, GetAvailableRecordingDevices, GetAvailableVideoDevices, GetBin, GetContact, GetContactType, GetConversationByBlob, GetConversationByIdentity, GetConversationByParticipants, GetConversationList, GetCustomContactGroups, GetDefaultAccountName, GetExistingAccounts, GetGreeting, GetHardwiredContactGroup, GetIdentityType, GetInt, GetISOCountryCodebyPhoneNo, GetISOCountryInfo, GetISOLanguageInfo, GetMessageByGuid, GetMicVolume, getmoduleid, GetNrgLevels, GetOptimalAgeRanges, GetPreviewVideo, GetSpeakerVolume, GetStr, GetSubKeys, GetSuggestedSkypename, GetVersionString, GetVoiceMailFromId, HandleEvent_inner, HandleEvent, HandlePropertyChange, HasVideoDeviceCapability, IsDefined, IsMicrophoneMuted, IsSpeakerMuted, MuteMicrophone, MuteSpeakers, NormalizeIdentity, NormalizePSTNWithCountry, PlayStart, PlayStartFromFile, PlayStop, RegisterListener, SelectSoundDevices, SetBin, SetInt, SetMicVolume, SetMobileMode, SetSpeakerVolume, SetStr, StartRecordingTest, StopRecordingTest, UnRegisterListener, ValidateAvatar, ValidatePassword, ValidateProfileString, VideoCommand, VoiceCommand
 
Methods inherited from class com.skype.ipc.RootObject
GetProperty, Init, MultiGetProperty, newXCallRequest, SetErrorListener, XCall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MY_CLASS_TAG_PFX

public static final java.lang.String MY_CLASS_TAG_PFX
Info/Debug console output message prefix/identifier tag prefix. Corresponds to class name.

Since:
1.0
See Also:
Constant Field Values

myTutorialTag

public static java.lang.String myTutorialTag
Info/Debug console output message prefix/identifier tag. Corresponds to class name.

Since:
1.0

streamName

public java.lang.String streamName
Datagram stream ID, used by Tutorial 11.

Since:
1.0
Constructor Detail

MySkype

public MySkype()
Default constructor.

Forces the info/debug console output message prefix/identifier tag to:
  MY_CLASS_TAG_PFX + "0" (zero).

Since:
1.0

MySkype

public MySkype(java.lang.String tutorialTag)
Tutorial constructor.

Sets the info/debug console output message prefix/identifier tag to MY_CLASS_TAG_PFX concatenated with the portion of the invoker's prefix/identifier tag starting with the underscore. These characters should be the digits corresponding to the tutorial step number.

Since:
1.0
Method Detail

SetupAudioDevices

public boolean SetupAudioDevices(int micIdx,
                                 int spkrIdx)
Assigns active input and output devices from among those available. Notifies user regarding the name of the selected devices or whether the request failed. Both devices must exist for the request to succeed.

Parameters:
micIdx - Index into the array of available recording devices of the requested input device.
spkrIdx - Index into the array of available output devices of the requested output device.
Returns:
  • true: success
  • false: failure
Since:
1.0
See Also:
Skype.GetAvailableRecordingDevices(), Skype.GetAvailableOutputDevices()

GetNormalizationStr

public com.skype.api.Skype.NormalizeIdentityResult GetNormalizationStr(java.lang.String pstn)
Normalizes a phone number and indicates that operation's success/failure.

Determines the country code dialing prefix through Skype.GetISOCountryInfo() by matching the default Locale country with an entry in the Skype.GetISOCountryInfoResult.countryCodeList. Writes a message to the console indicating success/failure reason.

Parameters:
pstn - Phone number to normalize.
Returns:
The normalization result, which includes:
  • an Enum instance detailing success/failure reason.
  • the normalized string (success) or error message string (failure)
Since:
1.0
See Also:
Skype.NormalizePSTNWithCountry(String, int), Skype.GetISOCountryInfo()