Commit b6696408 authored by Benjamin REIS's avatar Benjamin REIS

Add message_received_unable_decrypt callback

parent 1cf4eda4
......@@ -650,6 +650,9 @@ LinphoneReason linphone_core_message_received(LinphoneCore *lc, SalOp *op, const
retval = cb_process_incoming_message(imee, cr, msg);
if(retval == 0) {
msg->is_secured = TRUE;
} else if(retval > 0) {
// Unable to decrypt message
linphone_core_notify_message_received_unable_decrypt(cr->lc, cr, msg);
......@@ -212,6 +212,10 @@ void linphone_core_cbs_set_message_received(LinphoneCoreCbs *cbs, LinphoneCoreCb
cbs->vtable->message_received = cb;
void linphone_core_cbs_set_message_received_unable_decrypt(LinphoneCoreCbs *cbs, LinphoneCoreCbsMessageReceivedUnableDecryptCb cb) {
cbs->vtable->message_received_unable_decrypt = cb;
void linphone_core_cbs_set_is_composing_received(LinphoneCoreCbs *cbs, LinphoneCoreCbsIsComposingReceivedCb cb) {
cbs->vtable->is_composing_received = cb;
......@@ -1626,6 +1626,7 @@ void linphone_core_notify_authentication_requested(LinphoneCore *lc, LinphoneAut
void linphone_core_notify_call_log_updated(LinphoneCore *lc, LinphoneCallLog *newcl);
void linphone_core_notify_text_message_received(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message);
void linphone_core_notify_message_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message);
void linphone_core_notify_message_received_unable_decrypt(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message);
void linphone_core_notify_file_transfer_recv(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent* content, const char* buff, size_t size);
void linphone_core_notify_file_transfer_send(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent* content, char* buff, size_t* size);
void linphone_core_notify_file_transfer_progress_indication(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent* content, size_t offset, size_t total);
......@@ -188,6 +188,11 @@ void linphone_core_notify_message_received(LinphoneCore *lc, LinphoneChatRoom *r
NOTIFY_IF_EXIST(message_received, lc,room,message);
void linphone_core_notify_message_received_unable_decrypt(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message){
NOTIFY_IF_EXIST(message_received_unable_decrypt, lc,room,message);
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic push
......@@ -808,6 +808,15 @@ typedef void (*LinphoneCoreCbsMessageReceivedCb)(LinphoneCore *lc, LinphoneChatR
typedef LinphoneCoreCbsMessageReceivedCb LinphoneCoreMessageReceivedCb;
* Chat message not decrypted callback prototype
* @param lc #LinphoneCore object
* @param room #LinphoneChatRoom involved in this conversation. Can be be created by the framework in case \link #LinphoneAddress the from \endlink is not present in any chat room.
* @param LinphoneChatMessage incoming message
typedef void (*LinphoneCoreCbsMessageReceivedUnableDecryptCb)(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message);
* File transfer receive callback prototype. This function is called by the core upon an incoming File transfer is started. This function may be call several time for the same file in case of large file.
......@@ -1014,6 +1023,7 @@ typedef struct _LinphoneCoreVTable{
LinphoneCoreAuthenticationRequestedCb authentication_requested; /**< Ask the application some authentication information */
LinphoneCoreCallLogUpdatedCb call_log_updated; /**< Notifies that call log list has been updated */
LinphoneCoreMessageReceivedCb message_received; /**< a message is received, can be text or external body*/
LinphoneCoreCbsMessageReceivedUnableDecryptCb message_received_unable_decrypt; /**< an encrypted message is received but we can't decrypt it*/
LinphoneCoreIsComposingReceivedCb is_composing_received; /**< An is-composing notification has been received */
LinphoneCoreDtmfReceivedCb dtmf_received; /**< A dtmf has been received received */
LinphoneCoreReferReceivedCb refer_received; /**< An out of call refer was received */
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