X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fserver.h;h=398401a555dd1eff784ad1d2289677e5258660f2;hb=fea861d24d1d4ccd67c35101ae20488f5c50d650;hp=32ba8dc4b96757fe0d3938317e2fe1c0c9abff2b;hpb=c0ed407fb02891f0dd364e78b6192f0e6dbe1d8d;p=dcpomatic.git diff --git a/src/lib/server.h b/src/lib/server.h index 32ba8dc4b..398401a55 100644 --- a/src/lib/server.h +++ b/src/lib/server.h @@ -26,10 +26,15 @@ #include #include #include +#include #include "log.h" class Socket; +namespace cxml { + class Node; +} + /** @class ServerDescription * @brief Class to describe a server to which we can send encoding work. */ @@ -44,6 +49,8 @@ public: , _threads (t) {} + ServerDescription (boost::shared_ptr); + /** @return server's host name or IP address in string form */ std::string host_name () const { return _host_name; @@ -62,7 +69,7 @@ public: _threads = t; } - std::string as_metadata () const; + void as_xml (xmlpp::Node *) const; static ServerDescription * create_from_metadata (std::string v); @@ -76,7 +83,7 @@ private: class Server { public: - Server (Log* log); + Server (boost::shared_ptr log); void run (int num_threads); @@ -88,5 +95,5 @@ private: std::list > _queue; boost::mutex _worker_mutex; boost::condition _worker_condition; - Log* _log; + boost::shared_ptr _log; };