WPILibC++  unspecified
IConnectionNotifier.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #ifndef NTCORE_ICONNECTIONNOTIFIER_H_
9 #define NTCORE_ICONNECTIONNOTIFIER_H_
10 
11 #include <climits>
12 
13 #include "ntcore_cpp.h"
14 
15 namespace nt {
16 
18  public:
19  IConnectionNotifier() = default;
21  IConnectionNotifier& operator=(const IConnectionNotifier&) = delete;
22  virtual ~IConnectionNotifier() = default;
23  virtual unsigned int Add(
24  std::function<void(const ConnectionNotification& event)> callback) = 0;
25  virtual unsigned int AddPolled(unsigned int poller_uid) = 0;
26  virtual void NotifyConnection(bool connected, const ConnectionInfo& conn_info,
27  unsigned int only_listener = UINT_MAX) = 0;
28 };
29 
30 } // namespace nt
31 
32 #endif // NTCORE_ICONNECTIONNOTIFIER_H_
NetworkTables Connection Information.
Definition: ntcore_cpp.h:62
Definition: IConnectionNotifier.h:17
Definition: IStorage.h:21
NetworkTables Connection Notification.
Definition: ntcore_cpp.h:212