/usr/include/razormount/razormount.h is in librazorqt0-dev 0.5.2-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | /* BEGIN_COMMON_COPYRIGHT_HEADER
* (c)LGPL2+
*
* Razor - a lightweight, Qt based, desktop toolset
* http://razor-qt.org
*
* Copyright: 2012 Razor team
* Authors:
* Alexander Sokoloff <sokoloff.a@gmail.com>
*
* This program or library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* END_COMMON_COPYRIGHT_HEADER */
#ifndef RAZORMOUNT_RAZORMOUNT_H
#define RAZORMOUNT_RAZORMOUNT_H
#include <QtCore/QObject>
#include <QtCore/QList>
#define BOOL_SETTER(MEMBER) { bool res=(value != MEMBER); MEMBER = value; return res; }
class RzMountProvider;
class RazorMountDevice: public QObject
{
Q_OBJECT
public:
enum MediaType {
MediaTypeUnknown,
MediaTypeDrive,
MediaTypePartition,
MediaTypeFdd,
MediaTypeOptical
};
virtual bool mount() = 0;
virtual bool unmount() = 0;
virtual bool eject() = 0;
QString devFile() const { return mDevFile; }
QString label() const { return mLabel; }
QString vendor() const { return mVendor; }
QString model() const { return mModel; }
QString fileSystem() const { return mFileSystem; }
QString mountPath() const { return mMountPath; }
QString iconName() const { return mIconName; }
qulonglong size() const { return mSize; }
MediaType mediaType() const { return mMediaType; }
bool isValid() const { return mIsValid; }
bool isExternal() const { return mIsExternal; }
bool isMounted() const { return mIsMounted; }
bool isEjectable() const { return mIsEjectable; }
static QString sizeToString(qulonglong size);
signals:
void changed();
void error(const QString &msg);
void mounted();
void unmounted();
protected:
explicit RazorMountDevice();
bool setDevFile(const QString &value) BOOL_SETTER(mDevFile)
bool setLabel(const QString &value) BOOL_SETTER(mLabel)
bool setVendor(const QString &value) BOOL_SETTER(mVendor)
bool setModel(const QString &value) BOOL_SETTER(mModel)
bool setFileSystem(const QString &value) BOOL_SETTER(mFileSystem)
bool setMountPath(const QString &value) BOOL_SETTER(mMountPath)
bool setIconName(const QString &value) BOOL_SETTER(mIconName)
bool setSize(qulonglong value) BOOL_SETTER(mSize)
bool setMediaType(MediaType value) BOOL_SETTER(mMediaType)
bool setIsValid(bool value) BOOL_SETTER(mIsValid)
bool setIsExternal(bool value) BOOL_SETTER(mIsExternal)
bool setIsMounted(bool value) BOOL_SETTER(mIsMounted)
bool setIsEjectable(bool value) BOOL_SETTER(mIsEjectable)
QString mDevFile;
QString mLabel;
QString mVendor;
QString mModel;
QString mFileSystem;
QString mMountPath;
QString mIconName;
qulonglong mSize;
MediaType mMediaType;
bool mIsValid;
bool mIsExternal;
bool mIsMounted;
bool mIsEjectable;
private:
Q_DISABLE_COPY(RazorMountDevice)
};
typedef QList<RazorMountDevice*> RazorMountDeviceList;
class RazorMountManager : public QObject
{
Q_OBJECT
public:
explicit RazorMountManager(QObject *parent = 0);
virtual ~RazorMountManager();
const RazorMountDeviceList devices() const;
public slots:
void update();
signals:
void deviceAdded(RazorMountDevice *device);
void deviceRemoved(RazorMountDevice *device);
void deviceChanged(RazorMountDevice *device);
private:
RzMountProvider *mProvider;
};
QDebug operator<<(QDebug dbg, const RazorMountDevice& device);
QDebug operator<<(QDebug dbg, const RazorMountDevice* const device);
#endif // RAZORMOUNT_RAZORMOUNT_H
|