X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc%2Fvlc.h;h=8658f45769937e497ae6af268d6facea759d838c;hb=bd92601ccbbcb92a03ca421aef9980bd0b89ef0a;hp=01ecf79e7ec49e9698b2709b6024fd6ea16558c9;hpb=eb395af053ac65f5386bab02a2da920284528f56;p=vlc diff --git a/include/vlc/vlc.h b/include/vlc/vlc.h index 01ecf79e7e..8658f45769 100644 --- a/include/vlc/vlc.h +++ b/include/vlc/vlc.h @@ -2,7 +2,7 @@ * vlc.h: global header for vlc ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vlc.h,v 1.11 2002/08/26 01:01:13 sam Exp $ + * $Id: vlc.h,v 1.21 2002/12/15 16:28:20 gbazin 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 @@ -29,22 +29,49 @@ extern "C" { /***************************************************************************** * Our custom types *****************************************************************************/ -typedef struct vlc_t vlc_t; +typedef int vlc_bool_t; typedef struct vlc_list_t vlc_list_t; typedef struct vlc_object_t vlc_object_t; -typedef signed int vlc_error_t; -typedef int vlc_bool_t; -typedef int vlc_status_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; + +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_ENOMEM -1 /* Not enough memory */ -#define VLC_EMODULE -2 /* Module not found */ -#define VLC_ESTATUS -3 /* Invalid status */ -#define VLC_ETHREAD -4 /* Could not spawn thread */ +#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 */ @@ -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,48 +115,29 @@ typedef int vlc_status_t; * Required internal headers *****************************************************************************/ #if defined( __VLC__ ) -# include "../config.h" -# include "vlc_config.h" -# include "modules_inner.h" # include "vlc_common.h" -# include "os_specific.h" -# include "vlc_messages.h" -# include "mtime.h" -# include "modules.h" -# include "main.h" -# include "configuration.h" -# include "vlc_objects.h" #endif /***************************************************************************** * Exported libvlc API *****************************************************************************/ -vlc_status_t vlc_status ( void ); - -vlc_error_t vlc_create ( void ); -vlc_error_t vlc_init ( int, char *[] ); -vlc_error_t vlc_run ( void ); -vlc_error_t vlc_die ( void ); -vlc_error_t vlc_destroy ( void ); - -vlc_error_t vlc_set ( const char *, const char * ); -vlc_error_t vlc_add_intf ( const char *, vlc_bool_t ); -vlc_error_t vlc_add_target ( const char *, int, int ); - -/***************************************************************************** - * Exported libvlc reentrant API - *****************************************************************************/ -vlc_status_t vlc_status_r ( vlc_t * ); - -vlc_t * vlc_create_r ( void ); -vlc_error_t vlc_init_r ( vlc_t *, int, char *[] ); -vlc_error_t vlc_run_r ( vlc_t * ); -vlc_error_t vlc_die_r ( vlc_t * ); -vlc_error_t vlc_destroy_r ( vlc_t * ); - -vlc_error_t vlc_set_r ( vlc_t *, const char *, const char * ); -vlc_error_t vlc_add_intf_r ( vlc_t *, const char *, vlc_bool_t ); -vlc_error_t vlc_add_target_r ( vlc_t *, const char *, int, int ); +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 }