eb638ea7c8286bcd54d8286b3bbe0022d2526758
Stefan Schuermans implement operator connecti...

Stefan Schuermans authored 12 years ago

1) /* Blinker
2)    Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org>
3)    Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
4)    a blinkenarea.org project */
5) 
6) #ifndef BLINKER_OPPRINTER_H
7) #define BLINKER_OPPRINTER_H
8) 
Stefan Schuermans fix operator connection pri...

Stefan Schuermans authored 12 years ago

9) #include <set>
Stefan Schuermans implement operator connecti...

Stefan Schuermans authored 12 years ago

10) #include <string>
11) 
12) #include "Directory.h"
13) #include "File.h"
14) #include "Mgrs.h"
15) #include "Module.h"
16) #include "OpConn.h"
17) #include "OpConnIf.h"
18) #include "OpReqIf.h"
19) 
20) namespace Blinker {
21) 
22) /// a operator connection printer
23) class OpPrinter: public Module, public OpReqIf
24) {
Stefan Schuermans fix operator connection pri...

Stefan Schuermans authored 12 years ago

25) public:
26)   /// type for set of open operator connections
27)   typedef std::set<OpConn *> OpConns;
28) 
Stefan Schuermans implement operator connecti...

Stefan Schuermans authored 12 years ago

29) public:
30)   /**
31)    * @brief constructor
Stefan Schuermans make modules know their name

Stefan Schuermans authored 12 years ago

32)    * @param[in] name module name
Stefan Schuermans implement operator connecti...

Stefan Schuermans authored 12 years ago

33)    * @param[in] mgrs managers
34)    * @param[in] dirBase base directory
35)    */
Stefan Schuermans make modules know their name

Stefan Schuermans authored 12 years ago

36)   OpPrinter(const std::string &name, Mgrs &mgrs, const Directory &dirBase);
Stefan Schuermans implement operator connecti...

Stefan Schuermans authored 12 years ago

37) 
38)   /// virtual destructor
39)   virtual ~OpPrinter();
40) 
41) private:
42)   /// copy constructor disabled
43)   OpPrinter(const OpPrinter &that);
44) 
45)   /// assignment operator disabled
46)   const OpPrinter & operator=(const OpPrinter &that);
47) 
48) public:
49)   /// check for update of configuration
50)   virtual void updateConfig();
51) 
52)   /**
53)    * @brief check if accepting new operator connction is possible
54)    * @param[in] name operator interface name
55)    * @return if accepting new connection is possible
56)    */
57)   virtual bool acceptNewOpConn(const std::string &name);
58) 
59)   /**
60)    * @brief new operator connection
61)    * @param[in] name operator interface name
62)    * @param[in] pConn operator connection object
63)    */
64)   virtual void newOpConn(const std::string &name, OpConn *pConn);
65) 
Stefan Schuermans implemented play and key me...

Stefan Schuermans authored 12 years ago

66)   /**
67)    * @brief key command received on operator connection
68)    * @param[in] pConn operator connection object
69)    * @param[in] key key that was pressed
70)    */
71)   virtual void opConnRecvKey(OpConn *pConn, char key);
72) 
73)   /**
74)    * @brief play command received on operator connection
75)    * @param[in] pConn operator connection object
76)    * @param[in] sound name of sound to play
77)    */
78)   virtual void opConnRecvPlay(OpConn *pConn, const std::string &sound);
79) 
Stefan Schuermans implement operator connecti...

Stefan Schuermans authored 12 years ago

80)   /**
81)    * @brief operator connection is closed
82)    * @param[in] pConn operator connection object
83)    */
84)   virtual void opConnClose(OpConn *pConn);
Stefan Schuermans fix operator connection pri...

Stefan Schuermans authored 12 years ago

85) 
86) protected:
87)   OpConns m_opConns; ///< open operator connections