diff --git a/src/grp_query_drv_dummy.cc b/src/grp_query_drv_dummy.cc new file mode 100644 index 0000000..02081f8 --- /dev/null +++ b/src/grp_query_drv_dummy.cc @@ -0,0 +1,41 @@ +#include "grp_query_drv_dummy.hh" +#include "pEpLog.hh" +#include "listmanager_dummy.hh" +#include +#include + +using namespace std; + +namespace pEp { + bool GroupQueryDriverDummy::log_enabled = false; + + GroupQueryDriverDummy::GroupQueryDriverDummy(const std::string &db_path) : + lmd(ListManagerDummy(db_path)) + { + pEpLogClass("called"); + } + + PEP_STATUS GroupQueryDriverDummy::group_query_groups(PEP_SESSION session, identity_list **groups) + { + pEpLogClass("called"); + return PEP_STATUS_OK; + } + + PEP_STATUS GroupQueryDriverDummy::group_query_manager( + PEP_SESSION session, + const pEp_identity *const group, + pEp_identity **manager) + { + pEpLogClass("called"); + return PEP_STATUS_OK; + } + + PEP_STATUS GroupQueryDriverDummy::group_query_members( + PEP_SESSION session, + const pEp_identity *const group, + identity_list **members) + { + pEpLogClass("called"); + return PEP_STATUS_OK; + } +} // namespace pEp \ No newline at end of file diff --git a/src/grp_query_drv_dummy.hh b/src/grp_query_drv_dummy.hh new file mode 100644 index 0000000..a262768 --- /dev/null +++ b/src/grp_query_drv_dummy.hh @@ -0,0 +1,38 @@ +// This file is under GNU General Public License 3.0 +// see LICENSE.txt +#ifndef LIBPEPADAPTER_GRP_QUERY_DRV_DUMMY_HH +#define LIBPEPADAPTER_GRP_QUERY_DRV_DUMMY_HH + +#include "grp_query_interface.hh" +#include "pEpLog.hh" +#include "listmanager_dummy.hh" +#include +#include + +namespace pEp { + class GroupQueryDriverDummy : public GroupQueryInterface { + public: + GroupQueryDriverDummy() = delete; + GroupQueryDriverDummy(const std::string &db_path); + + PEP_STATUS group_query_groups(PEP_SESSION session, identity_list **groups) override; + PEP_STATUS group_query_manager( + PEP_SESSION session, + const pEp_identity *const group, + pEp_identity **manager) override; + PEP_STATUS group_query_members( + PEP_SESSION session, + const pEp_identity *const group, + identity_list **members) override; + + // Logging + static bool log_enabled; + Adapter::pEpLog::pEpLogger logger{ "GroupQueryDriverDummy", log_enabled }; + + private: + ListManagerDummy lmd; + Adapter::pEpLog::pEpLogger &m4gic_logger_n4ame = logger; + }; +} // namespace pEp + +#endif // LIBPEPADAPTER_GRP_QUERY_DRV_DUMMY_HH