0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-29 15:28:20 +02:00

ircd:Ⓜ️:sync: Add document comments for sync::data members.

This commit is contained in:
Jason Volk 2020-06-03 21:04:25 -07:00
parent fcd488b409
commit d662bdaa3e
2 changed files with 39 additions and 10 deletions

View file

@ -52,29 +52,55 @@ struct ircd::m::sync::data
/// The client. This may be null if sync is being called internally.
ircd::client *client {nullptr};
/// Parsed arguments for the request.
const sync::args *args {nullptr};
// User related
/// User apropos.
const m::user user;
/// User's room convenience.
const m::user::room user_room;
/// User's room state convenience.
const m::room::state user_state;
/// User's rooms interface convenience.
const m::user::rooms user_rooms;
/// Buffer for supplied or fetched filter.
const std::string filter_buf;
/// Structured parse of the above filter.
const m::filter filter;
/// User's device ID from the access token.
const device::id device_id;
/// Event apropos (may be null for polylog).
const m::event *event {nullptr};
/// Event room's interface convenience.
const m::room *room {nullptr};
/// User's membership in event's room.
string_view membership;
/// Event's depth in room.
int64_t room_depth {0}; // if *room
/// Event room's top-head sequence number
event::idx room_head {0}; // if *room
/// Event's sequence number
event::idx event_idx {0}; // if *event
/// Client transaction_id apropos
string_view client_txnid;
/// The json::stack master object
json::stack *out {nullptr};
// apropos contextual
const m::event *event {nullptr};
const m::room *room {nullptr};
string_view membership;
int64_t room_depth {0}; // if *room
event::idx room_head {0}; // if *room
event::idx event_idx {0}; // if *event
string_view client_txnid;
data(const m::user &user,
const m::events::range &range,
ircd::client *const &client = nullptr,

View file

@ -111,13 +111,16 @@ ircd::m::sync::make_since(const string_view &input)
0UL
};
// prefix
assert(!part[0] || part[0] == "ctor");
return
{
// since
part[1]?
lex_cast<event::idx>(part[1]):
0UL,
// snapshot
part[2]?
lex_cast<event::idx>(part[2]):
0UL,