Move service event types into service-constants.h
authorDavin McCall <davmac@davmac.org>
Wed, 30 Dec 2015 00:08:39 +0000 (00:08 +0000)
committerDavin McCall <davmac@davmac.org>
Wed, 30 Dec 2015 00:08:39 +0000 (00:08 +0000)
service-constants.h
service-listener.h

index e0b8a9021cb7ac36d3210455cd43dc273b138a32..083610684533001f6bd3a3c7643b62532fe7ecea 100644 (file)
@@ -9,8 +9,6 @@ enum class ServiceState {
     STOPPING    // service script is stopping and will stop.
 };
 
-
-
 /* Service types */
 enum class ServiceType {
     DUMMY,      // dummy service, used to detect cyclice dependencies
@@ -21,4 +19,14 @@ enum class ServiceType {
     INTERNAL    // internal service, runs no external process
 };
 
+/* Service events */
+enum class ServiceEvent {
+    STARTED,           // Service was started (reached STARTED state)
+    STOPPED,           // Service was stopped (reached STOPPED state)
+    FAILEDSTART,       // Service failed to start (possibly due to dependency failing)
+    STARTCANCELLED,    // Service was set to be started but a stop was requested
+    STOPCANCELLED      // Service was set to be stopped but a start was requested
+};
+
+
 #endif
index b44360205c9f55820fbe66b4a1861024da4779f3..82fc3546c959519b3e4943abe71faa7715c8eb06 100644 (file)
@@ -1,15 +1,9 @@
 #ifndef SERVICE_LISTENER_H
 #define SERVICE_LISTENER_H
 
-class ServiceRecord;
+#include <service-constants.h>
 
-enum class ServiceEvent {
-    STARTED,           // Service was started (reached STARTED state)
-    STOPPED,           // Service was stopped (reached STOPPED state)
-    FAILEDSTART,       // Service failed to start (possibly due to dependency failing)
-    STARTCANCELLED,    // Service was set to be started but a stop was requested
-    STOPCANCELLED      // Service was set to be stopped but a start was requested
-};
+class ServiceRecord;
 
 // Interface for listening to services
 class ServiceListener