mirror of
https://review.haiku-os.org/haiku
synced 2025-02-01 11:15:59 +01:00
c36b70586d
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22641 a95241bf-73f2-0310-859d-f6bbb57e9c96
48 lines
958 B
C++
48 lines
958 B
C++
/*
|
|
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
|
*
|
|
* All rights reserved. Distributed under the terms of the MIT License.
|
|
*
|
|
*/
|
|
|
|
#ifndef _DEVICE_CLASS_H
|
|
#define _DEVICE_CLASS_H
|
|
|
|
#include <String.h>
|
|
|
|
namespace Bluetooth {
|
|
|
|
class DeviceClass {
|
|
|
|
public:
|
|
DeviceClass(int record) {
|
|
this->record = record;
|
|
}
|
|
|
|
int getServiceClasses() {
|
|
return (record & 0x00FFE000) >> 13;
|
|
}
|
|
|
|
int getMajorDeviceClass() {
|
|
return (record & 0x00001F00) >> 8;
|
|
}
|
|
|
|
void getMajorDeviceClass(BString* str) {
|
|
|
|
}
|
|
|
|
int getMinorDeviceClass() {
|
|
return (record & 0x000000FF) >> 2;
|
|
}
|
|
|
|
void getMinorDeviceClass(BString* str) {
|
|
|
|
}
|
|
|
|
private:
|
|
int record;
|
|
};
|
|
}
|
|
|
|
#endif
|