Skip to content

Commit

Permalink
add class functions in source file
Browse files Browse the repository at this point in the history
  • Loading branch information
jbbjarnason committed Jun 18, 2024
1 parent 57f1df0 commit 53fbcc4
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libs/snitch/inc/public/tfc/snitch/details/dbus_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ namespace tfc::snitch::detail {

class dbus_client {
public:
dbus_client(std::shared_ptr<sdbusplus::asio::connection> conn) : dbus_{ std::move(conn) } {}
explicit dbus_client(std::shared_ptr<sdbusplus::asio::connection> conn);

// todo completion tokens ... std function
auto register_alarm(std::string_view tfc_id, std::string_view description, std::string_view details, level_e lvl, bool ackable) -> api::alarm_id_t;

auto list_alarms() -> std::vector<api::alarm>;
Expand All @@ -25,6 +26,8 @@ class dbus_client {
auto ack_alarm(api::alarm_id_t) -> void;

auto ack_all_alarms() -> void;

auto match_ack_alarm(api::alarm_id_t, std::function<void()> callback) -> void;
private:
std::shared_ptr<sdbusplus::asio::connection> dbus_;
};
Expand Down
31 changes: 31 additions & 0 deletions libs/snitch/src/dbus_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,34 @@
#include <sdbusplus/asio/connection.hpp>

#include <tfc/snitch/details/dbus_client.hpp>

namespace tfc::snitch::detail {

dbus_client::dbus_client(std::shared_ptr<sdbusplus::asio::connection> conn) : dbus_{ std::move(conn) } {
}

auto dbus_client::register_alarm(std::string_view tfc_id, std::string_view description, std::string_view details, level_e lvl, bool ackable) -> api::alarm_id_t {

Check failure on line 11 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-debug)

unused parameter 'tfc_id' [-Werror=unused-parameter]

Check failure on line 11 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-debug)

unused parameter 'description' [-Werror=unused-parameter]

Check failure on line 11 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-debug)

unused parameter 'details' [-Werror=unused-parameter]

Check failure on line 11 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-debug)

unused parameter 'lvl' [-Werror=unused-parameter]

Check failure on line 11 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-debug)

unused parameter 'ackable' [-Werror=unused-parameter]

Check failure on line 11 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-release)

unused parameter 'tfc_id' [-Werror=unused-parameter]

Check failure on line 11 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-release)

unused parameter 'description' [-Werror=unused-parameter]

Check failure on line 11 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-release)

unused parameter 'details' [-Werror=unused-parameter]

Check failure on line 11 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-release)

unused parameter 'lvl' [-Werror=unused-parameter]

Check failure on line 11 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-release)

unused parameter 'ackable' [-Werror=unused-parameter]
return 0;
}

auto dbus_client::list_alarms() -> std::vector<api::alarm> {
return {};
}

auto dbus_client::list_activations(std::string_view locale, std::uint64_t start_count, std::uint64_t count, level_e, api::active_e, api::time_point start, api::time_point end) -> std::vector<api::activation> {

Check failure on line 19 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-debug)

unused parameter 'locale' [-Werror=unused-parameter]

Check failure on line 19 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-debug)

unused parameter 'start_count' [-Werror=unused-parameter]

Check failure on line 19 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-debug)

unused parameter 'count' [-Werror=unused-parameter]

Check failure on line 19 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-debug)

unused parameter 'start' [-Werror=unused-parameter]

Check failure on line 19 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-debug)

unused parameter 'end' [-Werror=unused-parameter]

Check failure on line 19 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-release)

unused parameter 'locale' [-Werror=unused-parameter]

Check failure on line 19 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-release)

unused parameter 'start_count' [-Werror=unused-parameter]

Check failure on line 19 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-release)

unused parameter 'count' [-Werror=unused-parameter]

Check failure on line 19 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-release)

unused parameter 'start' [-Werror=unused-parameter]

Check failure on line 19 in libs/snitch/src/dbus_client.cpp

View workflow job for this annotation

GitHub Actions / build and run tests (gcc-release)

unused parameter 'end' [-Werror=unused-parameter]
return {};
}

auto dbus_client::set_alarm(api::alarm_id_t, std::unordered_map<std::string, std::string> args) -> void {
}

auto dbus_client::reset_alarm(api::alarm_id_t) -> void {
}

auto dbus_client::ack_alarm(api::alarm_id_t) -> void {
}

auto dbus_client::ack_all_alarms() -> void {
}

} // namespace tfc::snitch::detail

0 comments on commit 53fbcc4

Please sign in to comment.