On server, channel dprint through the readline-device. Also some refactors and quality improvements.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <mutex>
|
||||
#include "drvutil.hpp"
|
||||
|
||||
|
||||
@@ -12,7 +13,7 @@ public:
|
||||
using print_callback = void (*)(const std::u32string &text);
|
||||
|
||||
private:
|
||||
print_callback print_cb_;
|
||||
std::mutex mutex_;
|
||||
std::u32string desired_command_;
|
||||
std::u32string current_command_;
|
||||
std::u32string desired_prompt_;
|
||||
@@ -24,9 +25,6 @@ private:
|
||||
|
||||
|
||||
public:
|
||||
// The callback must be set before using the readline device.
|
||||
void set_print_callback(print_callback cb);
|
||||
|
||||
// change the prompt.
|
||||
void set_prompt(std::string_view prompt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user