Commit 921aaff4 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

lib: add libvlc_set_app_id() to complement libvlc_set_user_agent()

parent 9cca21d4
......@@ -214,6 +214,20 @@ LIBVLC_API
void libvlc_set_user_agent( libvlc_instance_t *p_instance,
const char *name, const char *http );
/**
* Sets some meta-informations about the application.
* See also libvlc_set_user_agent().
*
* \param p_instance LibVLC instance
* \param id Java-style application identifier, e.g. "com.acme.foobar"
* \param version application version numbers, e.g. "1.2.3"
* \param icon application icon name, e.g. "foobar"
* \version LibVLC 2.1.0 or later.
*/
LIBVLC_API
void libvlc_set_app_id( libvlc_instance_t *p_instance, const char *id,
const char *version, const char *icon );
/**
* Retrieve libvlc version.
*
......
......@@ -147,6 +147,16 @@ void libvlc_set_user_agent (libvlc_instance_t *p_i,
}
}
void libvlc_set_app_id(libvlc_instance_t *p_i, const char *id,
const char *version, const char *icon)
{
libvlc_int_t *p_libvlc = p_i->p_libvlc_int;
var_SetString(p_libvlc, "app-id", id ? id : "");
var_SetString(p_libvlc, "app-version", version ? version : "");
var_SetString(p_libvlc, "app-version", icon ? icon : "");
}
const char * libvlc_get_version(void)
{
return VERSION_MESSAGE;
......
......@@ -180,6 +180,7 @@ libvlc_retain
libvlc_set_fullscreen
libvlc_set_log_verbosity
libvlc_set_user_agent
libvlc_set_app_id
libvlc_toggle_fullscreen
libvlc_toggle_teletext
libvlc_track_description_release
......
......@@ -395,6 +395,12 @@ dbus_out:
var_Create( p_libvlc, "http-user-agent", VLC_VAR_STRING );
var_SetString( p_libvlc, "http-user-agent",
"VLC/"PACKAGE_VERSION" LibVLC/"PACKAGE_VERSION );
var_Create( p_libvlc, "app-icon-name", VLC_VAR_STRING );
var_SetString( p_libvlc, "app-icon-name", PACKAGE_NAME );
var_Create( p_libvlc, "app-id", VLC_VAR_STRING );
var_SetString( p_libvlc, "app-id", "org.VideoLAN.VLC" );
var_Create( p_libvlc, "app-version", VLC_VAR_STRING );
var_SetString( p_libvlc, "app-version", PACKAGE_VERSION );
/* System specific configuration */
system_Configure( p_libvlc, i_argc - vlc_optind, ppsz_argv + vlc_optind );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment