author | wimpie <wimpie> | 2005-01-04 01:44:52 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-04 01:44:52 (UTC) |
commit | 9a134ab03890d942d53b4121e31e2d37859fa42c (patch) (side-by-side diff) | |
tree | e9db8bfc0734d96409c90e12712dd6d8204aeb21 /noncore/settings/networksettings2/opietooth2/OTSDPService.h | |
parent | b65cbb7c8b45d57f849722d22f8f165cc202ceb5 (diff) | |
download | opie-9a134ab03890d942d53b4121e31e2d37859fa42c.zip opie-9a134ab03890d942d53b4121e31e2d37859fa42c.tar.gz opie-9a134ab03890d942d53b4121e31e2d37859fa42c.tar.bz2 |
New bluetooth library OT2 (loosely based on kbluetooth)
Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/OTSDPService.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/opietooth2/OTSDPService.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTSDPService.h b/noncore/settings/networksettings2/opietooth2/OTSDPService.h new file mode 100644 index 0000000..4831df0 --- a/dev/null +++ b/noncore/settings/networksettings2/opietooth2/OTSDPService.h @@ -0,0 +1,75 @@ +//-*-c++-*- +/*************************************************************************** + * Copyright (C) 2003 by Fred Schaettgen * + * kdebluetooth@schaettgen.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#ifndef SDPSERVICE_H +#define SDPSERVICE_H + +#include <qvector.h> +#include <qarray.h> +#include <OTSDPAttribute.h> + +namespace Opietooth2 { + +/** +@author Fred Schaettgen +*/ +class OTSDPService { + +public: + + OTSDPService(); + virtual ~OTSDPService(); + + void addAttribute(int id, OTSDPAttribute * attr); + + const OTSDPAttribute & attribute( int index ); + int attributeID( int index ); + + AttributeVector subAttributes( OTSDPAttribute * attr); + OTSDPAttribute * attributeByID( int id ); + + // See Bluetooth Core Spec Sec. 5.1 + bool recordHandle(uint32_t *handle); // 0x00 + + //bool getServiceClassIDList(vector<uuid_t> *classIDList); // 0x01 + //bool getServiceRecordState(uint32_t *state); // 0x02 + //bool getServiceID(uuid_t *id); // 0x03; + //bool getProtocolDescriptorList(SDP::Attribute *attribute); // 0x04 + //bool getBrowseGroupList(vector<uuid_t> *browseGroupList); // 0x05 + QString name(void); // langBase + 0x00 + QString description(void); // langBase + 0x01 + + UUIDVector allUUIDs(); + + // return list of classes this service belongs to + UUIDVector classIDList(); + + /** Retrieves the Rfcomm channel. + This function is provided just for conveniance. + @param n The Rfcomm channel. + @ret true if an rfcomm channel was found, false otherwise. */ + bool rfcommChannel(unsigned int &n); + + bool hasClassID(const OTUUID & uuid); + +private: + + struct AttributeEntry { + int id; + OTSDPAttribute * attr; + }; + + QArray<AttributeEntry> attributeList; +}; + +} + +#endif |