Changeset View
Changeset View
Standalone View
Standalone View
src/client/client-model.hpp
| Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | struct ClientModel | ||||
| std::optional<std::string> syncToken; | std::optional<std::string> syncToken; | ||||
| RoomListModel roomList; | RoomListModel roomList; | ||||
| immer::map<std::string /* sender */, Event> presence; | immer::map<std::string /* sender */, Event> presence; | ||||
| immer::map<std::string /* type */, Event> accountData; | immer::map<std::string /* type */, Event> accountData; | ||||
| std::string nextTxnId{DEFTXNID}; | std::string nextTxnId{DEFTXNID}; | ||||
| immer::flex_vector<BaseJob> nextJobs; | immer::flex_vector<BaseJob> nextJobs; | ||||
| immer::flex_vector<KazvEvent> nextTriggers; | immer::flex_vector<KazvTrigger> nextTriggers; | ||||
| EventList toDevice; | EventList toDevice; | ||||
| std::optional<immer::box<Crypto>> crypto; | std::optional<immer::box<Crypto>> crypto; | ||||
| bool identityKeysUploaded{false}; | bool identityKeysUploaded{false}; | ||||
| DeviceListTracker deviceLists; | DeviceListTracker deviceLists; | ||||
| DeviceTrustLevel trustLevelNeededToSendKeys{DeviceTrustLevel::Unseen}; | DeviceTrustLevel trustLevelNeededToSendKeys{DeviceTrustLevel::Unseen}; | ||||
| ▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | struct ClientModel | ||||
| } | } | ||||
| inline auto popAllJobs() { | inline auto popAllJobs() { | ||||
| auto jobs = std::move(nextJobs); | auto jobs = std::move(nextJobs); | ||||
| nextJobs = DEFVAL; | nextJobs = DEFVAL; | ||||
| return jobs; | return jobs; | ||||
| }; | }; | ||||
| inline void addTrigger(KazvEvent t) { | inline void addTrigger(KazvTrigger t) { | ||||
| addTriggers({t}); | addTriggers({t}); | ||||
| } | } | ||||
| inline void addTriggers(immer::flex_vector<KazvEvent> c) { | inline void addTriggers(immer::flex_vector<KazvTrigger> c) { | ||||
| nextTriggers = std::move(nextTriggers) + c; | nextTriggers = std::move(nextTriggers) + c; | ||||
| } | } | ||||
| inline auto popAllTriggers() { | inline auto popAllTriggers() { | ||||
| auto triggers = std::move(nextTriggers); | auto triggers = std::move(nextTriggers); | ||||
| nextTriggers = DEFVAL; | nextTriggers = DEFVAL; | ||||
| return triggers; | return triggers; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 481 Lines • Show Last 20 Lines | |||||