]> git.sesse.net Git - vlc/blob - include/vlc/libvlc_media_library.h
5325d5d58a88b2dd7dd15bec7f567100e3b3c849
[vlc] / include / vlc / libvlc_media_library.h
1 /*****************************************************************************
2  * libvlc.h:  libvlc external API
3  *****************************************************************************
4  * Copyright (C) 1998-2009 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *          Jean-Paul Saman <jpsaman@videolan.org>
9  *          Pierre d'Herbemont <pdherbemont@videolan.org>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24  *****************************************************************************/
25
26 /**
27  * \file
28  * This file defines libvlc_media_library external API
29  */
30
31 #ifndef VLC_LIBVLC_MEDIA_LIBRARY_H
32 #define VLC_LIBVLC_MEDIA_LIBRARY_H 1
33
34 # ifdef __cplusplus
35 extern "C" {
36 # endif
37
38 /*****************************************************************************
39  * Media Library
40  *****************************************************************************/
41 /** \defgroup libvlc_media_library libvlc_media_library
42  * \ingroup libvlc
43  * LibVLC Media Library
44  * @{
45  */
46
47 typedef struct libvlc_media_library_t libvlc_media_library_t;
48
49 /**
50  * Create an new Media Library object
51  *
52  * \param p_libvlc_instance the libvlc instance
53  * \param p_e an initialized exception pointer
54  */
55 VLC_PUBLIC_API libvlc_media_library_t *
56     libvlc_media_library_new( libvlc_instance_t * p_inst,
57                               libvlc_exception_t * p_e );
58
59 /**
60  * Release media library object. This functions decrements the
61  * reference count of the media library object. If it reaches 0,
62  * then the object will be released.
63  *
64  * \param p_mlib media library object
65  */
66 VLC_PUBLIC_API void
67     libvlc_media_library_release( libvlc_media_library_t * p_mlib );
68
69 /**
70  * Retain a reference to a media library object. This function will
71  * increment the reference counting for this object. Use
72  * libvlc_media_library_release() to decrement the reference count.
73  *
74  * \param p_mlib media library object
75  */
76 VLC_PUBLIC_API void
77     libvlc_media_library_retain( libvlc_media_library_t * p_mlib );
78
79 /**
80  * Load media library.
81  *
82  * \param p_mlib media library object
83  * \param p_e an initialized exception object.
84  */
85 VLC_PUBLIC_API void
86     libvlc_media_library_load( libvlc_media_library_t * p_mlib,
87                                libvlc_exception_t * p_e );
88
89 /**
90  * Save media library.
91  *
92  * \param p_mlib media library object
93  * \param p_e an initialized exception object.
94  */
95 VLC_PUBLIC_API void
96     libvlc_media_library_save( libvlc_media_library_t * p_mlib,
97                                libvlc_exception_t * p_e );
98
99 /**
100  * Get media library subitems.
101  *
102  * \param p_mlib media library object
103  * \param p_e an initialized exception object.
104  * \return media list subitems
105  */
106 VLC_PUBLIC_API libvlc_media_list_t *
107     libvlc_media_library_media_list( libvlc_media_library_t * p_mlib,
108                                      libvlc_exception_t * p_e );
109
110
111 /** @} */
112
113 # ifdef __cplusplus
114 }
115 # endif
116
117 #endif /* VLC_LIBVLC_MEDIA_LIBRARY_H */