|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.skype.ipc.SidObject
com.skype.api.Conversation
public final class Conversation
The Conversation class encapsulates all types of communication possible with Skype client. Instant messaging, calls, video calls, file transfers, SMS, screen sharing - all take place within the context of a Conversation. Contacts are represented in Conversation as Participant objects. This also applies to contacts of PSTN type. All events in a conversation are represented as Message objects.
| Nested Class Summary | |
|---|---|
static class |
Conversation.AllowedActivity
values for opt_admin_only_activities property |
class |
Conversation.GetLastMessagesResponse
|
static class |
Conversation.ListType
|
static class |
Conversation.LocalLiveStatus
|
static class |
Conversation.MyStatus
|
static class |
Conversation.ParticipantFilter
|
class |
Conversation.PostFilesResponse
|
static class |
Conversation.Property
Properties of the Conversation class |
static class |
Conversation.Type
|
| Field Summary | |
|---|---|
static java.lang.String |
CALL_APPLY_CF
Setupkey SETUPKEY_CALL_APPLY_CF type:int Enables/disables call forwarding. |
static java.lang.String |
CALL_EMERGENCY_COUNTRY
Setupkey SETUPKEY_CALL_EMERGENCY_COUNTRY type:string Country code for emergency calls This is account-specific setup key. |
static java.lang.String |
CALL_NOANSWER_TIMEOUT
Setupkey SETUPKEY_CALL_NOANSWER_TIMEOUT type:int default value:"15" Timeout in seconds after which the incoming live session will stop ringing (and if possible, proceed to voicemail or call forward). |
static java.lang.String |
CALL_SEND_TO_VM
Setupkey SETUPKEY_CALL_SEND_TO_VM type:int Autoforwarding of incoming calls to voicemail. |
static java.lang.String |
CHAT_HISTORY_DAYS
Setupkey SETUPKEY_CHAT_HISTORY_DAYS type:int Time limit for keeping local chat message history. |
static java.lang.String |
CHATDB_LIMIT_KB
Setupkey SETUPKEY_CHATDB_LIMIT_KB type:int default value:"0" Use this key to limit the size of the chat db. |
static java.lang.String |
DISABLE_CHAT
Setupkey SETUPKEY_DISABLE_CHAT type:int Disables chat (for voice only clients). |
static java.lang.String |
DISABLE_CHAT_ACTIVITY_INDICATION
Setupkey SETUPKEY_DISABLE_CHAT_ACTIVITY_INDICATION type:int Enables/disables transmitting typing indicator signals to othe participants of conversations. |
static java.lang.String |
DISABLE_CHAT_HISTORY
Setupkey SETUPKEY_DISABLE_CHAT_HISTORY type:int Disables storage of chat history. |
static java.lang.String |
ENABLE_BIRTHDAY_NOTIFICATION
Setupkey SETUPKEY_ENABLE_BIRTHDAY_NOTIFICATION type:int default value:"1" Enables/disables birthday notification messages. |
static java.lang.String |
INBOX_UPDATE_TIMEOUT
Setupkey SETUPKEY_INBOX_UPDATE_TIMEOUT type:int Timeout in seconds, how old the Conversation.P_INBOX_TIMESTAMP has to be for it to be re-sorted in the inbox. |
Voicemail |
mActiveVoicemail
|
java.lang.String |
mAlertString
|
int |
mConsumptionHorizon
|
int |
mCreationTimestamp
|
java.lang.String |
mCreator
|
java.lang.String |
mDisplayName
|
java.lang.String |
mGivenDisplayName
|
java.lang.String |
mIdentity
|
Message |
mInboxMessageId
|
int |
mInboxTimestamp
|
boolean |
mIsBookmarked
|
int |
mLastActivityTimestamp
|
java.lang.String |
mLiveHost
|
boolean |
mLiveIsMuted
|
int |
mLiveStartTimestamp
|
Conversation.LocalLiveStatus |
mLocalLiveStatus
|
java.lang.String |
mMetaGuidelines
|
java.lang.String |
mMetaName
|
byte[] |
mMetaPicture
|
java.lang.String |
mMetaTopic
|
Conversation.MyStatus |
mMyStatus
|
int |
mOptAdminOnlyActivities
|
boolean |
mOptDiscloseHistory
|
Participant.Rank |
mOptEntryLevelRank
|
boolean |
mOptJoiningEnabled
|
java.lang.String |
mPasswordHint
|
Conversation |
mSpawnedFromConvoId
|
Conversation.Type |
mType
|
int |
mUnconsumedElevatedMessages
|
boolean |
mUnconsumedMessagesVoice
|
int |
mUnconsumedNormalMessages
|
int |
mUnconsumedSuppressedMessages
|
static java.lang.String |
RECENTLY_LIVE_TIMEOUT
Setupkey SETUPKEY_RECENTLY_LIVE_TIMEOUT type:int default value:"20" The number of seconds a formerly live conversation will remain the Conversation.LIVE_CONVERSATIONS filter. |
| Fields inherited from class com.skype.ipc.SidObject |
|---|
mSidCached, mSidOid, mSidRoot, mSidTimestamp |
| Constructor Summary | |
|---|---|
Conversation(int oid,
SidRoot root)
|
|
| Method Summary | |
|---|---|
void |
addConsumers(java.lang.String[] identities)
Takes one or more Contact identities and creates corresponding Participant objects within the context of this Conversation, which must be of type CONFERENCE. |
void |
addToInbox(int timestamp)
Sets Conversation inbox_timestamp property. |
Conversation |
assimilate(Conversation otherConversation)
Merges two live conversations. |
boolean |
canTransferLiveSession(java.lang.String identity)
Checks if the identity is available for receiving a transferred live session. |
void |
delete()
Deletes this conversation, which must be of type CONFERENCE - dialogs between local user and any of his contacts are always persistant. |
void |
enterPassword(java.lang.String password)
Submits password for joining password-protected conversation. |
Message |
findMessage(java.lang.String text,
int fromTimestampUp)
Finds the most recent Message object in the conversation that contains the substring specified by the text argument. |
Voicemail |
getActiveVoicemail()
ID of voice message that is being played or recorded in this conversation |
java.lang.String |
getAlertString()
'' everything matches, '=' nothing matches, '=string' string matches |
int |
getConsumptionHorizon()
consumption cutoff timestamp: messages after (but not including) this are considered unconsumed |
int |
getCreationTimestamp()
timestamp of creation, tells you how far you can retrieve messages |
java.lang.String |
getCreator()
identity of conversation creator (doesn't apply to dialogs) |
java.lang.String |
getDisplayName()
resulting display name of the conversation (based on given name, topic, participant list, etc) |
java.lang.String |
getGivenDisplayName()
local name assigned via Rename |
java.lang.String |
getIdentity()
contact identity in case of dialogs, chat name in case of conferences |
Message |
getInboxMessageId()
ID of the message that caused INBOX_TIMESTAMP to be set |
int |
getInboxTimestamp()
timestamp to sort the conversations in inbox by. |
boolean |
getIsBookmarked()
if conversation is bookmarked/flagged |
java.lang.String |
getJoinBlob()
Retrieves a binary join blob for joining public conversations, which are always of type CONFERENCE. |
int |
getLastActivityTimestamp()
timestamp of last activity in conversation |
Conversation.GetLastMessagesResponse |
getLastMessages(int requireTimestamp)
Returns recent messages. |
java.lang.String |
getLiveHost()
host of current live session. |
boolean |
getLiveIsMuted()
if live session is muted |
int |
getLiveStartTimestamp()
moment when first participant other than host joined the current or last live session |
Conversation.LocalLiveStatus |
getLocalLiveStatus()
if the conversation is live and in which status it is then |
java.lang.String |
getMetaGuidelines()
guidelines (doesn't apply to dialogs) |
java.lang.String |
getMetaName()
deprecated, not used |
byte[] |
getMetaPicture()
conversation picture, in jpeg format (doesn't apply to dialogs) |
java.lang.String |
getMetaTopic()
conversation topic (doesn't apply to dialogs) |
Conversation.MyStatus |
getMyStatus()
my status in this conversation (connecting, participating, retired, etc) (doesn't apply to dialogs) |
int |
getOptAdminOnlyActivities()
activities that only ADMIN can do. |
boolean |
getOptDiscloseHistory()
if history visible to new consumers (doesn't apply to dialogs) |
Participant.Rank |
getOptEntryLevelRank()
rank that is auto-assigned at join (doesn't apply to dialogs) |
boolean |
getOptJoiningEnabled()
if it's a public conversation (doesn't apply to dialogs) |
Participant[] |
getParticipants(Conversation.ParticipantFilter filter)
Retrieves the list of this conversation's current participants, which you can optionally request to be filtered. |
java.lang.String |
getPasswordHint()
public conversation password hint, use SetPassword to set (doesn't apply to dialogs) |
java.lang.String |
getPropertyAsString(Conversation.Property prop)
|
java.lang.String |
getPropertyAsString(int prop)
|
Conversation |
getSpawnedFromConvoId()
dialog this conference was spawned from |
Conversation.Type |
getType()
type of the conversation |
int |
getUnconsumedElevatedMessages()
DEPRECATED, not set anymore |
boolean |
getUnconsumedMessagesVoice()
if there are unconsumed voice or call messages in the conversation |
int |
getUnconsumedNormalMessages()
number of messages in UNCONSUMED_NORMAL consumption status |
int |
getUnconsumedSuppressedMessages()
number of messages in UNCONSUMED_SUPPRESSED consumption status |
void |
holdMyLiveSession()
Puts the conversation on hold - Conversation LOCAL_LIVESTATUS changes to ON_HOLD_LOCALLY and to ON_HOLD_REMOTELY for remote participants. |
boolean |
isMemberOf(ContactGroup group)
Checks if the conversation is a member of the given ContactGroup * @param group ContactGroup |
void |
join()
Tries to join a public conversation (aka public chat). |
void |
joinLiveSession(java.lang.String accessToken)
starts, answers or joins a live session (first one to join becomes LIVE_HOST) * @param accessToken if starting a live session, allows to set a custom access token |
void |
leaveLiveSession(boolean postVoiceAutoresponse)
Hang up or refuse to answer an incoming call. |
void |
markUnread()
sets consumption horizon to last inbox message id timestamp |
Conversation |
mgetInfo()
multiget the following properties - P_DISPLAY_NAME - P_UNCONSUMED_NORMAL_MESSAGES - P_INBOX_TIMESTAMP |
static Conversation[] |
mgetInfo(Conversation[] objects)
multiget the following properties for a list of Conversation - P_DISPLAY_NAME - P_UNCONSUMED_NORMAL_MESSAGES - P_INBOX_TIMESTAMP |
int |
moduleId()
|
void |
muteMyMicrophone()
Sets VOICE_STATUS to LISTENING in the Participant instance associated with us, causing any input from our microphone to be ignored. |
void |
postContacts(Contact[] contacts)
Takes a list of Contacts as an argument and posts the list into the Conversation. |
Conversation.PostFilesResponse |
postFiles(java.lang.String[] paths,
java.lang.String body)
Takes a list of fully-qualified filenames and initiates corresponding file transfers in the conversation. |
void |
postSms(Sms sms,
java.lang.String body)
Takes an SMS instance created by Skype.CreateOutgoingSms and posts it in the conversation. |
Message |
postText(java.lang.String text,
boolean isXml)
Posts the specified text the conversation, and populates message with a reference to the corresponding Message object (if no error occurred during execution). |
void |
postVoiceMessage(Voicemail voicemail,
java.lang.String body)
Stops the active voicemail recording and sends it (dialog only) * @param voicemail This argument is deprecated as of SDK version 3.2. |
void |
removeFromInbox()
Removes conversation from Inbox. |
void |
renameTo(java.lang.String name)
Changes the META_NAME property of the conversation. |
void |
resumeMyLiveSession()
Resumes call from local hold. |
void |
retireFrom()
Leaves the conference. |
void |
ringOthers(java.lang.String[] identities,
boolean videoCall,
java.lang.String origin)
This is an alternative to calling Ring method for each Participant individually. |
void |
sendDtmf(Participant.Dtmf dtmf,
int lengthInMs)
Sends DTMF tone to a live conversation. |
void |
setAlertString(java.lang.String alertString)
Setter for Conversation class ALERT_STRING property. |
void |
setBookmark(boolean bookmark)
Setter for Conversation class IS_BOOKMARKED. |
void |
setConsumedHorizon(int timestamp,
boolean alsoUnconsume)
This method can be used to set the consumption (read) status of messages in the conversation. |
void |
setGuidelines(java.lang.String guidelines,
boolean isXml)
Setter for Conversation META_GUIDELINES. |
void |
setMyTextStatusTo(Participant.TextStatus status)
Sets local user typing indicator in the Conversation. |
void |
setOption(int propKey,
int value)
Setter method for Conversation option properties. |
void |
setPassword(java.lang.String password,
java.lang.String hint)
Sets password protection/new password for the conversation. |
void |
setPicture(byte[] jpeg)
Sets the conversation's avatar to the specified JPEG image, which is propagated to both local and remote participants. |
void |
setTopic(java.lang.String topic,
boolean isXml)
Setter for Conversation class META_TOPIC. |
byte[] |
sidGetBinaryProperty(PropertyEnumConverting prop)
|
boolean |
sidGetBoolProperty(PropertyEnumConverting prop)
|
EnumConverting |
sidGetEnumProperty(PropertyEnumConverting prop)
|
int |
sidGetIntProperty(PropertyEnumConverting prop)
|
SidObject |
sidGetObjectProperty(PropertyEnumConverting prop)
|
java.lang.String |
sidGetStringProperty(PropertyEnumConverting prop)
|
SidGetResponding |
sidMultiGet(Conversation.Property[] requested)
generic multiget of a list of Property |
static SidGetResponding[] |
sidMultiGet(Conversation.Property[] requested,
Conversation[] objects)
generic multiget of list of Property for a list of Conversation |
protected void |
sidOnChangedProperty(int propertyId,
int value,
java.lang.String svalue)
|
void |
sidSetProperty(PropertyEnumConverting prop,
byte[] newValue)
|
void |
sidSetProperty(PropertyEnumConverting prop,
int newValue)
|
void |
sidSetProperty(PropertyEnumConverting prop,
SidObject newValue)
|
void |
sidSetProperty(PropertyEnumConverting prop,
java.lang.String newValue)
|
Conversation |
spawnConference(java.lang.String[] identitiesToAdd)
When called from dialog conversation, this spawns a new conversation, with existing two dialog participants plus new contact identities given in the identitiesToAdd list. |
void |
startVoiceMessage()
Begin recording a voice mail for this conversation's remote participant. |
void |
stopSendDtmf()
Stops the current DTMF tone being played into conversation. |
void |
transferLiveSession(java.lang.String[] identities,
java.lang.String transferTopic)
This method is for doing call transfers. |
void |
unmuteMyMicrophone()
Sets VOICE_STATUS to SPEAKING in the Participant instance associated with us, causing any input from our microphone to be sent to the call host. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ENABLE_BIRTHDAY_NOTIFICATION
public static final java.lang.String INBOX_UPDATE_TIMEOUT
public static final java.lang.String RECENTLY_LIVE_TIMEOUT
public static final java.lang.String DISABLE_CHAT
public static final java.lang.String DISABLE_CHAT_HISTORY
public static final java.lang.String CHAT_HISTORY_DAYS
public static final java.lang.String CHATDB_LIMIT_KB
public static final java.lang.String DISABLE_CHAT_ACTIVITY_INDICATION
public static final java.lang.String CALL_NOANSWER_TIMEOUT
public static final java.lang.String CALL_SEND_TO_VM
public static final java.lang.String CALL_APPLY_CF
public static final java.lang.String CALL_EMERGENCY_COUNTRY
public java.lang.String mIdentity
public Conversation.Type mType
public java.lang.String mLiveHost
public int mLiveStartTimestamp
public boolean mLiveIsMuted
public java.lang.String mAlertString
public boolean mIsBookmarked
public java.lang.String mGivenDisplayName
public java.lang.String mDisplayName
public Conversation.LocalLiveStatus mLocalLiveStatus
public int mInboxTimestamp
public Message mInboxMessageId
public int mUnconsumedSuppressedMessages
public int mUnconsumedNormalMessages
public int mUnconsumedElevatedMessages
public boolean mUnconsumedMessagesVoice
public Voicemail mActiveVoicemail
public int mConsumptionHorizon
public int mLastActivityTimestamp
public Conversation mSpawnedFromConvoId
public java.lang.String mCreator
public int mCreationTimestamp
public Conversation.MyStatus mMyStatus
public boolean mOptJoiningEnabled
public Participant.Rank mOptEntryLevelRank
public boolean mOptDiscloseHistory
public int mOptAdminOnlyActivities
public java.lang.String mPasswordHint
public java.lang.String mMetaName
public java.lang.String mMetaTopic
public java.lang.String mMetaGuidelines
public byte[] mMetaPicture
| Constructor Detail |
|---|
public Conversation(int oid,
SidRoot root)
| Method Detail |
|---|
public void setOption(int propKey,
int value)
value - New value for the option property.
public void setTopic(java.lang.String topic,
boolean isXml)
isXml - Notifies remote UIs that the new topic contains xml tags.
public void setGuidelines(java.lang.String guidelines,
boolean isXml)
isXml - Set true to notify remote UIs that the new guideline contains XML tags.public void setPicture(byte[] jpeg)
public Conversation spawnConference(java.lang.String[] identitiesToAdd)
public void addConsumers(java.lang.String[] identities)
public Conversation assimilate(Conversation otherConversation)
public void joinLiveSession(java.lang.String accessToken)
public void ringOthers(java.lang.String[] identities,
boolean videoCall,
java.lang.String origin)
videoCall - If true, indicates that we want to do a video call (video still needs to be separately enabled)origin - When call is initiated from web link, this argument must contain the URI that was usedpublic void muteMyMicrophone()
public void unmuteMyMicrophone()
public void holdMyLiveSession()
public void resumeMyLiveSession()
public void leaveLiveSession(boolean postVoiceAutoresponse)
public void startVoiceMessage()
public void transferLiveSession(java.lang.String[] identities,
java.lang.String transferTopic)
identities - String list of transfer target identities. As soon as first one in this list picks up the call, others will stop ringing.transferTopic - Optional conversation topic. This value will get set as META_TOPIC property of the conversation at the transferee end. Note that this is the only case where META_TOPIC field is used in context of dialog conversations. Thus assumption that remote UI will display topic field in case of dialogs may not be 100% correct.public boolean canTransferLiveSession(java.lang.String identity)
public void sendDtmf(Participant.Dtmf dtmf,
int lengthInMs)
lengthInMs - Duration in milliseconds. Defaults to 260 ms. Note that the DTMF tone can be also cancelled with Conversation.StopSendDTMF method.public void stopSendDtmf()
public void setMyTextStatusTo(Participant.TextStatus status)
public Message postText(java.lang.String text,
boolean isXml)
isXml - For cases where the text argument was already encoded as xml message. * @return message Returns the Message object created as a result of this method (if successful).public void postContacts(Contact[] contacts)
contacts - List of Contact objects, to be posted in the conversation.
public Conversation.PostFilesResponse postFiles(java.lang.String[] paths,
java.lang.String body)
body - Optional BODY_XML property for POSTED_FILES type messages that show up in remote UI.
public void postVoiceMessage(Voicemail voicemail,
java.lang.String body)
body - Optional text message that remote UI can display in conversation, to notify the user of a new voicemail.
public void postSms(Sms sms,
java.lang.String body)
body - This argument is currently ignored. The message text needs to be set with Sms.SetBody method, prior to passing the Sms object to this methodpublic java.lang.String getJoinBlob()
public void join()
public void enterPassword(java.lang.String password)
public void setPassword(java.lang.String password,
java.lang.String hint)
hint - Password hint.public void retireFrom()
public void delete()
public void renameTo(java.lang.String name)
public void setBookmark(boolean bookmark)
public void setAlertString(java.lang.String alertString)
public void removeFromInbox()
public void addToInbox(int timestamp)
public void setConsumedHorizon(int timestamp,
boolean alsoUnconsume)
alsoUnconsume - If set to true, this also marks messages newer than the cutoff timestamp as unconsumed. For example, setting timestamp to 0 and also_unconsumed to true, will unconsume all messages in the conversation.public void markUnread()
public boolean isMemberOf(ContactGroup group)
public Participant[] getParticipants(Conversation.ParticipantFilter filter)
public Conversation.GetLastMessagesResponse getLastMessages(int requireTimestamp)
public Message findMessage(java.lang.String text,
int fromTimestampUp)
public SidGetResponding sidMultiGet(Conversation.Property[] requested)
requested - the list of requested properties of Conversation
public static SidGetResponding[] sidMultiGet(Conversation.Property[] requested,
Conversation[] objects)
requested - the list of requested properties
public Conversation mgetInfo()
public static Conversation[] mgetInfo(Conversation[] objects)
objects - targets of the request
public java.lang.String getIdentity()
public Conversation.Type getType()
public java.lang.String getLiveHost()
public int getLiveStartTimestamp()
public boolean getLiveIsMuted()
public java.lang.String getAlertString()
public boolean getIsBookmarked()
public java.lang.String getGivenDisplayName()
public java.lang.String getDisplayName()
public Conversation.LocalLiveStatus getLocalLiveStatus()
public int getInboxTimestamp()
public Message getInboxMessageId()
public int getUnconsumedSuppressedMessages()
public int getUnconsumedNormalMessages()
public int getUnconsumedElevatedMessages()
public boolean getUnconsumedMessagesVoice()
public Voicemail getActiveVoicemail()
public int getConsumptionHorizon()
public int getLastActivityTimestamp()
public Conversation getSpawnedFromConvoId()
public java.lang.String getCreator()
public int getCreationTimestamp()
public Conversation.MyStatus getMyStatus()
public boolean getOptJoiningEnabled()
public Participant.Rank getOptEntryLevelRank()
public boolean getOptDiscloseHistory()
public int getOptAdminOnlyActivities()
public java.lang.String getPasswordHint()
public java.lang.String getMetaName()
public java.lang.String getMetaTopic()
public java.lang.String getMetaGuidelines()
public byte[] getMetaPicture()
public java.lang.String sidGetStringProperty(PropertyEnumConverting prop)
sidGetStringProperty in interface SidGetRespondingsidGetStringProperty in class SidObjectpublic SidObject sidGetObjectProperty(PropertyEnumConverting prop)
sidGetObjectProperty in interface SidGetRespondingsidGetObjectProperty in class SidObjectpublic boolean sidGetBoolProperty(PropertyEnumConverting prop)
sidGetBoolProperty in interface SidGetRespondingsidGetBoolProperty in class SidObjectpublic int sidGetIntProperty(PropertyEnumConverting prop)
sidGetIntProperty in interface SidGetRespondingsidGetIntProperty in class SidObjectpublic EnumConverting sidGetEnumProperty(PropertyEnumConverting prop)
sidGetEnumProperty in interface SidGetRespondingsidGetEnumProperty in class SidObjectpublic byte[] sidGetBinaryProperty(PropertyEnumConverting prop)
sidGetBinaryProperty in interface SidGetRespondingsidGetBinaryProperty in class SidObjectpublic java.lang.String getPropertyAsString(int prop)
public java.lang.String getPropertyAsString(Conversation.Property prop)
protected void sidOnChangedProperty(int propertyId,
int value,
java.lang.String svalue)
sidOnChangedProperty in class SidObject
public void sidSetProperty(PropertyEnumConverting prop,
java.lang.String newValue)
sidSetProperty in interface SidGetRespondingsidSetProperty in class SidObject
public void sidSetProperty(PropertyEnumConverting prop,
SidObject newValue)
sidSetProperty in interface SidGetRespondingsidSetProperty in class SidObject
public void sidSetProperty(PropertyEnumConverting prop,
int newValue)
sidSetProperty in interface SidGetRespondingsidSetProperty in class SidObject
public void sidSetProperty(PropertyEnumConverting prop,
byte[] newValue)
sidSetProperty in interface SidGetRespondingsidSetProperty in class SidObjectpublic int moduleId()
moduleId in class SidObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||