]> git.sesse.net Git - vlc/blobdiff - include/vlc/libvlc.h
Add a proper API to set the user agent
[vlc] / include / vlc / libvlc.h
index eb6414aafce228716eb07cc09a7bdb24ba8f71f7..36b263feef32c270754f3b06ff778ecaeb363666 100644 (file)
@@ -67,8 +67,9 @@ extern "C" {
  * You can create one (or more) instance(s) of LibVLC in a given process,
  * with libvlc_new() and destroy them with libvlc_release().
  *
- * \version This documents LibVLC version 1.1.
- * Earlier versions (0.9 and 1.0) are <b>not</b> compatible.
+ * \version Unless otherwise stated, these functions are available
+ * from LibVLC versions numbered 1.1.0 or more.
+ * Earlier versions (0.9.x and 1.0.x) are <b>not</b> compatible.
  * @{
  */
 
@@ -170,6 +171,19 @@ void libvlc_set_exit_handler( libvlc_instance_t *p_instance,
 VLC_PUBLIC_API
 void libvlc_wait( libvlc_instance_t *p_instance );
 
+/**
+ * Sets the application name. LibVLC passes this as the user agent string
+ * when a protocol requires it.
+ *
+ * \param p_instance LibVLC instance
+ * \param name human-readable application name, e.g. "FooBar player 1.2.3"
+ * \param http HTTP User Agent, e.g. "FooBar/1.2.3 Python/2.6.0"
+ * \version LibVLC 1.1.1 or later
+ */
+VLC_PUBLIC_API
+void libvlc_set_user_agent( libvlc_instance_t *p_instance,
+                            const char *name, const char *http );
+
 /**
  * Retrieve libvlc version.
  *