Skip to content

Commit dd031e3

Browse files
author
MarcoFalke
committed
noui: Move handlers to header file
1 parent adf27b5 commit dd031e3

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

src/noui.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include <boost/signals2/connection.hpp>
1616

17-
static bool noui_ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style)
17+
bool noui_ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style)
1818
{
1919
bool fSecure = style & CClientUIInterface::SECURE;
2020
style &= ~CClientUIInterface::SECURE;
@@ -41,19 +41,18 @@ static bool noui_ThreadSafeMessageBox(const std::string& message, const std::str
4141
return false;
4242
}
4343

44-
static bool noui_ThreadSafeQuestion(const std::string& /* ignored interactive message */, const std::string& message, const std::string& caption, unsigned int style)
44+
bool noui_ThreadSafeQuestion(const std::string& /* ignored interactive message */, const std::string& message, const std::string& caption, unsigned int style)
4545
{
4646
return noui_ThreadSafeMessageBox(message, caption, style);
4747
}
4848

49-
static void noui_InitMessage(const std::string& message)
49+
void noui_InitMessage(const std::string& message)
5050
{
5151
LogPrintf("init message: %s\n", message);
5252
}
5353

5454
void noui_connect()
5555
{
56-
// Connect bitcoind signal handlers
5756
uiInterface.ThreadSafeMessageBox_connect(noui_ThreadSafeMessageBox);
5857
uiInterface.ThreadSafeQuestion_connect(noui_ThreadSafeQuestion);
5958
uiInterface.InitMessage_connect(noui_InitMessage);

src/noui.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
#ifndef BITCOIN_NOUI_H
66
#define BITCOIN_NOUI_H
77

8-
extern void noui_connect();
8+
#include <string>
9+
10+
/** Non-GUI handler, which logs and prints messages. */
11+
bool noui_ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style);
12+
/** Non-GUI handler, which logs and prints questions. */
13+
bool noui_ThreadSafeQuestion(const std::string& /* ignored interactive message */, const std::string& message, const std::string& caption, unsigned int style);
14+
/** Non-GUI handler, which only logs a message. */
15+
void noui_InitMessage(const std::string& message);
16+
17+
/** Connect all bitcoind signal handlers */
18+
void noui_connect();
919

1020
#endif // BITCOIN_NOUI_H

0 commit comments

Comments
 (0)