Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OTDeviceAddress.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 /***************************************************************************
00003  *   Copyright (C) 2003 by Fred Schaettgen                                 *
00004  *   kdebluetooth@0xF.de                                                   *
00005  *                                                                         *
00006  *   This program is free software; you can redistribute it and/or modify  *
00007  *   it under the terms of the GNU General Public License as published by  *
00008  *   the Free Software Foundation; either version 2 of the License, or     *
00009  *   (at your option) any later version.                                   *
00010  ***************************************************************************/
00011 
00012 #ifndef OTDEVICEADDRESS_H
00013 #define OTDEVICEADDRESS_H
00014 
00015 #include <qstring.h>
00016 #include <bluezlib.h>
00017 
00018 namespace Opietooth2 {
00019 
00029 class OTDeviceAddress {
00030 
00031 public:
00032 
00036     OTDeviceAddress();
00037 
00043     explicit OTDeviceAddress( const bdaddr_t& bdaddr,
00044                               bool networkbyteorder = false
00045                             );
00046 
00052     explicit OTDeviceAddress(const QString& s);
00053 
00057     QString toString() const;
00058 
00064     inline const bdaddr_t & getBDAddr( void ) const
00065       { return BDaddr; }
00066     bdaddr_t getBDAddrInNetworkByteOrder() const;
00067     void setBDAddr( const bdaddr_t& bdaddr,
00068                     bool networkbyteorder = false
00069                   );
00070 
00077     bool operator<(const OTDeviceAddress& b) const;
00078 
00085     bool operator==(const OTDeviceAddress& b) const;
00086 
00087     inline bool operator!=(const OTDeviceAddress& b) const
00088       { return ! ( *this == b ); }
00089 
00091     static const OTDeviceAddress local;
00092 
00094     static const OTDeviceAddress any;
00095 
00097     static const OTDeviceAddress invalid;
00098 
00099 protected:
00100 
00101     bdaddr_t BDaddr;
00102     bool     IsValid;
00103 
00104 };
00105 
00106 }
00107 
00108 #endif

Generated on Sat Nov 5 16:17:55 2005 for OPIE by  doxygen 1.4.2