21 #ifndef VLC_KEYSTORE_H 22 # define VLC_KEYSTORE_H 61 #define VLC_KEYSTORE_VALUES_INIT(ppsz_values) memset(ppsz_values, 0, sizeof(const char *) * KEY_MAX) 91 #define vlc_keystore_create(x) vlc_keystore_create(VLC_OBJECT(x)) 169 const char *psz_realm;
172 const char *psz_authtype;
174 const char *psz_username;
176 const char *psz_password;
182 GET_FROM_MEMORY_KEYSTORE,
189 unsigned int i_entries_count;
191 char *psz_split_domain;
192 char *psz_var_username;
193 char *psz_var_password;
195 char *psz_dialog_username;
196 char *psz_dialog_password;
197 bool b_from_keystore;
240 const char *psz_option_username,
241 const char *psz_option_password,
242 const char *psz_dialog_title,
243 const char *psz_dialog_fmt, ...)
VLC_FORMAT(6, 7);
244 #define vlc_credential_get(a, b, c, d, e, f, ...) \ 245 vlc_credential_get(a, VLC_OBJECT(b), c, d, e, f, ##__VA_ARGS__) 259 #define vlc_credential_store(a, b) \ 260 vlc_credential_store(a, VLC_OBJECT(b)) 268 #define VLC_KEYSTORE_NAME "libVLC" 274 p_entry->
p_secret = (uint8_t*) malloc(i_secret_len);
277 memcpy(p_entry->
p_secret, p_secret, i_secret_len);
285 for (
unsigned int j = 0; j <
KEY_MAX; ++j)
299 vlc_keystore_sys *p_sys;
static int vlc_keystore_entry_set_secret(vlc_keystore_entry *p_entry, const uint8_t *p_secret, size_t i_secret_len)
Definition: vlc_keystore.h:272
#define vlc_credential_store(a, b)
Definition: vlc_keystore.h:260
static void vlc_keystore_release_entry(vlc_keystore_entry *p_entry)
Definition: vlc_keystore.h:284
char * ppsz_values[KEY_MAX]
Set of key/values.
Definition: vlc_keystore.h:70
Definition: vlc_keystore.h:59
This file is a collection of common definitions and types.
void libvlc_InternalKeystoreClean(libvlc_int_t *p_libvlc)
Definition: keystore.c:144
Definition: vlc_objects.h:115
Internal module descriptor.
Definition: modules.h:75
Definition: vlc_keystore.h:55
uint8_t * p_secret
Secret password.
Definition: vlc_keystore.h:72
#define vlc_keystore_create(x)
Definition: vlc_keystore.h:92
vlc_keystore_key
List of keys that can be stored via the keystore API.
Definition: vlc_keystore.h:52
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.
Definition: keystore.c:79
void vlc_credential_clean(vlc_credential *p_credential)
Clean a credential struct.
Definition: keystore.c:360
Definition: vlc_keystore.h:60
Definition: vlc_keystore.h:57
Definition: vlc_url.h:145
Definition: vlc_keystore.h:296
Definition: vlc_keystore.h:56
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.
Definition: keystore.c:109
struct vlc_keystore_sys vlc_keystore_sys
Definition: vlc_keystore.h:295
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:470
Definition: vlc_keystore.h:164
Keystore entry returned by vlc_keystore_find()
Definition: vlc_keystore.h:67
Definition: vlc_keystore.h:54
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.
Definition: keystore.c:118
#define vlc_credential_get(a, b, c, d, e, f,...)
Definition: vlc_keystore.h:245
#define VLC_API
Definition: fourcc_gen.c:31
void vlc_keystore_release(vlc_keystore *p_keystore)
Release a keystore object.
Definition: keystore.c:70
#define VLC_EGENERIC
Unspecified error.
Definition: vlc_common.h:472
#define VLC_FORMAT(x, y)
String format function annotation.
Definition: vlc_common.h:141
Definition: vlc_keystore.h:58
size_t i_secret_len
Length of the secret.
Definition: vlc_keystore.h:74
int libvlc_InternalKeystoreInit(libvlc_int_t *p_libvlc)
Definition: keystore.c:134
void vlc_keystore_release_entries(vlc_keystore_entry *p_entries, unsigned int i_count)
Release the list of entries returned by vlc_keystore_find()
Definition: keystore.c:126
VLC object common members.
Definition: vlc_objects.h:43
void vlc_credential_init(vlc_credential *p_credential, const vlc_url_t *p_url)
Init a credential struct.
Definition: keystore.c:350
#define VLC_USED
Definition: fourcc_gen.c:32
Definition: vlc_keystore.h:53
char psz_label[13]
Definition: vout_intf.c:89