Compile fix + handle case with no xml:base
[vlc.git] / include / vlc_vlm.h
blob9483fd7ca062ab04a30d70f5c2300eb87975ac0e
1 /*****************************************************************************
2 * vlc_vlm.h: VLM core structures
3 *****************************************************************************
4 * Copyright (C) 2000, 2001 the VideoLAN team
5 * $Id$
7 * Authors: Simon Latapie <garf@videolan.org>
8 * Laurent Aimar <fenrir@videolan.org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #ifndef _VLC_VLM_H
26 #define _VLC_VLM_H 1
28 /* VLM specific - structures and functions */
29 enum
31 VOD_TYPE = 0,
32 BROADCAST_TYPE,
33 SCHEDULE_TYPE,
36 typedef struct
38 /* instance name */
39 char *psz_name;
41 /* "playlist" index */
42 int i_index;
44 input_item_t item;
45 input_thread_t *p_input;
47 } vlm_media_instance_t;
49 struct vlm_media_t
51 vlc_bool_t b_enabled;
52 int i_type;
54 /* name "media" is reserved */
55 char *psz_name;
56 input_item_t item;
58 /* "playlist" */
59 int i_input;
60 char **input;
62 int i_option;
63 char **option;
65 char *psz_output;
67 /* only for broadcast */
68 vlc_bool_t b_loop;
70 /* only for vod */
71 vod_media_t *vod_media;
72 char *psz_vod_output;
73 char *psz_mux;
75 /* actual input instances */
76 int i_instance;
77 vlm_media_instance_t **instance;
81 struct vlm_schedule_t
83 /* names "schedule" is reserved */
84 char *psz_name;
85 vlc_bool_t b_enabled;
86 /* list of commands to execute on date */
87 int i_command;
88 char **command;
90 /* the date of 1st execution */
91 mtime_t i_date;
93 /* if != 0 repeat schedule every (period) */
94 mtime_t i_period;
95 /* number of times you have to repeat
96 i_repeat < 0 : endless repeat */
97 int i_repeat;
101 /* ok, here is the structure of a vlm_message:
102 The parent node is ( name_of_the_command , NULL ), or
103 ( name_of_the_command , message_error ) on error.
104 If a node has children, it should not have a value (=NULL).*/
105 struct vlm_message_t
107 char *psz_name;
108 char *psz_value;
110 int i_child;
111 vlm_message_t **child;
115 struct vlm_t
117 VLC_COMMON_MEMBERS
119 vlc_mutex_t lock;
121 int i_media;
122 vlm_media_t **media;
124 int i_vod;
125 vod_t *vod;
127 int i_schedule;
128 vlm_schedule_t **schedule;
132 #define vlm_New( a ) __vlm_New( VLC_OBJECT(a) )
133 VLC_EXPORT( vlm_t *, __vlm_New, ( vlc_object_t * ) );
134 VLC_EXPORT( void, vlm_Delete, ( vlm_t * ) );
135 VLC_EXPORT( int, vlm_ExecuteCommand, ( vlm_t *, const char *, vlm_message_t ** ) );
136 VLC_EXPORT( void, vlm_MessageDelete, ( vlm_message_t * ) );
137 VLC_EXPORT( vlm_media_t *, vlm_MediaNew, ( vlm_t *, const char *, int ) );
138 VLC_EXPORT( void, vlm_MediaDelete, ( vlm_t *, vlm_media_t *, const char * ) );
139 VLC_EXPORT( int, vlm_MediaSetup, ( vlm_t *, vlm_media_t *, const char *, const char * ) );
140 VLC_EXPORT( int, vlm_MediaControl, ( vlm_t *, vlm_media_t *, const char *, const char *, const char * ) );
141 VLC_EXPORT( vlm_media_t* , vlm_MediaSearch,( vlm_t *, const char *) );
142 VLC_EXPORT( vlm_schedule_t *, vlm_ScheduleNew, ( vlm_t *, const char * ) );
143 VLC_EXPORT( void, vlm_ScheduleDelete, ( vlm_t *, vlm_schedule_t *, const char * ) );
144 VLC_EXPORT( int, vlm_ScheduleSetup, ( vlm_schedule_t *, const char *, const char * ) );
145 VLC_EXPORT( int, vlm_MediaVodControl, ( void *, vod_media_t *, const char *, int, va_list ) );
146 VLC_EXPORT( int, vlm_Save, ( vlm_t *, const char * ) );
147 VLC_EXPORT( int, vlm_Load, ( vlm_t *, const char * ) );
149 #endif