~ubuntu-branches/ubuntu/warty/kdebase/warty

« back to all changes in this revision

Viewing changes to kioslave/devices/kdedmodule/mountwatcher.h

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-09-16 04:51:45 UTC
  • Revision ID: james.westby@ubuntu.com-20040916045145-9vr63kith3k1cpza
Tags: upstream-3.2.2
ImportĀ upstreamĀ versionĀ 3.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the KDE Project
 
2
   Copyright (c) 2002 Joseph Wenninger <jowenn@kde.org>
 
3
 
 
4
   This library is free software; you can redistribute it and/or
 
5
   modify it under the terms of the GNU Library General Public
 
6
   License version 2 as published by the Free Software Foundation.
 
7
 
 
8
   This library is distributed in the hope that it will be useful,
 
9
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
11
   Library General Public License for more details.
 
12
 
 
13
   You should have received a copy of the GNU Library General Public License
 
14
   along with this library; see the file COPYING.LIB.  If not, write to
 
15
   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
16
   Boston, MA 02111-1307, USA.
 
17
*/
 
18
 
 
19
 
 
20
#ifndef _FAVICONS_H_
 
21
#define _FAVICONS_H_
 
22
 
 
23
#include <kdedmodule.h>
 
24
#include <kurl.h>
 
25
#include "disklist.h"
 
26
#include <qstringlist.h>
 
27
#include <qmap.h>
 
28
 
 
29
 
 
30
struct specialEntry
 
31
{
 
32
        QString id;
 
33
        QString description;
 
34
//      QString device;
 
35
        QString url;
 
36
        QString mimeType;
 
37
        bool mountState;
 
38
        bool fromConfigFile;
 
39
};
 
40
 
 
41
typedef QMap<QString,specialEntry> EntryMap;
 
42
 
 
43
class MountWatcherModule : public KDEDModule
 
44
{
 
45
    Q_OBJECT
 
46
    K_DCOP
 
47
public:
 
48
    MountWatcherModule(const QCString &obj);
 
49
    virtual ~MountWatcherModule();
 
50
 
 
51
private:
 
52
    DiskList mDiskList;
 
53
    EntryMap mEntryMap;
 
54
    QStringList mountList;
 
55
    QStringList completeList;
 
56
    bool firstTime;
 
57
    uint mtabsize;
 
58
k_dcop:
 
59
    uint    mountpointMappingCount();
 
60
    QString mountpoint(int id);
 
61
    QString mountpoint(QString name);
 
62
    QString devicenode(int id);
 
63
    QString type(int id);
 
64
    bool    mounted(int id);
 
65
    bool    mounted(QString name);
 
66
    QStringList basicList();
 
67
    QStringList basicSystemList();
 
68
    QStringList basicDeviceInfo(QString);
 
69
    QStringList basicDeviceInfoForMountPoint(QString);
 
70
    void addSpecialDevice(const QString& uniqueIdentifier, const QString& description,
 
71
                         const QString& URL, const QString& mimetype,bool mountState);
 
72
    void removeSpecialDevice(const QString& uniqueIdentifier);
 
73
    bool createLink(const KURL& deviceURL, const KURL& destinationURL);
 
74
    void reloadExclusionLists();
 
75
    void reReadSpecialConfig();
 
76
k_dcop_signals:
 
77
    void mountSituationChanged();
 
78
 
 
79
 
 
80
protected slots:
 
81
    void addSpecialDeviceInternal(const QString& uniqueIdentifier, const QString& description,
 
82
                         const QString& URL, const QString& mimetype,bool mountState,bool fromConfigFile);
 
83
 
 
84
        void dirty(const QString&);
 
85
        void readDFDone();
 
86
};
 
87
 
 
88
#endif
 
89
 
 
90
// vim: ts=4 sw=4 et