Example #1
0
static void countUnreadChatMessages(void *item, void *user_data)
{
    LinphoneManager *manager = (LinphoneManager *)user_data;
    LinphoneChatRoom *room = (LinphoneChatRoom *)item;
    if (room == NULL || manager == NULL)
        return;

    int currentCount = manager->unreadChatMessages();
    currentCount += linphone_chat_room_get_unread_messages_count(room);
    manager->setUnreadChatMessages(currentCount);
}