MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields
LightSong Struct Reference

A reference to a song file. More...

`#include <LightSong.hxx>`

Inheritance diagram for LightSong:
[legend]
Collaboration diagram for LightSong:
[legend]

## Public Member Functions
gcc_pure std::string | GetURI () const
gcc_pure SignedSongTime | GetDuration () const

## Data Fields
const char * | directory
| If this is not nullptr, then it denotes a prefix for the uri. More...
const char * | uri
const char * | real_uri
| The "real" URI, the one to be used for opening the resource. More...
const Tag * | tag
| Must not be nullptr. More...
time_t | mtime
SongTime | start_time
| Start of this sub-song within the file. More...
SongTime | end_time
| End of this sub-song within the file. More...

## Detailed Description

A reference to a song file.

Unlike the other "Song" classes in the MPD code base, this one consists only of pointers. It is supposed to be as light as possible while still providing all the information MPD has about a song file. This class does not manage any memory, and the pointers become invalid quickly. Only to be used to pass around during well-defined situations.

Definition at line 40 of file LightSong.hxx.

## Member Function Documentation

gcc_pure SignedSongTime LightSong::GetDuration | ( |  | ) | const

gcc_pure std::string LightSong::GetURI | ( |  | ) | const
| inline

Definition at line 79 of file LightSong.hxx.

## Field Documentation

const char* LightSong::directory

If this is not nullptr, then it denotes a prefix for the uri.

To build the full URI, join directory and uri with a slash.

Definition at line 46 of file LightSong.hxx.

SongTime LightSong::end_time

End of this sub-song within the file.

Unused if zero.

Definition at line 76 of file LightSong.hxx.

time_t LightSong::mtime

Definition at line 65 of file LightSong.hxx.

const char* LightSong::real_uri

The "real" URI, the one to be used for opening the resource.

If this attribute is nullptr, then uri (and directory) shall be used.

This attribute is used for songs from the database which have a relative URI.

Definition at line 58 of file LightSong.hxx.

SongTime LightSong::start_time

Start of this sub-song within the file.

Definition at line 70 of file LightSong.hxx.

const Tag* LightSong::tag

Must not be nullptr.

Definition at line 63 of file LightSong.hxx.

const char* LightSong::uri

Definition at line 48 of file LightSong.hxx.

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

- db/LightSong.hxx