Commit 6f18bd48 authored by Sylvain Berfini's avatar Sylvain Berfini :cow:
Browse files

Added missing marked as read callback in ChatRoomListener

parent c31c49be
master compat/ios_app_5_3 deleteme feature/AEC3 feature/account_manager_services_devices_list feature/allow-raw-mwi-notification feature/audio-conference-package feature/basic_auth feature/lime_status_by_uri feature/load-static-ms2-plugins feature/media_encryption_settings_on_account feature/medialess feature/screensharing_clean feature/screensharing_packet_router feature/screensharing_signalling feature/swift_push_unit_tests feature/test-new-ccmp-deployment feature/to-delete-compile-last-wrapper fix/ECC-for-desktop fix/android_window fix/audio_routes fix/auth_info_finding fix/broadcast_flexisip fix/call_history_after_core_stop fix/chat_lesage_local_address_no_contact fix/conf_unschedule_video fix/conference_called_after_joining_5_3 fix/copy_message_id_content_operator fix/crash_terminate fix/database fix/db_friend_list_fix fix/device_position_53 fix/didUpdatePushCredentials_debug_investigation fix/doc_upload fix/encrypted_chat_subscription_failed fix/fec-find-payload-type-number fix/flexisip-tester-2.3 fix/force_shared_lib_python_wrapper fix/gcc_14 fix/import-from-legacy-db fix/improve_account_matching_by_testing_username fix/ios_foreground_push_incoming_received fix/ios_registerforpush_on_core_start_5_4 fix/itc-misuse fix/jvm_cpp_wrapper_on_android fix/message_not_sent_rework fix/no-longer-use-deprecated-findpythoninterp-cmake-module fix/paused_by_remote_no_rtp_timeout_master fix/pdb_5_3 fix/plugin_timeout fix/python_build_macos fix/python_const_build_warning fix/qt_crash fix/relay_ice_candidates_conference_tests fix/remote_address_without_admin_param fix/retry_action_update fix/rtt_message fix/screen_jul fix/search_result_source_flag_5.4 fix/srtp_key_length fix/startup_restart fix/stream-deletion fix/stream_allocation_no_label_master fix/subject_not_changed fix/switch_data_sync_to_short_service fix/tone-indications fix/transfer_state fix/tunnel-crash-rtp-transport fix/unsubscribe_chatroom_on_account_unregister fix/unsubscribe_upon_core_stop fix/uuid4-generation fix/webrtc-ice fix/window_build_dec24 fix/workaround_for_sip_simple_messages_with_bad_to_header hotfix/lime-db-path hotfix/use-negotiated-extension-ids release/5.3 release/5.4 test/ansible test/call_no_routes test/flexisip-release-candidate-2-4 test/lime_double_digest_auth_challenge 5.5.0-alpha 5.4.4 5.4.3 5.4.2 5.4.1 5.4.0 5.4.0-beta 5.4.0-alpha 5.3.107 5.3.106 5.3.105 5.3.104 5.3.103 5.3.102 5.3.101 5.3.100 5.3.99 5.3.97 5.3.96 5.3.95 5.3.94 5.3.93 5.3.92 5.3.91 5.3.90 5.3.89 5.3.88 5.3.87 5.3.86 5.3.85 5.3.84 5.3.83 5.3.81 5.3.79 5.3.78 5.3.77 5.3.76 5.3.75 5.3.74 5.3.73 5.3.72 5.3.71 5.3.70 5.3.69 5.3.68 5.3.67 5.3.66 5.3.65 5.3.64 5.3.63 5.3.62 5.3.61 5.3.60 5.3.59 5.3.58 5.3.57 5.3.56 5.3.55 5.3.54 5.3.53 5.3.52 5.3.51 5.3.50 5.3.49 5.3.48 5.3.46 5.3.45 5.3.44 5.3.43 5.3.42 5.3.41 5.3.40 5.3.39 5.3.38 5.3.37 5.3.36 5.3.35 5.3.34 5.3.33 5.3.32 5.3.30 5.3.29 5.3.28 5.3.27 5.3.26 5.3.25 5.3.24 5.3.23 5.3.22 5.3.21 5.3.19 5.3.18 5.3.17 5.3.16 5.3.15 5.3.14 5.3.13 5.3.12 5.3.11 5.3.10 5.3.9 5.3.8 5.3.7 5.3.6 5.3.5 5.3.4 5.3.3 5.3.2 5.3.1 5.3.0 5.3.0-beta
1 merge request!2730Added missing marked as read callback in ChatRoomListener
Showing with 37 additions and 0 deletions
......@@ -530,6 +530,7 @@ void _linphone_chat_room_notify_chat_message_should_be_stored(LinphoneChatRoom *
void _linphone_chat_room_notify_chat_message_participant_imdn_state_changed(LinphoneChatRoom *cr,
LinphoneChatMessage *msg,
const LinphoneParticipantImdnState *state);
void _linphone_chat_room_notify_chat_room_read(LinphoneChatRoom *cr);
void _linphone_chat_room_clear_callbacks(LinphoneChatRoom *cr);
void _linphone_chat_message_notify_msg_state_changed(LinphoneChatMessage *msg, LinphoneChatMessageState state);
......
......@@ -545,6 +545,12 @@ typedef void (*LinphoneChatRoomCbsChatMessageParticipantImdnStateChangedCb)(Linp
LinphoneChatMessage *message,
const LinphoneParticipantImdnState *state);
/**
* Callback used to notify a chat room was "marked as read".
* @param chat_room The #LinphoneChatRoom object that was marked as read @notnil
*/
typedef void (*LinphoneChatRoomCbsChatRoomReadCb)(LinphoneChatRoom *chat_room);
/**
* @}
**/
......
......@@ -563,6 +563,22 @@ linphone_chat_room_cbs_get_chat_message_participant_imdn_state_changed(LinphoneC
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_chat_message_participant_imdn_state_changed(
LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsChatMessageParticipantImdnStateChangedCb cb);
/**
* Get the "marked as read" callback.
* @param cbs #LinphoneChatRoomCbs object. @notnil
* @return The marked as read callback.
*/
LINPHONE_PUBLIC LinphoneChatRoomCbsChatRoomReadCb
linphone_chat_room_cbs_get_chat_room_read(const LinphoneChatRoomCbs *cbs);
/**
* Set the "marked as read" callback.
* @param cbs #LinphoneChatRoomCbs object. @notnil
* @param cb The marked as read callback to be used.
*/
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_chat_room_read(LinphoneChatRoomCbs *cbs,
LinphoneChatRoomCbsChatRoomReadCb cb);
/**
* @}
*/
......
......@@ -59,6 +59,7 @@ struct _LinphoneChatRoomCbs {
LinphoneChatRoomCbsChatMessageParticipantImdnStateChangedCb chatMessageParticipantImdnStateChangedCb;
LinphoneChatRoomCbsNewEventCb newEventCb;
LinphoneChatRoomCbsNewEventsCb newEventsCb;
LinphoneChatRoomCbsChatRoomReadCb chatRoomReadCb;
};
BELLE_SIP_DECLARE_VPTR_NO_EXPORT(LinphoneChatRoomCbs);
......@@ -379,3 +380,11 @@ void linphone_chat_room_cbs_set_chat_message_participant_imdn_state_changed(
LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsChatMessageParticipantImdnStateChangedCb cb) {
cbs->chatMessageParticipantImdnStateChangedCb = cb;
}
LinphoneChatRoomCbsChatRoomReadCb linphone_chat_room_cbs_get_chat_room_read(const LinphoneChatRoomCbs *cbs) {
return cbs->chatRoomReadCb;
}
void linphone_chat_room_cbs_set_chat_room_read(LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsChatRoomReadCb cb) {
cbs->chatRoomReadCb = cb;
}
\ No newline at end of file
......@@ -782,6 +782,10 @@ void _linphone_chat_room_notify_chat_message_participant_imdn_state_changed(Linp
state);
}
void _linphone_chat_room_notify_chat_room_read(LinphoneChatRoom *cr) {
NOTIFY_IF_EXIST(ChatRoomRead, chat_room_read, cr);
}
// =============================================================================
// Reference and user data handling functions.
// =============================================================================
......
......@@ -789,6 +789,7 @@ void ChatRoom::markAsRead() {
}
dCore->mainDb->markChatMessagesAsRead(getConferenceId());
_linphone_chat_room_notify_chat_room_read(d->getCChatRoom());
linphone_core_notify_chat_room_read(getCore()->getCCore(), d->getCChatRoom());
}
......
Supports Markdown
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