File: Poco.Util.WinService.html

package info (click to toggle)
poco-doc 1.3.6-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 10,076 kB
  • ctags: 9,611
  • sloc: makefile: 31
file content (138 lines) | stat: -rw-r--r-- 7,857 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::Util::WinService</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.Util.html" class="namespace">Poco::Util</a></h1>
<h1 class="symbol">class WinService</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Util<br />
<b>Package:</b> Windows<br />
<b>Header:</b> Poco/Util/WinService.h</p>
<h2>Description</h2>
<div class="description">
<p>This class provides an object-oriented interface to the Windows Service Control Manager for registering, unregistering, configuring, starting and stopping services. </p>
<p>This class is only available on Windows platforms. </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Util.WinService.html#17409" title="Poco::Util::WinService::displayName()">displayName</a>, <a href="Poco.Util.WinService.html#17423" title="Poco::Util::WinService::getStartup()">getStartup</a>, <a href="Poco.Util.WinService.html#17417" title="Poco::Util::WinService::isRegistered()">isRegistered</a>, <a href="Poco.Util.WinService.html#17418" title="Poco::Util::WinService::isRunning()">isRunning</a>, <a href="Poco.Util.WinService.html#17408" title="Poco::Util::WinService::name()">name</a>, <a href="Poco.Util.WinService.html#17410" title="Poco::Util::WinService::path()">path</a>, <a href="Poco.Util.WinService.html#17411" title="Poco::Util::WinService::registerService()">registerService</a>, <a href="Poco.Util.WinService.html#17421" title="Poco::Util::WinService::setStartup()">setStartup</a>, <a href="Poco.Util.WinService.html#17419" title="Poco::Util::WinService::start()">start</a>, <a href="Poco.Util.WinService.html#17420" title="Poco::Util::WinService::stop()">stop</a>, <a href="Poco.Util.WinService.html#17416" title="Poco::Util::WinService::unregisterService()">unregisterService</a></p>
<h2>Enumerations</h2>
<h3><a name="17401">Startup</a></h3>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="17402">SVC_AUTO_START</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="17403">SVC_MANUAL_START</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="17404">SVC_DISABLED</a></p>
<div class="description">
<p></p>
</div>
<h2>Constructors</h2>
<h3><a name="17405">WinService</a></h3>
<p class="decl"><a href="Poco.Util.WinService.html" title="class Poco::Util::WinService">WinService</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; name<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Util.WinService.html" title="class Poco::Util::WinService">WinService</a>, using the given service name. </p>
</div>
<h2>Destructor</h2>
<h3><a name="17407">~WinService</a></h3>
<p class="decl">~<a href="Poco.Util.WinService.html" title="class Poco::Util::WinService">WinService</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Util.WinService.html" title="class Poco::Util::WinService">WinService</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="17409">displayName</a></h3>
<p class="decl">std::string displayName() const;</p>
<div class="description">
<p>Returns the service's display name. </p>
</div>
<h3><a name="17423">getStartup</a></h3>
<p class="decl"><a href="Poco.Util.WinService.html#17401" title="enum  Poco::Util::WinService::Startup">Startup</a> getStartup() const;</p>
<div class="description">
<p>Returns the startup mode for the service. </p>
</div>
<h3><a name="17417">isRegistered</a></h3>
<p class="decl">bool isRegistered() const;</p>
<div class="description">
<p>Returns true if the service has been registered with the Service Control Manager. </p>
</div>
<h3><a name="17418">isRunning</a></h3>
<p class="decl">bool isRunning() const;</p>
<div class="description">
<p>Returns true if the service is currently running. </p>
</div>
<h3><a name="17408">name</a></h3>
<p class="decl">const std::string &amp; name() const;</p>
<div class="description">
<p>Returns the service name. </p>
</div>
<h3><a name="17410">path</a></h3>
<p class="decl">std::string path() const;</p>
<div class="description">
<p>Returns the path to the service executable.  </p>
<p>Throws a <a href="Poco.NotFoundException.html" title="class Poco::NotFoundException">NotFoundException</a> if the service has not been registered. </p>
</div>
<h3><a name="17411">registerService</a></h3>
<p class="decl">void registerService(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; path,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; displayName<br />);</p>
<div class="description">
<p>Creates a Windows service with the executable specified by path and the given displayName. </p>
<p>Throws a <a href="Poco.ExistsException.html" title="class Poco::ExistsException">ExistsException</a> if the service has already been registered. </p>
</div>
<h3><a name="17414">registerService</a></h3>
<p class="decl">void registerService(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; path<br />);</p>
<div class="description">
<p>Creates a Windows service with the executable specified by path and the given displayName. The service name is used as display name. </p>
<p>Throws a <a href="Poco.ExistsException.html" title="class Poco::ExistsException">ExistsException</a> if the service has already been registered. </p>
</div>
<h3><a name="17421">setStartup</a></h3>
<p class="decl">void setStartup(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Util.WinService.html#17401" title="enum  Poco::Util::WinService::Startup">Startup</a> startup<br />);</p>
<div class="description">
<p>Sets the startup mode for the service. </p>
</div>
<h3><a name="17419">start</a></h3>
<p class="decl">void start();</p>
<div class="description">
<p>Starts the service. Does nothing if the service is already running. </p>
<p>Throws a <a href="Poco.NotFoundException.html" title="class Poco::NotFoundException">NotFoundException</a> if the service has not been registered. </p>
</div>
<h3><a name="17420">stop</a></h3>
<p class="decl">void stop();</p>
<div class="description">
<p>Stops the service. Does nothing if the service is not running. </p>
<p>Throws a <a href="Poco.NotFoundException.html" title="class Poco::NotFoundException">NotFoundException</a> if the service has not been registered. </p>
</div>
<h3><a name="17416">unregisterService</a></h3>
<p class="decl">void unregisterService();</p>
<div class="description">
<p>Deletes the Windows service.  </p>
<p>Throws a <a href="Poco.NotFoundException.html" title="class Poco::NotFoundException">NotFoundException</a> if the service has not been registered. </p>
</div>
<h2>Variables</h2>
<h3><a name="17424">STARTUP_TIMEOUT</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const int <a href="Poco.Util.WinService.html#17424" title="Poco::Util::WinService::STARTUP_TIMEOUT">STARTUP_TIMEOUT</a>;</p>
<div class="description">
<p></p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>