All Classes Namespaces Files Functions Variables Groups
kerio::jsonapi::webmail::im::im Interface Reference

Public Member Functions

void getPresence (out PresenceList list, in kerio::web::KIdList contacts)
void subscribePresence (out PresenceList list)
void setPresence (in Status status, in string text)
void createConversation (out Conversation conversation, in ContactIdList contacts)
void subscribeConversations (out ConversationList list)
void muteConversation (in ConversationId conversationId, in boolean mute)
void readConversation (in ConversationId conversationId, in MessageId lastReadId)
void getMessages (out MessageList list, in ConversationId conversationId, in MessageId currentMessageId, in long count)
void subscribeMessages (out MessageList list, in ConversationId conversationId, in long currentMessageId, in long count)
void unsubscribeMessages (in ConversationId conversationId)
void sendMessage (out MessageId messageId, out UtcDateTime time, in Message message, in boolean markAsRead)

Member Function Documentation

void kerio::jsonapi::webmail::im::im::createConversation ( out Conversation  conversation,
in ContactIdList  contacts 
)

Create new conversation (or return existing one)

Parameters
contacts- required conversation, one for 1:1, more for groupchats
conversation- created conversation
void kerio::jsonapi::webmail::im::im::getMessages ( out MessageList  list,
in ConversationId  conversationId,
in MessageId  currentMessageId,
in long  count 
)

Returns ordered list of messages from single conversation. The list is always ordered by messageId and always returns older messages than currentMessageId parameter

Parameters
conversationId- Identifier of a conversation.
currentMessageId- Messages older than currentMessageId are returned
count- Required messages count
list- Ordered list of messages for given conversation
void kerio::jsonapi::webmail::im::im::getPresence ( out PresenceList  list,
in kerio::web::KIdList  contacts 
)

Every contact has its presence status updated on server according to contact activity or availability. Retrieve presence for users.

Parameters
list- list of statuses of given contacts (or all non-offilne contacts if input array is empty)
contacts- (optional) list of all contacts
void kerio::jsonapi::webmail::im::im::muteConversation ( in ConversationId  conversationId,
in boolean  mute 
)

Set conversation as (un)muted for the current user

Parameters
conversationId- conversation to be set
isMuted- true = conversation will be muted
void kerio::jsonapi::webmail::im::im::readConversation ( in ConversationId  conversationId,
in MessageId  lastReadId 
)

Set last read message in conversation for the current user

Parameters
conversationId- conversation to be set
messageId- ID of last message which has been read
void kerio::jsonapi::webmail::im::im::sendMessage ( out MessageId  messageId,
out UtcDateTime  time,
in Message  message,
in boolean  markAsRead 
)

It sends a message into a conversation. Field 'message.to' must be known before sending a message. Client either have it or must asks for it.

Parameters
message- Message to be send. It already contains the destination (the 'to' field). It does not contain a 'messageId' as it is generated by server.
messageId- Message id
time- Time of message
markAsRead- Message will be marked as read for to users.
void kerio::jsonapi::webmail::im::im::setPresence ( in Status  status,
in string  text 
)

Update own presence. Server than resend such status to all interested clients (subscribed) as a Presence with current date.

Parameters
status- new user status to be set (online, offline, ...)
text- status text
void kerio::jsonapi::webmail::im::im::subscribeConversations ( out ConversationList  list)

It provides list of all conversations in which the current user participates and also subscribes for further changes.

Parameters
list- all conversations in which current user participes
void kerio::jsonapi::webmail::im::im::subscribeMessages ( out MessageList  list,
in ConversationId  conversationId,
in long  currentMessageId,
in long  count 
)

Returns ordered list of all new messages + required count of older messages from single conversation and also subscribes for continuous flow of changes. The list is always ordered by messageId. The continuous flow of messages includes all new, it is NOT filtered by query.

Parameters
conversationId- Identifier of a conversation
currentMessageId- All newer (included currentMessageId) messages are returned + count of older messages
count- Required older messages count
void kerio::jsonapi::webmail::im::im::subscribePresence ( out PresenceList  list)

Subsribe for presence changes. Presence status of all users are returned and changes then continuously pushed into client. Note that callback will be executed periodically as changes from server arrive.

Parameters
list- Presence status of all users. Offline users are always excluded. Missing means offline. (TODO)
void kerio::jsonapi::webmail::im::im::unsubscribeMessages ( in ConversationId  conversationId)

Stops listening on new messages within conversation.

Parameters
conversationId- Identifier of conversation to unsubscribe.

The documentation for this interface was generated from the following file: