Skip to content

Commit

Permalink
Refactor Xapi interface
Browse files Browse the repository at this point in the history
  • Loading branch information
MPogotsky committed Oct 21, 2024
1 parent 3d31d80 commit 58ba2a1
Show file tree
Hide file tree
Showing 18 changed files with 863 additions and 936 deletions.
4 changes: 2 additions & 2 deletions examples/GetBalance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <boost/json.hpp>
#include <xapi/Xapi.hpp>

boost::asio::awaitable<void> printBalance(xapi::XClientStream &stream)
boost::asio::awaitable<void> printBalance(xapi::XStationClientStream &stream)
{
co_await stream.getBalance();
// Use getKeepAlive, to keep the connection alive
Expand All @@ -20,8 +20,8 @@ boost::asio::awaitable<void> printBalance(xapi::XClientStream &stream)
counter += 1;
}

co_await stream.stopBalance();
co_await stream.stopKeepAlive();
co_await stream.stopBalance();

co_return;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/GetCandles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <boost/json.hpp>
#include <xapi/Xapi.hpp>

boost::asio::awaitable<void> printCandles(xapi::XClientStream &stream)
boost::asio::awaitable<void> printCandles(xapi::XStationClientStream &stream)
{
co_await stream.getCandles("US100");
// Use getKeepAlive, to keep the connection alive
Expand Down
3 changes: 1 addition & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ enable_testing()

set( SOURCES
TestConnection.cpp
TestSocket.cpp
TestStream.cpp
TestXStationClient.cpp
TestXStationClientStream.cpp
)

add_executable( tests
Expand Down
295 changes: 0 additions & 295 deletions test/TestSocket.cpp

This file was deleted.

Loading

0 comments on commit 58ba2a1

Please sign in to comment.