[PC-BSD Commits] r14984 - pcbsd/current/src-qt4/libpcbsd
svn at pcbsd.org
svn at pcbsd.org
Fri Jan 20 16:19:40 PST 2012
Author: kenmoore
Date: 2012-01-21 00:19:40 +0000 (Sat, 21 Jan 2012)
New Revision: 14984
Modified:
pcbsd/current/src-qt4/libpcbsd/hardware.cpp
pcbsd/current/src-qt4/libpcbsd/pcbsd-hardware.h
Log:
Add a "restartBT()" function to libpcbsd-hardware
Modified: pcbsd/current/src-qt4/libpcbsd/hardware.cpp
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/hardware.cpp 2012-01-20 18:06:10 UTC (rev 14983)
+++ pcbsd/current/src-qt4/libpcbsd/hardware.cpp 2012-01-21 00:19:40 UTC (rev 14984)
@@ -1,6 +1,6 @@
/***************************************************************************
- * Copyright (C) 2011 by Ken Moore *
- * ken at pcbsd.org *
+ * Copyright (C) 2011 by Ken Moore *
+ * ken at pcbsd.org *
* *
* Permission is hereby granted, free of charge, to any person obtaining *
* a copy of this software and associated documentation files (the *
@@ -15,7 +15,7 @@
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR *
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
@@ -114,7 +114,8 @@
Utils::runShellCommand("mv /etc/bluetooth/hcsecd.conf.tmp /etc/bluetooth/hcsecd.conf");
//restart the bluetooth service
- Utils::runShellCommand("/etc/rc.d/hcsecd restart");
+ restartBT();
+
return;
}
@@ -162,7 +163,7 @@
Utils::runShellCommand("mv /etc/bluetooth/hcsecd.conf.tmp /etc/bluetooth/hcsecd.conf");
//Restart the bluetooth service if desired
- if(willRestart) { Utils::runShellCommand("/etc/rc.d/hcsecd restart"); }
+ if(willRestart) { restartBT(); }
}
QString Hardware::getHcsecsDeviceValue(QString rawline){
@@ -171,3 +172,7 @@
line = line.section(" ",1,1,QString::SectionSkipEmpty); //remove the label at the beginning
return line;
}
+
+void Hardware::restartBT(){
+ Utils::runShellCommand("/etc/rc.d/hcsecd restart");
+}
Modified: pcbsd/current/src-qt4/libpcbsd/pcbsd-hardware.h
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/pcbsd-hardware.h 2012-01-20 18:06:10 UTC (rev 14983)
+++ pcbsd/current/src-qt4/libpcbsd/pcbsd-hardware.h 2012-01-21 00:19:40 UTC (rev 14984)
@@ -1,6 +1,6 @@
/***************************************************************************
- * Copyright (C) 2008 by Tim McCormick *
- * tim at pcbsd.org *
+ * Copyright (C) 2008 by Tim McCormick *
+ * ken at pcbsd.org *
* *
* Permission is hereby granted, free of charge, to any person obtaining *
* a copy of this software and associated documentation files (the *
@@ -15,7 +15,7 @@
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR *
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
@@ -37,7 +37,8 @@
void setBTdevName(QString newName, QString devName);
void addBTdevice(QString bdaddr, QString name, QString key, QString pin);
void rmBTdevice(QString bdaddr, bool willRestart);
-
+ void restartBT();
+
private:
QString name;
QString getHcsecsDeviceValue(QString rawline); //for bluetooth functions
More information about the Commits
mailing list