2007-08-05 19:48:04 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 by Dominik Wenger
|
2007-08-23 22:11:50 +00:00
|
|
|
* $Id$
|
2007-08-05 19:48:04 +00:00
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2007-08-05 19:48:04 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef AUTODETECTION_H_
|
|
|
|
#define AUTODETECTION_H_
|
|
|
|
|
2008-02-10 18:25:49 +00:00
|
|
|
#include <QtCore>
|
2008-04-03 20:05:13 +00:00
|
|
|
#include "rbsettings.h"
|
2007-08-05 19:48:04 +00:00
|
|
|
|
|
|
|
class Autodetection :public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
Autodetection(QObject* parent=0);
|
2008-05-22 17:51:35 +00:00
|
|
|
|
2008-04-03 20:05:13 +00:00
|
|
|
void setSettings(RbSettings* sett) {settings = sett;}
|
2008-05-22 17:51:35 +00:00
|
|
|
|
2007-08-05 19:48:04 +00:00
|
|
|
bool detect();
|
2007-09-15 22:57:07 +00:00
|
|
|
|
2007-08-05 19:48:04 +00:00
|
|
|
QString getDevice() {return m_device;}
|
|
|
|
QString getMountPoint() {return m_mountpoint;}
|
2007-09-14 20:52:38 +00:00
|
|
|
QString errdev(void) { return m_errdev; }
|
2008-04-05 21:48:54 +00:00
|
|
|
QString incompatdev(void) { return m_incompat; }
|
2008-12-13 19:45:11 +00:00
|
|
|
static QStringList mountpoints(void);
|
2007-08-05 19:48:04 +00:00
|
|
|
|
|
|
|
private:
|
2007-08-23 15:24:28 +00:00
|
|
|
QString resolveMountPoint(QString);
|
2007-09-14 20:52:38 +00:00
|
|
|
bool detectUsb(void);
|
2007-09-27 08:50:47 +00:00
|
|
|
bool detectAjbrec(QString);
|
2007-09-15 22:57:07 +00:00
|
|
|
|
2007-08-05 19:48:04 +00:00
|
|
|
QString m_device;
|
|
|
|
QString m_mountpoint;
|
2007-09-14 20:52:38 +00:00
|
|
|
QString m_errdev;
|
2008-04-05 21:48:54 +00:00
|
|
|
QString m_incompat;
|
2007-09-27 08:50:47 +00:00
|
|
|
QList<int> m_usbconid;
|
2008-04-03 20:05:13 +00:00
|
|
|
RbSettings* settings;
|
2007-08-05 19:48:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif /*AUTODETECTION_H_*/
|
2008-10-15 18:37:26 +00:00
|
|
|
|