Function

RBRhythmDBEntryexample_new

Declaration [src]

RhythmDBEntry*
rhythmdb_entry_example_new (
  RhythmDB* db,
  RhythmDBEntryType* type,
  const char* uri
)

Description [src]

Creates a new sample entry of type type and location uri, it does not insert it into the database. This is indended for use as a example entry.

This may return NULL if entry creation fails.

Parameters

db

Type: RhythmDB

A RhythmDB.

The data is owned by the caller of the function.
type

Type: RhythmDBEntryType

Type of entry to create.

The data is owned by the caller of the function.
uri

Type: const char*

The location of the entry, this be unique amongst all entries.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: RhythmDBEntry

The newly created RhythmDBEntry.

The caller of the function takes ownership of the data, and is responsible for freeing it.