VLC 4.0.0-dev
|
Data Structures | |
struct | vlc_keystore_entry |
Keystore entry returned by vlc_keystore_find() More... | |
Macros | |
#define | VLC_KEYSTORE_VALUES_INIT(ppsz_values) memset(ppsz_values, 0, sizeof(const char *) * KEY_MAX) |
#define | vlc_keystore_create(x) vlc_keystore_create(VLC_OBJECT(x)) |
Enumerations | |
enum | vlc_keystore_key { KEY_PROTOCOL , KEY_USER , KEY_SERVER , KEY_PATH , KEY_PORT , KEY_REALM , KEY_AUTHTYPE , KEY_MAX } |
List of keys that can be stored via the keystore API. More... | |
Functions | |
vlc_keystore * | vlc_keystore_create (vlc_object_t *p_parent) |
Create a keystore object. More... | |
void | vlc_keystore_release (vlc_keystore *p_keystore) |
Release a keystore object. More... | |
int | vlc_keystore_store (vlc_keystore *p_keystore, const char *const ppsz_values[KEY_MAX], const uint8_t *p_secret, ssize_t i_secret_len, const char *psz_label) |
Store a secret associated with a set of key/values. More... | |
unsigned int | vlc_keystore_find (vlc_keystore *p_keystore, const char *const ppsz_values[KEY_MAX], vlc_keystore_entry **pp_entries) |
Find all entries that match a set of key/values. More... | |
unsigned int | vlc_keystore_remove (vlc_keystore *p_keystore, const char *const ppsz_values[KEY_MAX]) |
Remove all entries that match a set of key/values. More... | |
void | vlc_keystore_release_entries (vlc_keystore_entry *p_entries, unsigned int i_count) |
Release the list of entries returned by vlc_keystore_find() More... | |
#define vlc_keystore_create | ( | x | ) | vlc_keystore_create(VLC_OBJECT(x)) |
#define VLC_KEYSTORE_VALUES_INIT | ( | ppsz_values | ) | memset(ppsz_values, 0, sizeof(const char *) * KEY_MAX) |
enum vlc_keystore_key |
vlc_keystore * vlc_keystore_create | ( | vlc_object_t * | p_parent | ) |
Create a keystore object.
A keystore object is persistent across runtime. It is saved on local filesystem via a vlc keystore module (KWallet, SecretService, Apple Keychain Service ...).
p_parent | the parent object used to create the keystore object |
References keystore_create(), and var_InheritString().
Referenced by vlc_credential_get().
unsigned int vlc_keystore_find | ( | vlc_keystore * | p_keystore, |
const char *const | ppsz_values[KEY_MAX], | ||
vlc_keystore_entry ** | pp_entries | ||
) |
Find all entries that match a set of key/values.
ppsz_values | set of key/values, see vlc_keystore_key, any values can be NULL |
pp_entries | list of found entries. To be released with vlc_keystore_release_entries() |
References vlc_keystore::pf_find.
Referenced by credential_find_keystore().
void vlc_keystore_release | ( | vlc_keystore * | p_keystore | ) |
Release a keystore object.
References module_unneed, vlc_keystore::p_module, and vlc_object_delete.
Referenced by libvlc_InternalKeystoreClean(), and vlc_credential_clean().
void vlc_keystore_release_entries | ( | vlc_keystore_entry * | p_entries, |
unsigned int | i_count | ||
) |
Release the list of entries returned by vlc_keystore_find()
References vlc_keystore_release_entry().
Referenced by credential_find_keystore(), and vlc_credential_clean().
unsigned int vlc_keystore_remove | ( | vlc_keystore * | p_keystore, |
const char *const | ppsz_values[KEY_MAX] | ||
) |
Remove all entries that match a set of key/values.
ppsz_values | set of key/values, see vlc_keystore_key, any values can be NULL |
References vlc_keystore::pf_remove.
int vlc_keystore_store | ( | vlc_keystore * | p_keystore, |
const char *const | ppsz_values[KEY_MAX], | ||
const uint8_t * | p_secret, | ||
ssize_t | i_secret_len, | ||
const char * | psz_label | ||
) |
Store a secret associated with a set of key/values.
ppsz_values | set of key/values, see vlc_keystore_key. ppsz_values[KEY_PROTOCOL] and ppsz_values[KEY_SERVER] must be valid strings |
p_secret | binary secret or string password |
i_secret_len | length of p_secret. If it's less than 0, then p_secret is assumed to be a '\0' terminated string |
psz_label | user friendly label |
References i_port, KEY_PORT, KEY_PROTOCOL, KEY_SERVER, msg_Err, vlc_keystore::pf_store, psz_label, and VLC_EGENERIC.
Referenced by vlc_credential_store().