Lines Matching refs:Service
17 #include "apmanager/service.h"
44 const char Service::kHostapdPath[] = "/usr/sbin/hostapd";
45 const char Service::kHostapdConfigPathFormat[] =
47 const char Service::kHostapdControlInterfacePath[] =
50 const char Service::kHostapdPath[] = "/system/bin/hostapd";
51 const char Service::kHostapdConfigPathFormat[] =
53 const char Service::kHostapdControlInterfacePath[] =
58 const int Service::kAPInterfaceCheckIntervalMilliseconds = 200;
59 const int Service::kAPInterfaceCheckMaxAttempts = 5;
62 const int Service::kTerminationTimeoutSeconds = 2;
64 // static. Service state definitions.
65 const char Service::kStateIdle[] = "Idle";
66 const char Service::kStateStarting[] = "Starting";
67 const char Service::kStateStarted[] = "Started";
68 const char Service::kStateFailed[] = "Failed";
70 Service::Service(Manager* manager, int service_identifier)
90 Service::~Service() {
97 bool Service::StartInternal(Error* error) {
100 error, Error::kInternalError, "Service already running", FROM_HERE);
124 // Claim the device needed for this ap service.
128 "Failed to claim the device for this service",
137 // Release the device claimed for this service.
161 new HostapdMonitor(base::Bind(&Service::HostapdEventCallback,
168 // Update service state.
174 void Service::Start(const base::Callback<void(const Error&)>& result_callback) {
199 base::Bind(&Service::APInterfaceCheckTask,
208 bool Service::Stop(Error* error) {
212 "Service is not currently running", FROM_HERE);
222 void Service::HandleStartFailure() {
231 void Service::APInterfaceCheckTask(
260 base::Bind(&Service::APInterfaceCheckTask,
269 bool Service::IsHostapdRunning() {
274 bool Service::StartHostapdProcess(const string& config_file_path) {
285 void Service::StopHostapdProcess() {
292 void Service::ReleaseResources() {
308 void Service::HostapdEventCallback(HostapdMonitor::Event event,