2008-06-27 22:48:25 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 by Dominik Wenger
|
2008-06-30 22:09:45 +00:00
|
|
|
* $Id$
|
2008-06-27 22:48:25 +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.
|
2008-06-27 22:48:25 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef DETECT_H
|
|
|
|
#define DETECT_H
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <QUrl>
|
|
|
|
#include "rbsettings.h"
|
|
|
|
|
2008-10-24 22:31:07 +00:00
|
|
|
class Detect
|
2008-06-27 22:48:25 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
Detect() {}
|
2008-10-24 22:31:07 +00:00
|
|
|
|
2008-06-27 22:48:25 +00:00
|
|
|
#if defined(Q_OS_WIN32)
|
|
|
|
enum userlevel { ERR, GUEST, USER, ADMIN };
|
|
|
|
static enum userlevel userPermissions(void);
|
|
|
|
static QString userPermissionsString(void);
|
|
|
|
#endif
|
2008-10-24 22:31:07 +00:00
|
|
|
|
2008-06-27 22:48:25 +00:00
|
|
|
static QString userName(void);
|
|
|
|
static QString osVersionString(void);
|
|
|
|
static QList<uint32_t> listUsbIds(void);
|
2008-06-28 18:06:55 +00:00
|
|
|
static QMap<uint32_t, QString> listUsbDevices(void);
|
2008-06-27 22:48:25 +00:00
|
|
|
|
|
|
|
static QUrl systemProxy(void);
|
|
|
|
static QString installedVersion(QString mountpoint);
|
|
|
|
static int installedTargetId(QString mountpoint);
|
|
|
|
|
2008-10-24 22:31:07 +00:00
|
|
|
static QString check(RbSettings* settings, bool permission, int targetId);
|
2008-06-27 22:48:25 +00:00
|
|
|
|
|
|
|
};
|
2008-09-19 05:28:59 +00:00
|
|
|
#endif
|
2008-06-27 22:48:25 +00:00
|
|
|
|