winss
Classes | Typedefs | Enumerations | Functions
winss Namespace Reference

Classes

struct  case_ignore
 A binary function to ignore case when comparing strings. More...
 
class  Control
 Orchestrates control. More...
 
class  ControlItem
 Base class for inbound and outbound control item. More...
 
class  Environment
 Base environment. More...
 
class  EnvironmentDir
 A directory where each file is an environment variable. More...
 
class  EventWrapper
 Wraps a windows event. More...
 
class  FilesystemInterface
 An interface for interacting with the file system. More...
 
class  HandleWrapper
 A wrapper for a Windows HANDLE. More...
 
class  InboundControlItem
 Inbound control item. More...
 
class  InboundControlItemListener
 A listener for inbound control item events. More...
 
class  InboundPipeClientTmpl
 An inbound pipe client. More...
 
class  InboundPipeInstance
 A pipe instance for inbound client/server. More...
 
class  InboundPipeServerTmpl
 An inbound pipe server. More...
 
struct  LogArchiveFile
 An archived log file. More...
 
struct  LogSettings
 Settings for the logger. More...
 
class  LogSettingsParser
 Parser for the log settings. More...
 
class  LogStreamReader
 A stream reader for reading logs. More...
 
class  LogStreamWriter
 A stream writer for writing logs. More...
 
class  LogTmpl
 The logger template. More...
 
class  MapKeyIterator
 An iterator for keys of a map. More...
 
class  MapValueIterator
 An iterator for values of a map. More...
 
class  NotOwningPtr
 A container for pointers where the lifetime should be owned by the caller. More...
 
class  OutboundControlItem
 Outbound control item. More...
 
class  OutboundPipeClientTmpl
 An outbound pipe client. More...
 
class  OutboundPipeInstance
 A pipe instance for outbound client/server. More...
 
class  OutboundPipeServerTmpl
 An outbound pipe server. More...
 
class  PathMutex
 A global mutex where the key is derived from a file path and service name. More...
 
class  PipeClient
 Base named pipe client. More...
 
struct  PipeClientConfig
 Config for a named pipe client. More...
 
class  PipeClientConnectionListener
 A listener for pipe client connection events. More...
 
class  PipeClientReceiveListener
 A listener for pipe client received data events. More...
 
class  PipeClientSendListener
 A listener for pipe client send complete events. More...
 
class  PipeInstance
 The pipe instance which is shared between client and server. More...
 
class  PipeName
 Pipe names are based on file system paths. More...
 
class  PipeServer
 Base named pipe server. More...
 
struct  PipeServerConfig
 Config for a named pipe server. More...
 
class  PipeServerReceiveListener
 A listener for server receiving data from pipe clients. More...
 
class  Process
 Manages the life cycle of a process. More...
 
struct  ProcessParams
 Parameters to start a Windows process. More...
 
struct  ServicePipes
 Holds the STDIN and STDOUT pipes for redirecting. More...
 
class  ServiceProcessTmpl
 A template for a service process. More...
 
class  ServiceTmpl
 A template for a service. More...
 
class  SHA256
 SHA256 hash function helper. More...
 
class  SuperviseController
 A controller for supervised processes. More...
 
class  SuperviseListener
 The supervisor listener. More...
 
struct  SuperviseState
 The state of the supervisor. More...
 
class  SuperviseStateFile
 Serializes the state file but can also read it as a human-readable message. More...
 
class  SuperviseStateListener
 A supervisor state listener which is race-condition free. More...
 
class  SuperviseTmpl
 The supervisor class template. More...
 
class  SvScanController
 A controller for svscan process. More...
 
class  SvScanTmpl
 The svscan template. More...
 
class  TrustedHandleWrapper
 
class  Utils
 Utility functions. More...
 
class  WaitMultiplexer
 A HANDLE wait multiplexer. More...
 
struct  WaitResult
 The wait result for when waiting on handles. More...
 
struct  WaitTimeoutItem
 Holds timeout information such that when a timeout occurs the multiplexer knows how to handle it. More...
 
class  WindowsInterface
 Wraps the windows functions as an interface so that they can be easily mocked and tested. More...
 

Typedefs

typedef unsigned char u_char
 Unsigned char for readability. More...
 
typedef LogTmpl< winss::PathMutexLog
 Concrete log implementation. More...
 
template<typename Key , typename Value >
using Map = std::map< Key, Value >
 Use std::map as the map. More...
 
template<typename Key , typename Value >
using MapIterator = typename Map< Key, Value >::iterator
 Use std::map::iterator as the map iterator. More...
 
typedef OutboundPipeClientTmpl< winss::OutboundPipeInstanceOutboundPipeClient
 A concrete outbound pipe client. More...
 
typedef InboundPipeClientTmpl< winss::InboundPipeInstanceInboundPipeClient
 A concrete inbound pipe client. More...
 
typedef OutboundPipeServerTmpl< winss::OutboundPipeInstanceOutboundPipeServer
 Concrete outbound pipe server implementation. More...
 
typedef InboundPipeServerTmpl< winss::InboundPipeInstanceInboundPipeServer
 Concrete inbound pipe server implementation. More...
 
