| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_ | 5 #ifndef CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_ |
| 6 #define CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_ | 6 #define CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/command_line.h" |
| 11 #include "base/string16.h" | 12 #include "base/string16.h" |
| 12 #include "cloud_print/resources.h" | 13 #include "cloud_print/resources.h" |
| 13 | 14 |
| 14 namespace base { | 15 namespace base { |
| 15 class FilePath; | 16 class FilePath; |
| 16 } // base | 17 } // base |
| 17 | 18 |
| 18 class ServiceController { | 19 class ServiceController { |
| 19 public: | 20 public: |
| 20 enum State { | 21 enum State { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 39 HRESULT InstallConnectorService(const string16& user, | 40 HRESULT InstallConnectorService(const string16& user, |
| 40 const string16& password, | 41 const string16& password, |
| 41 const base::FilePath& user_data_dir, | 42 const base::FilePath& user_data_dir, |
| 42 bool enable_logging); | 43 bool enable_logging); |
| 43 | 44 |
| 44 HRESULT UninstallService(); | 45 HRESULT UninstallService(); |
| 45 | 46 |
| 46 HRESULT StartService(); | 47 HRESULT StartService(); |
| 47 HRESULT StopService(); | 48 HRESULT StopService(); |
| 48 | 49 |
| 50 HRESULT UpdateBinaryPath(); |
| 51 |
| 49 // Query service status and options. Results accessible with getters below. | 52 // Query service status and options. Results accessible with getters below. |
| 50 void UpdateState(); | 53 void UpdateState(); |
| 51 State state() const { return state_; } | 54 State state() const { return state_; } |
| 52 const string16& user() const { return user_; } | 55 const string16& user() const { return user_; } |
| 53 bool is_logging_enabled() const { return is_logging_enabled_; } | 56 bool is_logging_enabled() const; |
| 57 |
| 58 base::FilePath GetBinary() const; |
| 54 | 59 |
| 55 private: | 60 private: |
| 56 HRESULT InstallService(const string16& user, | 61 HRESULT InstallService(const string16& user, |
| 57 const string16& password, | 62 const string16& password, |
| 58 bool auto_start, | 63 bool auto_start, |
| 59 const std::string& run_switch, | 64 const std::string& run_switch, |
| 60 const base::FilePath& user_data_dir, | 65 const base::FilePath& user_data_dir, |
| 61 bool enable_logging); | 66 bool enable_logging); |
| 62 | 67 |
| 63 const string16 name_; | 68 const string16 name_; |
| 64 State state_; | 69 State state_; |
| 65 string16 user_; | 70 string16 user_; |
| 66 bool is_logging_enabled_; | 71 bool is_logging_enabled_; |
| 72 CommandLine command_line_; |
| 67 }; | 73 }; |
| 68 | 74 |
| 69 #endif // CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_ | 75 #endif // CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_ |
| 70 | 76 |
| OLD | NEW |