ConnectionManager(QObject* parent = 0);
~ConnectionManager();
- void setBlocking(bool value);
bool connect();
bool connect(Connection const& connection);
bool connect(QString const& id);
bool isConnected();
bool scanConnections(QList<Connection>& connections, ConnectionType type = NO_TYPE);
Error error() const;
- static unsigned int const TIMEOUT = 20000;
-
-signals:
- void connectReply(bool connected);
- void isConnectedReply(bool connected);
- void newConnection(ConnectionManager::Connection const& connection);
- void scanReady();
+ static unsigned int const TIMEOUT = 15000;
+ static unsigned int const WAIT_AFTER_CONNECT = 400;
protected:
virtual void timerEvent(QTimerEvent* event);
void scanResult(const QDBusMessage& rep);
private:
+ void sleep(unsigned int ms);
bool waitSignal(bool* ready);
- bool blocking_;
bool stateReady_;
bool connectionReady_;
bool scanReady_;
int numberOfConnections_;
int scannedConnections_;
int timer_;
+ ConnectionType searchType_;
Error error_;
QList<Connection>* connections_;
QDBusInterface* icd2interface_;