Various bits mostly related to colour conversions.
[dcpomatic.git] / src / lib / server.h
index e6d3743691e09cc2b3054300e8683031b5534ea1..56a1fdab9f20d133f9436c0c028015a8e13a4339 100644 (file)
@@ -17,6 +17,9 @@
 
 */
 
+#ifndef DCPOMATIC_SERVER_H
+#define DCPOMATIC_SERVER_H
+
 /** @file src/server.h
  *  @brief Class to describe a server to which we can send
  *  encoding work, and a class to implement such a server.
@@ -41,6 +44,11 @@ namespace cxml {
 class ServerDescription
 {
 public:
+       ServerDescription ()
+               : _host_name ("")
+               , _threads (1)
+       {}
+       
        /** @param h Server host name or IP address in string form.
         *  @param t Number of threads to use on the server.
         */
@@ -73,7 +81,7 @@ public:
 
        void as_xml (xmlpp::Node *) const;
        
-       static ServerDescription * create_from_metadata (std::string v);
+       static boost::optional<ServerDescription> create_from_metadata (std::string);
 
 private:
        /** server's host name */
@@ -99,3 +107,5 @@ private:
        boost::condition _worker_condition;
        boost::shared_ptr<Log> _log;
 };
+
+#endif