Use enum for perform_update() return code. Made function protected
[bpdyndnsd] / src / service.hpp
index 5037883..82b765b 100644 (file)
@@ -61,6 +61,11 @@ private:
 
     Logger::Ptr Log;
 
+protected:
+
+    enum UpdateErrorCode { UpdateOk=0, GenericError=1, NoChange=2, Blocked=3 };
+    virtual UpdateErrorCode perform_update(const std::string& ip) = 0;
+
 public:
 
     typedef boost::shared_ptr<Service> Ptr;
@@ -69,8 +74,6 @@ public:
 
     virtual ~Service();
 
-    virtual int perform_update(const std::string& ip) = 0;
-
     void update(const std::string& ip, const time_t current_time, bool changed_to_online);
 
     bool update_allowed(const time_t current_time, bool changed_to_online, const std::string& ip_host);