Connection handling in daemon improved. Added settings to allow automatic connection...
[jenirok] / src / daemon / calllistener.h
index 4fe29b4..54677f1 100644 (file)
@@ -39,7 +39,9 @@ public:
     void end();
     static const int REQUEST_TIMEOUT = 10000;
     static const int BANNER_DELAY = 350;
-    static const int NUMBER_OF_RETRIES = 3;
+    static const int NUMBER_OF_RETRIES = 2;
+    static const int CONNECT_RETRIES = 2;
+    static const int ERROR_BANNER_TIMEOUT = 5000;
 
 private slots:
     void requestFinished(QVector <Eniro::Result> const& results, Eniro::SearchDetails const& details, bool error);
@@ -55,6 +57,8 @@ private:
     void showDelayedResult(QString const& text, int delay);
     void searchInit();
     void searchClose();
+    bool handleConnection();
+    void showError(QString const& msg);
     QString createResult(QString const& name, QString const& street, QString const& city);
     QString timedMessage_;
     Eniro* eniro_;
@@ -67,6 +71,8 @@ private:
     int retries_;
     QString currentSearch_;
     Eniro::Site site_;
+    QString connectionName_;
+    bool autoconnect_;
 };
 
 #endif // CALLLISTENER_H