Qmmp
Public Member Functions | List of all members
FileInfo Class Reference

#include <fileinfo.h>

Public Member Functions

 FileInfo (const QString &path=QString())
 
 FileInfo (const FileInfo &info)
 
 ~FileInfo ()
 
FileInfooperator= (const FileInfo &info)
 
bool operator== (const FileInfo &info)
 
bool operator!= (const FileInfo &info)
 
qint64 length () const
 
const QString metaData (Qmmp::MetaData key) const
 
const QMap< Qmmp::MetaData, QString > metaData () const
 
bool isEmpty () const
 
const QString path () const
 
void setLength (qint64 length)
 
void setMetaData (Qmmp::MetaData key, const QString &value)
 
void setMetaData (Qmmp::MetaData key, int value)
 
void setMetaData (const QMap< Qmmp::MetaData, QString > &metaData)
 
void setPath (const QString &path)
 

Detailed Description

The FileInfo class stores metadata and audio information about media file or stream.

Author
Ilya Kotov forko.nosp@m.tov0.nosp@m.2@ya..nosp@m.ru

Constructor & Destructor Documentation

◆ FileInfo() [1/2]

FileInfo ( const QString &  path = QString())

Constructs a new empty FileInfo that with file path

◆ FileInfo() [2/2]

FileInfo ( const FileInfo info)

Constructs a new FileInfo that is a copy of the given info

◆ ~FileInfo()

~FileInfo ( )

Destructor.

Member Function Documentation

◆ isEmpty()

bool isEmpty ( ) const

Returns true if stream/file has no metadata, otherwise returns false

◆ length()

qint64 length ( ) const

Returnds file duration in seconds.

◆ metaData() [1/2]

const QString metaData ( Qmmp::MetaData  key) const

Returns the metdata string associated with the given key.

◆ metaData() [2/2]

const QMap<Qmmp::MetaData, QString> metaData ( ) const

Returns all meta data in map.

◆ operator!=()

bool operator!= ( const FileInfo info)

Returns false if this FileInfo object refers to info; otherwise returns true.

◆ operator=()

FileInfo& operator= ( const FileInfo info)

Makes a copy of the given info

◆ operator==()

bool operator== ( const FileInfo info)

Returns true if this FileInfo object refers to info; otherwise returns false.

◆ path()

const QString path ( ) const

Returns file path or stream url.

◆ setLength()

void setLength ( qint64  length)

Sets file duration to length in seconds.

◆ setMetaData() [1/3]

void setMetaData ( Qmmp::MetaData  key,
const QString &  value 
)

Sets metadata key to value

◆ setMetaData() [2/3]

void setMetaData ( Qmmp::MetaData  key,
int  value 
)

Sets metadata key to value (integer is converted to string)

◆ setMetaData() [3/3]

void setMetaData ( const QMap< Qmmp::MetaData, QString > &  metaData)

Changes all metadata to metaData

◆ setPath()

void setPath ( const QString &  path)

Sets file path or stream url to path


The documentation for this class was generated from the following file: