summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools/Idle')
-rw-r--r--SwifTools/Idle/ActualIdleDetector.cpp8
-rw-r--r--SwifTools/Idle/ActualIdleDetector.h2
-rw-r--r--SwifTools/Idle/DummyIdleQuerier.h2
-rw-r--r--SwifTools/Idle/IdleDetector.cpp2
-rw-r--r--SwifTools/Idle/IdleDetector.h3
-rw-r--r--SwifTools/Idle/IdleQuerier.cpp2
-rw-r--r--SwifTools/Idle/IdleQuerierTest/IdleQuerierTest.cpp4
-rw-r--r--SwifTools/Idle/IdleQuerierTest/SConscript1
-rw-r--r--SwifTools/Idle/MacOSXIdleQuerier.cpp3
-rw-r--r--SwifTools/Idle/MacOSXIdleQuerier.h2
-rw-r--r--SwifTools/Idle/PlatformIdleQuerier.cpp16
-rw-r--r--SwifTools/Idle/PlatformIdleQuerier.h2
-rw-r--r--SwifTools/Idle/UnitTest/ActualIdleDetectorTest.cpp10
-rw-r--r--SwifTools/Idle/WindowsIdleQuerier.cpp2
-rw-r--r--SwifTools/Idle/WindowsIdleQuerier.h2
-rw-r--r--SwifTools/Idle/XSSIdleQuerier.cpp2
-rw-r--r--SwifTools/Idle/XSSIdleQuerier.h2
17 files changed, 33 insertions, 32 deletions
diff --git a/SwifTools/Idle/ActualIdleDetector.cpp b/SwifTools/Idle/ActualIdleDetector.cpp
index 59df632..2a99e1a 100644
--- a/SwifTools/Idle/ActualIdleDetector.cpp
+++ b/SwifTools/Idle/ActualIdleDetector.cpp
@@ -4,14 +4,14 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "SwifTools/Idle/ActualIdleDetector.h"
+#include <SwifTools/Idle/ActualIdleDetector.h>
#include <boost/bind.hpp>
#include <iostream>
-#include "SwifTools/Idle/IdleQuerier.h"
-#include "Swiften/Network/Timer.h"
-#include "Swiften/Network/TimerFactory.h"
+#include <SwifTools/Idle/IdleQuerier.h>
+#include <Swiften/Network/Timer.h>
+#include <Swiften/Network/TimerFactory.h>
namespace Swift {
diff --git a/SwifTools/Idle/ActualIdleDetector.h b/SwifTools/Idle/ActualIdleDetector.h
index 3a355cc..7845398 100644
--- a/SwifTools/Idle/ActualIdleDetector.h
+++ b/SwifTools/Idle/ActualIdleDetector.h
@@ -8,7 +8,7 @@
#include <boost/shared_ptr.hpp>
-#include "SwifTools/Idle/IdleDetector.h"
+#include <SwifTools/Idle/IdleDetector.h>
namespace Swift {
class IdleQuerier;
diff --git a/SwifTools/Idle/DummyIdleQuerier.h b/SwifTools/Idle/DummyIdleQuerier.h
index 0c40643..162d8f6 100644
--- a/SwifTools/Idle/DummyIdleQuerier.h
+++ b/SwifTools/Idle/DummyIdleQuerier.h
@@ -6,7 +6,7 @@
#pragma once
-#include "SwifTools/Idle/IdleQuerier.h"
+#include <SwifTools/Idle/IdleQuerier.h>
namespace Swift {
class DummyIdleQuerier : public IdleQuerier {
diff --git a/SwifTools/Idle/IdleDetector.cpp b/SwifTools/Idle/IdleDetector.cpp
index f29be01..66ec4a5 100644
--- a/SwifTools/Idle/IdleDetector.cpp
+++ b/SwifTools/Idle/IdleDetector.cpp
@@ -4,7 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "SwifTools/Idle/IdleDetector.h"
+#include <SwifTools/Idle/IdleDetector.h>
namespace Swift {
diff --git a/SwifTools/Idle/IdleDetector.h b/SwifTools/Idle/IdleDetector.h
index 746e281..9e379f7 100644
--- a/SwifTools/Idle/IdleDetector.h
+++ b/SwifTools/Idle/IdleDetector.h
@@ -6,7 +6,7 @@
#pragma once
-#include "Swiften/Base/boost_bsignals.h"
+#include <Swiften/Base/boost_bsignals.h>
#include <boost/shared_ptr.hpp>
namespace Swift {
@@ -29,7 +29,6 @@ namespace Swift {
boost::signal<void (bool /* isIdle */)> onIdleChanged;
- protected:
void setIdle(bool b) {
if (b != idle) {
idle = b;
diff --git a/SwifTools/Idle/IdleQuerier.cpp b/SwifTools/Idle/IdleQuerier.cpp
index d8c01ca..f553252 100644
--- a/SwifTools/Idle/IdleQuerier.cpp
+++ b/SwifTools/Idle/IdleQuerier.cpp
@@ -4,7 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "SwifTools/Idle/IdleQuerier.h"
+#include <SwifTools/Idle/IdleQuerier.h>
namespace Swift {
diff --git a/SwifTools/Idle/IdleQuerierTest/IdleQuerierTest.cpp b/SwifTools/Idle/IdleQuerierTest/IdleQuerierTest.cpp
index 5ae4a4d..df233a2 100644
--- a/SwifTools/Idle/IdleQuerierTest/IdleQuerierTest.cpp
+++ b/SwifTools/Idle/IdleQuerierTest/IdleQuerierTest.cpp
@@ -6,8 +6,8 @@
#include <iostream>
-#include "SwifTools/Idle/PlatformIdleQuerier.h"
-#include "Swiften/Base/sleep.h"
+#include <SwifTools/Idle/PlatformIdleQuerier.h>
+#include <Swiften/Base/sleep.h>
using namespace Swift;
diff --git a/SwifTools/Idle/IdleQuerierTest/SConscript b/SwifTools/Idle/IdleQuerierTest/SConscript
index 65f94ba..5878a46 100644
--- a/SwifTools/Idle/IdleQuerierTest/SConscript
+++ b/SwifTools/Idle/IdleQuerierTest/SConscript
@@ -7,5 +7,6 @@ if env["TEST"] :
myenv.MergeFlags(myenv["BOOST_FLAGS"])
if myenv["HAVE_XSS"] :
myenv.MergeFlags(myenv.get("XSS_FLAGS", {}))
+ myenv.Append(LIBS = ["X11"])
myenv.MergeFlags(myenv["PLATFORM_FLAGS"])
tester = myenv.Program("IdleQuerierTest", ["IdleQuerierTest.cpp"])
diff --git a/SwifTools/Idle/MacOSXIdleQuerier.cpp b/SwifTools/Idle/MacOSXIdleQuerier.cpp
index 4760285..b634fcb 100644
--- a/SwifTools/Idle/MacOSXIdleQuerier.cpp
+++ b/SwifTools/Idle/MacOSXIdleQuerier.cpp
@@ -4,7 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "SwifTools/Idle/MacOSXIdleQuerier.h"
+#include <SwifTools/Idle/MacOSXIdleQuerier.h>
#pragma GCC diagnostic ignored "-Wold-style-cast"
@@ -26,6 +26,7 @@ int MacOSXIdleQuerier::getIdleTimeSeconds() {
uint64_t idle = 0;
bool result = CFNumberGetValue((CFNumberRef)property, kCFNumberSInt64Type, &idle);
assert(result);
+ (void) result;
CFRelease(property);
return idle / 1000000000;
}
diff --git a/SwifTools/Idle/MacOSXIdleQuerier.h b/SwifTools/Idle/MacOSXIdleQuerier.h
index ebd4656..fbbd448 100644
--- a/SwifTools/Idle/MacOSXIdleQuerier.h
+++ b/SwifTools/Idle/MacOSXIdleQuerier.h
@@ -8,7 +8,7 @@
#include <IOKit/IOKitLib.h>
-#include "SwifTools/Idle/IdleQuerier.h"
+#include <SwifTools/Idle/IdleQuerier.h>
namespace Swift {
class MacOSXIdleQuerier : public IdleQuerier {
diff --git a/SwifTools/Idle/PlatformIdleQuerier.cpp b/SwifTools/Idle/PlatformIdleQuerier.cpp
index a28e701..34bcedd 100644
--- a/SwifTools/Idle/PlatformIdleQuerier.cpp
+++ b/SwifTools/Idle/PlatformIdleQuerier.cpp
@@ -4,17 +4,17 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "SwifTools/Idle/PlatformIdleQuerier.h"
-#include "Swiften/Base/Platform.h"
+#include <SwifTools/Idle/PlatformIdleQuerier.h>
+#include <Swiften/Base/Platform.h>
-#if defined(SWIFTEN_PLATFORM_MACOSX) && defined(HAVE_IOKIT)
-#include "SwifTools/Idle/MacOSXIdleQuerier.h"
+#if defined(SWIFTEN_PLATFORM_MACOSX) && defined(HAVE_IOKIT) && !defined(SWIFTEN_PLATFORM_IPHONE)
+#include <SwifTools/Idle/MacOSXIdleQuerier.h>
#elif defined(SWIFTEN_PLATFORM_WINDOWS)
-#include "SwifTools/Idle/WindowsIdleQuerier.h"
+#include <SwifTools/Idle/WindowsIdleQuerier.h>
#elif defined(HAVE_XSS)
-#include "SwifTools/Idle/XSSIdleQuerier.h"
+#include <SwifTools/Idle/XSSIdleQuerier.h>
#endif
-#include "SwifTools/Idle/DummyIdleQuerier.h"
+#include <SwifTools/Idle/DummyIdleQuerier.h>
#include <cassert>
#include <iostream>
@@ -23,7 +23,7 @@ namespace Swift {
PlatformIdleQuerier::PlatformIdleQuerier() : querier(NULL) {
#if defined(SWIFTEN_PLATFORM_MACOSX)
-#if defined(HAVE_IOKIT)
+#if defined(HAVE_IOKIT) && !defined(SWIFTEN_PLATFORM_IPHONE)
querier = new MacOSXIdleQuerier();
#else
querier = new DummyIdleQuerier();
diff --git a/SwifTools/Idle/PlatformIdleQuerier.h b/SwifTools/Idle/PlatformIdleQuerier.h
index 30c4bb7..2679e39 100644
--- a/SwifTools/Idle/PlatformIdleQuerier.h
+++ b/SwifTools/Idle/PlatformIdleQuerier.h
@@ -6,7 +6,7 @@
#pragma once
-#include "SwifTools/Idle/IdleQuerier.h"
+#include <SwifTools/Idle/IdleQuerier.h>
namespace Swift {
class PlatformIdleQuerier : public IdleQuerier {
diff --git a/SwifTools/Idle/UnitTest/ActualIdleDetectorTest.cpp b/SwifTools/Idle/UnitTest/ActualIdleDetectorTest.cpp
index 3fa7136..686b7a0 100644
--- a/SwifTools/Idle/UnitTest/ActualIdleDetectorTest.cpp
+++ b/SwifTools/Idle/UnitTest/ActualIdleDetectorTest.cpp
@@ -8,11 +8,11 @@
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <boost/bind.hpp>
-#include "SwifTools/Idle/ActualIdleDetector.h"
-#include "SwifTools/Idle/IdleQuerier.h"
-#include "Swiften/Base/foreach.h"
-#include "Swiften/Network/TimerFactory.h"
-#include "Swiften/Network/Timer.h"
+#include <SwifTools/Idle/ActualIdleDetector.h>
+#include <SwifTools/Idle/IdleQuerier.h>
+#include <Swiften/Base/foreach.h>
+#include <Swiften/Network/TimerFactory.h>
+#include <Swiften/Network/Timer.h>
using namespace Swift;
diff --git a/SwifTools/Idle/WindowsIdleQuerier.cpp b/SwifTools/Idle/WindowsIdleQuerier.cpp
index 904fd6d..4b9a5a1 100644
--- a/SwifTools/Idle/WindowsIdleQuerier.cpp
+++ b/SwifTools/Idle/WindowsIdleQuerier.cpp
@@ -4,7 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "SwifTools/Idle/WindowsIdleQuerier.h"
+#include <SwifTools/Idle/WindowsIdleQuerier.h>
#include <windows.h>
diff --git a/SwifTools/Idle/WindowsIdleQuerier.h b/SwifTools/Idle/WindowsIdleQuerier.h
index 8297c77..4a219e5 100644
--- a/SwifTools/Idle/WindowsIdleQuerier.h
+++ b/SwifTools/Idle/WindowsIdleQuerier.h
@@ -6,7 +6,7 @@
#pragma once
-#include "SwifTools/Idle/IdleQuerier.h"
+#include <SwifTools/Idle/IdleQuerier.h>
namespace Swift {
class WindowsIdleQuerier : public IdleQuerier {
diff --git a/SwifTools/Idle/XSSIdleQuerier.cpp b/SwifTools/Idle/XSSIdleQuerier.cpp
index 39a3cef..74e1eda 100644
--- a/SwifTools/Idle/XSSIdleQuerier.cpp
+++ b/SwifTools/Idle/XSSIdleQuerier.cpp
@@ -4,7 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "SwifTools/Idle/XSSIdleQuerier.h"
+#include <SwifTools/Idle/XSSIdleQuerier.h>
#include <cassert>
#include <iostream>
diff --git a/SwifTools/Idle/XSSIdleQuerier.h b/SwifTools/Idle/XSSIdleQuerier.h
index b00c702..29569a3 100644
--- a/SwifTools/Idle/XSSIdleQuerier.h
+++ b/SwifTools/Idle/XSSIdleQuerier.h
@@ -9,7 +9,7 @@
#include <X11/Xlib.h>
#include <X11/extensions/scrnsaver.h>
-#include "SwifTools/Idle/IdleQuerier.h"
+#include <SwifTools/Idle/IdleQuerier.h>
namespace Swift {
class XSSIdleQuerier : public IdleQuerier {