mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
feat(MainDb): FilterMask is now an EnumMask type
This commit is contained in:
parent
fd191aa675
commit
43e775bff2
2 changed files with 7 additions and 5 deletions
|
|
@ -109,7 +109,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
bool isStart = true;
|
||||
string sql;
|
||||
for (const auto &filter : filters) {
|
||||
if (!(mask & filter))
|
||||
if (!mask.isSet(filter))
|
||||
continue;
|
||||
|
||||
if (isStart) {
|
||||
|
|
@ -1505,7 +1505,7 @@ static constexpr string &blobToString (string &in) {
|
|||
int count = 0;
|
||||
|
||||
DurationLogger durationLogger(
|
||||
"Get events count with mask=" + Utils::toString(static_cast<int>(mask)) + "."
|
||||
"Get events count with mask=" + Utils::toString(mask) + "."
|
||||
);
|
||||
|
||||
L_BEGIN_LOG_EXCEPTION
|
||||
|
|
@ -1999,7 +1999,7 @@ static constexpr string &blobToString (string &in) {
|
|||
DurationLogger durationLogger(
|
||||
"Clean history of: (peer=" + chatRoomId.getPeerAddress().asString() +
|
||||
", local=" + chatRoomId.getLocalAddress().asString() +
|
||||
", mask=" + Utils::toString(static_cast<int>(mask)) + ")."
|
||||
", mask=" + Utils::toString(mask) + ")."
|
||||
);
|
||||
|
||||
L_BEGIN_LOG_EXCEPTION
|
||||
|
|
@ -2422,7 +2422,7 @@ static constexpr string &blobToString (string &in) {
|
|||
return list<shared_ptr<EventLog>>();
|
||||
}
|
||||
|
||||
int getHistorySize (const ChatRoomId &, FilterMask) const {
|
||||
int MainDb::getHistorySize (const ChatRoomId &, FilterMask) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include <list>
|
||||
|
||||
#include "linphone/utils/enum-mask.h"
|
||||
|
||||
#include "abstract/abstract-db.h"
|
||||
#include "chat/chat-room/chat-room-id.h"
|
||||
#include "core/core-accessor.h"
|
||||
|
|
@ -49,7 +51,7 @@ public:
|
|||
ConferenceInfoFilter = 0x4
|
||||
};
|
||||
|
||||
typedef int FilterMask;
|
||||
typedef EnumMask<Filter> FilterMask;
|
||||
|
||||
MainDb (const std::shared_ptr<Core> &core);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue