Safir SDK Core
Loading...
Searching...
No Matches
BackdoorKeeper.h
Go to the documentation of this file.
1/******************************************************************************
2*
3* Copyright Saab AB, 2006-2013 (http://safirsdkcore.com)
4*
5* Created by: Anders Widén / stawi
6*
7*******************************************************************************
8*
9* This file is part of Safir SDK Core.
10*
11* Safir SDK Core is free software: you can redistribute it and/or modify
12* it under the terms of version 3 of the GNU General Public License as
13* published by the Free Software Foundation.
14*
15* Safir SDK Core is distributed in the hope that it will be useful,
16* but WITHOUT ANY WARRANTY; without even the implied warranty of
17* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18* GNU General Public License for more details.
19*
20* You should have received a copy of the GNU General Public License
21* along with Safir SDK Core. If not, see <http://www.gnu.org/licenses/>.
22*
23******************************************************************************/
24#ifndef __SWRE_BACKDOOR_KEEPER_H__
25#define __SWRE_BACKDOOR_KEEPER_H__
26
27#include <Safir/Application/Internal/SwReportExportDefs.h>
29#include <Safir/Dob/Consumer.h>
32
33namespace Safir
34{
35namespace Application
36{
37
44class SWRE_INTERFACE_CPP_API BackdoorKeeper :
46{
47public:
48
55 explicit BackdoorKeeper(const Safir::Dob::ConnectionBase& connection);
56
60 virtual ~BackdoorKeeper(){}
61
76
81 void Stop();
82
88 bool IsStarted() const {return m_started;}
89
90private:
91 //Disable copying and assignment
92 BackdoorKeeper(const BackdoorKeeper&) = delete;
93 BackdoorKeeper& operator=(const BackdoorKeeper&) = delete;
94
95 void OnMessage(const Safir::Dob::MessageProxy messageProxy) override;
96
97 void Tokenize(const std::wstring& str,
98 std::vector<std::wstring>& tokens,
99 const std::wstring& delimiters = L" \t\n");
100
101 const Safir::Dob::ConnectionBase& m_connection;
102 Backdoor* m_backdoor;
103
104 bool m_started;
105};
106
107}
108}
109
110#endif
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition Backdoor.h:31
Interface for handling PI commands.
Definition Backdoor.h:42
Class that provides subscription and filtering for BackdoorCommands.
Definition BackdoorKeeper.h:46
bool IsStarted() const
Check if the backdoor keeper has been started.
Definition BackdoorKeeper.h:88
void Stop()
Stops subscription for backdoor commands.
virtual ~BackdoorKeeper()
Destructor.
Definition BackdoorKeeper.h:60
BackdoorKeeper(const Safir::Dob::ConnectionBase &connection)
Constructor.
void Start(Safir::Application::Backdoor &backdoor)
Starts subscription for backdoor commands to be sent to the Backdoor.
Common base class for connections to the DOB.
Definition ConnectionBase.h:59
Interface to be implemented by subscribers of messages.
Definition Consumer.h:331
Proxy class for a message.
Definition MessageProxy.h:59