001 package com.skype.api;
002
003 import com.skype.api.Conversation;
004 import com.skype.api.Skype;
005
006
007 public interface SkypeListener{
008 /**
009 * onNewCustomContactGroup
010 * @param object
011 * @param group eg, new contact group loaded from CBL
012 */
013 public void onNewCustomContactGroup(Skype object, ContactGroup group);
014 /** This contact has appeared online. display alert * @param contact
015 */
016 public void onContactOnlineAppearance(Skype object, Contact contact);
017 /** This contact has gone offline. display alert * @param contact
018 */
019 public void onContactGoneOffline(Skype object, Contact contact);
020 /** This event gets fired when a Conversation item is added or removed from the list specified in the type argument. The primary use of this event is to detect creation of new Conversation objects. It can also be used for detecting occurance of live sessions - by monitoring added = true in Conversation.LIVE_CONVERSATIONS. Note that this method is not entirely sufficient for detecting live session termination (added = false and type = Conversation.LIVE_CONVERSATIONS). When the live session goes down, the default behaviour is that the Conversation object remains in the LIVE_CONVERSATIONS list for approximately 10 seconds. When another live session comes up within the same Conversation, the OnConversationListChange event will not fire - because the conversation was already in that list. There are two ways of getting around that. Firstly you can have all the conversations referenced at all times and then monitor Conversation.P_LOCAL_LIVESTATUS property changes, in which case you can pick up incoming live sessions from there. Alternatively, you can remove the delay between live session termination and conversation's removal from the LIVE_CONVERSATIONS list. This delay is controlled by the SETUPKEY_RECENTLY_LIVE_TIMEOUT setup key. To remove the delay, use Skype.SetInt(SETUPKEY_RECENTLY_LIVE_TIMEOUT, 0). Note that this setup key is account-based. You will need to have an account logged in in order to modify its value. * @param conversation Conversation object that was added or removed to a list specified in the type argument.
021 * @param type Specifies the list, into which the conversation was added or removed from.
022 * @param added Specifies whether the conversation was added or removed. For ALL_CONVERSATIONS list, the removed event is only fired when the conversation is actually deleted.
023 */
024 public void onConversationListChange(Skype object, Conversation conversation, Conversation.ListType type, boolean added);
025 /**
026 * onMessage
027 * @param object
028 * @param message
029 * @param changesInboxTimestamp if changesInboxTimestamp==true is a hint that tray alert should probably be displayed
030 * @param supersedesHistoryMessage DEPRECATED, not set anymore
031 * @param conversation
032 */
033 public void onMessage(Skype object, Message message, boolean changesInboxTimestamp, Message supersedesHistoryMessage, Conversation conversation);
034 /** This callback gets fired when there are changes in the system video device list (USB webcam gets plugged in or is detached.) */
035 public void onAvailableVideoDeviceListChange(Skype object);
036 /** Event is implemented only in SkypeKit builds. Fired when Skype video library uses software H264 codec for the first time on the particular hardware by particular SkypeKit-based application */
037 public void onH264Activated(Skype object);
038 /**
039 * onQualityTestResult
040 * @param object
041 * @param testType
042 * @param testResult
043 * @param withUser
044 * @param details
045 * @param xmlDetails
046 */
047 public void onQualityTestResult(Skype object, Skype.QualityTestType testType, Skype.QualityTestResult testResult, String withUser, String details, String xmlDetails);
048 /** This callback gets fired when there are changes in the system audio device list (USB headset gets plugged in or is detached.) */
049 public void onAvailableDeviceListChange(Skype object);
050 /** This callback gets fired when the audio strength changes in either playback or recording audio streams. Useful for providing visual indicators of audio activity in your UI. */
051 public void onNrgLevelsChange(Skype object);
052 /**
053 * onProxyAuthFailure
054 * @param object
055 * @param type
056 */
057 public void onProxyAuthFailure(Skype object, Skype.ProxyType type);
058 /** This event gets fired on incoming app2app datagram. * @param appname App2app application ID.
059 * @param stream App2app stream ID - see OnApp2AppStreamListChange event for obtaining stream IDs.
060 * @param data Datagram payload - limited to 1500 bytes.
061 */
062 public void onApp2AppDatagram(Skype object, String appname, String stream, byte[] data);
063 /**
064 * In context of datagrams, this event will fire when:
065 * - Connection is established between two app2app applications. That is, when both parties have an app up with the same name and -both- used App2AppConnect In that case, both parties get this event, with listType ALL_STREAMS
066 * - When a datagram is sent, the sender will get this event with listType SENDING_STREAMS Receiver of the datagram will get OnApp2AppDatagram event instead.
067 * - When the remote party drops app2app connection, the local user will get OnApp2AppStreamListChange with listType ALL_STREAMS and streams.size() zero.
068 * In context of stream reads/writes, this event will fire for both the sender (listType == SENDING_STREAMS)and the receiver (listType == RECEIVED_STREAMS). For receiver side, this is the place to put your reading code - App2AppRead.
069 * @param appname application ID - the name you supplied in App2AppCreate.
070 * @param listType application list type (read/write/all)
071 * @param streams SEStringlist with affected stream IDs.
072 * @param receivedSizes For RECEIVED_STREAMS, contains the number of bytes in each stream waiting to be read
073 */
074 public void onApp2AppStreamListChange(Skype object, String appname, Skype.App2AppStreams listType, String[] streams, int[] receivedSizes);
075 }