~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kinfocenter/Modules/view1394/view1394.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * view1394.h
 
3
 *
 
4
 *  Copyright (C) 2003 Alexander Neundorf <neundorf@kde.org>
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
19
 */
 
20
 
 
21
#ifndef VIEW1394_H_
 
22
#define VIEW1394_H_
 
23
 
 
24
#include <kcmodule.h>
 
25
 
 
26
#include <QMap>
 
27
#include <QSocketNotifier>
 
28
 
 
29
#include <QTimer>
 
30
 
 
31
#include "ui_view1394widget.h"
 
32
 
 
33
#include <libraw1394/raw1394.h>
 
34
 
 
35
 
 
36
class OuiDb {
 
37
public:
 
38
        OuiDb();
 
39
        QString vendor(octlet_t guid);
 
40
private:
 
41
        QMap<QString, QString> m_vendorIds;
 
42
};
 
43
 
 
44
class View1394Widget : public QWidget, public Ui::View1394Widget {
 
45
public:
 
46
        View1394Widget(QWidget *parent) :
 
47
                QWidget(parent) {
 
48
                setupUi( this);
 
49
        }
 
50
};
 
51
 
 
52
class View1394 : public KCModule {
 
53
Q_OBJECT
 
54
public:
 
55
        View1394(QWidget *parent, const QVariantList &args);
 
56
        virtual ~View1394();
 
57
 
 
58
public Q_SLOTS:
 
59
        // Public slots
 
60
        void rescanBus();
 
61
        void generateBusReset();
 
62
 
 
63
private:
 
64
        View1394Widget *m_view;
 
65
        QList<raw1394handle_t> m_handles;
 
66
        QList<QSocketNotifier*> m_notifiers;
 
67
        bool readConfigRom(raw1394handle_t handle, nodeid_t nodeid, quadlet_t& firstQuad, quadlet_t& cap, octlet_t& guid);
 
68
        bool m_insideRescanBus;
 
69
        QTimer m_rescanTimer;
 
70
        OuiDb *m_ouiDb;
 
71
private Q_SLOTS:
 
72
        void callRaw1394EventLoop(int fd);
 
73
};
 
74
#endif