Allow setting hostname
This commit is contained in:
parent
ed2f543c24
commit
156a7cc4b4
2 changed files with 8 additions and 8 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include <fc/crypto/ripemd160.hpp>
|
||||
#include <fc/crypto/rand.hpp>
|
||||
#include <fc/optional.hpp>
|
||||
#include <fc/network/ip.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
@ -40,7 +41,7 @@ namespace fc
|
|||
|
||||
class gntp_notifier {
|
||||
public:
|
||||
gntp_notifier();
|
||||
gntp_notifier(const std::string& host_to_notify = "127.0.0.1", uint16_t port = 23053);
|
||||
~gntp_notifier();
|
||||
void set_application_name(std::string application_name);
|
||||
void set_application_icon(const gntp_icon_ptr& icon);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace fc
|
|||
class gntp_notifier_impl
|
||||
{
|
||||
public:
|
||||
gntp_notifier_impl();
|
||||
gntp_notifier_impl(const std::string& host_to_notify = "127.0.0.1", uint16_t port = 23053);
|
||||
|
||||
// there's no API to change these right now, it will always notify localhost at the default GNTP port
|
||||
std::string hostname;
|
||||
|
|
@ -60,9 +60,9 @@ namespace fc
|
|||
void send_gntp_message(const std::string& message);
|
||||
};
|
||||
|
||||
gntp_notifier_impl::gntp_notifier_impl() :
|
||||
hostname("127.0.0.1"),
|
||||
port(23053),
|
||||
gntp_notifier_impl::gntp_notifier_impl(const std::string& host_to_notify /* = "127.0.0.1" */, uint16_t port /* = 23053 */ ) :
|
||||
hostname(host_to_notify),
|
||||
port(port),
|
||||
connection_failed(false),
|
||||
is_registered(false)
|
||||
{
|
||||
|
|
@ -157,8 +157,8 @@ namespace fc
|
|||
{
|
||||
}
|
||||
|
||||
gntp_notifier::gntp_notifier() :
|
||||
my(new detail::gntp_notifier_impl)
|
||||
gntp_notifier::gntp_notifier(const std::string& host_to_notify /* = "127.0.0.1" */, uint16_t port /* = 23053 */ ) :
|
||||
my(new detail::gntp_notifier_impl(host_to_notify, port))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -166,7 +166,6 @@ namespace fc
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
void gntp_notifier::set_application_name(std::string appName)
|
||||
{
|
||||
my->application_name = appName;
|
||||
|
|
|
|||
Loading…
Reference in a new issue