Solid

ifaces/block.h
1 /*
2  SPDX-FileCopyrightText: 2006 Kevin Ottens <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 
7 #ifndef SOLID_IFACES_BLOCK_H
8 #define SOLID_IFACES_BLOCK_H
9 
10 #include <solid/devices/ifaces/deviceinterface.h>
11 
12 namespace Solid
13 {
14 namespace Ifaces
15 {
23 class Block : virtual public DeviceInterface
24 {
25 public:
29  virtual ~Block();
30 
37  virtual int deviceMajor() const = 0;
38 
45  virtual int deviceMinor() const = 0;
46 
54  virtual QString device() const = 0;
55 };
56 }
57 }
58 
59 Q_DECLARE_INTERFACE(Solid::Ifaces::Block, "org.kde.Solid.Ifaces.Block/0.1")
60 
61 #endif
virtual int deviceMajor() const =0
Retrieves the major number of the node file to interact with the device.
Base interface of all the device interfaces.
virtual QString device() const =0
Retrieves the absolute path of the special file to interact with the device.
virtual int deviceMinor() const =0
Retrieves the minor number of the node file to interact with the device.
This device interface is available on block devices.
Definition: ifaces/block.h:23
The single responsibility of this class is to create arguments valid for logind Inhibit call...
virtual ~Block()
Destroys a Block object.
Definition: ifaces/block.cpp:9
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Sep 22 2020 22:50:17 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.