QBluetoothZero  2.0
QBtLocalDevice.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed under the Apache License, Version 2.0 (the "License");
00004  * you may not use this file except in compliance with the License.
00005  * You may obtain a copy of the License at
00006  *
00007  *      http://www.apache.org/licenses/LICENSE-2.0
00008  *
00009  * Unless required by applicable law or agreed to in writing, software
00010  * distributed under the License is distributed on an "AS IS" BASIS,
00011  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012  * See the License for the specific language governing permissions and
00013  * limitations under the License.
00014  */
00015 
00016 #ifndef QBTLOCALDEVICE_H
00017 #define QBTLOCALDEVICE_H
00018 
00019 #include <QBtGlobal.h>
00020 #include <QBtTypes.h>
00021 #include <QtCore/QObject>
00022 
00023 QBT_NAMESPACE_BEGIN
00024 
00025 //This class contains only static functions. How can it be used through QML
00026 // TYPE == Q_STATIC
00027 
00028 class DLL_EXPORT QBtLocalDevice //: public QObject
00029 {
00030     //Q_OBJECT
00031 public:
00032 
00036 
00039     static QBtAddress getLocalDeviceAddress();
00040 
00044     static bool isVisible ();
00045 
00050     static void setVisible (bool value);
00051     
00052     
00053     static QBtDevice::DeviceMajor getDeviceClass();
00054 
00060     static void setDeviceClass(QBtDevice::DeviceMajor classId);
00061 
00066     static void setLocalDeviceName (const QString & deviceName);
00067 
00072     static QString getLocalDeviceName();
00073 
00077     static bool isBluetoothSupported();
00078 
00084     static void askUserTurnOnBtPower();
00085     
00086     
00091     static bool setBluetoothPowerState (bool value);    
00092 
00096     static bool getBluetoothPowerState();
00097 
00103     static bool addNewDevice(const QBtDevice& device);
00104 
00110     static bool deleteDevice(const QBtDevice& device);
00111 
00117     static bool deleteDevice(const QBtAddress& address);
00118 
00124     static bool unpairDevice(const QBtDevice& device);
00125 
00132     static bool unpairDevice(const QBtAddress& address);
00133 };
00134 
00135 QBT_NAMESPACE_END
00136 
00137 Q_DECLARE_METATYPE(QBT_PREPEND_NAMESPACE(QBtLocalDevice))
00138 
00139 #if QT_VERSION >= 0x040700
00140 //QML_DECLARE_TYPEINFO(QBT_PREPEND_NAMESPACE(QBtLocalDevice))
00141 #endif
00142 
00143 
00144 #endif // QBTLOCALDEVICE_H