Logo Computer scientist,
engineer, and educator
• Software  • The kmediad project

The kmediad project — the kmediad API and interface

Proper documentation to follow shortly :)

This library provides a C/C++ interface to the kmediad server. It allows control of the playlist and transport, extraction of information from the database, and some control over the indexing process.

Included with the interface is a command-line program that can perform many kmediad operations; the purpose of this program is not really to be useful in its own right, but to demonstrate how the interface is used.

Building the kmediad interface

Note that the interface depends on the general-purpose object-oriented C library klib. I recommend using the same version of this library that kmediad uses. The Makefiles are set up to do that, assuming that the interface source directory is alongside the kmediad directory in the filesystem.

Sample code

The following code shows in outline how the interface is used.
#include <kmediadinterface/kmediadinterface.h>

kmediadinterface_Connection *connection = kmediadinterface_connection_new
    (host->str, port);

klib_Error *error = NULL;
  (connection, "/Music/test.mp3", &error);

if (error)
  // Failed — handle error
  klib_log_error (error);
  klib_object_unref ((klib_Object *)error);
  // Success
  klib_object_unref ((klib_Object *)connection);


Copyright © 1994-2015 Kevin Boone. Updated Dec 12 2016