diff options
Diffstat (limited to 'api/direct_bt/DBTAdapter.hpp')
-rw-r--r-- | api/direct_bt/DBTAdapter.hpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/api/direct_bt/DBTAdapter.hpp b/api/direct_bt/DBTAdapter.hpp index b6cbcd13..727f70f1 100644 --- a/api/direct_bt/DBTAdapter.hpp +++ b/api/direct_bt/DBTAdapter.hpp @@ -171,11 +171,6 @@ namespace direct_bt { std::recursive_mutex mtx_statusListenerList; std::recursive_mutex mtx_discovery; - inline void checkValid() { - if( !valid ) { - throw IllegalStateException("Adapter state invalid: "+toString(), E_FILE_LINE); - } - } bool validateDevInfo(); bool openHCI(); bool closeHCI(); @@ -249,6 +244,15 @@ namespace direct_bt { return std::string(JAVA_DBT_PACKAGE "DBTAdapter"); } + /** + * Throws an IllegalStateException if isValid() == false + */ + inline void checkValid() const { + if( !isValid() ) { + throw IllegalStateException("Adapter state invalid: "+toString(), E_FILE_LINE); + } + } + bool hasDevId() const { return 0 <= dev_id; } EUI48 const & getAddress() const { return adapterInfo->address; } |