File: PinotDBus_proxy.h

package info (click to toggle)
pinot 1.23-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,608 kB
  • sloc: cpp: 41,870; makefile: 611; xml: 416; sh: 336
file content (457 lines) | stat: -rw-r--r-- 15,133 bytes parent folder | download | duplicates (3)
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
#pragma once
#include <string>
#include <tuple>
#include <vector>
#include <glibmm.h>
#include <giomm.h>
#include "PinotDBus_common.h"

namespace org {
namespace freedesktop {
namespace DBus {

class IntrospectableProxy : public Glib::ObjectBase {
public:
    static void createForBus(Gio::DBus::BusType busType,
                             Gio::DBus::ProxyFlags proxyFlags,
                             const std::string &name,
                             const std::string &objectPath,
                             const Gio::SlotAsyncReady &slot,
                             const Glib::RefPtr<Gio::Cancellable> &cancellable = {});

    static Glib::RefPtr<IntrospectableProxy> createForBusFinish (const Glib::RefPtr<Gio::AsyncResult> &result);

    static Glib::RefPtr<IntrospectableProxy> createForBus_sync(
        Gio::DBus::BusType busType,
        Gio::DBus::ProxyFlags proxyFlags,
        const std::string &name,
        const std::string &objectPath,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {});

    Glib::RefPtr<Gio::DBus::Proxy> dbusProxy() const { return m_proxy; }

    void Introspect(
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void Introspect_finish (
        Glib::ustring &data,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    Glib::ustring
    Introspect_sync(
const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);


    void reference() const override {}
    void unreference() const override {}

protected:
    Glib::RefPtr<Gio::DBus::Proxy> m_proxy;

private:
    IntrospectableProxy(const Glib::RefPtr<Gio::DBus::Proxy> &proxy);

    void handle_signal(const Glib::ustring &sender_name,
                       const Glib::ustring &signal_name,
                       const Glib::VariantContainerBase &parameters);

    void handle_properties_changed(const Gio::DBus::Proxy::MapChangedProperties &changed_properties,
                                   const std::vector<Glib::ustring> &invalidated_properties);

};

}// DBus
}// freedesktop
}// org
namespace com {
namespace github {
namespace fabricecolin {

class PinotProxy : public Glib::ObjectBase {
public:
    static void createForBus(Gio::DBus::BusType busType,
                             Gio::DBus::ProxyFlags proxyFlags,
                             const std::string &name,
                             const std::string &objectPath,
                             const Gio::SlotAsyncReady &slot,
                             const Glib::RefPtr<Gio::Cancellable> &cancellable = {});

    static Glib::RefPtr<PinotProxy> createForBusFinish (const Glib::RefPtr<Gio::AsyncResult> &result);

    static Glib::RefPtr<PinotProxy> createForBus_sync(
        Gio::DBus::BusType busType,
        Gio::DBus::ProxyFlags proxyFlags,
        const std::string &name,
        const std::string &objectPath,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {});

    Glib::RefPtr<Gio::DBus::Proxy> dbusProxy() const { return m_proxy; }