typedef SuperviseTmpl< winss::PathMutex, winss::ProcessSupervise
 Concrete supervise implementation. More...
 
typedef ServiceTmpl< winss::ServiceProcessService
 Concrete service implementation. More...
 
typedef ServiceProcessTmpl< winss::ProcessServiceProcess
 Concrete service process implementation. More...
 
typedef SvScanTmpl< winss::Service, winss::PathMutex, winss::ProcessSvScan
 Concrete svscan implementation. More...
 
typedef std::map< std::string, std::string, winss::case_ignoreenv_t
 The environment mapping. More...
 
typedef std::function< void(WaitMultiplexer &)> Callback
 A callback function for wait multiplexer events. More...
 
typedef std::function< void(WaitMultiplexer &, const winss::HandleWrapper &)> TriggeredCallback
 A callback function specifically for triggered multiplexer events. More...
 

Enumerations

enum  WaitResultState { SUCCESS, TIMEOUT, FAILED }
 The wait result state for when waiting on handles. More...
 
enum  OverlappedResult { REMOVE, CONTINUE, SKIP }
 The result of the overlapped operation. More...
 
enum  SuperviseStateListenerAction {
  NO_WAIT, WAIT_UP, WAIT_DOWN, WAIT_FINISHED,
  WAIT_RESTART
}
 The actions which the listener can wait for. More...
 
enum  SuperviseNotification {
  UNKNOWN, START, RUN, END,
  BROKEN, FINISHED, EXIT
}
 The supervisor events which can occur. More...
 

Functions

winss::EventWrapperGetCloseEvent ()
 Gets a global close event. More...
 
BOOL WINAPI CtrlHandler (DWORD ctrlType)
 The CTRL handler. More...
 
void AttachCtrlHandler ()
 Attaches the CTRL handler to the event. More...
 
template<class T >
NotOwningPtr< T > NotOwned (T *p)
 Helper method to make it easier to create a not owned pointer. More...
 

Typedef Documentation

typedef std::function<void(WaitMultiplexer&)> winss::Callback

A callback function for wait multiplexer events.

typedef std::map<std::string, std::string, winss::case_ignore> winss::env_t

The environment mapping.

A concrete inbound pipe client.

Concrete inbound pipe server implementation.

Concrete log implementation.

template<typename Key , typename Value >
using winss::Map = typedef std::map<Key, Value>

Use std::map as the map.

Template Parameters
KeyThe type of map key.
ValueThe type of map value.
template<typename Key , typename Value >
using winss::MapIterator = typedef typename Map<Key, Value>::iterator

Use std::map::iterator as the map iterator.

Template Parameters
KeyThe type of map key.
ValueThe type of map value.

A concrete outbound pipe client.

Concrete outbound pipe server implementation.

Concrete service implementation.

Concrete service process implementation.

Concrete supervise implementation.

Concrete svscan implementation.

typedef std::function<void(WaitMultiplexer&, const winss::HandleWrapper&)> winss::TriggeredCallback

A callback function specifically for triggered multiplexer events.

typedef unsigned char winss::u_char

Unsigned char for readability.

Enumeration Type Documentation

The result of the overlapped operation.

Enumerator
REMOVE 

Close client.

CONTINUE 

CLient is ready.

SKIP 

Wait till next result.

The supervisor events which can occur.

Enumerator
UNKNOWN 

Unknown notification.

START 

Supervisor starting.

RUN 

Run process has started.

END 

Run process has ended.

BROKEN 
FINISHED 

Permanent failure.

Finish process has ended.

EXIT 

Supervisor exiting.

The actions which the listener can wait for.

Enumerator
NO_WAIT 

No-op.

WAIT_UP 

Wait for the run process to start.

WAIT_DOWN 

Wait for the run process to end.

WAIT_FINISHED 

Wait for the finish process to end.

WAIT_RESTART 

Wait for the service to go down and back up.

The wait result state for when waiting on handles.

Enumerator
SUCCESS 

The wait was a success.

TIMEOUT 

The wait timed out.

FAILED 

The wait failed.

Function Documentation

void winss::AttachCtrlHandler ( )

Attaches the CTRL handler to the event.

References CtrlHandler(), and WINDOWS.

BOOL WINAPI winss::CtrlHandler ( DWORD  ctrlType)

The CTRL handler.

References GetCloseEvent(), and winss::EventWrapper::Set().

Referenced by AttachCtrlHandler().

winss::EventWrapper & winss::GetCloseEvent ( )

Gets a global close event.

Referenced by CtrlHandler().

template<class T >
NotOwningPtr<T> winss::NotOwned ( T *  p)

Helper method to make it easier to create a not owned pointer.

Template Parameters
TThe type of pointer which is not owned.
Parameters
[in]pThe object pointer.
Returns
A not owned pointer object with the type of p.

Referenced by winss::InboundControlItem::InboundControlItem(), winss::OutboundControlItem::OutboundControlItem(), winss::SuperviseController::SuperviseController(), and winss::SvScanController::SvScanController().