/*****************************************************************************
* libvlc_events.h: libvlc_events external API structure
*****************************************************************************
- * Copyright (C) 1998-2007 the VideoLAN team
+ * Copyright (C) 1998-2008 the VideoLAN team
* $Id $
*
* Authors: Filippo Carone <littlejohn@videolan.org>
#ifndef LIBVLC_EVENTS_H
#define LIBVLC_EVENTS_H 1
+/**
+ * \file
+ * This file defines libvlc_event external API
+ */
+
# ifdef __cplusplus
extern "C" {
# endif
* @{
*/
-typedef enum libvlc_event_type_t {
+#ifdef __cplusplus
+enum libvlc_event_type_e {
+#else
+enum libvlc_event_type_t {
+#endif
+ /* Append new event types at the end.
+ * Do not remove, insert or re-order any entry. */
libvlc_MediaMetaChanged,
libvlc_MediaSubItemAdded,
libvlc_MediaDurationChanged,
libvlc_MediaListPlayerStopped,
libvlc_MediaDiscovererStarted,
- libvlc_MediaDiscovererEnded
+ libvlc_MediaDiscovererEnded,
-} libvlc_event_type_t;
+ libvlc_MediaPlayerTitleChanged,
+ libvlc_MediaPlayerSnapshotTaken,
+ libvlc_MediaPlayerLengthChanged,
+
+ libvlc_VlmMediaAdded,
+ libvlc_VlmMediaRemoved,
+ libvlc_VlmMediaChanged,
+ libvlc_VlmMediaInstanceStarted,
+ libvlc_VlmMediaInstanceStopped,
+ /* New event types HERE */
+};
/**
* An Event
* \param u Event dependent content
*/
-typedef struct libvlc_event_t
+struct libvlc_event_t
{
- libvlc_event_type_t type;
+ unsigned type;
void * p_obj;
union event_type_specific
{
/* media descriptor */
struct
{
- libvlc_meta_t meta_type;
+ unsigned meta_type;
} media_meta_changed;
struct
{
} media_freed;
struct
{
- libvlc_state_t new_state;
+ unsigned new_state;
} media_state_changed;
/* media instance */
} media_player_time_changed;
struct
{
- libvlc_time_t new_seekable;
+ int new_title;
+ } media_player_title_changed;
+ struct
+ {
+ uint64_t new_seekable; /* FIXME: that's a boolean! */
} media_player_seekable_changed;
struct
{
- libvlc_time_t new_pausable;
+ uint64_t new_pausable; /* FIXME: that's a BOOL!!! */
} media_player_pausable_changed;
/* media list */
int index;
} media_list_view_will_delete_item;
- /* media discoverer */
+ /* snapshot taken */
struct
{
- void * unused;
- } media_media_discoverer_started;
+ char* psz_filename ;
+ } media_player_snapshot_taken ;
+
+ /* Length changed */
struct
{
- void * unused;
- } media_media_discoverer_ended;
-
- } u;
-} libvlc_event_t;
+ libvlc_time_t new_length;
+ } media_player_length_changed;
-/**
- * Event manager that belongs to a libvlc object, and from whom events can
- * be received.
- */
-
-typedef struct libvlc_event_manager_t libvlc_event_manager_t;
+ /* VLM media */
+ struct
+ {
+ const char * psz_media_name;
+ } vlm_media_event;
-/**
- * Callback function notification
- * \param p_event the event triggering the callback
- */
+ } u;
+};
-typedef void ( *libvlc_callback_t )( const libvlc_event_t *, void * );
/**@} */