QVisu
Qt-based visualization for smart homes
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
qvfritz.h
1 #ifndef QVFRITZ_H
2 #define QVFRITZ_H
3 
4 #include <QtXml>
5 #include <QGridLayout>
6 #include <QLabel>
7 #include <QList>
8 #include <QString>
9 #include <QDateTime>
10 #include <QTime>
11 #include <QTcpSocket>
12 #include "../qvelement.h"
13 #include "../qvsvgwidget.h"
14 
15 
16 class QVFritz : public QVElement
17 {
18  Q_OBJECT
19 public:
20  explicit QVFritz(QDomElement xml_desc, QString container, QWidget *parent);
21  ~QVFritz();
22 
23  void resizeEvent(QResizeEvent*);
24 
25 signals:
26  void soapReceived(QString,QDomElement);
27  void updateCallList(QDomElement);
28 
29 public slots:
30  void onValueChanged(QString,QString);
31  void onInitCompleted();
32  void popupClosed();
33 
34 protected slots:
35  void onConnected();
36  void onDisconnected();
37  void onDataReceived();
38  void onSoapReceived(QString, QDomElement);
39 
40  void onDLConnected();
41  void onDLDisconnected();
42  void onDLDataReceived();
43 
44  void onCallListUpdated(QDomElement);
45 
46 protected:
47  QGridLayout *layout;
48  QList<QLabel*> w_callers, w_times;
49  QList<QVSvgWidget*> w_icons;
50  QString svg_in, svg_out, svg_missed;
51  QDateTime last_known_call;
52  QList<int> show_list;
53 
54  QTcpSocket *socket;
55 
56  unsigned int status;
57  QString *socket_buffer;
58  QString *socket_header, *socket_body;
59 
60  int body_remaining;
61 
62  static const unsigned int socket_idle = 0;
63  static const unsigned int process_header = 1;
64  static const unsigned int process_body = 2;
65 
66  int dummy;
67  int socket_status;
68 
69  static const unsigned int closed = 0;
70  static const unsigned int opening = 1;
71  static const unsigned int open = 2;
72  static const unsigned int authenticating = 3;
73  static const unsigned int request_sent = 4;
74  static const unsigned int authenticated = 10;
75  static const unsigned int calllist_pending = 11;
76  static const unsigned int tamcalllist_pending = 11;
77  static const unsigned int closing = 50;
78  static const unsigned int close_for_reopen = 60; /*
79  static const unsigned int opening = 0; */
80 
81  int dummy2[32];
82 
83  /* Authentication */
84  QString server;
85  QString nonce;
86  QString username;
87  QString password;
88  QString realm;
89  QString auth;
90  QString sid;
91 
92  /* Attachment Download */
93  QTcpSocket *dl_socket;
94  QString dl_request;
95  QByteArray dl_buffer;
96 };
97 
98 #endif // QVFRITZ_H
Definition: qvelement.h:34
void resizeEvent(QResizeEvent *)
Definition: qvfritz.cpp:483
Definition: qvfritz.h:16
QString container
Definition: qvelement.h:73