2
/***************************************************************************
3
* Copyright (C) 2003 by Fred Schaettgen *
4
* kdebluetooth@schaettgen.de *
6
* This program is free software; you can redistribute it and/or modify *
7
* it under the terms of the GNU General Public License as published by *
8
* the Free Software Foundation; either version 2 of the License, or *
9
* (at your option) any later version. *
10
***************************************************************************/
17
#include "sdpattribute.h"
25
@author Fred Schaettgen
36
std::vector<AttributeEntry> attributeList;
37
std::vector<int> languageBases;
38
std::map<int,int> languageBaseToMibEnum;
42
void addAttribute(int id, const Attribute& attr);
43
const Attribute& getAttribute(int index);
44
int getAttributeID(int index);
45
std::vector<SDP::Attribute> getSubAttributes(SDP::Attribute attr);
47
bool getAttributeByID(int id, Attribute& attrib);
48
bool getI18nAttributeByID(int id, Attribute& attrib, int &languageBase);
49
QString decodeI18nString(int languageBase, const QCString &cstring);
51
// See Bluetooth Core Spec Sec. 5.1
52
bool getServiceRecordHandle(uint32_t *handle); // 0x00
53
//bool getServiceClassIDList(vector<uuid_t> *classIDList); // 0x01
54
//bool getServiceRecordState(uint32_t *state); // 0x02
55
//bool getServiceID(uuid_t *id); // 0x03;
56
//bool getProtocolDescriptorList(SDP::Attribute *attribute); // 0x04
57
//bool getBrowseGroupList(vector<uuid_t> *browseGroupList); // 0x05
58
bool getServiceName(QString &name); // langBase + 0x00
59
bool getServiceDescription(QString &desc); // langBase + 0x01
60
std::vector<SDP::uuid_t> getAllUUIDs();
64
/** Retrieves the Rfcomm channel.
65
This function is provided just for conveniance.
66
@param n The Rfcomm channel.
67
@ret true if an rfcomm channel was found, false otherwise. */
68
bool getRfcommChannel(unsigned int &n);
69
SDP::UUIDVec getClassIdList();
71
bool haveServiceClassID(SDP::uuid_t uuid);