X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fdaemon%2Fcalllistener.h;h=a07743eccd62ea5c51d262e387d2af11dfd296d9;hb=4a9690bd6f3d972d36976863607f9353a5d62301;hp=54677f12ff73331570fa9f7d0f43c32a3708013a;hpb=2136f257ebff2370bdfe7572e0c87ef50705feb2;p=jenirok diff --git a/src/daemon/calllistener.h b/src/daemon/calllistener.h index 54677f1..a07743e 100644 --- a/src/daemon/calllistener.h +++ b/src/daemon/calllistener.h @@ -26,7 +26,6 @@ #include #include "informationbox.h" #include "eniro.h" -#include "connectionmanager.h" class CallListener: public QObject { @@ -35,13 +34,18 @@ class CallListener: public QObject public: CallListener(); ~CallListener(); - void begin(); + bool begin(); void end(); static const int REQUEST_TIMEOUT = 10000; static const int BANNER_DELAY = 350; - static const int NUMBER_OF_RETRIES = 2; - static const int CONNECT_RETRIES = 2; - static const int ERROR_BANNER_TIMEOUT = 5000; + static const int SEARCH_RETRIES = 2; + static const int CONNECT_RETRIES = 3; + static const int CONNECTION_LOOKUP_RETRIES = 15; + static const int WAIT_BETWEEN_RETRIES = 1000; + static const int ERROR_BANNER_TIMEOUT = 4000; + +protected: + virtual void timerEvent(QTimerEvent* event); private slots: void requestFinished(QVector const& results, Eniro::SearchDetails const& details, bool error); @@ -59,10 +63,10 @@ private: void searchClose(); bool handleConnection(); void showError(QString const& msg); + void sleep(int ms); QString createResult(QString const& name, QString const& street, QString const& city); QString timedMessage_; Eniro* eniro_; - ConnectionManager* connectionManager_; bool closeConnection_; bool initialized_; InformationBox* box_; @@ -72,6 +76,7 @@ private: QString currentSearch_; Eniro::Site site_; QString connectionName_; + int timer_; bool autoconnect_; };