]> git.sesse.net Git - casparcg/blobdiff - shell/server.h
2.1.0: changed "const_array" and "mutable_array" into generic "array" with const...
[casparcg] / shell / server.h
index 9ee3a7f12ff51eccac385241cbe3ac8539f3fe2c..9e93dbc6c7f9585cf056d663092fe5d1bf7970f2 100644 (file)
 * Author: Robert Nagy, ronag89@gmail.com\r
 */\r
 \r
-\r
 #pragma once\r
 \r
-#include <common/memory/safe_ptr.h>\r
+#include <common/spl/memory.h>\r
+\r
+#include <core/monitor/monitor.h>\r
 \r
 #include <boost/noncopyable.hpp>\r
 \r
@@ -34,14 +35,20 @@ namespace core {
        class video_channel;\r
 }\r
 \r
-class server : boost::noncopyable\r
+class server sealed : public monitor::observable\r
+                                       , boost::noncopyable\r
 {\r
 public:\r
        server();\r
-       const std::vector<safe_ptr<core::video_channel>> get_channels() const;\r
+       const std::vector<spl::shared_ptr<core::video_channel>> channels() const;\r
+\r
+       // monitor::observable\r
+\r
+       virtual void subscribe(const monitor::observable::observer_ptr& o) override;\r
+       virtual void unsubscribe(const monitor::observable::observer_ptr& o) override;\r
 private:\r
-       struct implementation;\r
-       safe_ptr<implementation> impl_;\r
+       struct impl;\r
+       spl::shared_ptr<impl> impl_;\r
 };\r
 \r
 }
\ No newline at end of file