KFileMetaData::UserMetaData

Search for usage in LXR

KFileMetaData::UserMetaData Class Reference

#include <KFileMetaData/UserMetaData>

Public Types

enum  Attribute : uint32_t {
  None = 0x0 , Any = None , Tags = 0x1 , Rating = 0x2 ,
  Comment = 0x4 , OriginUrl = 0x8 , OriginEmailSubject = 0x10 , OriginEmailSender = 0x20 ,
  OriginEmailMessageId = 0x40 , Other = 0xffffff80 , All = 0xffffffff
}
 
typedef QFlags< AttributeAttributes
 
enum  Error {
  NoError = 0 , UnknownError , NotSupported , NoSpace ,
  MissingPermission , ValueTooBig , NameToolong
}
 

Public Member Functions

 UserMetaData (const QString &filePath)
 
 UserMetaData (const UserMetaData &rhs)
 
QString attribute (const QString &name)
 
QString attribute (const QString &name) const
 
QString filePath () const
 
bool hasAttribute (const QString &name)
 
bool hasAttribute (const QString &name) const
 
bool isSupported () const
 
const UserMetaDataoperator= (const UserMetaData &rhs)
 
QString originEmailMessageId () const
 
QString originEmailSender () const
 
QString originEmailSubject () const
 
QUrl originUrl () const
 
Attributes queryAttributes (Attributes attributes=Attribute::Any) const
 
int rating () const
 
Error setAttribute (const QString &name, const QString &value)
 
Error setOriginEmailMessageId (const QString &originEmailMessageId)
 
Error setOriginEmailSender (const QString &originEmailSender)
 
Error setOriginEmailSubject (const QString &originEmailSubject)
 
Error setOriginUrl (const QUrl &originUrl)
 
Error setRating (int rating)
 
Error setTags (const QStringList &tags)
 
Error setUserComment (const QString &userComment)
 
QStringList tags () const
 
QString userComment () const
 

Detailed Description

The UserMetaData class can be used to read and set user meta data of files.

Definition at line 25 of file usermetadata.h.

Member Typedef Documentation

◆ Attributes

Stores a combination of Attribute values.

Definition at line 68 of file usermetadata.h.

Member Enumeration Documentation

◆ Attribute

See also
Attributes

Definition at line 52 of file usermetadata.h.

◆ Error

Enumerator
NoError 

i.e Success

UnknownError 

An error that's not currently handled specifically.

Since
6.2
NotSupported 

Underlying filesystem does not provide extended attributes features.

Since
6.2
NoSpace 

There is insufficient space remaining to store the extended attribute.

Since
6.2
MissingPermission 

Process doesn't have write permission to the file or the file is marked append-only.

Since
6.2
ValueTooBig 

The value size exceeds the maximum size allowed per-value (64 kB for Linux VFS)

Since
6.2
NameToolong 

The attribute name is too long (255 bytes for Linux VFS)

Since
6.2

Definition at line 32 of file usermetadata.h.

Constructor & Destructor Documentation

◆ UserMetaData() [1/2]

UserMetaData::UserMetaData ( const QString & filePath)

Definition at line 19 of file usermetadata.cpp.

◆ UserMetaData() [2/2]

UserMetaData::UserMetaData ( const UserMetaData & rhs)

Definition at line 25 of file usermetadata.cpp.

Member Function Documentation

◆ attribute() [1/2]

QString UserMetaData::attribute ( const QString & name)
Deprecated
since 6.2

Definition at line 165 of file usermetadata.cpp.

◆ attribute() [2/2]

QString UserMetaData::attribute ( const QString & name) const
Since
6.2

Definition at line 171 of file usermetadata.cpp.

◆ filePath()

QString UserMetaData::filePath ( ) const

Definition at line 38 of file usermetadata.cpp.

◆ hasAttribute() [1/2]

bool UserMetaData::hasAttribute ( const QString & name)
Deprecated
since 6.2

Definition at line 153 of file usermetadata.cpp.

◆ hasAttribute() [2/2]

bool UserMetaData::hasAttribute ( const QString & name) const
Since
6.2

Definition at line 159 of file usermetadata.cpp.

◆ isSupported()

bool UserMetaData::isSupported ( ) const

Definition at line 179 of file usermetadata.cpp.

◆ operator=()

const UserMetaData & UserMetaData::operator= ( const UserMetaData & rhs)

Definition at line 32 of file usermetadata.cpp.

◆ originEmailMessageId()

QString UserMetaData::originEmailMessageId ( ) const

Definition at line 106 of file usermetadata.cpp.

◆ originEmailSender()

QString UserMetaData::originEmailSender ( ) const

Definition at line 96 of file usermetadata.cpp.

◆ originEmailSubject()

QString UserMetaData::originEmailSubject ( ) const

Definition at line 86 of file usermetadata.cpp.

◆ originUrl()

QUrl UserMetaData::originUrl ( ) const

Definition at line 76 of file usermetadata.cpp.

◆ queryAttributes()

UserMetaData::Attributes UserMetaData::queryAttributes ( UserMetaData::Attributes attributes = Attribute::Any) const

Query list of available attributes.

Checks for the availability of the given attributes. May return a superset of the input value when the file has attributes set beyond the requested ones.

If the input attribute mask is Attribute::Any, either Attribute::None (the file has no user attributes) or Attribute::All (the file has at least one attribute set) is returned.

Since
5.60

Definition at line 184 of file usermetadata.cpp.

◆ rating()

int UserMetaData::rating ( ) const

Definition at line 56 of file usermetadata.cpp.

◆ setAttribute()

UserMetaData::Error UserMetaData::setAttribute ( const QString & name,
const QString & value )

Definition at line 116 of file usermetadata.cpp.

◆ setOriginEmailMessageId()

UserMetaData::Error UserMetaData::setOriginEmailMessageId ( const QString & originEmailMessageId)

Definition at line 111 of file usermetadata.cpp.

◆ setOriginEmailSender()

UserMetaData::Error UserMetaData::setOriginEmailSender ( const QString & originEmailSender)

Definition at line 101 of file usermetadata.cpp.

◆ setOriginEmailSubject()

UserMetaData::Error UserMetaData::setOriginEmailSubject ( const QString & originEmailSubject)

Definition at line 91 of file usermetadata.cpp.

◆ setOriginUrl()

UserMetaData::Error UserMetaData::setOriginUrl ( const QUrl & originUrl)

Definition at line 81 of file usermetadata.cpp.

◆ setRating()

UserMetaData::Error UserMetaData::setRating ( int rating)

Definition at line 61 of file usermetadata.cpp.

◆ setTags()

UserMetaData::Error UserMetaData::setTags ( const QStringList & tags)

Definition at line 43 of file usermetadata.cpp.

◆ setUserComment()

UserMetaData::Error UserMetaData::setUserComment ( const QString & userComment)

Definition at line 71 of file usermetadata.cpp.

◆ tags()

QStringList UserMetaData::tags ( ) const

Definition at line 48 of file usermetadata.cpp.

◆ userComment()

QString UserMetaData::userComment ( ) const

Definition at line 66 of file usermetadata.cpp.


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 Dec 20 2024 11:48:19 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.