Commit a225f7cf authored by Ronan's avatar Ronan
Browse files

fix(MainDb): add a workaround to define sql filters on Windows

parent 3ee89b9d
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#include "linphone/api/c-api.h"
#include "linphone/core.h" #include "linphone/core.h"
#include "linphone/event.h" #include "linphone/event.h"
#include "linphone/proxy_config.h" #include "linphone/proxy_config.h"
......
...@@ -153,27 +153,35 @@ struct SqlEventFilterBuilder<Type> { ...@@ -153,27 +153,35 @@ struct SqlEventFilterBuilder<Type> {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
namespace { namespace {
constexpr auto ConferenceCallFilter = SqlEventFilterBuilder< #ifdef _WIN32
EventLog::Type::ConferenceCallStart, // TODO: Find a workaround to deal with StaticString concatenation!!!
EventLog::Type::ConferenceCallEnd constexpr char ConferenceCallFilter[] = "3,4";
>::get(); constexpr char ConferenceChatMessageFilter[] = "5";
constexpr char ConferenceInfoNoDeviceFilter[] = "1,2,6,7,8,9,12";
constexpr auto ConferenceChatMessageFilter = SqlEventFilterBuilder<EventLog::Type::ConferenceChatMessage>::get(); constexpr char ConferenceInfoFilter[] = "1,2,6,7,8,9,10,11,12";
#else
constexpr auto ConferenceInfoNoDeviceFilter = SqlEventFilterBuilder< constexpr auto ConferenceCallFilter = SqlEventFilterBuilder<
EventLog::Type::ConferenceCreated, EventLog::Type::ConferenceCallStart,
EventLog::Type::ConferenceTerminated, EventLog::Type::ConferenceCallEnd
EventLog::Type::ConferenceParticipantAdded, >::get();
EventLog::Type::ConferenceParticipantRemoved,
EventLog::Type::ConferenceParticipantSetAdmin, constexpr auto ConferenceChatMessageFilter = SqlEventFilterBuilder<EventLog::Type::ConferenceChatMessage>::get();
EventLog::Type::ConferenceParticipantUnsetAdmin,
EventLog::Type::ConferenceSubjectChanged constexpr auto ConferenceInfoNoDeviceFilter = SqlEventFilterBuilder<
>::get(); EventLog::Type::ConferenceCreated,
EventLog::Type::ConferenceTerminated,
constexpr auto ConferenceInfoFilter = ConferenceInfoNoDeviceFilter + "," + SqlEventFilterBuilder< EventLog::Type::ConferenceParticipantAdded,
EventLog::Type::ConferenceParticipantDeviceAdded, EventLog::Type::ConferenceParticipantRemoved,
EventLog::Type::ConferenceParticipantDeviceRemoved EventLog::Type::ConferenceParticipantSetAdmin,
>::get(); EventLog::Type::ConferenceParticipantUnsetAdmin,
EventLog::Type::ConferenceSubjectChanged
>::get();
constexpr auto ConferenceInfoFilter = ConferenceInfoNoDeviceFilter + "," + SqlEventFilterBuilder<
EventLog::Type::ConferenceParticipantDeviceAdded,
EventLog::Type::ConferenceParticipantDeviceRemoved
>::get();
#endif // ifdef _WIN32
constexpr EnumToSql<MainDb::Filter> EventFilterToSql[] = { constexpr EnumToSql<MainDb::Filter> EventFilterToSql[] = {
{ MainDb::ConferenceCallFilter, ConferenceCallFilter }, { MainDb::ConferenceCallFilter, ConferenceCallFilter },
......
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