[vlc-devel] [RFC PATCH] add vlc_keystore API
Rémi Denis-Courmont
remi at remlab.net
Mon Nov 23 16:35:35 CET 2015
Le 2015-11-23 17:10, Thomas Guillem a écrit :
> +VLC_API int
> +vlc_keystore_store(vlc_keystore *p_keystore,
> + const char *psz_user, const char *psz_protocol,
> + const char *psz_server, const char *psz_port,
> + const char *psz_passwd);
The authentication realm is missing for HTTP support. IMO, the
protocol, server and port should be merged as a single URI parameter.
> +
> +/**
> + * Get a password associated with user, protocol, server and port
> keys
> + *
> + * @note This function is an helper for vlc_keystore_dict_find()
> when
> + * the dict contains "user", "protocol", "server", "port" keys.
> + *
> + * @param p_keystore
> + * @param psz_user if NULL, return any password that match
> protocol/server/port
> + * @param psz_protocol protocol (http, https, ftp, ftps, smb...)
> + * @param psz_server (www.example.com)
> + * @param psz_port if NULL, use default protocol port
> + *
> + * @return the password, a '\0' terminated string to be freed by
> free()
> + */
> +VLC_API char *
> +vlc_keystore_find(vlc_keystore *p_keystore,
> + const char *psz_user, const char *psz_protocol,
> + const char *psz_server, const char *psz_port)
> VLC_USED VLC_MALLOC;
Ditto.
Also should the username not be an output rather than input parameter?
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list