diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc
index 49450e0a8..6d5e9734d 100644
--- a/coreapi/linphonecore_jni.cc
+++ b/coreapi/linphonecore_jni.cc
@@ -4497,7 +4497,7 @@ extern "C" jint Java_org_linphone_core_LinphoneChatRoomImpl_getHistorySize (JNI
,jlong ptr) {
return (jint) linphone_chat_room_get_history_size((LinphoneChatRoom*)ptr);
}
-extern "C" jint Java_org_linphone_core_LinphoneChatRoomImpl_getUnreadMessagesCount(JNIEnv* env
+extern "C" jint Java_org_linphone_core_LinphoneChatRoomImpl_getUnreadMessageCount(JNIEnv* env
,jobject thiz
,jlong ptr) {
return (jint) linphone_chat_room_get_unread_messages_count((LinphoneChatRoom*)ptr);
diff --git a/java/common/org/linphone/core/LinphoneChatRoom.java b/java/common/org/linphone/core/LinphoneChatRoom.java
index e08378b02..0f08e270f 100644
--- a/java/common/org/linphone/core/LinphoneChatRoom.java
+++ b/java/common/org/linphone/core/LinphoneChatRoom.java
@@ -80,7 +80,7 @@ public interface LinphoneChatRoom {
* Returns the amount of unread messages associated with the peer of this chatRoom.
* @return the amount of unread messages
*/
- int getUnreadMessagesCount();
+ int getUnreadMessageCount();
/**
* Returns the amount of messages associated with the peer of this chatRoom.
diff --git a/java/impl/org/linphone/core/LinphoneChatRoomImpl.java b/java/impl/org/linphone/core/LinphoneChatRoomImpl.java
index f44c6ecf6..0202f2ec0 100644
--- a/java/impl/org/linphone/core/LinphoneChatRoomImpl.java
+++ b/java/impl/org/linphone/core/LinphoneChatRoomImpl.java
@@ -32,7 +32,7 @@ class LinphoneChatRoomImpl implements LinphoneChatRoom {
private native Object[] getHistoryRange(long ptr, int begin, int end);
private native Object[] getHistory(long ptr, int limit);
private native void destroy(long ptr);
- private native int getUnreadMessagesCount(long ptr);
+ private native int getUnreadMessageCount(long ptr);
private native int getHistorySize(long ptr);
private native void deleteHistory(long ptr);
private native void compose(long ptr);
@@ -101,9 +101,9 @@ class LinphoneChatRoomImpl implements LinphoneChatRoom {
}
}
- public int getUnreadMessagesCount() {
+ public int getUnreadMessageCount() {
synchronized(getCore()){
- return getUnreadMessagesCount(nativePtr);
+ return getUnreadMessageCount(nativePtr);
}
}
diff --git a/src/c-wrapper/api/c-chat-room.cpp b/src/c-wrapper/api/c-chat-room.cpp
index 48930535e..1702d188d 100644
--- a/src/c-wrapper/api/c-chat-room.cpp
+++ b/src/c-wrapper/api/c-chat-room.cpp
@@ -176,11 +176,11 @@ void linphone_chat_room_mark_as_read (LinphoneChatRoom *cr) {
}
int linphone_chat_room_get_unread_messages_count (LinphoneChatRoom *cr) {
- return L_GET_CPP_PTR_FROM_C_OBJECT(cr)->getUnreadChatMessagesCount();
+ return L_GET_CPP_PTR_FROM_C_OBJECT(cr)->getUnreadChatMessageCount();
}
int linphone_chat_room_get_history_size (LinphoneChatRoom *cr) {
- return L_GET_CPP_PTR_FROM_C_OBJECT(cr)->getChatMessagesCount();
+ return L_GET_CPP_PTR_FROM_C_OBJECT(cr)->getChatMessageCount();
}
void linphone_chat_room_delete_message (LinphoneChatRoom *cr, LinphoneChatMessage *msg) {
diff --git a/src/chat/chat-room/chat-room.cpp b/src/chat/chat-room/chat-room.cpp
index 98a0959cb..b5b5c55df 100644
--- a/src/chat/chat-room/chat-room.cpp
+++ b/src/chat/chat-room/chat-room.cpp
@@ -362,12 +362,12 @@ void ChatRoom::deleteHistory () {
getCore()->getPrivate()->mainDb->cleanHistory(getChatRoomId());
}
-int ChatRoom::getChatMessagesCount () {
- return getCore()->getPrivate()->mainDb->getChatMessagesCount(getChatRoomId());
+int ChatRoom::getChatMessageCount () {
+ return getCore()->getPrivate()->mainDb->getChatMessageCount(getChatRoomId());
}
-int ChatRoom::getUnreadChatMessagesCount () {
- return getCore()->getPrivate()->mainDb->getUnreadChatMessagesCount(getChatRoomId());
+int ChatRoom::getUnreadChatMessageCount () {
+ return getCore()->getPrivate()->mainDb->getUnreadChatMessageCount(getChatRoomId());
}
// -----------------------------------------------------------------------------
@@ -438,7 +438,7 @@ std::list
ChatRoom::getComposingAddresses () const {
void ChatRoom::markAsRead () {
L_D();
- if (getUnreadChatMessagesCount() == 0)
+ if (getUnreadChatMessageCount() == 0)
return;
CorePrivate *dCore = getCore()->getPrivate();
diff --git a/src/chat/chat-room/chat-room.h b/src/chat/chat-room/chat-room.h
index 5b253a1e6..b276c83c3 100644
--- a/src/chat/chat-room/chat-room.h
+++ b/src/chat/chat-room/chat-room.h
@@ -68,8 +68,8 @@ public:
void deleteHistory ();
- int getChatMessagesCount ();
- int getUnreadChatMessagesCount ();
+ int getChatMessageCount ();
+ int getUnreadChatMessageCount ();
// TODO: Remove useless functions.
void compose ();
diff --git a/src/db/main-db.cpp b/src/db/main-db.cpp
index e316e7db2..22a191fe0 100644
--- a/src/db/main-db.cpp
+++ b/src/db/main-db.cpp
@@ -1307,7 +1307,7 @@ MainDb::MainDb (const shared_ptr &core) : AbstractDb(*new MainDbPrivate),
return false;
}
- int MainDb::getEventsCount (FilterMask mask) const {
+ int MainDb::getEventCount (FilterMask mask) const {
L_D();
if (!isConnected()) {
@@ -1441,7 +1441,7 @@ MainDb::MainDb (const shared_ptr &core) : AbstractDb(*new MainDbPrivate),
return list>();
}
- int MainDb::getChatMessagesCount (const ChatRoomId &chatRoomId) const {
+ int MainDb::getChatMessageCount (const ChatRoomId &chatRoomId) const {
L_D();
if (!isConnected()) {
@@ -1477,7 +1477,7 @@ MainDb::MainDb (const shared_ptr &core) : AbstractDb(*new MainDbPrivate),
return count;
}
- int MainDb::getUnreadChatMessagesCount (const ChatRoomId &chatRoomId) const {
+ int MainDb::getUnreadChatMessageCount (const ChatRoomId &chatRoomId) const {
L_D();
if (!isConnected()) {
@@ -1525,7 +1525,7 @@ MainDb::MainDb (const shared_ptr &core) : AbstractDb(*new MainDbPrivate),
return;
}
- if (getUnreadChatMessagesCount(chatRoomId) == 0)
+ if (getUnreadChatMessageCount(chatRoomId) == 0)
return;
string query = "UPDATE conference_chat_message_event"
@@ -2186,7 +2186,7 @@ MainDb::MainDb (const shared_ptr &core) : AbstractDb(*new MainDbPrivate),
return false;
}
- int MainDb::getEventsCount (FilterMask) const {
+ int MainDb::getEventCount (FilterMask) const {
return 0;
}
@@ -2201,11 +2201,11 @@ MainDb::MainDb (const shared_ptr &core) : AbstractDb(*new MainDbPrivate),
return list>();
}
- int MainDb::getChatMessagesCount (const ChatRoomId &) const {
+ int MainDb::getChatMessageCount (const ChatRoomId &) const {
return 0;
}
- int MainDb::getUnreadChatMessagesCount (const ChatRoomId &) const {
+ int MainDb::getUnreadChatMessageCount (const ChatRoomId &) const {
return 0;
}
diff --git a/src/db/main-db.h b/src/db/main-db.h
index f91578573..c3918d581 100644
--- a/src/db/main-db.h
+++ b/src/db/main-db.h
@@ -60,7 +60,7 @@ public:
bool addEvent (const std::shared_ptr &eventLog);
bool updateEvent (const std::shared_ptr &eventLog);
static bool deleteEvent (const std::shared_ptr &eventLog);
- int getEventsCount (FilterMask mask = NoFilter) const;
+ int getEventCount (FilterMask mask = NoFilter) const;
static std::shared_ptr getEventFromKey (const MainDbKey &dbKey);
@@ -77,8 +77,8 @@ public:
// Conference chat message events.
// ---------------------------------------------------------------------------
- int getChatMessagesCount (const ChatRoomId &chatRoomId = ChatRoomId()) const;
- int getUnreadChatMessagesCount (const ChatRoomId &chatRoomId = ChatRoomId()) const;
+ int getChatMessageCount (const ChatRoomId &chatRoomId = ChatRoomId()) const;
+ int getUnreadChatMessageCount (const ChatRoomId &chatRoomId = ChatRoomId()) const;
void markChatMessagesAsRead (const ChatRoomId &chatRoomId = ChatRoomId()) const;
std::list> getUnreadChatMessages (const ChatRoomId &chatRoomId = ChatRoomId()) const;
diff --git a/tester/main-db-tester.cpp b/tester/main-db-tester.cpp
index ca041b279..c8bc44881 100644
--- a/tester/main-db-tester.cpp
+++ b/tester/main-db-tester.cpp
@@ -73,19 +73,19 @@ static void open_database () {
static void get_events_count () {
MainDbProvider provider;
const MainDb &mainDb = provider.getMainDb();
- BC_ASSERT_EQUAL(mainDb.getEventsCount(), 5175, int, "%d");
- BC_ASSERT_EQUAL(mainDb.getEventsCount(MainDb::ConferenceCallFilter), 0, int, "%d");
- BC_ASSERT_EQUAL(mainDb.getEventsCount(MainDb::ConferenceInfoFilter), 18, int, "%d");
- BC_ASSERT_EQUAL(mainDb.getEventsCount(MainDb::ConferenceChatMessageFilter), 5157, int, "%d");
- BC_ASSERT_EQUAL(mainDb.getEventsCount(MainDb::NoFilter), 5175, int, "%d");
+ BC_ASSERT_EQUAL(mainDb.getEventCount(), 5175, int, "%d");
+ BC_ASSERT_EQUAL(mainDb.getEventCount(MainDb::ConferenceCallFilter), 0, int, "%d");
+ BC_ASSERT_EQUAL(mainDb.getEventCount(MainDb::ConferenceInfoFilter), 18, int, "%d");
+ BC_ASSERT_EQUAL(mainDb.getEventCount(MainDb::ConferenceChatMessageFilter), 5157, int, "%d");
+ BC_ASSERT_EQUAL(mainDb.getEventCount(MainDb::NoFilter), 5175, int, "%d");
}
static void get_messages_count () {
MainDbProvider provider;
const MainDb &mainDb = provider.getMainDb();
- BC_ASSERT_EQUAL(mainDb.getChatMessagesCount(), 5157, int, "%d");
+ BC_ASSERT_EQUAL(mainDb.getChatMessageCount(), 5157, int, "%d");
BC_ASSERT_EQUAL(
- mainDb.getChatMessagesCount(
+ mainDb.getChatMessageCount(
ChatRoomId(IdentityAddress("sip:test-3@sip.linphone.org"), IdentityAddress("sip:test-1@sip.linphone.org"))
),
861, int, "%d"
@@ -95,9 +95,9 @@ static void get_messages_count () {
static void get_unread_messages_count () {
MainDbProvider provider;
const MainDb &mainDb = provider.getMainDb();
- BC_ASSERT_EQUAL(mainDb.getUnreadChatMessagesCount(), 2, int, "%d");
+ BC_ASSERT_EQUAL(mainDb.getUnreadChatMessageCount(), 2, int, "%d");
BC_ASSERT_EQUAL(
- mainDb.getUnreadChatMessagesCount(
+ mainDb.getUnreadChatMessageCount(
ChatRoomId(IdentityAddress("sip:test-3@sip.linphone.org"), IdentityAddress("sip:test-1@sip.linphone.org"))
),
0, int, "%d"