#include <XspfWriter.h>
List of all members.
Detailed Description
Writes a playlist as XSPF to a file. XSPF version 0 and 1 are supported.
Definition at line 75 of file XspfWriter.h.
Constructor & Destructor Documentation
Copy constructor.
- Parameters:
-
| source | Source to copy from |
Member Function Documentation
Appends a track to the playlist. The track
instance passed can be safely deleted after the call returns.
- Parameters:
-
- Returns:
- Success flag
- Since:
- 1.0.0
Appends a track to the playlist. The track
instance passed can be safely deleted after the call returns.
- Parameters:
-
- Returns:
- Success flag
- Since:
- 1.0.0
static XspfWriter* makeWriter |
( |
XspfXmlFormatter & |
formatter, |
|
|
XML_Char const * |
baseUri, |
|
|
bool |
embedBase = false , |
|
|
int * |
errorCode = NULL | |
|
) |
| | [static] |
Creates a new playlist writer.
- Parameters:
-
| formatter | XML formatter to use |
| baseUri | Absolute base URI to reduce against, pass NULL to keep all URIs absolute |
| embedBase | Embeds base URI as xml:base in root node if true or not if false |
| errorCode | Place to write error code or XSPF_WRITER_SUCCESS to. |
- Returns:
NULL
on error or a new'ed XspfWriter that you have to delete manually later.
- Since:
- 1.0.0
Assignment operator.
- Parameters:
-
| source | Source to copy from |
bool registerNamespace |
( |
XML_Char const * |
uri, |
|
|
XML_Char const * |
prefixSuggestion | |
|
) |
| | |
Pre-registers a namespace so it can still appear in the root element.
- Attention:
- registerNamespace() must be called before any calls to setProps() or addTrack().
- Parameters:
-
| uri | Namespace URI |
| prefixSuggestion | Suggested prefix |
- Returns:
- Success flag
void reset |
( |
XspfXmlFormatter & |
formatter, |
|
|
XML_Char const * |
baseUri, |
|
|
bool |
embedBase = false | |
|
) |
| | |
Clears all previously added tracks and makes the writer reusable by another playlist.
- Parameters:
-
| formatter | XML formatter to use |
| baseUri | Absolute base URI to reduce against. |
| embedBase | Embeds base URI as xml:base in root node if true or not if false |
- Since:
- 1.0.0
Sets playlist-wide properties of the playlist to be written including the version of XSPF to be used. The props
instance passed can be safely deleted after the call returns.
- Attention:
- setProps() must be called before any calls to addTrack().
- Parameters:
-
| props | Playlist properties to set, can be NULL |
- Returns:
- Success flag
- Since:
- 1.0.0
Sets playlist-wide properties of the playlist to be written including the version of XSPF to be used. The props
instance passed can be safely deleted after the call returns.
- Attention:
- setProps() must be called before any calls to addTrack().
- Parameters:
-
| props | Playlist properties to set, can be NULL |
- Returns:
- Success flag
- Since:
- 1.0.0
int writeFile |
( |
XML_Char const * |
filename |
) |
|
Finalizes the playlist and writes it to a file. You can call this method several times to write the same playlist to several files but you cannot add new tracks anymore. Call reset() to start over.
- Parameters:
-
| filename | Filename of the file to write to |
- Returns:
- Error code
int writeMemory |
( |
char *& |
memory, |
|
|
int & |
numBytes | |
|
) |
| | |
Finalizes the playlist and writes it to a block of memory. You can call this method several times to write the same playlist to several files but you cannot add new tracks anymore. Call reset() to start over.
- Parameters:
-
| memory | Reference to output memory block, delete[] on your own |
| numBytes | Size of the memory block in bytes |
- Returns:
- Error code
The documentation for this class was generated from the following file: