mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Add immediate_notify and is_new to entry listener.
On the callback function, is_new indicates the value is newly added. On adding a callback function, immediate_notify indicates the callback should be called once (with is_new=true) for each matching entry that already exists.
This commit is contained in:
@@ -166,13 +166,15 @@ void Flush();
|
||||
*/
|
||||
|
||||
typedef std::function<void(unsigned int uid, StringRef name,
|
||||
std::shared_ptr<Value> value)> EntryListenerCallback;
|
||||
std::shared_ptr<Value> value, bool is_new)>
|
||||
EntryListenerCallback;
|
||||
|
||||
typedef std::function<void(unsigned int uid, int connected,
|
||||
const ConnectionInfo& conn)>
|
||||
ConnectionListenerCallback;
|
||||
|
||||
unsigned int AddEntryListener(StringRef prefix, EntryListenerCallback callback);
|
||||
unsigned int AddEntryListener(StringRef prefix, EntryListenerCallback callback,
|
||||
bool immediate_notify);
|
||||
void RemoveEntryListener(unsigned int entry_listener_uid);
|
||||
unsigned int AddConnectionListener(ConnectionListenerCallback callback);
|
||||
void RemoveConnectionListener(unsigned int conn_listener_uid);
|
||||
|
||||
Reference in New Issue
Block a user