summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/lib/remotedevice.cc
Unidiff
Diffstat (limited to 'noncore/net/opietooth/lib/remotedevice.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/remotedevice.cc48
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
4using namespace OpieTooth;
5
6bool 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
13RemoteDevices::RemoteDevices(){
14
15}
16RemoteDevices::RemoteDevices(const RemoteDevices& ole ){
17 (*this) = ole;
18}
19RemoteDevices::RemoteDevices(const QString &mac, const QString& name ){
20 m_mac = mac;
21 m_name = name;
22}
23RemoteDevices::~RemoteDevices(){
24
25}
26bool RemoteDevices::isEmpty() const {
27 if( m_name.isEmpty() && m_mac.isEmpty() )
28 return true;
29 return false;
30};
31RemoteDevices& RemoteDevices::operator=( const RemoteDevices& rem1){
32 m_name = rem1.m_name;
33 m_mac = rem1.m_mac;
34 return *this;
35
36}
37QString RemoteDevices::mac() const {
38 return m_mac;
39}
40void RemoteDevices::setMac( const QString& mac ){
41 m_mac = mac;
42}
43QString RemoteDevices::name() const{
44 return m_name;
45}
46void RemoteDevices::setName( const QString& name ){
47 m_name = name;
48}