]> git.sesse.net Git - vlc/blobdiff - include/vlc/vlc.h
* ./bootstrap: we touch m4/Makefile.am so that configure doesn't complain
[vlc] / include / vlc / vlc.h
index e94d4d3ff5c86b5b07d53d5f768b52c460cce622..02f3413c83d24bfccb7b2ad0d30e951b69b8981c 100644 (file)
@@ -2,7 +2,7 @@
  * vlc.h: global header for vlc
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc.h,v 1.1 2002/06/01 12:31:58 sam Exp $
+ * $Id: vlc.h,v 1.13 2002/08/26 23:36:20 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
@@ -27,74 +27,106 @@ extern "C" {
 # endif
 
 /*****************************************************************************
- * Error values
+ * Our custom types
  *****************************************************************************/
+typedef struct vlc_t vlc_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;
 
+/*****************************************************************************
+ * Error values
+ *****************************************************************************/
 #define VLC_SUCCESS         -0                                   /* No error */
-#define VLC_EGENERIC        -1                              /* Generic error */
-#define VLC_ENOMEM          -2                          /* Not enough memory */
+#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_EEXIT         -255                             /* Program exited */
+#define VLC_EGENERIC      -666                              /* Generic error */
 
 /*****************************************************************************
  * Booleans
  *****************************************************************************/
-typedef int vlc_bool_t;
-
 #define VLC_FALSE 0
 #define VLC_TRUE  1
 
 /*****************************************************************************
  * Main structure status
  *****************************************************************************/
-typedef int vlc_status_t;
-
 #define VLC_STATUS_NONE     0x00000000
 #define VLC_STATUS_CREATED  0x02020202
 #define VLC_STATUS_STOPPED  0x12121212
 #define VLC_STATUS_RUNNING  0x42424242
 
 /*****************************************************************************
- * Structure types
+ * Playlist
  *****************************************************************************/
-#define VLC_DECLARE_STRUCT( name ) \
-    struct name##_s;         \
-    typedef struct name##_s name##_t;
-VLC_DECLARE_STRUCT(vlc)
-VLC_DECLARE_STRUCT(vlc_object)
+
+/* Used by playlist_Add */
+#define PLAYLIST_INSERT      0x0001
+#define PLAYLIST_REPLACE     0x0002
+#define PLAYLIST_APPEND      0x0004
+#define PLAYLIST_GO          0x0008
+
+#define PLAYLIST_END           -666
+
+/* Playlist parsing mode */
+#define PLAYLIST_REPEAT_CURRENT   0             /* Keep playing current item */
+#define PLAYLIST_FORWARD          1              /* Parse playlist until end */
+#define PLAYLIST_BACKWARD        -1                       /* Parse backwards */
+#define PLAYLIST_FORWARD_LOOP     2               /* Parse playlist and loop */
+#define PLAYLIST_BACKWARD_LOOP   -2              /* Parse backwards and loop */
+#define PLAYLIST_RANDOM           3                          /* Shuffle play */
+#define PLAYLIST_REVERSE_RANDOM  -3                  /* Reverse shuffle play */
+
+/* Playlist commands */
+#define PLAYLIST_PLAY   1                         /* Starts playing. No arg. */
+#define PLAYLIST_PAUSE  2                 /* Toggles playlist pause. No arg. */
+#define PLAYLIST_STOP   3                          /* Stops playing. No arg. */
+#define PLAYLIST_SKIP   4                          /* Skip X items and play. */
+#define PLAYLIST_GOTO   5                                  /* Goto Xth item. */
+#define PLAYLIST_MODE   6                          /* Set playlist mode. ??? */
 
 /*****************************************************************************
  * 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 "threads_funcs.h"
-#   include "vlc_objects.h"
 #endif
 
 /*****************************************************************************
- * Exported libvlc base API
+ * 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_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_status_t    vlc_status_r     ( vlc_t * );
 
-vlc_error_t     vlc_add_intf   ( vlc_t *, char *, vlc_bool_t );
-vlc_error_t     vlc_add_target ( vlc_t *, char * );
+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_status_t    vlc_status     ( 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 );
 
 # ifdef __cplusplus
 }