Commit 59177851 authored by Ghislain MARY's avatar Ghislain MARY

Add linphone_chat_message_send() API.

parent 6369dbdd
......@@ -263,12 +263,19 @@ LINPHONE_PUBLIC LinphoneStatus linphone_chat_message_download_file(LinphoneChatM
*/
LINPHONE_PUBLIC void linphone_chat_message_cancel_file_transfer(LinphoneChatMessage* msg);
/**
* Send a chat message.
* @param[in] msg LinphoneChatMessage object
*/
LINPHONE_PUBLIC void linphone_chat_message_send (LinphoneChatMessage *msg);
/**
* Resend a chat message if it is in the 'not delivered' state for whatever reason.
* @param[in] msg LinphoneChatMessage object
* @deprecated Use linphone_chat_message_send instead.
* @donotwrap
*/
LINPHONE_PUBLIC void linphone_chat_message_resend(LinphoneChatMessage *msg);
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_message_resend(LinphoneChatMessage *msg);
LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_message_get_peer_address(LinphoneChatMessage *msg);
......
......@@ -100,7 +100,7 @@ LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_room_get_peer_address(Linph
/**
* Send a message to peer member of this chat room.
* @deprecated Use linphone_chat_room_send_chat_message() instead.
* @deprecated Use linphone_chat_message_send() instead.
* @param cr #LinphoneChatRoom object
* @param msg message to be sent
* @donotwrap
......@@ -113,7 +113,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_message(Linphon
* @param msg #LinphoneChatMessage message to be sent
* @param status_cb LinphoneChatMessageStateChangeCb status callback invoked when message is delivered or could not be delivered. May be NULL
* @param ud user data for the status cb.
* @deprecated Use linphone_chat_room_send_chat_message() instead.
* @deprecated Use linphone_chat_message_send() instead.
* @note The LinphoneChatMessage must not be destroyed until the the callback is called.
* The LinphoneChatMessage reference is transfered to the function and thus doesn't need to be unref'd by the application.
* @donotwrap
......@@ -127,9 +127,10 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_message2(Linpho
* The state of the message sending will be notified via the callbacks defined in the LinphoneChatMessageCbs object that can be obtained
* by calling linphone_chat_message_get_callbacks().
* The LinphoneChatMessage reference is transfered to the function and thus doesn't need to be unref'd by the application.
* @deprecated Use linphone_chat_message_send() instead.
* @donotwrap
*/
LINPHONE_PUBLIC void linphone_chat_room_send_chat_message(LinphoneChatRoom *cr, LinphoneChatMessage *msg);
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_chat_message(LinphoneChatRoom *cr, LinphoneChatMessage *msg);
/**
* Mark all messages of the conversation as read
......
......@@ -264,6 +264,10 @@ void linphone_chat_message_cancel_file_transfer(LinphoneChatMessage *msg) {
L_GET_CPP_PTR_FROM_C_OBJECT(msg)->cancelFileTransfer();
}
void linphone_chat_message_send (LinphoneChatMessage *msg) {
L_GET_CPP_PTR_FROM_C_OBJECT(msg)->send();
}
void linphone_chat_message_resend(LinphoneChatMessage *msg) {
L_GET_CPP_PTR_FROM_C_OBJECT(msg)->send();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment