~ubuntu-branches/ubuntu/vivid/krusader/vivid-proposed

« back to all changes in this revision

Viewing changes to krusader/MountMan/kmountman.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-05-05 22:26:37 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505222637-ydv3cwjwy365on2r
Tags: 1:2.1.0~beta1-1ubuntu1
* Merge from Debian Unstable.  Remaining changes:
  - Retain Kubuntu doc path

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#define KMOUNTMAN_H
32
32
 
33
33
// QT includes
34
 
#include <qobject.h>
35
 
#include <qstring.h>
 
34
#include <QtCore/QObject>
 
35
#include <QtCore/QString>
36
36
#include <qaction.h>
37
37
 
38
38
// KDE includes
51
51
 
52
52
class KMountManGUI;
53
53
 
54
 
class KMountMan : public QObject {
55
 
   Q_OBJECT
56
 
   friend class KMountManGUI;
 
54
class KMountMan : public QObject
 
55
{
 
56
    Q_OBJECT
 
57
    friend class KMountManGUI;
57
58
 
58
59
public:
59
 
   enum mntStatus {DOESNT_EXIST, NOT_MOUNTED, MOUNTED};
60
 
 
61
 
   inline bool operational() {
62
 
      return Operational;
63
 
   } // check this 1st
64
 
   
65
 
        void mainWindow();                        // opens up the GUI
66
 
   void mount( QString mntPoint, bool blocking=true ); // this is probably what you need for mount
67
 
   void unmount( QString mntPoint, bool blocking=true ); // this is probably what you need for unmount
68
 
   mntStatus getStatus( QString mntPoint );  // return the status of a mntPoint (if any)
69
 
   void autoMount( QString path );           // just call it before refreshing into a dir
70
 
   void eject( QString mntPoint );
71
 
   bool ejectable( QString path );
72
 
   QString convertSize( KIO::filesize_t size );
73
 
        bool invalidFilesystem(QString type);
74
 
        bool nonmountFilesystem(QString type, QString mntPoint);
75
 
 
76
 
   KMountMan();
77
 
   ~KMountMan();
78
 
 
79
 
   QString findUdiForPath( QString path, const Solid::DeviceInterface::Type &expType = Solid::DeviceInterface::Unknown );
 
60
    enum mntStatus {DOESNT_EXIST, NOT_MOUNTED, MOUNTED};
 
61
 
 
62
    inline bool operational() {
 
63
        return Operational;
 
64
    } // check this 1st
 
65
 
 
66
    void mainWindow();                        // opens up the GUI
 
67
    void mount(QString mntPoint, bool blocking = true); // this is probably what you need for mount
 
68
    void unmount(QString mntPoint, bool blocking = true); // this is probably what you need for unmount
 
69
    mntStatus getStatus(QString mntPoint);    // return the status of a mntPoint (if any)
 
70
    void autoMount(QString path);             // just call it before refreshing into a dir
 
71
    void eject(QString mntPoint);
 
72
    bool ejectable(QString path);
 
73
    QString convertSize(KIO::filesize_t size);
 
74
    bool invalidFilesystem(QString type);
 
75
    bool nonmountFilesystem(QString type, QString mntPoint);
 
76
 
 
77
    KMountMan();
 
78
    ~KMountMan();
 
79
 
 
80
    QString findUdiForPath(QString path, const Solid::DeviceInterface::Type &expType = Solid::DeviceInterface::Unknown);
80
81
 
81
82
public slots:
82
 
   void delayedPerformAction( QAction * );
83
 
   void performAction();
84
 
   void quickList();
 
83
    void delayedPerformAction(QAction *);
 
84
    void performAction();
 
85
    void quickList();
85
86
 
86
87
protected slots:
87
 
        void jobResult(KJob *job);
88
 
        void slotTeardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
89
 
        void slotSetupDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
90
 
        
 
88
    void jobResult(KJob *job);
 
89
    void slotTeardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
 
90
    void slotSetupDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
 
91
 
91
92
protected:
92
 
        // used internally
93
 
        static KSharedPtr<KMountPoint> findInListByMntPoint(KMountPoint::List &lst, QString value); 
94
 
   void toggleMount( QString mntPoint ); 
95
 
                
96
 
private:
97
 
   QString *_actions;
98
 
 
99
 
private:
100
 
   bool Operational;   // if false, something went terribly wrong on startup
101
 
        bool waiting; // used to block krusader while waiting for (un)mount operation
102
 
   KMountManGUI *mountManGui;
103
 
        // the following is the FS type
104
 
        QStringList invalid_fs;
105
 
        QStringList nonmount_fs;
106
 
        // the following is the FS name
107
 
                QStringList nonmount_fs_mntpoint;
 
93
    // used internally
 
94
    static KSharedPtr<KMountPoint> findInListByMntPoint(KMountPoint::List &lst, QString value);
 
95
    void toggleMount(QString mntPoint);
 
96
 
 
97
private:
 
98
    QString *_actions;
 
99
 
 
100
private:
 
101
    bool Operational;   // if false, something went terribly wrong on startup
 
102
    bool waiting; // used to block krusader while waiting for (un)mount operation
 
103
    KMountManGUI *mountManGui;
 
104
    // the following is the FS type
 
105
    QStringList invalid_fs;
 
106
    QStringList nonmount_fs;
 
107
    // the following is the FS name
 
108
    QStringList nonmount_fs_mntpoint;
108
109
};
109
110
 
110
111
#endif