Lines Matching refs:Service
41 #define SVC_RESTART 0x100 // Use to safely restart (stop, wait, start) a service.
43 #define SVC_EXEC 0x400 // This synthetic service corresponds to an 'exec'.
69 class Service {
71 Service(const std::string& name, const std::string& classname,
74 Service(const std::string& name, const std::string& classname,
104 using OptionHandler = bool (Service::*) (const std::vector<std::string>& args,
151 // keycodes for triggering this service via /dev/keychord
165 void AddService(std::unique_ptr<Service> service);
166 Service* MakeExecOneshotService(const std::vector<std::string>& args);
167 Service* FindServiceByName(const std::string& name) const;
168 Service* FindServiceByPid(pid_t pid) const;
169 Service* FindServiceByKeychord(int keychord_id) const;
170 void ForEachService(std::function<void(Service*)> callback) const;
172 void (*func)(Service* svc)) const;
174 void (*func)(Service* svc)) const;
176 void RemoveService(const Service& svc);
186 static int exec_count_; // Every service needs a unique name.
187 std::vector<std::unique_ptr<Service>> services_;
205 std::unique_ptr<Service> service_;