
3 changed files with 61 additions and 75 deletions
@ -0,0 +1,61 @@ |
|||
// This file is under GNU General Public License 3.0
|
|||
// see LICENSE.txt
|
|||
|
|||
#ifndef LIBPEPADAPTER_GRP_MANAGER_INTERFACE_HH |
|||
#define LIBPEPADAPTER_GRP_MANAGER_INTERFACE_HH |
|||
|
|||
#include <pEp/message_api.h> |
|||
|
|||
namespace pEp { |
|||
namespace Adapter { |
|||
class GroupUpdateInterface { |
|||
public: |
|||
virtual PEP_STATUS adapter_group_create( |
|||
::PEP_SESSION session, |
|||
::pEp_identity *group_identity, |
|||
::pEp_identity *manager, |
|||
::identity_list *memberlist) noexcept = 0; |
|||
|
|||
virtual PEP_STATUS adapter_group_dissolve( |
|||
::PEP_SESSION session, |
|||
::pEp_identity *group_identity, |
|||
::pEp_identity *manager) noexcept = 0; |
|||
|
|||
virtual PEP_STATUS adapter_group_invite_member( |
|||
::PEP_SESSION session, |
|||
::pEp_identity *group_identity, |
|||
::pEp_identity *group_member) noexcept = 0; |
|||
|
|||
virtual PEP_STATUS adapter_group_remove_member( |
|||
::PEP_SESSION session, |
|||
::pEp_identity *group_identity, |
|||
::pEp_identity *group_member) noexcept = 0; |
|||
|
|||
private: |
|||
}; |
|||
|
|||
class GroupQueryInterface { |
|||
public: |
|||
virtual PEP_STATUS group_query_groups( |
|||
::PEP_SESSION session, |
|||
::identity_list **groups) noexcept = 0; |
|||
|
|||
virtual PEP_STATUS group_query_manager( |
|||
::PEP_SESSION session, |
|||
const ::pEp_identity *const group, |
|||
::pEp_identity **manager) noexcept = 0; |
|||
|
|||
virtual PEP_STATUS group_query_members( |
|||
::PEP_SESSION session, |
|||
const ::pEp_identity *const group, |
|||
::identity_list **members) noexcept = 0; |
|||
|
|||
private: |
|||
}; |
|||
|
|||
class GroupManagerInterface : public GroupUpdateInterface, public GroupQueryInterface { |
|||
}; |
|||
} // namespace Adapter
|
|||
} // namespace pEp
|
|||
|
|||
#endif // LIBPEPADAPTER_GRP_MANAGER_INTERFACE_HH
|
@ -1,29 +0,0 @@ |
|||
// This file is under GNU General Public License 3.0
|
|||
// see LICENSE.txt
|
|||
|
|||
#ifndef LIBPEPADAPTER_GRP_QUERY_INTERFACE_HH |
|||
#define LIBPEPADAPTER_GRP_QUERY_INTERFACE_HH |
|||
|
|||
#include <pEp/message_api.h> |
|||
#include <pEp/group.h> |
|||
|
|||
namespace pEp { |
|||
class GroupQueryInterface { |
|||
public: |
|||
virtual PEP_STATUS group_query_groups(PEP_SESSION session, identity_list **groups) noexcept = 0; |
|||
|
|||
virtual PEP_STATUS group_query_manager( |
|||
PEP_SESSION session, |
|||
const pEp_identity *const group, |
|||
pEp_identity **manager) noexcept = 0; |
|||
|
|||
virtual PEP_STATUS group_query_members( |
|||
PEP_SESSION session, |
|||
const pEp_identity *const group, |
|||
identity_list **members) noexcept = 0; |
|||
|
|||
private: |
|||
}; |
|||
} // namespace pEp
|
|||
|
|||
#endif // LIBPEPADAPTER_GRP_QUERY_INTERFACE_HH
|
@ -1,46 +0,0 @@ |
|||
// This file is under GNU General Public License 3.0
|
|||
// see LICENSE.txt
|
|||
|
|||
#ifndef LIBPEPADAPTER_GRP_UPDATE_INTERFACE_HH |
|||
#define LIBPEPADAPTER_GRP_UPDATE_INTERFACE_HH |
|||
|
|||
#include <pEp/message_api.h> |
|||
#include <pEp/group.h> |
|||
|
|||
namespace pEp { |
|||
class GroupUpdateInterface { |
|||
public: |
|||
virtual PEP_STATUS adapter_group_create( |
|||
PEP_SESSION session, |
|||
pEp_identity *group_identity, |
|||
pEp_identity *manager, |
|||
identity_list *memberlist) noexcept = 0; |
|||
|
|||
// JOIN does not exist in listmanagers
|
|||
// For LIB-16 - Store groups a user is part of and provide a method to query them
|
|||
// We need to create a separate DB _if_ we dont store it in the engine
|
|||
// virtual PEP_STATUS adapter_group_join(
|
|||
// PEP_SESSION session,
|
|||
// pEp_identity *group_identity,
|
|||
// pEp_identity *as_member) noexcept = 0;
|
|||
|
|||
virtual PEP_STATUS adapter_group_dissolve( |
|||
PEP_SESSION session, |
|||
pEp_identity *group_identity, |
|||
pEp_identity *manager) noexcept = 0; |
|||
|
|||
virtual PEP_STATUS adapter_group_invite_member( |
|||
PEP_SESSION session, |
|||
pEp_identity *group_identity, |
|||
pEp_identity *group_member) noexcept = 0; |
|||
|
|||
virtual PEP_STATUS adapter_group_remove_member( |
|||
PEP_SESSION session, |
|||
pEp_identity *group_identity, |
|||
pEp_identity *group_member) noexcept = 0; |
|||
|
|||
private: |
|||
}; |
|||
} // namespace pEp
|
|||
|
|||
#endif // LIBPEPADAPTER_GRP_UPDATE_INTERFACE_HH
|
Loading…
Reference in new issue