Diffstat (limited to 'noncore/net/opietooth/lib/remotedevice.cc') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/lib/remotedevice.cc | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/noncore/net/opietooth/lib/remotedevice.cc b/noncore/net/opietooth/lib/remotedevice.cc new file mode 100644 index 0000000..0045904 --- a/dev/null +++ b/noncore/net/opietooth/lib/remotedevice.cc | |||
@@ -0,0 +1,48 @@ | |||
1 | |||
2 | #include "remotedevice.h" | ||
3 | |||
4 | using namespace OpieTooth; | ||
5 | |||
6 | bool operator==(const RemoteDevices& rem1, const RemoteDevices& rem2){ | ||
7 | if( ( rem1.mac() == rem2.mac() ) && (rem1.name() == rem2.name() ) ) | ||
8 | return true; | ||
9 | |||
10 | return false; | ||
11 | } | ||
12 | |||
13 | RemoteDevices::RemoteDevices(){ | ||
14 | |||
15 | } | ||
16 | RemoteDevices::RemoteDevices(const RemoteDevices& ole ){ | ||
17 | (*this) = ole; | ||
18 | } | ||
19 | RemoteDevices::RemoteDevices(const QString &mac, const QString& name ){ | ||
20 | m_mac = mac; | ||
21 | m_name = name; | ||
22 | } | ||
23 | RemoteDevices::~RemoteDevices(){ | ||
24 | |||
25 | } | ||
26 | bool RemoteDevices::isEmpty() const { | ||
27 | if( m_name.isEmpty() && m_mac.isEmpty() ) | ||
28 | return true; | ||
29 | return false; | ||
30 | }; | ||
31 | RemoteDevices& RemoteDevices::operator=( const RemoteDevices& rem1){ | ||
32 | m_name = rem1.m_name; | ||
33 | m_mac = rem1.m_mac; | ||
34 | return *this; | ||
35 | |||
36 | } | ||
37 | QString RemoteDevices::mac() const { | ||
38 | return m_mac; | ||
39 | } | ||
40 | void RemoteDevices::setMac( const QString& mac ){ | ||
41 | m_mac = mac; | ||
42 | } | ||
43 | QString RemoteDevices::name() const{ | ||
44 | return m_name; | ||
45 | } | ||
46 | void RemoteDevices::setName( const QString& name ){ | ||
47 | m_name = name; | ||
48 | } | ||