mirror of
https://github.com/matrix-construct/construct
synced 2024-09-30 12:48:54 +02:00
ircd:Ⓜ️:sync: Add document comments for sync::data members.
This commit is contained in:
parent
fcd488b409
commit
d662bdaa3e
2 changed files with 39 additions and 10 deletions
|
@ -52,29 +52,55 @@ struct ircd::m::sync::data
|
||||||
|
|
||||||
/// The client. This may be null if sync is being called internally.
|
/// The client. This may be null if sync is being called internally.
|
||||||
ircd::client *client {nullptr};
|
ircd::client *client {nullptr};
|
||||||
|
|
||||||
|
/// Parsed arguments for the request.
|
||||||
const sync::args *args {nullptr};
|
const sync::args *args {nullptr};
|
||||||
|
|
||||||
// User related
|
/// User apropos.
|
||||||
const m::user user;
|
const m::user user;
|
||||||
|
|
||||||
|
/// User's room convenience.
|
||||||
const m::user::room user_room;
|
const m::user::room user_room;
|
||||||
|
|
||||||
|
/// User's room state convenience.
|
||||||
const m::room::state user_state;
|
const m::room::state user_state;
|
||||||
|
|
||||||
|
/// User's rooms interface convenience.
|
||||||
const m::user::rooms user_rooms;
|
const m::user::rooms user_rooms;
|
||||||
|
|
||||||
|
/// Buffer for supplied or fetched filter.
|
||||||
const std::string filter_buf;
|
const std::string filter_buf;
|
||||||
|
|
||||||
|
/// Structured parse of the above filter.
|
||||||
const m::filter filter;
|
const m::filter filter;
|
||||||
|
|
||||||
|
/// User's device ID from the access token.
|
||||||
const device::id device_id;
|
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
|
/// The json::stack master object
|
||||||
json::stack *out {nullptr};
|
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,
|
data(const m::user &user,
|
||||||
const m::events::range &range,
|
const m::events::range &range,
|
||||||
ircd::client *const &client = nullptr,
|
ircd::client *const &client = nullptr,
|
||||||
|
|
|
@ -111,13 +111,16 @@ ircd::m::sync::make_since(const string_view &input)
|
||||||
0UL
|
0UL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// prefix
|
||||||
assert(!part[0] || part[0] == "ctor");
|
assert(!part[0] || part[0] == "ctor");
|
||||||
return
|
return
|
||||||
{
|
{
|
||||||
|
// since
|
||||||
part[1]?
|
part[1]?
|
||||||
lex_cast<event::idx>(part[1]):
|
lex_cast<event::idx>(part[1]):
|
||||||
0UL,
|
0UL,
|
||||||
|
|
||||||
|
// snapshot
|
||||||
part[2]?
|
part[2]?
|
||||||
lex_cast<event::idx>(part[2]):
|
lex_cast<event::idx>(part[2]):
|
||||||
0UL,
|
0UL,
|
||||||
|
|
Loading…
Reference in a new issue