File indexing completed on 2022-09-27 14:35:03

0001 /*
0002  * KMix -- KDE's full featured mini mixer
0003  *
0004  * Copyright (C) 2000 Stefan Schimanski <1Stein@gmx.de>
0005  *
0006  * This program is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Library General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2 of the License, or (at your option) any later version.
0010  *
0011  * This program is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014  * Library General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Library General Public
0017  * License along with this program; if not, write to the Free
0018  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
0019  */
0020 
0021 #ifndef KMIXD_H
0022 #define KMIXD_H
0023 
0024 
0025 // Qt
0026 #include <QDBusContext>
0027 #include <QString>
0028 
0029 #include <qlist.h>
0030 #include <QTimer>
0031 
0032 // KDE
0033 #include <kdedmodule.h> 
0034 
0035 class
0036 KMixD : public KDEDModule, protected QDBusContext
0037 {
0038   Q_OBJECT
0039   Q_CLASSINFO("D-Bus Interface", "org.kde.KMixD")
0040 
0041   public:
0042    explicit KMixD(QObject* parent, const QList<QVariant>&);
0043    ~KMixD();
0044 
0045   private: 
0046    void saveBaseConfig();
0047    void loadConfig();
0048    void loadBaseConfig();
0049 
0050    void initActions();
0051 
0052   private:
0053    bool m_multiDriverMode;
0054    QList<QString> m_backendFilter;
0055 
0056   private slots:
0057    void delayedInitialization();
0058    void saveConfig();
0059 
0060    void plugged(const char *driverName, const QString &udi, int dev);
0061    void unplugged(const QString &udi);
0062 };
0063 
0064 #endif // KMIXD_H