-class ADMIN;
-
-class SERVICES {
-public:
- virtual ~SERVICES() {}
- virtual int Add(const SERVICE_CONF & service, const ADMIN * admin) = 0;
- virtual int Del(const std::string & name, const ADMIN * admin) = 0;
- virtual int Change(const SERVICE_CONF & service, const ADMIN * admin) = 0;
- virtual bool Find(const std::string & name, SERVICE_CONF * service) = 0;
- virtual bool Exists(const std::string & name) const = 0;
- virtual const std::string & GetStrError() const = 0;
+namespace STG
+{
+
+class Admin;
+struct ServiceConf;
+struct ServiceConfOpt;
+
+struct Services {
+ virtual ~Services() = default;
+
+ virtual int Add(const ServiceConf& service, const Admin* admin) = 0;
+ virtual int Del(const std::string& name, const Admin* admin) = 0;
+ virtual int Change(const ServiceConf& service, const Admin* admin) = 0;
+ virtual bool Find(const std::string& name, ServiceConf* service) const = 0;
+ virtual bool Find(const std::string& name, ServiceConfOpt* service) const = 0;
+ virtual bool Exists(const std::string& name) const = 0;
+ virtual const std::string& GetStrError() const = 0;