Compilation flag to avoid compil errors on ubuntu
[staging/HomeScreen.git] / HomeScreen / src2 / usermanagement.h
index 89735ab..c3a41bc 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef USERMANAGEMENT_H
 #define USERMANAGEMENT_H
 
-#define REAL_SERVER "ws://localhost:1212/api?token=hello"
+//#define REAL_SERVER "ws://localhost:1212/api?token=hello"
 
 #include <QObject>
 #include "applicationmodel.h"
 #ifndef REAL_SERVER
 #include <QtWebSockets/QWebSocketServer>
 #endif
-//{"postal_address":"201 Mission Street","loc":"37.7914374,-122.3950694","country":"USA","mail":"bjensen@example.com",
-//"city":"San Francisco","graphEmail":"bjensen@example.com","graphPreferredLanguage":"en","ccNumberMasked":"************1212",
-//"ccExpYear":"19","description":"Original description","ccExpMonth":"01","groups":[],"last_name":"Jensen"
-//"ccNumber":"123-1111-2222-3333-1212","house_identifier":"ForgeRock","phone":"+1 408 555 1862","name":"bjensen"
-//"state":"CA","fax":"+1 408 555 1862","common_name":"Barbara Jensen","postal_code":"94105","first_name":"Barbara","keytoken":"EB:7C:23:C6:21:BF"}
 struct User {
     QString postal_address;
     QPointF loc;
@@ -40,6 +35,8 @@ struct User {
     QString postal_code;
     QString first_name;
     QString keytoken;
+    QStringList graphActions;
+    QString policy;
 };
 
 class UserManagement : public QObject
@@ -65,6 +62,8 @@ public slots:
     void serverSocketDisconnected();
     void slot_timerTest();
 #endif
+    void slot_turnOffRed();
+    void slot_disconnect();
 private:
     QObject *home;
     QObject *shortcutArea;
@@ -73,6 +72,8 @@ private:
     QByteArray data;
     ApplicationModel *appModel;
     QWebSocket webSocket;
+    QTimer timerRed;
+    bool isRed;
     int sequence;
     bool jsonToMap(const QByteArray &buf, QVariantMap *map) const;
     bool mapToJson(const QVariantMap &map, QByteArray *json) const;