X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc%2Fvlc.h;h=7ff86046680936cf49d2af1941add1c6f322c2a0;hb=476ba22e35e6fc083199ca15a0ef9298792b3822;hp=4700511b7957d4d4eb78f613f607ceb1b1f18b8c;hpb=7f0d9408c2d0afe973e90b1426b50fc8587d5be2;p=vlc diff --git a/include/vlc/vlc.h b/include/vlc/vlc.h index 4700511b79..7ff8604668 100644 --- a/include/vlc/vlc.h +++ b/include/vlc/vlc.h @@ -2,13 +2,13 @@ * vlc.h: global header for vlc ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vlc.h,v 1.4 2002/07/03 19:40:49 sam Exp $ + * $Id: vlc.h,v 1.22 2003/01/28 02:03:32 sam Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (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 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -29,24 +29,51 @@ extern "C" { /***************************************************************************** * Our custom types *****************************************************************************/ -#define VLC_DECLARE_STRUCT( name ) \ - struct name##_s; \ - typedef struct name##_s name##_t; -VLC_DECLARE_STRUCT(vlc) -VLC_DECLARE_STRUCT(vlc_object) +typedef int vlc_bool_t; +typedef struct vlc_list_t vlc_list_t; +typedef struct vlc_object_t vlc_object_t; + +typedef union +{ + int i_int; + vlc_bool_t b_bool; + float f_float; + char * psz_string; + void * p_address; + vlc_object_t * p_object; + vlc_list_t * p_list; + + /* Make sure the structure is at least 64bits */ + struct { char a, b, c, d, e, f, g, h; } padding; + +} vlc_value_t; -typedef signed int vlc_error_t; -typedef int vlc_bool_t; -typedef int vlc_status_t; +struct vlc_list_t +{ + int i_count; + vlc_value_t * p_values; + int * pi_types; + +}; /***************************************************************************** * Error values *****************************************************************************/ #define VLC_SUCCESS -0 /* No error */ -#define VLC_EGENERIC -1 /* Generic error */ -#define VLC_ENOMEM -2 /* Not enough memory */ -#define VLC_ESTATUS -3 /* Invalid status */ +#define VLC_ENOMEM -1 /* Not enough memory */ +#define VLC_ETHREAD -2 /* Thread error */ +#define VLC_ETIMEOUT -3 /* Timeout */ + +#define VLC_ENOMOD -10 /* Module not found */ + +#define VLC_ENOOBJ -20 /* Object not found */ +#define VLC_EBADOBJ -21 /* Bad object type */ + +#define VLC_ENOVAR -30 /* Variable not found */ +#define VLC_EBADVAR -31 /* Bad variable value */ + #define VLC_EEXIT -255 /* Program exited */ +#define VLC_EGENERIC -666 /* Generic error */ /***************************************************************************** * Booleans @@ -54,23 +81,16 @@ typedef int vlc_status_t; #define VLC_FALSE 0 #define VLC_TRUE 1 -/***************************************************************************** - * Main structure status - *****************************************************************************/ -#define VLC_STATUS_NONE 0x00000000 -#define VLC_STATUS_CREATED 0x02020202 -#define VLC_STATUS_STOPPED 0x12121212 -#define VLC_STATUS_RUNNING 0x42424242 - /***************************************************************************** * Playlist *****************************************************************************/ /* Used by playlist_Add */ -#define PLAYLIST_INSERT 0x0001 -#define PLAYLIST_REPLACE 0x0002 -#define PLAYLIST_APPEND 0x0004 -#define PLAYLIST_GO 0x0008 +#define PLAYLIST_INSERT 0x0001 +#define PLAYLIST_REPLACE 0x0002 +#define PLAYLIST_APPEND 0x0004 +#define PLAYLIST_GO 0x0008 +#define PLAYLIST_CHECK_INSERT 0x0010 #define PLAYLIST_END -666 @@ -95,32 +115,29 @@ typedef int vlc_status_t; * Required internal headers *****************************************************************************/ #if defined( __VLC__ ) -# include "defs.h" -# include "config.h" -# include "modules_inner.h" # include "vlc_common.h" -# include "vlc_messages.h" -# include "mtime.h" -# include "modules.h" -# include "main.h" -# include "configuration.h" -# include "vlc_objects.h" #endif /***************************************************************************** - * Exported libvlc base API + * Exported libvlc API *****************************************************************************/ -vlc_t * vlc_create ( void ); -vlc_error_t vlc_init ( vlc_t *, int, char *[] ); -vlc_error_t vlc_run ( vlc_t * ); -vlc_error_t vlc_stop ( vlc_t * ); -vlc_error_t vlc_end ( vlc_t * ); -vlc_error_t vlc_destroy ( vlc_t * ); - -vlc_error_t vlc_add_intf ( vlc_t *, const char *, vlc_bool_t ); -vlc_error_t vlc_add_target ( vlc_t *, const char *, int, int ); - -vlc_status_t vlc_status ( vlc_t * ); +char const * VLC_Version ( void ); +char const * VLC_Error ( int ); + +int VLC_Create ( void ); +int VLC_Init ( int, int, char *[] ); +int VLC_Die ( int ); +int VLC_Destroy ( int ); + +int VLC_Set ( int, char const *, vlc_value_t ); +int VLC_Get ( int, char const *, vlc_value_t * ); +int VLC_AddIntf ( int, char const *, vlc_bool_t ); +int VLC_AddTarget ( int, char const *, int, int ); + +int VLC_Play ( int ); +int VLC_Pause ( int ); +int VLC_Stop ( int ); +int VLC_FullScreen ( int ); # ifdef __cplusplus }