summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base')
-rw-r--r--rbutil/rbutilqt/base/autodetection.cpp16
-rw-r--r--rbutil/rbutilqt/base/autodetection.h4
2 files changed, 11 insertions, 9 deletions
diff --git a/rbutil/rbutilqt/base/autodetection.cpp b/rbutil/rbutilqt/base/autodetection.cpp
index 67e95b998d..2a82bf319f 100644
--- a/rbutil/rbutilqt/base/autodetection.cpp
+++ b/rbutil/rbutilqt/base/autodetection.cpp
@@ -20,6 +20,9 @@
20#include <QtCore> 20#include <QtCore>
21#include "autodetection.h" 21#include "autodetection.h"
22 22
23#include "../ipodpatcher/ipodpatcher.h"
24#include "../sansapatcher/sansapatcher.h"
25
23#if defined(Q_OS_LINUX) || defined(Q_OS_MACX) 26#if defined(Q_OS_LINUX) || defined(Q_OS_MACX)
24#include <stdio.h> 27#include <stdio.h>
25#include <usb.h> 28#include <usb.h>
@@ -47,7 +50,6 @@
47 50
48Autodetection::Autodetection(QObject* parent): QObject(parent) 51Autodetection::Autodetection(QObject* parent): QObject(parent)
49{ 52{
50
51} 53}
52 54
53bool Autodetection::detect() 55bool Autodetection::detect()
@@ -190,7 +192,8 @@ bool Autodetection::detect()
190 free(sansa_sectorbuf); 192 free(sansa_sectorbuf);
191 sansa_sectorbuf = NULL; 193 sansa_sectorbuf = NULL;
192 194
193 if(m_mountpoint.isEmpty() && m_device.isEmpty() && m_errdev.isEmpty() && m_incompat.isEmpty()) 195 if(m_mountpoint.isEmpty() && m_device.isEmpty()
196 && m_errdev.isEmpty() && m_incompat.isEmpty())
194 return false; 197 return false;
195 return true; 198 return true;
196} 199}
@@ -362,17 +365,17 @@ bool Autodetection::detectAjbrec(QString root)
362 qDebug() << "file len:" << f.size(); 365 qDebug() << "file len:" << f.size();
363 if((f.size() - 6) == len) 366 if((f.size() - 6) == len)
364 m_device = "recorder"; 367 m_device = "recorder";
365 368
366 // size didn't match, now we need to assume we have a headerlength of 24. 369 // size didn't match, now we need to assume we have a headerlength of 24.
367 switch(header[11]) { 370 switch(header[11]) {
368 case 2: 371 case 2:
369 m_device = "recorderv2"; 372 m_device = "recorderv2";
370 break; 373 break;
371 374
372 case 4: 375 case 4:
373 m_device = "fmrecorder"; 376 m_device = "fmrecorder";
374 break; 377 break;
375 378
376 case 8: 379 case 8:
377 m_device = "ondiofm"; 380 m_device = "ondiofm";
378 break; 381 break;
@@ -385,7 +388,8 @@ bool Autodetection::detectAjbrec(QString root)
385 break; 388 break;
386 } 389 }
387 f.close(); 390 f.close();
388 391
389 if(m_device.isEmpty()) return false; 392 if(m_device.isEmpty()) return false;
390 return true; 393 return true;
391} 394}
395
diff --git a/rbutil/rbutilqt/base/autodetection.h b/rbutil/rbutilqt/base/autodetection.h
index 1fbe47f9a7..64c68dbbca 100644
--- a/rbutil/rbutilqt/base/autodetection.h
+++ b/rbutil/rbutilqt/base/autodetection.h
@@ -26,9 +26,6 @@
26#include <QtCore> 26#include <QtCore>
27#include "rbsettings.h" 27#include "rbsettings.h"
28 28
29#include "../ipodpatcher/ipodpatcher.h"
30#include "../sansapatcher/sansapatcher.h"
31
32class Autodetection :public QObject 29class Autodetection :public QObject
33{ 30{
34 Q_OBJECT 31 Q_OBJECT
@@ -61,3 +58,4 @@ private:
61 58
62 59
63#endif /*AUTODETECTION_H_*/ 60#endif /*AUTODETECTION_H_*/
61