dxd - dynax driver framework 2.7.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::service::app Class Reference

service::app - Windows Service Windows services are essentially just a type of container for which startup conditions can be defined. The service interface does not support any additional communication. Communication between client and service are usually be implemented using Windows named pipes. More...

#include <dx_service.h>

Inheritance diagram for dx::service::app:
Collaboration diagram for dx::service::app:

Public Member Functions

virtual void info (std::ostream &os) noexcept
 log object class information
bool try_conclude () noexcept
 atomically conclude()s if currently launched; returns whether this call did it
bool try_launch ()
 atomically launch()es if not already launched; returns whether this call did it

Public Attributes

std::atomic< bool > launched {}

Protected Member Functions

virtual void conclude () noexcept
 conclude notification: object will be removed. If you overwrite conclude() you also need to overwrite destructor and check if its needed to be called from there. Called only through try_conclude() - never call this directly from outside the class hierarchy.
 dx_catchall () static void __stdcall __ctrl(
void exception (const dx::exception &exception, bool filtered=false) const noexcept override
 notification exception handler
void launch () override
 launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.
virtual void run (const parser::args &)

Static Protected Member Functions

static void __stdcall __main (::DWORD argc, char **argv) noexcept
static void abort (int) noexcept

Protected Attributes

::SERVICE_STATUS_HANDLE handle {}
std::string id

Static Protected Attributes

static appself

Detailed Description

service::app - Windows Service Windows services are essentially just a type of container for which startup conditions can be defined. The service interface does not support any additional communication. Communication between client and service are usually be implemented using Windows named pipes.

Now the service itself implements a dx::service::app. The dx::service::manager controls the installation, starting, stopping, etc. of the service. This can be part of service executable and i.e. controlled via cmd line parameters or seperate application. dx::service::parser therefor provide standard cmd line parameters to control the service.

Member Function Documentation

◆ __main()

void __stdcall dx::service::app::__main ( ::DWORD argc,
char ** argv )
inlinestaticprotectednoexcept
Here is the caller graph for this function:

◆ abort()

void dx::service::app::abort ( int )
inlinestaticprotectednoexcept
Here is the caller graph for this function:

◆ conclude()

◆ dx_catchall()

dx::service::app::dx_catchall ( )
inlineprotected

◆ exception()

void dx::service::app::exception ( const dx::exception & exception,
bool filtered = false ) const
inlineoverrideprotectedvirtualnoexcept

notification exception handler

Implements dx::object.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ info()

virtual void dx::object::info ( std::ostream & os)
inlinevirtualnoexceptinherited

log object class information

Reimplemented in dx::asio::client::_device< desc, preference, stream< device< desc, preference, stream > > >, dx::asio::client::driver< device_t, devices >, dx::asio::service::device< super_device_t >, dx::coreaudio::_device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream > > >, dx::coreaudio::_device< dx::virtuel::stream::desc, cf::preference, stream< device< dx::virtuel::stream::desc, cf::preference, stream > > >, dx::coreaudio::stream::device< desc_t, preference_t, stream_t >, dx::coremidi::_device< desc, cf::preference, stream< device< desc, cf::preference, stream > > >, dx::device< id_t, preference_t >, dx::device< dx::guid, preference >, dx::device< std::string, dx::preference >, dx::device< std::string, preference >, dx::device< std::string, preference_t >, dx::device<::AudioObjectID, cf::preference >, dx::device<::io_service_t, dx::preference >, dx::device<::io_service_t, preference_t >, dx::device<::MIDIDeviceRef, cf::preference >, dx::device<>, dx::map::driver< _device_t >, dx::map::driver< device<> >, dx::map::driver< device_t >, dx::proxy::device< preference_t >, dx::proxy::device< dx::preference >, dx::proxy::stream::_device< dx::stream::desc<>, dx::preference, stream< device< dx::stream::desc<>, dx::preference, stream > > >, dx::service::device< preference_t >, dx::service::device< dx::preference >, dx::service::device< super_device_t >, dx::stream::control< dx::device< dx::guid, preference > >, dx::stream::control< dx::device< std::string, dx::preference > >, dx::stream::control< dx::device< std::string, preference > >, dx::stream::control< dx::device<::AudioObjectID, cf::preference > >, dx::stream::control< dx::device<::MIDIDeviceRef, cf::preference > >, dx::stream::control< dx::proxy::device< dx::preference > >, dx::stream::control< dx::stream::object< device<> > >, dx::stream::control< dx::stream::object< device_t > >, dx::stream::control< object< device_t > >, dx::stream::control< stream::object< device<> > >, dx::stream::control< stream::object< device_t > >, dx::stream::control< usb::device< dx::preference > >, dx::stream::device< dx::stream::control< dx::device< dx::guid, preference > >, desc, stream< device< desc, preference, stream > > >, dx::stream::device< dx::stream::control< dx::device< std::string, dx::preference > >, desc, dx::stream::shared::stream< device< desc, dx::preference, dx::stream::shared::stream > > >, dx::stream::device< dx::stream::control< dx::device< std::string, preference > >, desc, stream< device< desc, preference, stream > > >, dx::stream::device< dx::stream::control< dx::device<::AudioObjectID, cf::preference > >, dx::virtuel::stream::desc, dx::stream::stream< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream > > >, dx::stream::device< dx::stream::control< dx::device<::AudioObjectID, cf::preference > >, dx::virtuel::stream::desc, stream< device< dx::virtuel::stream::desc, cf::preference, stream > > >, dx::stream::device< dx::stream::control< dx::device<::MIDIDeviceRef, cf::preference > >, desc, stream< device< desc, cf::preference, stream > > >, dx::stream::device< dx::stream::control< dx::proxy::device< dx::preference > >, dx::stream::desc<>, stream< device< dx::stream::desc<>, dx::preference, stream > > >, dx::stream::device< dx::stream::control< usb::device< dx::preference > >, desc_t, pipe< device< desc_t, dx::preference, pipe > > >, dx::stream::driver< dx::map::driver< device_t > >, dx::stream::driver< map::driver< device_t > >, dx::stream::object< _device_t >, dx::stream::object< device<> >, dx::stream::pin< device_t, _circular_t >, dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >, dx::usb::pipe< device_t >, dx::usb::pipe< device_t >, dx::usb::platform::device< preference_t >, dx::usb::platform::device< dx::preference >, dx::usb::platform::device< preference_t >, dx::usb::stream::_device< desc_t, dx::preference, pipe< device< desc_t, dx::preference, pipe > > >, dx::usb::stream::pipe< device_t, circular_t, stream_t >, dx::virtuel::driver< device_t >, and dx::virtuel::stream::_device< desc, dx::preference, dx::stream::shared::stream< device< desc, dx::preference, dx::stream::shared::stream > > >.

Here is the caller graph for this function:

◆ launch()

void dx::service::app::launch ( )
inlineoverrideprotectedvirtual

launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.

Reimplemented from dx::object.

Here is the call graph for this function:

◆ run()

virtual void dx::service::app::run ( const parser::args & )
inlineprotectedvirtual
Here is the call graph for this function:

◆ try_conclude()

bool dx::object::try_conclude ( )
inlinenoexceptinherited

atomically conclude()s if currently launched; returns whether this call did it

Here is the call graph for this function:
Here is the caller graph for this function:

◆ try_launch()

bool dx::object::try_launch ( )
inlineinherited

atomically launch()es if not already launched; returns whether this call did it

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ handle

::SERVICE_STATUS_HANDLE dx::service::app::handle {}
protected

◆ id

std::string dx::service::app::id
protected

◆ launched

std::atomic<bool> dx::object::launched {}
inherited

◆ self

app* dx::service::app::self
staticprotected

The documentation for this class was generated from the following file:

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.