    void GetStatistics(
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetStatistics_finish (
        guint32 &crawledCount,
        guint32 &docsCount,
        bool &lowDiskSpace,
        bool &onBattery,
        bool &crawling,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    std::tuple<guint32, guint32, bool, bool, bool>
    GetStatistics_sync(
const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void Reload(
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void Reload_finish (
        bool &reloading,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    bool
    Reload_sync(
const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void Stop(
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void Stop_finish (
        gint32 &exitStatus,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    gint32
    Stop_sync(
const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetDocumentInfo(
        guint32 docId,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetDocumentInfo_finish (
        std::vector<std::tuple<Glib::ustring,Glib::ustring>> &fields,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    std::vector<std::tuple<Glib::ustring,Glib::ustring>>
    GetDocumentInfo_sync(
        guint32 docId,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetDocumentTermsCount(
        guint32 docId,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetDocumentTermsCount_finish (
        guint32 &count,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    guint32
    GetDocumentTermsCount_sync(
        guint32 docId,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetDocumentTerms(
        guint32 docId,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetDocumentTerms_finish (
        std::vector<Glib::ustring> &terms,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    std::vector<Glib::ustring>
    GetDocumentTerms_sync(
        guint32 docId,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetLabels(
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetLabels_finish (
        std::vector<Glib::ustring> &labels,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    std::vector<Glib::ustring>
    GetLabels_sync(
const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void AddLabel(
        const Glib::ustring & label,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void AddLabel_finish (
        Glib::ustring &label,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    Glib::ustring
    AddLabel_sync(
        const Glib::ustring & label,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void DeleteLabel(
        const Glib::ustring & label,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void DeleteLabel_finish (
        Glib::ustring &label,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    Glib::ustring
    DeleteLabel_sync(
        const Glib::ustring & label,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void HasLabel(
        guint32 docId,
        const Glib::ustring & label,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void HasLabel_finish (
        guint32 &docId,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    guint32
    HasLabel_sync(
        guint32 docId,        const Glib::ustring & label,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetDocumentLabels(
        guint32 docId,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetDocumentLabels_finish (
        std::vector<Glib::ustring> &labels,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    std::vector<Glib::ustring>
    GetDocumentLabels_sync(
        guint32 docId,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void SetDocumentLabels(
        guint32 docId,
        const std::vector<Glib::ustring> & labels,
        bool resetLabels,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void SetDocumentLabels_finish (
        guint32 &docId,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    guint32
    SetDocumentLabels_sync(
        guint32 docId,        const std::vector<Glib::ustring> & labels,        bool resetLabels,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void SetDocumentsLabels(
        const std::vector<Glib::ustring> & docIds,
        const std::vector<Glib::ustring> & labels,
        bool resetLabels,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void SetDocumentsLabels_finish (
        bool &status,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    bool
    SetDocumentsLabels_sync(
        const std::vector<Glib::ustring> & docIds,        const std::vector<Glib::ustring> & labels,        bool resetLabels,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void HasDocument(
        const Glib::ustring & url,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void HasDocument_finish (
        guint32 &docId,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    guint32
    HasDocument_sync(
        const Glib::ustring & url,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetCloseTerms(
        const Glib::ustring & term,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetCloseTerms_finish (
        std::vector<Glib::ustring> &terms,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    std::vector<Glib::ustring>
    GetCloseTerms_sync(
        const Glib::ustring & term,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetDocumentsCount(
        const Glib::ustring & label,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void GetDocumentsCount_finish (
        guint32 &count,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    guint32
    GetDocumentsCount_sync(
        const Glib::ustring & label,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void ListDocuments(
        const Glib::ustring & term,
        guint32 termType,
        guint32 maxCount,
        guint32 startOffset,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void ListDocuments_finish (
        std::vector<Glib::ustring> &docIds,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    std::vector<Glib::ustring>
    ListDocuments_sync(
        const Glib::ustring & term,        guint32 termType,        guint32 maxCount,        guint32 startOffset,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void UpdateDocument(
        guint32 docId,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void UpdateDocument_finish (
        guint32 &docId,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    guint32
    UpdateDocument_sync(
        guint32 docId,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void SetDocumentInfo(
        guint32 docId,
        const std::vector<std::tuple<Glib::ustring,Glib::ustring>> & fields,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void SetDocumentInfo_finish (
        guint32 &docId,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    guint32
    SetDocumentInfo_sync(
        guint32 docId,        const std::vector<std::tuple<Glib::ustring,Glib::ustring>> & fields,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void Query(
        const Glib::ustring & engineType,
        const Glib::ustring & engineName,
        const Glib::ustring & searchText,
        guint32 startDoc,
        guint32 maxHits,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void Query_finish (
        guint32 &estimatedHits,
        std::vector<std::vector<std::tuple<Glib::ustring,Glib::ustring>>> &hitsList,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    std::tuple<guint32, std::vector<std::vector<std::tuple<Glib::ustring,Glib::ustring>>>>
    Query_sync(
        const Glib::ustring & engineType,        const Glib::ustring & engineName,        const Glib::ustring & searchText,        guint32 startDoc,        guint32 maxHits,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void SimpleQuery(
        const Glib::ustring & searchText,
        guint32 maxHits,
        const Gio::SlotAsyncReady &slot,
        const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    void SimpleQuery_finish (
        std::vector<Glib::ustring> &docIds,
        const Glib::RefPtr<Gio::AsyncResult> &res);

    std::vector<Glib::ustring>
    SimpleQuery_sync(
        const Glib::ustring & searchText,        guint32 maxHits,const Glib::RefPtr<Gio::Cancellable> &cancellable = {},
        int timeout_msec = -1);

    Glib::ustring DaemonVersion_get(bool *ok = nullptr);
    sigc::signal<void> &DaemonVersion_changed() {
        return m_DaemonVersion_changed;
    }

    guint32 IndexFlushEpoch_get(bool *ok = nullptr);
    sigc::signal<void> &IndexFlushEpoch_changed() {
        return m_IndexFlushEpoch_changed;
    }


    void reference() const override {}
    void unreference() const override {}

protected:
    Glib::RefPtr<Gio::DBus::Proxy> m_proxy;

private:
    PinotProxy(const Glib::RefPtr<Gio::DBus::Proxy> &proxy);

    void handle_signal(const Glib::ustring &sender_name,
                       const Glib::ustring &signal_name,
                       const Glib::VariantContainerBase &parameters);

    void handle_properties_changed(const Gio::DBus::Proxy::MapChangedProperties &changed_properties,
                                   const std::vector<Glib::ustring> &invalidated_properties);

    sigc::signal<void> m_DaemonVersion_changed;
    sigc::signal<void> m_IndexFlushEpoch_changed;
};

}// fabricecolin
}// github
}// com