Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
msl2008.h
1 
2 /***************************************************************************
3  * msl2008.h - Fawkes mid-size refbox 2008 protocol repeater
4  *
5  * Created: Wed Apr 01 10:36:08 2009
6  * Copyright 2009 Stefan Schiffer [stefanschiffer.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program 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 Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #ifndef __TOOLS_REFBOXREP_MSL2008_H_
24 #define __TOOLS_REFBOXREP_MSL2008_H_
25 
26 #include "refbox_state_sender.h"
27 
28 #include <cstdlib>
29 #include <string>
30 #include <vector>
31 
32 namespace fawkes {
33  class MulticastDatagramSocket;
34 }
35 
36 namespace xmlpp {
37  class DomParser;
38  class Node;
39 }
40 
42 {
43  public:
45  const char *refbox_host, unsigned short int refbox_port);
47 
48  void run();
49 
50  private:
51  void process_string(char *buf, size_t len);
52  void reconnect();
53 
54  private:
55  RefBoxStateSender &__rss;
57 
58  unsigned int __score_cyan;
59  unsigned int __score_magenta;
60 
61  bool __quit;
62 
63  char *__refbox_host;
64  unsigned short int __refbox_port;
65 
66 
67  xmlpp::DomParser *dom;
68  xmlpp::Node *root;
69 
70 };
71 
72 #endif