the service control command line: install, start, stop, remove and run in the console, on a dx::service::manager of its own. Its settings live under HKLM\SOFTWARE\<id>, writable where the process is elevated
More...
#include <dx_service.h>
|
| typedef std::deque< std::string > | args |
|
| void | close () noexcept |
| void | initialize (const std::string &id="", const ::DWORD(&access)[2]={SC_MANAGER_ALL_ACCESS, SERVICE_ALL_ACCESS}, const std::string desc="", const std::string &path="") |
| void | install (const std::string &name) |
| void | open () |
| | operator std::unique_ptr<::QUERY_SERVICE_CONFIGA > () |
| | operator std::unique_ptr<::SERVICE_DESCRIPTION > () |
| | operator::SERVICE_STATUS_PROCESS () |
| virtual void | operator<< (argsargs &argsargs) |
| virtual void | operator<< (const argsargs &argsargs) |
| | parser (const std::string &id, const char *name, const decltype(dictionary)&dictionary, const std::string &path={}) |
| | parser (const std::string &id, const char *name, const std::string &desc, const std::string &path) |
| | parser (const std::string &id, const char *name, const std::string &desc={}, const decltype(dictionary)&dictionary={}, const std::string &path={}) |
| virtual void | quiet (const args &={}) noexcept |
| void | remove () |
| void | stop () |
| dx::service::manager::enumerate promoted | this (::DWORD value) |
| dx::service::manager::status promoted | this (promoted::lock_t &&lock, const ::DWORD &value, const ::DWORD &) |
the service control command line: install, start, stop, remove and run in the console, on a dx::service::manager of its own. Its settings live under HKLM\SOFTWARE\<id>, writable where the process is elevated
◆ args
◆ parser() [1/3]
| dx::service::parser::parser |
( |
const std::string & | id, |
|
|
const char * | name, |
|
|
const std::string & | desc = {}, |
|
|
const decltype(dictionary)& | dictionary = {}, |
|
|
const std::string & | path = {} ) |
|
inline |
◆ parser() [2/3]
| dx::service::parser::parser |
( |
const std::string & | id, |
|
|
const char * | name, |
|
|
const decltype(dictionary)& | dictionary, |
|
|
const std::string & | path = {} ) |
|
inline |
◆ parser() [3/3]
| dx::service::parser::parser |
( |
const std::string & | id, |
|
|
const char * | name, |
|
|
const std::string & | desc, |
|
|
const std::string & | path ) |
|
inline |
◆ arg()
| virtual void dx::service::parser::arg |
( |
args & | args | ) |
|
|
inlineprotectedvirtual |
◆ close()
| void dx::service::manager::close |
( |
| ) |
|
|
inlinenoexceptinherited |
◆ head()
| bool dx::service::parser::head |
( |
| ) |
const |
|
inlineoverrideprotectedvirtualnoexcept |
◆ help()
| virtual void dx::parser::help |
( |
args & | args | ) |
|
|
inlineprotectedvirtualinherited |
◆ help_head()
| virtual void dx::parser::help_head |
( |
| ) |
const |
|
inlineprotectedvirtualnoexceptinherited |
◆ indent()
| virtual void dx::parser::indent |
( |
args & | args | ) |
|
|
inlineprotectedvirtualinherited |
◆ info()
| virtual void dx::service::parser::info |
( |
args & | | ) |
|
|
inlineprotectedvirtual |
◆ initialize()
| void dx::service::manager::initialize |
( |
const std::string & | id = "", |
|
|
const ::DWORD(&) | access[2] = {SC_MANAGER_ALL_ACCESS, SERVICE_ALL_ACCESS}, |
|
|
const std::string | desc = "", |
|
|
const std::string & | path = "" ) |
|
inlineinherited |
◆ install() [1/2]
| void dx::service::manager::install |
( |
const std::string & | name | ) |
|
|
inlineinherited |
◆ install() [2/2]
| virtual void dx::service::parser::install |
( |
args & | args | ) |
|
|
inlineprotectedvirtual |
◆ kill()
| virtual void dx::service::parser::kill |
( |
args & | | ) |
|
|
inlineprotectedvirtual |
◆ load()
| virtual void dx::service::parser::load |
( |
args & | args | ) |
|
|
inlineprotectedvirtual |
◆ no_args()
| virtual void dx::parser::no_args |
( |
const args & | args | ) |
|
|
inlineprotectedvirtualinherited |
◆ open()
| void dx::service::manager::open |
( |
| ) |
|
|
inlineinherited |
◆ operator std::unique_ptr<::QUERY_SERVICE_CONFIGA >()
| dx::service::manager::operator std::unique_ptr<::QUERY_SERVICE_CONFIGA > |
( |
| ) |
|
|
inlineinherited |
◆ operator std::unique_ptr<::SERVICE_DESCRIPTION >()
| dx::service::manager::operator std::unique_ptr<::SERVICE_DESCRIPTION > |
( |
| ) |
|
|
inlineinherited |
◆ operator::SERVICE_STATUS_PROCESS()
| dx::service::manager::operator::SERVICE_STATUS_PROCESS |
( |
| ) |
|
|
inlineinherited |
◆ operator<<() [1/2]
| virtual void dx::parser::operator<< |
( |
args & | args | ) |
|
|
inlinevirtualinherited |
◆ operator<<() [2/2]
| virtual void dx::parser::operator<< |
( |
const args & | args | ) |
|
|
inlinevirtualinherited |
◆ quiet()
| virtual void dx::parser::quiet |
( |
const args & | = {} | ) |
|
|
inlinevirtualnoexceptinherited |
◆ remove() [1/2]
| void dx::service::manager::remove |
( |
| ) |
|
|
inlineinherited |
◆ remove() [2/2]
| virtual void dx::service::parser::remove |
( |
args & | | ) |
|
|
inlineprotectedvirtual |
◆ run()
| virtual void dx::service::parser::run |
( |
args & | | ) |
|
|
inlineprotectedvirtual |
◆ select()
| auto dx::parser::select |
( |
const std::string & | id | ) |
|
|
inlineprotectedinherited |
◆ start()
| virtual void dx::service::parser::start |
( |
args & | args | ) |
|
|
inlineprotectedvirtual |
◆ stop() [1/2]
| void dx::service::manager::stop |
( |
| ) |
|
|
inlineinherited |
◆ stop() [2/2]
| virtual void dx::service::parser::stop |
( |
args & | | ) |
|
|
inlineprotectedvirtual |
◆ this() [1/2]
◆ this() [2/2]
◆ version()
| virtual void dx::parser::version |
( |
const args & | args = {} | ) |
|
|
inlineprotectedvirtualinherited |
◆ access
| ::DWORD dx::service::manager::access {} |
|
protectedinherited |
◆ desc
| std::string dx::service::manager::desc |
|
protectedinherited |
◆ dictionary
| std::map<std::deque<std::string>, dispatch> dx::parser::dictionary |
|
protectedinherited |
Initial value:{
{{"--continue", "--no-error", "--ignore", "--ignore-error"},
{{
"--indent",
"--tab"}, {std::bind(&
parser::indent,
this, std::placeholders::_1),
"set/get indention width and pattern",
"[width [pattern]]", {},{
{{
"err",
"stderr"}, {[
this](
args&){this->
parameter.log.err=
true;},
"select std error"}},
{{
"log",
"stdlog"}, {[
this](
args&){this->
parameter.log.log=
true;},
"select std log"}},
{{
"out",
"stdout"}, {[
this](
args&){this->
parameter.log.out=
true;},
"select std out"}},
}}},
{{
"--quiet",
"-q"}, {std::bind(&
parser::quiet,
this, std::placeholders::_1),
"quiet!"}},
{{
"--version",
"-v"}, {std::bind(&
parser::version,
this, std::placeholders::_1), std::string{
"display "}+
name+
" version"}},
}
virtual void indent(args &args)
Definition dx_parser.h:235
virtual void no_args(const args &args)
Definition dx_parser.h:228
const char * name
Definition dx_parser.h:64
std::deque< std::string > args
Definition dx_parser.h:60
struct dx::parser::@046247176025362246310022157273031025265032273157 parameter
virtual void version(const args &args={})
Definition dx_parser.h:261
virtual void quiet(const args &={}) noexcept
Definition dx_parser.h:298
◆ handle
| ::SC_HANDLE dx::service::manager::handle {} |
|
protectedinherited |
◆ id
| std::string dx::service::manager::id |
|
protectedinherited |
◆ name
| const char* dx::parser::name {} |
|
protectedinherited |
◆ parameter
| struct { ... } dx::parser::parameter |
◆ path
| std::string dx::service::manager::path |
|
protectedinherited |
◆ preference
| preference dx::service::parser::preference {std::string{"SOFTWARE\\"}+ id, HKEY_LOCAL_MACHINE, static_cast<::REGSAM>(process::admin()? KEY_ALL_ACCESS: KEY_READ)} |
|
protected |
◆ service
| ::SC_HANDLE dx::service::manager::service {} |
|
protectedinherited |
◆ this [1/2]
Initial value:{[this](::DWORD value){
switch(value){
case SERVICE_NOTIFY_DELETE_PENDING:
break;
}}}}
void close() noexcept
Definition dx_service.h:380
◆ this [2/2]
The documentation for this class was generated from the following file: