Safir SDK Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BackdoorKeeper.h
Go to the documentation of this file.
1 /******************************************************************************
2 *
3 * Copyright Saab AB, 2006-2013 (http://safir.sourceforge.net)
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 
33 namespace Safir
34 {
35 namespace Application
36 {
37 
44 class SWRE_INTERFACE_CPP_API BackdoorKeeper :
46 {
47 public:
48 
55  explicit BackdoorKeeper(const Safir::Dob::ConnectionBase& connection);
56 
60  virtual ~BackdoorKeeper(){}
61 
75  void Start(Safir::Application::Backdoor& backdoor);
76 
81  void Stop();
82 
88  bool IsStarted() const {return m_started;}
89 
90 private:
91  //Disable copying and assignment
93  BackdoorKeeper& operator=(const BackdoorKeeper&);
94 
95  // Implementation of message subscriber interface
96  virtual void OnMessage(const Safir::Dob::MessageProxy messageProxy);
97 
98  void Tokenize(const std::wstring& str,
99  std::vector<std::wstring>& tokens,
100  const std::wstring& delimiters = L" \t\n");
101 
102  const Safir::Dob::ConnectionBase& m_connection;
103  Backdoor* m_backdoor;
104 
105  bool m_started;
106 };
107 
108 }
109 }
110 
111 #endif
Interface to be implemented by subscribers of messages.
Definition: Consumer.h:329
Interface for handling PI commands.
Definition: Backdoor.h:41
virtual ~BackdoorKeeper()
Destructor.
Definition: BackdoorKeeper.h:60
bool IsStarted() const
Check if the backdoor keeper has been started.
Definition: BackdoorKeeper.h:88
Common base class for connections to the DOB.
Definition: ConnectionBase.h:52
Class that provides subscription and filtering for BackdoorCommands.
Definition: BackdoorKeeper.h:44
Proxy class for a message.
Definition: MessageProxy.h:59