summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/lib/connection.cpp
authorzecke <zecke>2002-06-28 20:41:55 (UTC)
committer zecke <zecke>2002-06-28 20:41:55 (UTC)
commit545d7b51d67e4c1fa6be40436103b0a6b237a3a7 (patch) (side-by-side diff)
tree7a40a66ef8798e51a23ac362254788609f818f17 /noncore/net/opietooth/lib/connection.cpp
parent8a34a47d873d8d767d0a84a828e6724b73295b8d (diff)
downloadopie-545d7b51d67e4c1fa6be40436103b0a6b237a3a7.zip
opie-545d7b51d67e4c1fa6be40436103b0a6b237a3a7.tar.gz
opie-545d7b51d67e4c1fa6be40436103b0a6b237a3a7.tar.bz2
hcitool con additions ( not done yet )
Diffstat (limited to 'noncore/net/opietooth/lib/connection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/connection.cpp90
1 files changed, 90 insertions, 0 deletions
diff --git a/noncore/net/opietooth/lib/connection.cpp b/noncore/net/opietooth/lib/connection.cpp
new file mode 100644
index 0000000..1f9baaf
--- a/dev/null
+++ b/noncore/net/opietooth/lib/connection.cpp
@@ -0,0 +1,90 @@
+
+#include "connection.h"
+
+using namespace OpieTooth;
+
+Connection::Connection() {
+ m_direction = Incoming;
+ m_handle = -1;
+ m_state = -1;
+ m_linkMode = -1;
+};
+
+Connection::Connection( const Connection& con1 ) {
+ (*this) = con1;
+}
+
+
+Connection::Connection( bool in,
+ const QString& conType,
+ const QString& mac,
+ int handle,
+ int state,
+ int linkMode ) {
+ m_direction = in;
+ m_contype = conType;
+ m_mac = mac;
+ m_handle = handle;
+ m_state = state;
+ m_linkMode = linkMode;
+
+}
+
+void Connection::setDirection( bool incoming ) {
+ m_direction = incoming;
+}
+
+bool Connection::direction() const {
+ return m_direction;
+}
+
+void Connection::setConnectionMode( const QString& conType ) {
+ m_contype = conType;
+}
+
+QString Connection::connectionMode() const {
+ return m_contype;
+}
+
+void Connection::setMac( const QString& mac ) {
+ m_mac = mac;
+}
+
+QString Connection::mac() const{
+ return m_mac;
+}
+
+void Connection::setHandle( int handle ) {
+ m_handle = handle;
+}
+
+int Connection::handle() const{
+ return m_handle;
+}
+
+void Connection::setState( int state ) {
+ m_state = state;
+}
+
+int Connection::state()const {
+ return m_state;
+}
+
+void Connection::setLinkMode( int linkMode ) {
+ m_linkMode = linkMode;
+}
+
+int Connection::linkMode()const{
+ return m_linkMode;
+}
+
+Connection &Connection::operator=( const Connection& con1 ) {
+ m_direction = con1.m_direction;
+ m_contype = con1.m_contype;
+ m_mac = con1.m_mac;
+ m_handle = con1.m_handle;
+ m_state = con1.m_state;
+ m_linkMode = con1.m_linkMode;
+
+ return (*this);
+}