8 #ifndef CSCORE_NOTIFIER_H_ 9 #define CSCORE_NOTIFIER_H_ 13 #include <support/SafeThread.h> 15 #include "cscore_cpp.h" 23 friend class NotifierTest;
35 static bool destroyed() {
return s_destroyed; }
37 void SetOnStart(std::function<
void()> on_start) { m_on_start = on_start; }
38 void SetOnExit(std::function<
void()> on_exit) { m_on_exit = on_exit; }
40 int AddListener(std::function<
void(
const RawEvent& event)> callback,
42 void RemoveListener(
int uid);
45 void NotifySource(
llvm::StringRef name, CS_Source source, CS_EventKind kind);
46 void NotifySource(
const SourceImpl& source, CS_EventKind kind);
48 void NotifySourceProperty(
const SourceImpl& source, CS_EventKind kind,
50 CS_PropertyKind propertyKind,
int value,
53 void NotifySink(
const SinkImpl& sink, CS_EventKind kind);
56 void NotifyNetworkInterfacesChanged();
64 std::function<void()> m_on_start;
65 std::function<void()> m_on_exit;
66 static bool s_destroyed;
71 #endif // CSCORE_NOTIFIER_H_ Definition: SinkImpl.h:19
Definition: SinkImpl.h:23
Listener event.
Definition: cscore_cpp.h:71
Definition: SourceImpl.h:30
Definition: Notifier.h:22
Definition: Notifier.cpp:66
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:42
Video mode.
Definition: cscore_cpp.h:46