aboutsummaryrefslogtreecommitdiff
path: root/src/message/signalproxy/objects/backlogmanager.rs
blob: 4e74b155e7fd5d20d508402a1a4f14be5118a04e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
// interface BacklogManager {
//
//
//     // C->S calls
//
//     /**
//      * Loads backlog for `bufferId`, starting at message `first`, up to `last`
//      * (plus `additional` more messages after `last`) but at most `limit`
//      * messages total.
//      */
//     requestBacklog(bufferId: BufferId, first: MsgId, last: MsgId, limit: Int, additional: Int)
//     /**
//      * Same as `requestBacklog`, but only messages of a certain message `type`
//      * with certain `flags` set.
//      */
//     requestBacklogFiltered(bufferId: BufferId, first: MsgId, last: MsgId, limit: Int, additional: Int, type: Int, flags: Int)
//     /**
//      * Same as `requestBacklog`, but applied to all buffers.
//      */
//     requestBacklogAll(first: MsgId, last: MsgId, limit: Int, additional: Int)
//     /**
//      * Same as `requestBacklogFiltered`, but applied to all buffers.
//      */
//     requestBacklogAllFiltered(first: MsgId, last: MsgId, limit: Int, additional: Int, type: Int, flags: Int)
//
//
//     // S->C calls
//
//     /**
//      * The response to `requestBacklog`, with the messages encoded as QVariants
//      * in the `messages` parameter.
//      */
//     receiveBacklog(bufferId: BufferId, first: MsgId, last: MsgId, limit: Int, additional: Int, messages: QVariantList)
//     /**
//      * The response to `requestBacklogFiltered`, with the messages encoded as
//      * QVariants in the `messages` parameter.
//      */
//     receiveBacklogFiltered(bufferId: BufferId, first: MsgId, last: MsgId, limit: Int, additional: Int, type: Int, flags: Int, messages: QVariantList)
//     /**
//      * The response to `requestBacklogAll`, with the messages encoded as
//      * QVariants in the `messages` parameter.
//      */
//     receiveBacklogAll(first: MsgId, last: MsgId, limit: Int, additional: Int, messages: QVariantList)
//     /**
//      * The response to `requestBacklogAllFiltered`, with the messages encoded as
//      * QVariants in the `messages` parameter.
//      */
//     receiveBacklogAllFiltered(first: MsgId, last: MsgId, limit: Int, additional: Int, type: Int, flags: Int, messages: QVariantList)
// }

#![allow(non_snake_case, dead_code)]

use crate::primitive::VariantList;

/// Receive and Request Backlog
/// All "request" functions are Client to Server and all "receive" functions are Server to Client
#[derive(Clone, Debug, std::cmp::PartialEq, Default)]
pub struct BacklogManager {}

impl BacklogManager {
    /// Loads backlog for `bufferId`, starting at message `first`, up to `last`
    /// (plus `additional` more messages after `last`) but at most `limit`
    /// messages total.
    fn requestBacklog(self: Self, buffer_id: u32, first: u32, last: u32, limit: u32, additional: u32) {
        unimplemented!()
    }

    /// Same as `requestBacklog`, but only messages of a certain message `type`
    /// with certain `flags` set.
    fn requestBacklogFiltered(
        self: Self,
        buffer_id: u32,
        first: u32,
        last: u32,
        limit: u32,
        additional: u32,
        msgtype: u32,
        flags: u32,
    ) {
        unimplemented!()
    }

    /// Same as `requestBacklog`, but applied to all buffers.
    fn requestBacklogAll(self: Self, first: u32, last: u32, limit: u32, additional: u32) {
        unimplemented!()
    }

    /// Same as `requestBacklogFiltered`, but applied to all buffers.
    fn requestBacklogAllFiltered(
        self: Self,
        first: u32,
        last: u32,
        limit: u32,
        additional: u32,
        msgtype: u32,
        flags: u32,
    ) {
        unimplemented!()
    }

    /// The response to `requestBacklog`, with the messages encoded as Variants
    /// in the `messages` parameter.
    fn receiveBacklog(
        self: Self,
        buffer_id: u32,
        first: u32,
        last: u32,
        limit: u32,
        additional: u32,
        messages: VariantList,
    ) {
        unimplemented!()
    }

    /// The response to `requestBacklogFiltered`, with the messages encoded as
    /// Variants in the `messages` parameter.
    fn receiveBacklogFiltered(
        self: Self,
        buffer_id: u32,
        first: u32,
        last: u32,
        limit: u32,
        additional: u32,
        msgtype: u32,
        flags: u32,
        messages: VariantList,
    ) {
        unimplemented!()
    }

    /// Same as `receiveBacklog`, but applied to all buffers.
    fn receiveBacklogAll(
        self: Self,
        first: u32,
        last: u32,
        limit: u32,
        additional: u32,
        messages: VariantList,
    ) {
        unimplemented!()
    }

    /// Same as `receiveBacklogFiltered`, but applied to all buffers.
    fn receiveBacklogAllFiltered(
        self: Self,
        first: u32,
        last: u32,
        limit: u32,
        additional: u32,
        msgtype: u32,
        flags: u32,
        messages: VariantList,
    ) {
        unimplemented!()
    }
}