haiku/headers/os/bluetooth/DeviceClass.h
Oliver Ruiz Dorantes be79ee53e1 - Add Implicit namespaces
- Fix constructors & and friend classes



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24976 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 22:26:32 +00:00

65 lines
1006 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;
};
}
#ifndef _BT_USE_EXPLICIT_NAMESPACE
using Bluetooth::DeviceClass;
#endif
#endif