aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLibravatar Michael Jurkoic <mjjurkoic@gmail.com>2024-03-18 20:20:36 -0500
committerLibravatar Michael Jurkoic <mjjurkoic@gmail.com>2024-03-18 20:20:36 -0500
commitb766baf6f34df321e8eff9687cc2c17485da6fb4 (patch)
tree4abc88ec98a252c97f85081999b610f9a6871263 /include
parentaaba3db6976f9bb8e92ae7ff1075f9719f8936c1 (diff)
Use smart pointers
Diffstat (limited to 'include')
-rw-r--r--include/nostr.hpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/nostr.hpp b/include/nostr.hpp
index 1a4e33c..51ea7cd 100644
--- a/include/nostr.hpp
+++ b/include/nostr.hpp
@@ -104,8 +104,13 @@ private:
class NostrService
{
public:
- NostrService(plog::IAppender* appender, client::IWebSocketClient* client);
- NostrService(plog::IAppender* appender, client::IWebSocketClient* client, RelayList relays);
+ NostrService(
+ std::shared_ptr<plog::IAppender> appender,
+ std::shared_ptr<client::IWebSocketClient> client);
+ NostrService(
+ std::shared_ptr<plog::IAppender> appender,
+ std::shared_ptr<client::IWebSocketClient> client,
+ RelayList relays);
~NostrService();
RelayList defaultRelays() const;
@@ -207,7 +212,7 @@ private:
const int MAX_EVENTS_PER_SUBSCRIPTION = 128;
///< The WebSocket client used to communicate with relays.
- client::IWebSocketClient* _client;
+ shared_ptr<client::IWebSocketClient> _client;
///< A mutex to protect the instance properties.
std::mutex _propertyMutex;
///< The default set of Nostr relays to which the service will attempt to connect.