Diffstat (limited to 'noncore/net/opietooth/lib/services.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/lib/services.cc | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/noncore/net/opietooth/lib/services.cc b/noncore/net/opietooth/lib/services.cc new file mode 100644 index 0000000..75c1bd6 --- a/dev/null +++ b/noncore/net/opietooth/lib/services.cc | |||
@@ -0,0 +1,168 @@ | |||
1 | |||
2 | #include "services.h" | ||
3 | |||
4 | using namespace OpieTooth; | ||
5 | |||
6 | |||
7 | Services::ProfileDescriptor::ProfileDescriptor(){ | ||
8 | |||
9 | } | ||
10 | Services::ProfileDescriptor::ProfileDescriptor(const QString &id, uint idInt, uint version ){ | ||
11 | m_id = id; | ||
12 | m_idInt = idInt; | ||
13 | m_version = version; | ||
14 | } | ||
15 | Services::ProfileDescriptor::ProfileDescriptor( const ProfileDescriptor& rem){ | ||
16 | (*this) = rem; | ||
17 | } | ||
18 | QString Services::ProfileDescriptor::id() const { | ||
19 | return m_id; | ||
20 | } | ||
21 | void Services::ProfileDescriptor::setId( const QString& id ){ | ||
22 | m_id = id; | ||
23 | } | ||
24 | void Services::ProfileDescriptor::setId(uint id ){ | ||
25 | m_idInt = id; | ||
26 | } | ||
27 | uint Services::ProfileDescriptor::idInt()const{ | ||
28 | return m_idInt; | ||
29 | } | ||
30 | uint Services::ProfileDescriptor::version() const{ | ||
31 | return m_version; | ||
32 | } | ||
33 | void Services::ProfileDescriptor::setVersion(uint version){ | ||
34 | m_version = version; | ||
35 | } | ||
36 | Services::ProfileDescriptor& Services::ProfileDescriptor::operator=( const Services::ProfileDescriptor& prof){ | ||
37 | m_id = prof.m_id; | ||
38 | m_idInt = prof.m_idInt; | ||
39 | m_version = prof.m_version; | ||
40 | return *this; | ||
41 | } | ||
42 | bool operator==(const Services::ProfileDescriptor& first, | ||
43 | const Services::ProfileDescriptor& second ){ | ||
44 | |||
45 | if( (first.id() == second.id() ) && | ||
46 | (first.version() == second.version() ) && | ||
47 | (first.idInt() == second.idInt() ) ) | ||
48 | return true; | ||
49 | return false; | ||
50 | } | ||
51 | |||
52 | Services::ProtocolDescriptor::ProtocolDescriptor(){ | ||
53 | m_number = 0; | ||
54 | m_channel = 0; | ||
55 | } | ||
56 | Services::ProtocolDescriptor::ProtocolDescriptor(const QString& name, | ||
57 | uint number, | ||
58 | uint channel){ | ||
59 | m_name = name; | ||
60 | m_number = number; | ||
61 | m_channel = channel; | ||
62 | } | ||
63 | Services::ProtocolDescriptor::ProtocolDescriptor( const ProtocolDescriptor& ole ){ | ||
64 | (*this) = ole; | ||
65 | } | ||
66 | Services::ProtocolDescriptor::~ProtocolDescriptor(){ | ||
67 | |||
68 | } | ||
69 | QString Services::ProtocolDescriptor::name() const{ | ||
70 | return m_name; | ||
71 | } | ||
72 | void Services::ProtocolDescriptor::setName(const QString& name ){ | ||
73 | m_name = name; | ||
74 | } | ||
75 | uint Services::ProtocolDescriptor::id()const { | ||
76 | return m_number; | ||
77 | } | ||
78 | void Services::ProtocolDescriptor::setId( uint id ){ | ||
79 | m_number = id; | ||
80 | } | ||
81 | uint Services::ProtocolDescriptor::port()const { | ||
82 | return m_channel; | ||
83 | } | ||
84 | void Services::ProtocolDescriptor::setPort( uint port ){ | ||
85 | m_channel = port; | ||
86 | } | ||
87 | Services::ProtocolDescriptor &Services::ProtocolDescriptor::operator=( const Services::ProtocolDescriptor& desc ){ | ||
88 | m_name = desc.m_name; | ||
89 | m_channel = desc.m_channel; | ||
90 | m_number = desc.m_number; | ||
91 | return *this; | ||
92 | } | ||
93 | bool operator==( const Services::ProtocolDescriptor &first, | ||
94 | const Services::ProtocolDescriptor &second ){ | ||
95 | if( ( first.name() == second.name() ) && | ||
96 | ( first.id() == second.id() ) && | ||
97 | ( first.port() == second.port() ) ) | ||
98 | return true; | ||
99 | |||
100 | return false; | ||
101 | |||
102 | } | ||
103 | |||
104 | Services::Services(){ | ||
105 | |||
106 | } | ||
107 | Services::Services(const Services& service ){ | ||
108 | |||
109 | } | ||
110 | Services::~Services(){ | ||
111 | |||
112 | } | ||
113 | Services &Services::operator=( const Services& ){ | ||
114 | return *this; | ||
115 | } | ||
116 | bool operator==( const Services&, | ||
117 | const Services& ){ | ||
118 | return false; | ||
119 | } | ||
120 | QString Services::serviceName() const{ | ||
121 | |||
122 | } | ||
123 | void Services::setServiceName( const QString& service ){ | ||
124 | |||
125 | } | ||
126 | int Services::recHandle() const{ | ||
127 | |||
128 | } | ||
129 | void Services::setRecHandle( int ){ | ||
130 | |||
131 | } | ||
132 | QString Services::classIdList() const{ | ||
133 | |||
134 | } | ||
135 | void Services::setClassIdList( const QString& ){ | ||
136 | |||
137 | } | ||
138 | int Services::classIdListInt() const{ | ||
139 | |||
140 | } | ||
141 | void Services::setClassIdList(int ){ | ||
142 | |||
143 | } | ||
144 | void Services::insertProtocolDescriptor( const ProtocolDescriptor& ){ | ||
145 | |||
146 | } | ||
147 | void Services::clearProtocolDescriptorList(){ | ||
148 | |||
149 | } | ||
150 | void Services::removeProtocolDescriptor( const ProtocolDescriptor& ){ | ||
151 | |||
152 | } | ||
153 | Services::ProtocolDescriptor::ValueList Services::protocolDescriptorList()const{ | ||
154 | |||
155 | } | ||
156 | |||
157 | void Services::insertProfileDescriptor( const ProfileDescriptor& ){ | ||
158 | |||
159 | } | ||
160 | void Services::clearProfileDescriptorList(){ | ||
161 | |||
162 | } | ||
163 | void Services::removeProfileDescriptor( const ProfileDescriptor& ){ | ||
164 | |||
165 | } | ||
166 | Services::ProfileDescriptor::ValueList Services::profileDescriptor() const{ | ||
167 | |||
168 | } | ||