diff options
author | Javier <dev.git@javispedro.com> | 2016-06-05 00:51:39 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2016-06-05 00:51:39 +0200 |
commit | 1905841f4008a58932368a7099e370e5758544c4 (patch) | |
tree | 241b95d68b288b2c54ef0df61096ec5b70e8acf5 /gatoattclient.cpp | |
parent | 365f98a9f973f5ead0886073ebcaa9bf7c5f0f47 (diff) | |
download | libgato-1905841f4008a58932368a7099e370e5758544c4.tar.gz libgato-1905841f4008a58932368a7099e370e5758544c4.zip |
initial attempts to work with paired devices
Diffstat (limited to 'gatoattclient.cpp')
-rw-r--r-- | gatoattclient.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/gatoattclient.cpp b/gatoattclient.cpp index 00dd9d0..b8bdc17 100644 --- a/gatoattclient.cpp +++ b/gatoattclient.cpp @@ -75,8 +75,7 @@ static QByteArray remove_method_signature(const char *sig) } GatoAttClient::GatoAttClient(QObject *parent) : - QObject(parent), socket(new GatoSocket(this)), cur_mtu(ATT_DEFAULT_LE_MTU), next_id(1), - required_sec(GatoSocket::SecurityLow) + QObject(parent), socket(new GatoSocket(this)), cur_mtu(ATT_DEFAULT_LE_MTU), next_id(1) { connect(socket, SIGNAL(connected()), SLOT(handleSocketConnected())); connect(socket, SIGNAL(disconnected()), SLOT(handleSocketDisconnected())); @@ -92,9 +91,8 @@ GatoSocket::State GatoAttClient::state() const return socket->state(); } -bool GatoAttClient::connectTo(const GatoAddress &addr, GatoSocket::SecurityLevel sec_level) +bool GatoAttClient::connectTo(const GatoAddress &addr) { - required_sec = sec_level; return socket->connectTo(addr, ATT_CID); } @@ -110,7 +108,6 @@ GatoSocket::SecurityLevel GatoAttClient::securityLevel() const bool GatoAttClient::setSecurityLevel(GatoSocket::SecurityLevel level) { - required_sec = level; return socket->setSecurityLevel(level); } @@ -563,10 +560,6 @@ QList<GatoAttClient::AttributeGroupData> GatoAttClient::parseAttributeGroupData( void GatoAttClient::handleSocketConnected() { - if (socket->securityLevel() < required_sec) { - socket->setSecurityLevel(required_sec); - } - requestExchangeMTU(ATT_MAX_LE_MTU, this, SLOT(handleServerMTU(quint16))); emit connected(); } |