1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_
6 #define CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_
11 #include "base/command_line.h"
12 #include "base/strings/string16.h"
13 #include "cloud_print/resources.h"
19 class ServiceController {
28 DECLARE_REGISTRY_APPID_RESOURCEID(IDR_CLOUDPRINTSERVICE,
29 "{8013FB7C-2E3E-4992-B8BD-05C0C4AB0627}")
34 // Installs temporarily service to check pre-requirements.
35 HRESULT InstallCheckService(const string16& user,
36 const string16& password,
37 const base::FilePath& user_data_dir);
39 // Installs real service that will run connector.
40 HRESULT InstallConnectorService(const string16& user,
41 const string16& password,
42 const base::FilePath& user_data_dir,
45 HRESULT UninstallService();
47 HRESULT StartService();
48 HRESULT StopService();
50 HRESULT UpdateBinaryPath();
52 // Query service status and options. Results accessible with getters below.
54 State state() const { return state_; }
55 const string16& user() const { return user_; }
56 bool is_logging_enabled() const;
58 base::FilePath GetBinary() const;
61 HRESULT InstallService(const string16& user,
62 const string16& password,
64 const std::string& run_switch,
65 const base::FilePath& user_data_dir,
71 bool is_logging_enabled_;
72 CommandLine command_line_;
75 #endif // CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_