/usr/include/measurement_kit/ooni/collector_client.hpp is in libmeasurement-kit-dev 0.7.1-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | // Part of measurement-kit <https://measurement-kit.github.io/>.
// Measurement-kit is free software. See AUTHORS and LICENSE for more
// information on the copying conditions.
#ifndef MEASUREMENT_KIT_OONI_BACKEND_CLIENT_HPP
#define MEASUREMENT_KIT_OONI_BACKEND_CLIENT_HPP
#include <measurement_kit/http.hpp>
#include <measurement_kit/report.hpp>
namespace mk {
namespace ooni {
namespace collector {
/*
To submit a file report, use one of the following collectors. By default
the library uses the `production` collector.
*/
#define MK_OONI_PRODUCTION_COLLECTOR_URL "https://b.collector.ooni.io"
#define MK_OONI_TESTING_COLLECTOR_URL "https://b.collector.test.ooni.io:4441"
std::string production_collector_url();
std::string testing_collector_url();
void submit_report(std::string filepath, std::string collector_base_url,
Callback<Error> callback, Settings conf = {},
Var<Reactor> = Reactor::global(),
Var<Logger> = Logger::global());
void submit_report(std::string filepath, std::string collector_base_url,
std::string collector_front_domain,
Callback<Error> callback, Settings conf = {},
Var<Reactor> = Reactor::global(),
Var<Logger> = Logger::global());
/*
The following APIs are used to implement `submit_report()` and could
also be the basic bricks to open report at the beginning, update during
the test progress, and close when test ends:
*/
void connect(Settings, Callback<Error, Var<net::Transport>>,
Var<Reactor> = Reactor::global(), Var<Logger> = Logger::global());
void create_report(Var<net::Transport>, report::Entry,
Callback<Error, std::string>, Settings = {},
Var<Reactor> = Reactor::global(),
Var<Logger> = Logger::global());
void connect_and_create_report(report::Entry, Callback<Error, std::string>,
Settings = {}, Var<Reactor> = Reactor::global(),
Var<Logger> = Logger::global());
void update_report(Var<net::Transport>, std::string report_id, report::Entry,
Callback<Error>, Settings = {},
Var<Reactor> = Reactor::global(),
Var<Logger> = Logger::global());
void connect_and_update_report(std::string report_id, report::Entry,
Callback<Error>, Settings = {},
Var<Reactor> = Reactor::global(),
Var<Logger> = Logger::global());
void close_report(Var<net::Transport>, std::string report_id, Callback<Error>,
Settings = {}, Var<Reactor> = Reactor::global(),
Var<Logger> = Logger::global());
void connect_and_close_report(std::string report_id, Callback<Error>,
Settings = {}, Var<Reactor> = Reactor::global(),
Var<Logger> = Logger::global());
} // namespace collector
} // namespace mk
} // namespace ooni
#endif
|