input_plugin Struct Reference

#include <input_plugin.h>

Data Fields

const char * name
bool(* init )(const struct config_param *param, GError **error_r)
 Global initialization.
void(* finish )(void)
 Global deinitialization.
struct input_stream *(* open )(const char *uri, GMutex *mutex, GCond *cond, GError **error_r)
void(* close )(struct input_stream *is)
bool(* check )(struct input_stream *is, GError **error_r)
 Check for errors that may have occurred in the I/O thread.
void(* update )(struct input_stream *is)
 Update the public attributes.
struct tag *(* tag )(struct input_stream *is)
bool(* available )(struct input_stream *is)
 Returns true if the next read operation will not block: either data is available, or end-of-stream has been reached, or an error has occurred.
size_t(* read )(struct input_stream *is, void *ptr, size_t size, GError **error_r)
bool(* eof )(struct input_stream *is)
bool(* seek )(struct input_stream *is, goffset offset, int whence, GError **error_r)

Detailed Description

Definition at line 32 of file input_plugin.h.


Field Documentation

Returns true if the next read operation will not block: either data is available, or end-of-stream has been reached, or an error has occurred.

If this method is unimplemented, then it is assumed that reading will never block.

bool(* input_plugin::check)(struct input_stream *is, GError **error_r)

Check for errors that may have occurred in the I/O thread.

May be unimplemented for synchronous plugins.

Returns:
false on error
void(* input_plugin::close)(struct input_stream *is)
bool(* input_plugin::eof)(struct input_stream *is)
void(* input_plugin::finish)(void)

Global deinitialization.

Called once before MPD shuts down (only if init() has returned true).

bool(* input_plugin::init)(const struct config_param *param, GError **error_r)

Global initialization.

This method is called when MPD starts.

Parameters:
error_r location to store the error occurring, or NULL to ignore errors
Returns:
true on success, false if the plugin should be disabled
const char* input_plugin::name

Definition at line 33 of file input_plugin.h.

struct input_stream*(* input_plugin::open)(const char *uri, GMutex *mutex, GCond *cond, GError **error_r) [read]
size_t(* input_plugin::read)(struct input_stream *is, void *ptr, size_t size, GError **error_r)
bool(* input_plugin::seek)(struct input_stream *is, goffset offset, int whence, GError **error_r)
struct tag*(* input_plugin::tag)(struct input_stream *is) [read]
void(* input_plugin::update)(struct input_stream *is)

Update the public attributes.

Call before access. Can be NULL if the plugin always keeps its attributes up to date.


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

Generated on 9 Aug 2013 for MPD by  doxygen 1.6.1