summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2007-09-02 10:50:13 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2007-09-02 10:50:13 +0000
commit72b74478bfe0fd6fc54b4fae5ffeeee311fc3c6a (patch)
tree7db78e0f0a3bffd8779e23dc159fa4bde01a6d98 /rbutil
parent5ccf18019ed9529564300dc13313705ab35b94b3 (diff)
downloadrockbox-72b74478bfe0fd6fc54b4fae5ffeeee311fc3c6a.tar.gz
rockbox-72b74478bfe0fd6fc54b4fae5ffeeee311fc3c6a.zip
Add first time detection for some archos devices and gigabeat based on player-specific files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14576 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/autodetection.cpp45
1 files changed, 41 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/autodetection.cpp b/rbutil/rbutilqt/autodetection.cpp
index 8f478835be..59b3373f19 100644
--- a/rbutil/rbutilqt/autodetection.cpp
+++ b/rbutil/rbutilqt/autodetection.cpp
@@ -70,12 +70,49 @@ bool Autodetection::detect()
70 return true; 70 return true;
71 } 71 }
72 } 72 }
73 // check for some specific files in root folder
74 QDir root(mountpoints.at(i));
75 QStringList rootentries = root.entryList(QDir::Files);
76 if(rootentries.contains("archos.mod", Qt::CaseSensitive))
77 {
78 // archos.mod in root folder -> Archos Player
79 m_device = "player";
80 m_mountpoint = mountpoints.at(i);
81 return true;
82 }
83 if(rootentries.contains("ONDIOST.BIN"))
84 {
85 // ONDIOST.BIN in root -> Ondio FM
86 m_device = "ondiofm";
87 m_mountpoint = mountpoints.at(i);
88 return true;
89 }
90 if(rootentries.contains("ONDIOSP.BIN"))
91 {
92 // ONDIOSP.BIN in root -> Ondio SP
93 m_device = "ondiosp";
94 m_mountpoint = mountpoints.at(i);
95 return true;
96 }
97 if(rootentries.contains("ajbrec.ajz"))
98 {
99 qDebug() << "it's an archos. further detection needed";
100 }
101 // detection based on player specific folders
102 QStringList rootfolders = root.entryList(QDir::Dirs);
103 if(rootfolders.contains("GBSYSTEM"))
104 {
105 // GBSYSTEM folder -> Gigabeat
106 m_device = "gigabeatf";
107 m_mountpoint = mountpoints.at(i);
108 return true;
109 }
110 qDebug() << rootfolders;
73 } 111 }
74 112
75 } 113 }
76
77 int n;
78 114
115 int n;
79 //try ipodpatcher 116 //try ipodpatcher
80 struct ipod_t ipod; 117 struct ipod_t ipod;
81 n = ipod_scan(&ipod); 118 n = ipod_scan(&ipod);
@@ -85,7 +122,7 @@ bool Autodetection::detect()
85 m_mountpoint = resolveMountPoint(ipod.diskname); 122 m_mountpoint = resolveMountPoint(ipod.diskname);
86 return true; 123 return true;
87 } 124 }
88 125
89 //try sansapatcher 126 //try sansapatcher
90 struct sansa_t sansa; 127 struct sansa_t sansa;
91 n = sansa_scan(&sansa); 128 n = sansa_scan(&sansa);
@@ -95,7 +132,7 @@ bool Autodetection::detect()
95 m_mountpoint = resolveMountPoint(sansa.diskname); 132 m_mountpoint = resolveMountPoint(sansa.diskname);
96 return true; 133 return true;
97 } 134 }
98 135
99 return false; 136 return false;
100} 137}
101 138