author | zecke <zecke> | 2002-07-12 17:14:58 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-07-12 17:14:58 (UTC) |
commit | 89dce758480cc90502ad14b6c4cf80774e6c1845 (patch) (unidiff) | |
tree | 2ff4e635c8aa86385dfd896084f5cd419efd0840 /noncore/net/opietooth/lib/connection.cpp | |
parent | 716211b5e06bb25145cfbcf62a11a7c52c79dde5 (diff) | |
download | opie-89dce758480cc90502ad14b6c4cf80774e6c1845.zip opie-89dce758480cc90502ad14b6c4cf80774e6c1845.tar.gz opie-89dce758480cc90502ad14b6c4cf80774e6c1845.tar.bz2 |
- Connection -> ConnectionState
- Factory adjustments
- Factory function
- Refactoring the QListViewItem derived class
BTListItem
|
- BTDeviceItem for RemoteDevices
|
- BTServiceItem for Services
|
- BTConnectionItem for ConnectionState
- misc bug fixes
Diffstat (limited to 'noncore/net/opietooth/lib/connection.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/lib/connection.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/noncore/net/opietooth/lib/connection.cpp b/noncore/net/opietooth/lib/connection.cpp index 1f9baaf..ef7d925 100644 --- a/noncore/net/opietooth/lib/connection.cpp +++ b/noncore/net/opietooth/lib/connection.cpp | |||
@@ -3,19 +3,19 @@ | |||
3 | 3 | ||
4 | using namespace OpieTooth; | 4 | using namespace OpieTooth; |
5 | 5 | ||
6 | Connection::Connection() { | 6 | ConnectionState::ConnectionState() { |
7 | m_direction = Incoming; | 7 | m_direction = Incoming; |
8 | m_handle = -1; | 8 | m_handle = -1; |
9 | m_state = -1; | 9 | m_state = -1; |
10 | m_linkMode = -1; | 10 | m_linkMode = -1; |
11 | }; | 11 | }; |
12 | 12 | ||
13 | Connection::Connection( const Connection& con1 ) { | 13 | ConnectionState::ConnectionState( const ConnectionState& con1 ) { |
14 | (*this) = con1; | 14 | (*this) = con1; |
15 | } | 15 | } |
16 | 16 | ||
17 | 17 | ||
18 | Connection::Connection( bool in, | 18 | ConnectionState::ConnectionState( bool in, |
19 | const QString& conType, | 19 | const QString& conType, |
20 | const QString& mac, | 20 | const QString& mac, |
21 | int handle, | 21 | int handle, |
@@ -30,55 +30,55 @@ Connection::Connection( bool in, | |||
30 | 30 | ||
31 | } | 31 | } |
32 | 32 | ||
33 | void Connection::setDirection( bool incoming ) { | 33 | void ConnectionState::setDirection( bool incoming ) { |
34 | m_direction = incoming; | 34 | m_direction = incoming; |
35 | } | 35 | } |
36 | 36 | ||
37 | bool Connection::direction() const { | 37 | bool ConnectionState::direction() const { |
38 | return m_direction; | 38 | return m_direction; |
39 | } | 39 | } |
40 | 40 | ||
41 | void Connection::setConnectionMode( const QString& conType ) { | 41 | void ConnectionState::setConnectionMode( const QString& conType ) { |
42 | m_contype = conType; | 42 | m_contype = conType; |
43 | } | 43 | } |
44 | 44 | ||
45 | QString Connection::connectionMode() const { | 45 | QString ConnectionState::connectionMode() const { |
46 | return m_contype; | 46 | return m_contype; |
47 | } | 47 | } |
48 | 48 | ||
49 | void Connection::setMac( const QString& mac ) { | 49 | void ConnectionState::setMac( const QString& mac ) { |
50 | m_mac = mac; | 50 | m_mac = mac; |
51 | } | 51 | } |
52 | 52 | ||
53 | QString Connection::mac() const{ | 53 | QString ConnectionState::mac() const{ |
54 | return m_mac; | 54 | return m_mac; |
55 | } | 55 | } |
56 | 56 | ||
57 | void Connection::setHandle( int handle ) { | 57 | void ConnectionState::setHandle( int handle ) { |
58 | m_handle = handle; | 58 | m_handle = handle; |
59 | } | 59 | } |
60 | 60 | ||
61 | int Connection::handle() const{ | 61 | int ConnectionState::handle() const{ |
62 | return m_handle; | 62 | return m_handle; |
63 | } | 63 | } |
64 | 64 | ||
65 | void Connection::setState( int state ) { | 65 | void ConnectionState::setState( int state ) { |
66 | m_state = state; | 66 | m_state = state; |
67 | } | 67 | } |
68 | 68 | ||
69 | int Connection::state()const { | 69 | int ConnectionState::state()const { |
70 | return m_state; | 70 | return m_state; |
71 | } | 71 | } |
72 | 72 | ||
73 | void Connection::setLinkMode( int linkMode ) { | 73 | void ConnectionState::setLinkMode( int linkMode ) { |
74 | m_linkMode = linkMode; | 74 | m_linkMode = linkMode; |
75 | } | 75 | } |
76 | 76 | ||
77 | int Connection::linkMode()const{ | 77 | int ConnectionState::linkMode()const{ |
78 | return m_linkMode; | 78 | return m_linkMode; |
79 | } | 79 | } |
80 | 80 | ||
81 | Connection &Connection::operator=( const Connection& con1 ) { | 81 | ConnectionState &ConnectionState::operator=( const ConnectionState& con1 ) { |
82 | m_direction = con1.m_direction; | 82 | m_direction = con1.m_direction; |
83 | m_contype = con1.m_contype; | 83 | m_contype = con1.m_contype; |
84 | m_mac = con1.m_mac; | 84 | m_mac = con1.m_mac; |