SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
GroupQueryResult.h
1 /*
2  Copyright © CloudBackend AB 2020-2023.
3  */
4 
5 #ifndef INCLUDE_CBE_GROUP_QUERY_H_
6 #define INCLUDE_CBE_GROUP_QUERY_H_
7 
8 #include <string>
9 #include <vector>
10 
11 #include "cbe/Types.h"
12 #include "cbe/GroupFilter.h"
13 
14 namespace CBI {
15 class GroupQueryResult;
16 using GroupQueryResultPtr = std::shared_ptr<CBI::GroupQueryResult>;
17 class GroupEventProtocol;
18 using GroupDelegatePtr = std::shared_ptr<GroupEventProtocol>;
19 } // namespace CBI
20 
21 namespace cbe {
22 
28  // friend class DirectoryCache;
29  friend class GroupManager;
30  friend class CloudBackend;
31 public:
34 
39 
40  using GroupsSnapshot = std::vector<Group>;
47  GroupsSnapshot getGroupsSnapshot() const;
48 
52  uint64_t GroupsLoaded() const;
53 
58  uint64_t totalCount() const;
59 
64  bool containsGroup(uint64_t groupId);
65 
66  friend std::ostream& operator<<(std::ostream& os,
67  const GroupQueryResult& groupQuery);
68 
69  explicit operator bool() const;
70 private:
71  struct Impl;
72  std::shared_ptr<Impl> pImpl{};
73 
74  GroupQueryResult(CBI::GroupQueryResultPtr cbiPeerPtr);
75  CBI::GroupQueryResult& getCbiPeer() const;
76 }; // class GroupQueryResult
77 
78 }
79 // namespace cbe
80 
81 #endif // INCLUDE_CBE_GROUPQUERY_H_
The session that holds the connection with the cloud.
Definition: CloudBackend.h:47
To filter when searching a list of Group.
Definition: GroupFilter.h:31
For managing the groups.
Definition: GroupManager.h:30
Resultset of data retrieved in a search for Group.
Definition: GroupQueryResult.h:27
uint64_t totalCount() const
GroupsSnapshot getGroupsSnapshot() const
cbe::GroupFilter filter() const
uint64_t GroupsLoaded() const
bool containsGroup(uint64_t groupId)
Root namespace for the CloudBackend SDK API.
Definition: Account.h:22
DefaultCtor
Default constructor marker.
Definition: Types.h:204