2007-08-13 21:08:15 +02:00
|
|
|
/*****************************************************************************
|
2011-12-14 00:29:36 +01:00
|
|
|
* vlc_events.h: events definitions
|
2007-08-13 21:08:15 +02:00
|
|
|
* Interface used to send events.
|
|
|
|
*****************************************************************************
|
LGPL
Re-license almost all of libVLC and libVLCcore to LGPLv2.1+
This move was authorized by the developers, either:
- by e-mail,
- by vote at the VideoLAN Dev Days 2011,
- on the license website,
- in a contract, oral or written.
No objection was raised, so far.
The developers agreeing are:
Justus Piater
Alexis Ballier
Alexander Bethke
Mohammed Adnène Trojette
Alex Converse
Alexey Sokolov
Alexis de Lattre
Andre Pang
Anthony Loiseau
Cyril Deguet
André Weber
Boris Dorès
Brieuc Jeunhomme
Benjamin Drung
Hugo Beauzée-Luyssen
Benoit Steiner
Benjamin Pracht
Bernie Purcell
Przemyslaw Fiala
Arnaud de Bossoreille de Ribou
Brad Smith
Nick Briggs
Christopher Rath
Christophe Courtaut
Christopher Mueller
Clement Chesnin
Andres Krapf
Damien Fouilleul
David Flynn
Sebastien Zwickert
Antoine Cellerier
Jérôme Decoodt
Jérome Decoodt
Dylan Yudaken
Eduard Babayan
Eugenio Jarosiewicz
Elliot Murphy
Eric Petit
Erwan Tulou
Etienne Membrives
Ludovic Fauvet
Fabio Ritrovato
Tobias Güntner
Jakub Wieczorek
Frédéric Crozat
Francois Cartegnie
Laurent Aimar
Florian G. Pflug
Felix Paul Kühne
Frank Enderle
Rafaël Carré
Simon Latapie
Gildas Bazin
Geoffroy Couprie
Julien / Gellule
Gildas Bazin
Arnaud Schauly
Toralf Niebuhr
Vicente Jimenez Aguilar
Derk-Jan Hartman
Henri Fallon
Ilkka Ollakka
Olivier Teulière
Rémi Duraffort
Jakob Leben
Jean-Baptiste Kempf
Jean-Paul Saman
Jean-Philippe Grimaldi
Jean-François Massol
Gaël Hendryckx
Jakob Leben
Jean-Marc Dressler
Jai Menon
Johan Bilien
Johann Ransay
Joris van Rooij
JP Dinger
Jean-Philippe André
Adrien Grand
Juha Jeronen
Juho Vähä-Herttua
Kaarlo Raiha
Kaarlo Raiha
Kamil Baldyga
Keary Griffin
Ken Self
KO Myung-Hun
Pierre Ynard
Filippo Carone
Loïc Minier
Luca Barbato
Lucas C. Villa Real
Lukas Durfina
Adrien Maglo
Marc Ariberti
Mark Lee
Mark Moriarty
Martin Storsjö
Christophe Massiot
Michel Kaempf
Marian Ďurkovič
Mirsal Ennaime
Carlo Calabrò
Damien Lucas
Naohiro Koriyama
Basos G
Pierre Baillet
Vincent Penquerc'h
Olivier Aubert
Pankaj Yadav
Paul Corke
Pierre d'Herbemont
Philippe Morin
Antoine Lejeune
Michael Ploujnikov
Jean-Marc Dressler
Michael Hanselmann
Rafaël Carré
Ramiro Polla
Rémi Denis-Courmont
Renaud Dartus
Richard Shepherd
Faustino Osuna
Arnaud Vallat
Rob Jonson
Robert Jedrzejczyk
Steve Lhomme
Rocky Bernstein
Romain Goyet
Rov Juvano
Sam Hocevar
Martin T. H. Sandsmark
Sebastian Birk
Sébastien Escudier
Vincent Seguin
Fabio Ritrovato
Sigmund Augdal Helberg
Casian Andrei
Srikanth Raju
Hannes Domani
Stéphane Borel
Stephan Krempel
Stephan Assmus
Tony Castley
Pavlov Konstantin
Eric Petit
Tanguy Krotoff
Dennis van Amerongen
Michel Lespinasse
Can Wu
Xavier Marchesini
Sébastien Toque
Christophe Mutricy
Yoann Peronneau
Yohann Martineau
Yuval Tze
Scott Caudle
Clément Stenac
It is possible, that some minor piece of code was badly tracked, for
some reasons (SVN, mainly) or that some small developers did not answer.
However, as an "œuvre collective", defined as in "CPI 113-2 alinéa 3",
and seeing "Cour. Cass. 17 Mai 1978", and seeing that the editor and
the very vast majority of developers have agreed (> 99.99% of the code,
> 99% of developers), we are fine here.
2011-11-27 21:44:15 +01:00
|
|
|
* Copyright (C) 2007 VLC authors and VideoLAN
|
2007-08-13 21:08:15 +02:00
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Authors: Pierre d'Herbemont
|
|
|
|
*
|
LGPL
Re-license almost all of libVLC and libVLCcore to LGPLv2.1+
This move was authorized by the developers, either:
- by e-mail,
- by vote at the VideoLAN Dev Days 2011,
- on the license website,
- in a contract, oral or written.
No objection was raised, so far.
The developers agreeing are:
Justus Piater
Alexis Ballier
Alexander Bethke
Mohammed Adnène Trojette
Alex Converse
Alexey Sokolov
Alexis de Lattre
Andre Pang
Anthony Loiseau
Cyril Deguet
André Weber
Boris Dorès
Brieuc Jeunhomme
Benjamin Drung
Hugo Beauzée-Luyssen
Benoit Steiner
Benjamin Pracht
Bernie Purcell
Przemyslaw Fiala
Arnaud de Bossoreille de Ribou
Brad Smith
Nick Briggs
Christopher Rath
Christophe Courtaut
Christopher Mueller
Clement Chesnin
Andres Krapf
Damien Fouilleul
David Flynn
Sebastien Zwickert
Antoine Cellerier
Jérôme Decoodt
Jérome Decoodt
Dylan Yudaken
Eduard Babayan
Eugenio Jarosiewicz
Elliot Murphy
Eric Petit
Erwan Tulou
Etienne Membrives
Ludovic Fauvet
Fabio Ritrovato
Tobias Güntner
Jakub Wieczorek
Frédéric Crozat
Francois Cartegnie
Laurent Aimar
Florian G. Pflug
Felix Paul Kühne
Frank Enderle
Rafaël Carré
Simon Latapie
Gildas Bazin
Geoffroy Couprie
Julien / Gellule
Gildas Bazin
Arnaud Schauly
Toralf Niebuhr
Vicente Jimenez Aguilar
Derk-Jan Hartman
Henri Fallon
Ilkka Ollakka
Olivier Teulière
Rémi Duraffort
Jakob Leben
Jean-Baptiste Kempf
Jean-Paul Saman
Jean-Philippe Grimaldi
Jean-François Massol
Gaël Hendryckx
Jakob Leben
Jean-Marc Dressler
Jai Menon
Johan Bilien
Johann Ransay
Joris van Rooij
JP Dinger
Jean-Philippe André
Adrien Grand
Juha Jeronen
Juho Vähä-Herttua
Kaarlo Raiha
Kaarlo Raiha
Kamil Baldyga
Keary Griffin
Ken Self
KO Myung-Hun
Pierre Ynard
Filippo Carone
Loïc Minier
Luca Barbato
Lucas C. Villa Real
Lukas Durfina
Adrien Maglo
Marc Ariberti
Mark Lee
Mark Moriarty
Martin Storsjö
Christophe Massiot
Michel Kaempf
Marian Ďurkovič
Mirsal Ennaime
Carlo Calabrò
Damien Lucas
Naohiro Koriyama
Basos G
Pierre Baillet
Vincent Penquerc'h
Olivier Aubert
Pankaj Yadav
Paul Corke
Pierre d'Herbemont
Philippe Morin
Antoine Lejeune
Michael Ploujnikov
Jean-Marc Dressler
Michael Hanselmann
Rafaël Carré
Ramiro Polla
Rémi Denis-Courmont
Renaud Dartus
Richard Shepherd
Faustino Osuna
Arnaud Vallat
Rob Jonson
Robert Jedrzejczyk
Steve Lhomme
Rocky Bernstein
Romain Goyet
Rov Juvano
Sam Hocevar
Martin T. H. Sandsmark
Sebastian Birk
Sébastien Escudier
Vincent Seguin
Fabio Ritrovato
Sigmund Augdal Helberg
Casian Andrei
Srikanth Raju
Hannes Domani
Stéphane Borel
Stephan Krempel
Stephan Assmus
Tony Castley
Pavlov Konstantin
Eric Petit
Tanguy Krotoff
Dennis van Amerongen
Michel Lespinasse
Can Wu
Xavier Marchesini
Sébastien Toque
Christophe Mutricy
Yoann Peronneau
Yohann Martineau
Yuval Tze
Scott Caudle
Clément Stenac
It is possible, that some minor piece of code was badly tracked, for
some reasons (SVN, mainly) or that some small developers did not answer.
However, as an "œuvre collective", defined as in "CPI 113-2 alinéa 3",
and seeing "Cour. Cass. 17 Mai 1978", and seeing that the editor and
the very vast majority of developers have agreed (> 99.99% of the code,
> 99% of developers), we are fine here.
2011-11-27 21:44:15 +01:00
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU Lesser General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2.1 of the License, or
|
2007-08-13 21:08:15 +02:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
LGPL
Re-license almost all of libVLC and libVLCcore to LGPLv2.1+
This move was authorized by the developers, either:
- by e-mail,
- by vote at the VideoLAN Dev Days 2011,
- on the license website,
- in a contract, oral or written.
No objection was raised, so far.
The developers agreeing are:
Justus Piater
Alexis Ballier
Alexander Bethke
Mohammed Adnène Trojette
Alex Converse
Alexey Sokolov
Alexis de Lattre
Andre Pang
Anthony Loiseau
Cyril Deguet
André Weber
Boris Dorès
Brieuc Jeunhomme
Benjamin Drung
Hugo Beauzée-Luyssen
Benoit Steiner
Benjamin Pracht
Bernie Purcell
Przemyslaw Fiala
Arnaud de Bossoreille de Ribou
Brad Smith
Nick Briggs
Christopher Rath
Christophe Courtaut
Christopher Mueller
Clement Chesnin
Andres Krapf
Damien Fouilleul
David Flynn
Sebastien Zwickert
Antoine Cellerier
Jérôme Decoodt
Jérome Decoodt
Dylan Yudaken
Eduard Babayan
Eugenio Jarosiewicz
Elliot Murphy
Eric Petit
Erwan Tulou
Etienne Membrives
Ludovic Fauvet
Fabio Ritrovato
Tobias Güntner
Jakub Wieczorek
Frédéric Crozat
Francois Cartegnie
Laurent Aimar
Florian G. Pflug
Felix Paul Kühne
Frank Enderle
Rafaël Carré
Simon Latapie
Gildas Bazin
Geoffroy Couprie
Julien / Gellule
Gildas Bazin
Arnaud Schauly
Toralf Niebuhr
Vicente Jimenez Aguilar
Derk-Jan Hartman
Henri Fallon
Ilkka Ollakka
Olivier Teulière
Rémi Duraffort
Jakob Leben
Jean-Baptiste Kempf
Jean-Paul Saman
Jean-Philippe Grimaldi
Jean-François Massol
Gaël Hendryckx
Jakob Leben
Jean-Marc Dressler
Jai Menon
Johan Bilien
Johann Ransay
Joris van Rooij
JP Dinger
Jean-Philippe André
Adrien Grand
Juha Jeronen
Juho Vähä-Herttua
Kaarlo Raiha
Kaarlo Raiha
Kamil Baldyga
Keary Griffin
Ken Self
KO Myung-Hun
Pierre Ynard
Filippo Carone
Loïc Minier
Luca Barbato
Lucas C. Villa Real
Lukas Durfina
Adrien Maglo
Marc Ariberti
Mark Lee
Mark Moriarty
Martin Storsjö
Christophe Massiot
Michel Kaempf
Marian Ďurkovič
Mirsal Ennaime
Carlo Calabrò
Damien Lucas
Naohiro Koriyama
Basos G
Pierre Baillet
Vincent Penquerc'h
Olivier Aubert
Pankaj Yadav
Paul Corke
Pierre d'Herbemont
Philippe Morin
Antoine Lejeune
Michael Ploujnikov
Jean-Marc Dressler
Michael Hanselmann
Rafaël Carré
Ramiro Polla
Rémi Denis-Courmont
Renaud Dartus
Richard Shepherd
Faustino Osuna
Arnaud Vallat
Rob Jonson
Robert Jedrzejczyk
Steve Lhomme
Rocky Bernstein
Romain Goyet
Rov Juvano
Sam Hocevar
Martin T. H. Sandsmark
Sebastian Birk
Sébastien Escudier
Vincent Seguin
Fabio Ritrovato
Sigmund Augdal Helberg
Casian Andrei
Srikanth Raju
Hannes Domani
Stéphane Borel
Stephan Krempel
Stephan Assmus
Tony Castley
Pavlov Konstantin
Eric Petit
Tanguy Krotoff
Dennis van Amerongen
Michel Lespinasse
Can Wu
Xavier Marchesini
Sébastien Toque
Christophe Mutricy
Yoann Peronneau
Yohann Martineau
Yuval Tze
Scott Caudle
Clément Stenac
It is possible, that some minor piece of code was badly tracked, for
some reasons (SVN, mainly) or that some small developers did not answer.
However, as an "œuvre collective", defined as in "CPI 113-2 alinéa 3",
and seeing "Cour. Cass. 17 Mai 1978", and seeing that the editor and
the very vast majority of developers have agreed (> 99.99% of the code,
> 99% of developers), we are fine here.
2011-11-27 21:44:15 +01:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License for more details.
|
2007-08-13 21:08:15 +02:00
|
|
|
*
|
LGPL
Re-license almost all of libVLC and libVLCcore to LGPLv2.1+
This move was authorized by the developers, either:
- by e-mail,
- by vote at the VideoLAN Dev Days 2011,
- on the license website,
- in a contract, oral or written.
No objection was raised, so far.
The developers agreeing are:
Justus Piater
Alexis Ballier
Alexander Bethke
Mohammed Adnène Trojette
Alex Converse
Alexey Sokolov
Alexis de Lattre
Andre Pang
Anthony Loiseau
Cyril Deguet
André Weber
Boris Dorès
Brieuc Jeunhomme
Benjamin Drung
Hugo Beauzée-Luyssen
Benoit Steiner
Benjamin Pracht
Bernie Purcell
Przemyslaw Fiala
Arnaud de Bossoreille de Ribou
Brad Smith
Nick Briggs
Christopher Rath
Christophe Courtaut
Christopher Mueller
Clement Chesnin
Andres Krapf
Damien Fouilleul
David Flynn
Sebastien Zwickert
Antoine Cellerier
Jérôme Decoodt
Jérome Decoodt
Dylan Yudaken
Eduard Babayan
Eugenio Jarosiewicz
Elliot Murphy
Eric Petit
Erwan Tulou
Etienne Membrives
Ludovic Fauvet
Fabio Ritrovato
Tobias Güntner
Jakub Wieczorek
Frédéric Crozat
Francois Cartegnie
Laurent Aimar
Florian G. Pflug
Felix Paul Kühne
Frank Enderle
Rafaël Carré
Simon Latapie
Gildas Bazin
Geoffroy Couprie
Julien / Gellule
Gildas Bazin
Arnaud Schauly
Toralf Niebuhr
Vicente Jimenez Aguilar
Derk-Jan Hartman
Henri Fallon
Ilkka Ollakka
Olivier Teulière
Rémi Duraffort
Jakob Leben
Jean-Baptiste Kempf
Jean-Paul Saman
Jean-Philippe Grimaldi
Jean-François Massol
Gaël Hendryckx
Jakob Leben
Jean-Marc Dressler
Jai Menon
Johan Bilien
Johann Ransay
Joris van Rooij
JP Dinger
Jean-Philippe André
Adrien Grand
Juha Jeronen
Juho Vähä-Herttua
Kaarlo Raiha
Kaarlo Raiha
Kamil Baldyga
Keary Griffin
Ken Self
KO Myung-Hun
Pierre Ynard
Filippo Carone
Loïc Minier
Luca Barbato
Lucas C. Villa Real
Lukas Durfina
Adrien Maglo
Marc Ariberti
Mark Lee
Mark Moriarty
Martin Storsjö
Christophe Massiot
Michel Kaempf
Marian Ďurkovič
Mirsal Ennaime
Carlo Calabrò
Damien Lucas
Naohiro Koriyama
Basos G
Pierre Baillet
Vincent Penquerc'h
Olivier Aubert
Pankaj Yadav
Paul Corke
Pierre d'Herbemont
Philippe Morin
Antoine Lejeune
Michael Ploujnikov
Jean-Marc Dressler
Michael Hanselmann
Rafaël Carré
Ramiro Polla
Rémi Denis-Courmont
Renaud Dartus
Richard Shepherd
Faustino Osuna
Arnaud Vallat
Rob Jonson
Robert Jedrzejczyk
Steve Lhomme
Rocky Bernstein
Romain Goyet
Rov Juvano
Sam Hocevar
Martin T. H. Sandsmark
Sebastian Birk
Sébastien Escudier
Vincent Seguin
Fabio Ritrovato
Sigmund Augdal Helberg
Casian Andrei
Srikanth Raju
Hannes Domani
Stéphane Borel
Stephan Krempel
Stephan Assmus
Tony Castley
Pavlov Konstantin
Eric Petit
Tanguy Krotoff
Dennis van Amerongen
Michel Lespinasse
Can Wu
Xavier Marchesini
Sébastien Toque
Christophe Mutricy
Yoann Peronneau
Yohann Martineau
Yuval Tze
Scott Caudle
Clément Stenac
It is possible, that some minor piece of code was badly tracked, for
some reasons (SVN, mainly) or that some small developers did not answer.
However, as an "œuvre collective", defined as in "CPI 113-2 alinéa 3",
and seeing "Cour. Cass. 17 Mai 1978", and seeing that the editor and
the very vast majority of developers have agreed (> 99.99% of the code,
> 99% of developers), we are fine here.
2011-11-27 21:44:15 +01:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
2007-08-13 21:08:15 +02:00
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef VLC_EVENTS_H
|
|
|
|
# define VLC_EVENTS_H
|
|
|
|
|
|
|
|
#include <vlc_arrays.h>
|
2007-08-15 16:54:03 +02:00
|
|
|
#include <vlc_meta.h>
|
2007-08-13 21:08:15 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \file
|
|
|
|
* This file is the interface definition for events
|
|
|
|
* (implementation in src/misc/events.c)
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* Documentation
|
|
|
|
*****************************************************************************/
|
|
|
|
/*
|
|
|
|
**** Background
|
|
|
|
*
|
|
|
|
* This implements a way to send and receive event for an object (which can be
|
|
|
|
* a simple C struct or less).
|
2007-09-10 20:56:52 +02:00
|
|
|
*
|
2007-08-13 21:08:15 +02:00
|
|
|
* This is in direct concurrency with the Variable based Callback
|
|
|
|
* (see src/misc/variables.c).
|
|
|
|
*
|
|
|
|
* It has the following advantages over Variable based Callback:
|
|
|
|
* - No need to implement the whole VLC_COMMON_MEMBERS in the object,
|
|
|
|
* thus it reduce it size. This is especially true for input_item_t which
|
|
|
|
* doesn't have VLC_COMMON_MEMBERS. This is the first reason of existence of
|
|
|
|
* this implementation.
|
|
|
|
* - Libvlc can easily be based upon that.
|
|
|
|
* - Existing event are clearly declared (in include/vlc_events.h)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
**** Example usage
|
|
|
|
*
|
|
|
|
* (vlc_cool_object_t doesn't need to have the VLC_COMMON_MEMBERS.)
|
|
|
|
*
|
2007-09-10 20:56:52 +02:00
|
|
|
* struct vlc_cool_object_t
|
2007-08-13 21:08:15 +02:00
|
|
|
* {
|
|
|
|
* ...
|
|
|
|
* vlc_event_manager_t p_event_manager;
|
|
|
|
* ...
|
|
|
|
* }
|
|
|
|
*
|
|
|
|
* vlc_my_cool_object_new()
|
|
|
|
* {
|
|
|
|
* ...
|
2008-06-14 12:09:14 +02:00
|
|
|
* vlc_event_manager_init( &p_self->p_event_manager, p_self, p_a_libvlc_object );
|
2007-08-13 21:08:15 +02:00
|
|
|
* vlc_event_manager_register_event_type(p_self->p_event_manager,
|
|
|
|
* vlc_MyCoolObjectDidSomething, p_e)
|
|
|
|
* ...
|
|
|
|
* }
|
|
|
|
*
|
|
|
|
* vlc_my_cool_object_release()
|
|
|
|
* {
|
|
|
|
* ...
|
2008-06-14 12:09:14 +02:00
|
|
|
* vlc_event_manager_fini( &p_self->p_event_manager );
|
2007-08-13 21:08:15 +02:00
|
|
|
* ...
|
|
|
|
* }
|
|
|
|
*
|
|
|
|
* vlc_my_cool_object_do_something()
|
|
|
|
* {
|
|
|
|
* ...
|
|
|
|
* vlc_event_t event;
|
|
|
|
* event.type = vlc_MyCoolObjectDidSomething;
|
|
|
|
* event.u.my_cool_object_did_something.what_it_did = kSomething;
|
2008-06-14 12:09:14 +02:00
|
|
|
* vlc_event_send( &p_self->p_event_manager, &event );
|
2007-08-13 21:08:15 +02:00
|
|
|
* }
|
|
|
|
* */
|
2008-04-08 22:58:33 +02:00
|
|
|
|
2007-08-13 21:08:15 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* Event Type
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
/* Private structure defined in misc/events.c */
|
|
|
|
struct vlc_event_listeners_group_t;
|
|
|
|
|
|
|
|
/* Event manager type */
|
|
|
|
typedef struct vlc_event_manager_t
|
|
|
|
{
|
|
|
|
void * p_obj;
|
2007-08-17 04:18:40 +02:00
|
|
|
vlc_mutex_t object_lock;
|
2008-01-01 15:33:18 +01:00
|
|
|
vlc_mutex_t event_sending_lock;
|
2007-08-13 21:08:15 +02:00
|
|
|
DECL_ARRAY(struct vlc_event_listeners_group_t *) listeners_groups;
|
|
|
|
} vlc_event_manager_t;
|
|
|
|
|
|
|
|
/* List of event */
|
|
|
|
typedef enum vlc_event_type_t {
|
2008-06-14 13:37:02 +02:00
|
|
|
/* Input (thread) events */
|
|
|
|
vlc_InputStateChanged,
|
2008-06-14 16:22:35 +02:00
|
|
|
vlc_InputSelectedStreamChanged,
|
2008-06-14 13:37:02 +02:00
|
|
|
|
2007-08-17 04:18:40 +02:00
|
|
|
/* Input item events */
|
2007-08-16 19:52:28 +02:00
|
|
|
vlc_InputItemMetaChanged,
|
2007-08-17 04:18:40 +02:00
|
|
|
vlc_InputItemSubItemAdded,
|
2010-02-02 03:56:10 +01:00
|
|
|
vlc_InputItemSubItemTreeAdded,
|
2007-10-20 19:56:00 +02:00
|
|
|
vlc_InputItemDurationChanged,
|
|
|
|
vlc_InputItemPreparsedChanged,
|
2008-06-14 15:45:44 +02:00
|
|
|
vlc_InputItemNameChanged,
|
|
|
|
vlc_InputItemInfoChanged,
|
2008-08-01 22:47:33 +02:00
|
|
|
vlc_InputItemErrorWhenReadingChanged,
|
2015-02-04 09:55:52 +01:00
|
|
|
vlc_InputItemPreparseEnded,
|
2007-08-17 04:23:11 +02:00
|
|
|
|
|
|
|
/* Service Discovery event */
|
|
|
|
vlc_ServicesDiscoveryItemAdded,
|
2007-12-25 21:54:18 +01:00
|
|
|
vlc_ServicesDiscoveryItemRemoved,
|
2012-01-11 03:10:41 +01:00
|
|
|
vlc_ServicesDiscoveryItemRemoveAll,
|
2007-12-25 21:54:18 +01:00
|
|
|
vlc_ServicesDiscoveryStarted,
|
2014-02-07 23:06:20 +01:00
|
|
|
vlc_ServicesDiscoveryEnded,
|
|
|
|
|
|
|
|
/* Addons Manager events */
|
|
|
|
vlc_AddonFound,
|
|
|
|
vlc_AddonsDiscoveryEnded,
|
|
|
|
vlc_AddonChanged
|
2007-08-13 21:08:15 +02:00
|
|
|
} vlc_event_type_t;
|
|
|
|
|
|
|
|
/* Event definition */
|
|
|
|
typedef struct vlc_event_t
|
|
|
|
{
|
|
|
|
vlc_event_type_t type;
|
2007-08-16 19:52:28 +02:00
|
|
|
void * p_obj; /* Sender object, automatically filled by vlc_event_send() */
|
2007-08-15 16:54:03 +02:00
|
|
|
union vlc_event_type_specific
|
2007-08-13 21:08:15 +02:00
|
|
|
{
|
2008-06-14 13:37:02 +02:00
|
|
|
/* Input (thread) events */
|
|
|
|
struct vlc_input_state_changed
|
|
|
|
{
|
2008-06-14 15:52:23 +02:00
|
|
|
int new_state;
|
2008-06-14 15:47:26 +02:00
|
|
|
} input_state_changed;
|
2008-06-14 16:22:35 +02:00
|
|
|
struct vlc_input_selected_stream_changed
|
|
|
|
{
|
|
|
|
void * unused;
|
|
|
|
} input_selected_stream_changed;
|
2008-06-14 13:37:02 +02:00
|
|
|
|
2007-08-17 04:18:40 +02:00
|
|
|
/* Input item events */
|
2007-08-15 16:54:03 +02:00
|
|
|
struct vlc_input_item_meta_changed
|
2007-08-13 21:08:15 +02:00
|
|
|
{
|
2007-08-15 16:54:03 +02:00
|
|
|
vlc_meta_type_t meta_type;
|
2007-08-13 21:08:15 +02:00
|
|
|
} input_item_meta_changed;
|
2007-08-16 19:52:28 +02:00
|
|
|
struct vlc_input_item_subitem_added
|
|
|
|
{
|
|
|
|
input_item_t * p_new_child;
|
|
|
|
} input_item_subitem_added;
|
2010-02-02 03:56:10 +01:00
|
|
|
struct vlc_input_item_subitem_tree_added
|
|
|
|
{
|
|
|
|
input_item_node_t * p_root;
|
|
|
|
} input_item_subitem_tree_added;
|
2007-10-20 19:56:00 +02:00
|
|
|
struct vlc_input_item_duration_changed
|
|
|
|
{
|
|
|
|
mtime_t new_duration;
|
|
|
|
} input_item_duration_changed;
|
|
|
|
struct vlc_input_item_preparsed_changed
|
|
|
|
{
|
|
|
|
int new_status;
|
|
|
|
} input_item_preparsed_changed;
|
2008-06-14 15:45:44 +02:00
|
|
|
struct vlc_input_item_name_changed
|
|
|
|
{
|
|
|
|
const char * new_name;
|
|
|
|
} input_item_name_changed;
|
|
|
|
struct vlc_input_item_info_changed
|
|
|
|
{
|
|
|
|
void * unused;
|
|
|
|
} input_item_info_changed;
|
2008-08-01 22:47:33 +02:00
|
|
|
struct input_item_error_when_reading_changed
|
|
|
|
{
|
|
|
|
bool new_value;
|
|
|
|
} input_item_error_when_reading_changed;
|
2007-10-20 19:56:00 +02:00
|
|
|
|
2007-08-17 04:23:11 +02:00
|
|
|
/* Service discovery events */
|
|
|
|
struct vlc_services_discovery_item_added
|
|
|
|
{
|
|
|
|
input_item_t * p_new_item;
|
|
|
|
const char * psz_category;
|
|
|
|
} services_discovery_item_added;
|
|
|
|
struct vlc_services_discovery_item_removed
|
|
|
|
{
|
|
|
|
input_item_t * p_item;
|
|
|
|
} services_discovery_item_removed;
|
2007-12-25 21:54:18 +01:00
|
|
|
struct vlc_services_discovery_started
|
|
|
|
{
|
|
|
|
void * unused;
|
|
|
|
} services_discovery_started;
|
|
|
|
struct vlc_services_discovery_ended
|
|
|
|
{
|
|
|
|
void * unused;
|
|
|
|
} services_discovery_ended;
|
2007-08-17 04:23:11 +02:00
|
|
|
|
2014-02-07 23:06:20 +01:00
|
|
|
/* Addons */
|
|
|
|
struct vlc_addon_generic_event
|
|
|
|
{
|
|
|
|
addon_entry_t * p_entry;
|
|
|
|
} addon_generic_event;
|
2007-08-13 21:08:15 +02:00
|
|
|
} u;
|
|
|
|
} vlc_event_t;
|
|
|
|
|
|
|
|
/* Event callback type */
|
|
|
|
typedef void ( *vlc_event_callback_t )( const vlc_event_t *, void * );
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* Event manager
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* p_obj points to the object that owns the event manager, and from
|
|
|
|
* which events are sent
|
|
|
|
*/
|
2011-07-10 17:03:26 +02:00
|
|
|
VLC_API int vlc_event_manager_init( vlc_event_manager_t * p_em, void * p_obj );
|
2007-08-13 21:08:15 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Destroy
|
|
|
|
*/
|
2011-05-07 13:06:21 +02:00
|
|
|
VLC_API void vlc_event_manager_fini( vlc_event_manager_t * p_em );
|
2007-08-13 21:08:15 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Tells a specific event manager that it will handle event_type object
|
|
|
|
*/
|
2011-05-07 13:06:21 +02:00
|
|
|
VLC_API int vlc_event_manager_register_event_type( vlc_event_manager_t * p_em,
|
|
|
|
vlc_event_type_t );
|
2007-08-13 21:08:15 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Send an event to the listener attached to this p_em.
|
|
|
|
*/
|
2011-05-07 13:06:21 +02:00
|
|
|
VLC_API void vlc_event_send( vlc_event_manager_t * p_em, vlc_event_t * );
|
2007-08-13 21:08:15 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Add a callback for an event.
|
|
|
|
*/
|
2011-05-07 13:06:21 +02:00
|
|
|
VLC_API int vlc_event_attach( vlc_event_manager_t * p_event_manager,
|
|
|
|
vlc_event_type_t event_type,
|
|
|
|
vlc_event_callback_t pf_callback,
|
2011-07-10 17:03:26 +02:00
|
|
|
void *p_user_data );
|
2007-08-13 21:08:15 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Remove a callback for an event.
|
|
|
|
*/
|
2011-07-10 17:03:26 +02:00
|
|
|
VLC_API void vlc_event_detach( vlc_event_manager_t *p_event_manager,
|
|
|
|
vlc_event_type_t event_type,
|
|
|
|
vlc_event_callback_t pf_callback,
|
|
|
|
void *p_user_data );
|
2007-08-13 21:08:15 +02:00
|
|
|
|
|
|
|
#endif /* VLC_EVENTS_H */
|