author | zecke <zecke> | 2002-06-28 20:41:55 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-28 20:41:55 (UTC) |
commit | 545d7b51d67e4c1fa6be40436103b0a6b237a3a7 (patch) (unidiff) | |
tree | 7a40a66ef8798e51a23ac362254788609f818f17 /noncore/net/opietooth/lib/connection.cpp | |
parent | 8a34a47d873d8d767d0a84a828e6724b73295b8d (diff) | |
download | opie-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.cpp | 90 |
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 @@ | |||
1 | |||
2 | #include "connection.h" | ||
3 | |||
4 | using namespace OpieTooth; | ||
5 | |||
6 | Connection::Connection() { | ||
7 | m_direction = Incoming; | ||
8 | m_handle = -1; | ||
9 | m_state = -1; | ||
10 | m_linkMode = -1; | ||
11 | }; | ||
12 | |||
13 | Connection::Connection( const Connection& con1 ) { | ||
14 | (*this) = con1; | ||
15 | } | ||
16 | |||
17 | |||
18 | Connection::Connection( bool in, | ||
19 | const QString& conType, | ||
20 | const QString& mac, | ||
21 | int handle, | ||
22 | int state, | ||
23 | int linkMode ) { | ||
24 | m_direction = in; | ||
25 | m_contype = conType; | ||
26 | m_mac = mac; | ||
27 | m_handle = handle; | ||
28 | m_state = state; | ||
29 | m_linkMode = linkMode; | ||
30 | |||
31 | } | ||
32 | |||
33 | void Connection::setDirection( bool incoming ) { | ||
34 | m_direction = incoming; | ||
35 | } | ||
36 | |||
37 | bool Connection::direction() const { | ||
38 | return m_direction; | ||
39 | } | ||
40 | |||
41 | void Connection::setConnectionMode( const QString& conType ) { | ||
42 | m_contype = conType; | ||
43 | } | ||
44 | |||
45 | QString Connection::connectionMode() const { | ||
46 | return m_contype; | ||
47 | } | ||
48 | |||
49 | void Connection::setMac( const QString& mac ) { | ||
50 | m_mac = mac; | ||
51 | } | ||
52 | |||
53 | QString Connection::mac() const{ | ||
54 | return m_mac; | ||
55 | } | ||
56 | |||
57 | void Connection::setHandle( int handle ) { | ||
58 | m_handle = handle; | ||
59 | } | ||
60 | |||
61 | int Connection::handle() const{ | ||
62 | return m_handle; | ||
63 | } | ||
64 | |||
65 | void Connection::setState( int state ) { | ||
66 | m_state = state; | ||
67 | } | ||
68 | |||
69 | int Connection::state()const { | ||
70 | return m_state; | ||
71 | } | ||
72 | |||
73 | void Connection::setLinkMode( int linkMode ) { | ||
74 | m_linkMode = linkMode; | ||
75 | } | ||
76 | |||
77 | int Connection::linkMode()const{ | ||
78 | return m_linkMode; | ||
79 | } | ||
80 | |||
81 | Connection &Connection::operator=( const Connection& con1 ) { | ||
82 | m_direction = con1.m_direction; | ||
83 | m_contype = con1.m_contype; | ||
84 | m_mac = con1.m_mac; | ||
85 | m_handle = con1.m_handle; | ||
86 | m_state = con1.m_state; | ||
87 | m_linkMode = con1.m_linkMode; | ||
88 | |||
89 | return (*this); | ||
90 | } | ||