summaryrefslogtreecommitdiffstats
path: root/cloud_print/service/win/service_controller.h
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-12 04:20:38 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-12 04:20:38 +0000
commita9734a2c32754e3f00a0ab9e1e8511288d74f717 (patch)
treeddc8c79cfc944ac20e1ca9bb5493265e2b4c2c4f /cloud_print/service/win/service_controller.h
parentee479cdca22f7c0166ce371af4e432cd21293e90 (diff)
downloadchromium_src-a9734a2c32754e3f00a0ab9e1e8511288d74f717.zip
chromium_src-a9734a2c32754e3f00a0ab9e1e8511288d74f717.tar.gz
chromium_src-a9734a2c32754e3f00a0ab9e1e8511288d74f717.tar.bz2
Exctracted ServiceController.
BUG=0 Review URL: https://chromiumcodereview.appspot.com/12729003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187489 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print/service/win/service_controller.h')
-rw-r--r--cloud_print/service/win/service_controller.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/cloud_print/service/win/service_controller.h b/cloud_print/service/win/service_controller.h
new file mode 100644
index 0000000..4e06059
--- /dev/null
+++ b/cloud_print/service/win/service_controller.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_
+#define CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_
+
+#include <atlbase.h>
+#include <string>
+
+#include "base/string16.h"
+#include "cloud_print/service/win/resource.h"
+
+namespace base {
+class FilePath;
+} // base
+
+class ServiceController {
+ public:
+ DECLARE_REGISTRY_APPID_RESOURCEID(IDR_CLOUDPRINTSERVICE,
+ "{8013FB7C-2E3E-4992-B8BD-05C0C4AB0627}")
+
+ explicit ServiceController(const string16& name);
+ ~ServiceController();
+
+ HRESULT InstallService(const string16& user,
+ const string16& password,
+ const std::string& run_switch,
+ const base::FilePath& user_data_dir);
+
+ HRESULT UninstallService();
+
+ HRESULT StartService();
+ HRESULT StopService();
+
+ private:
+ const string16 name_;
+};
+
+#endif // CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_
+