Solid::Ifaces::StorageAccess

Search for usage in LXR

Solid::Ifaces::StorageAccess Class Referenceabstract

#include <storageaccess.h>

Inheritance diagram for Solid::Ifaces::StorageAccess:

Public Member Functions

 ~StorageAccess () override
 
virtual bool canCheck () const
 
virtual bool canRepair () const
 
virtual bool check ()
 
virtual QString filePath () const =0
 
virtual bool isAccessible () const =0
 
virtual bool isEncrypted () const =0
 
virtual bool isIgnored () const =0
 
virtual bool repair ()
 
virtual bool setup ()=0
 
virtual bool teardown ()=0
 
- Public Member Functions inherited from Solid::Ifaces::DeviceInterface
virtual ~DeviceInterface ()
 

Protected Member Functions

virtual void accessibilityChanged (bool accessible, const QString &udi)=0
 
virtual void repairDone (Solid::ErrorType error, QVariant resultData, const QString &udi)
 
virtual void repairRequested (const QString &udi)
 
virtual void setupDone (Solid::ErrorType error, QVariant resultData, const QString &udi)=0
 
virtual void setupRequested (const QString &udi)=0
 
virtual void teardownDone (Solid::ErrorType error, QVariant resultData, const QString &udi)=0
 
virtual void teardownRequested (const QString &udi)=0
 

Detailed Description

This device interface is available on volume devices.

A volume is anything that can contain data (partition, optical disc, memory card). It's a particular kind of block device.

Definition at line 23 of file ifaces/storageaccess.h.

Constructor & Destructor Documentation

◆ ~StorageAccess()

Solid::Ifaces::StorageAccess::~StorageAccess ( )
override

Destroys a StorageVolume object.

Definition at line 9 of file ifaces/storageaccess.cpp.

Member Function Documentation

◆ accessibilityChanged()

virtual void Solid::Ifaces::StorageAccess::accessibilityChanged ( bool accessible,
const QString & udi )
protectedpure virtual

This signal is emitted when the mount state of this device has changed.

Parameters
newStatetrue if the volume is mounted, false otherwise
udithe UDI of the volume

◆ canCheck()

bool Solid::Ifaces::StorageAccess::canCheck ( ) const
virtual

Indicates if this volume can check for filesystem errors.

Returns
true if the volume is can be checked

Definition at line 13 of file ifaces/storageaccess.cpp.

◆ canRepair()

bool Solid::Ifaces::StorageAccess::canRepair ( ) const
virtual

Indicates if this volume can repair filesystem errors.

Returns
true if the volume is can be repaired

Definition at line 23 of file ifaces/storageaccess.cpp.

◆ check()

bool Solid::Ifaces::StorageAccess::check ( )
virtual

Checks the filesystem for consistency avoiding any modifications or repairs.

Mounted or unsupported filesystems will result in an error.

Returns
Whether the filesystem is undamaged.

Definition at line 18 of file ifaces/storageaccess.cpp.

◆ filePath()

virtual QString Solid::Ifaces::StorageAccess::filePath ( ) const
pure virtual

Retrieves the absolute path of this volume mountpoint.

Returns
the absolute path to the mount point if the volume is mounted, QString() otherwise

◆ isAccessible()

virtual bool Solid::Ifaces::StorageAccess::isAccessible ( ) const
pure virtual

Indicates if this volume is mounted.

Returns
true if the volume is mounted

◆ isEncrypted()

virtual bool Solid::Ifaces::StorageAccess::isEncrypted ( ) const
pure virtual

Checks if source of the storage is encrypted.

Returns
true if storage is encrypted one

◆ isIgnored()

virtual bool Solid::Ifaces::StorageAccess::isIgnored ( ) const
pure virtual

Indicates if this volume should be ignored by applications.

If it should be ignored, it generally means that it should be invisible to the user. It's useful for firmware partitions or OS reinstall partitions on some systems.

Returns
true if the volume should be ignored

◆ repair()

bool Solid::Ifaces::StorageAccess::repair ( )
virtual

Tries to repair the filesystem.

Mounted or unsupported filesystems will result in an error.

Returns
Whether the filesystem could be successfully repaired

Definition at line 28 of file ifaces/storageaccess.cpp.

◆ repairDone()

void Solid::Ifaces::StorageAccess::repairDone ( Solid::ErrorType error,
QVariant resultData,
const QString & udi )
protectedvirtual

This signal is emitted when the attempted repaired of this device is completed.

Parameters
errortype of error that occurred, if any
errorDatamore information about the error, if any
udithe UDI of the volume

Definition at line 38 of file ifaces/storageaccess.cpp.

◆ repairRequested()

void Solid::Ifaces::StorageAccess::repairRequested ( const QString & udi)
protectedvirtual

This signal is emitted when a repair of this device is requested.

The signal might be spontaneous i.e. it can be triggered by another process.

Parameters
udithe UDI of the volume

Definition at line 33 of file ifaces/storageaccess.cpp.

◆ setup()

virtual bool Solid::Ifaces::StorageAccess::setup ( )
pure virtual

Mounts the volume.

Returns
the job handling the operation

◆ setupDone()

virtual void Solid::Ifaces::StorageAccess::setupDone ( Solid::ErrorType error,
QVariant resultData,
const QString & udi )
protectedpure virtual

This signal is emitted when the mount state of this device has changed.

Parameters
newStatetrue if the volume is mounted, false otherwise
udithe UDI of the volume

◆ setupRequested()

virtual void Solid::Ifaces::StorageAccess::setupRequested ( const QString & udi)
protectedpure virtual

This signal is emitted when a setup of this device is requested.

The signal might be spontaneous i.e. it can be triggered by another process.

Parameters
udithe UDI of the volume

◆ teardown()

virtual bool Solid::Ifaces::StorageAccess::teardown ( )
pure virtual

Unmounts the volume.

Returns
the job handling the operation

◆ teardownDone()

virtual void Solid::Ifaces::StorageAccess::teardownDone ( Solid::ErrorType error,
QVariant resultData,
const QString & udi )
protectedpure virtual

This signal is emitted when the mount state of this device has changed.

Parameters
newStatetrue if the volume is mounted, false otherwise
udithe UDI of the volume

◆ teardownRequested()

virtual void Solid::Ifaces::StorageAccess::teardownRequested ( const QString & udi)
protectedpure virtual

This signal is emitted when a teardown of this device is requested.

The signal might be spontaneous i.e. it can be triggered by another process

Parameters
udithe UDI of the volume

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 3 2024 11:47:59 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.