Go to the documentation of this file.
21 #ifndef VLC_KEYSTORE_H
22 # define VLC_KEYSTORE_H
60 #define VLC_KEYSTORE_VALUES_INIT(ppsz_values) memset(ppsz_values, 0, sizeof(const char *) * KEY_MAX)
90 #define vlc_keystore_create(x) vlc_keystore_create(VLC_OBJECT(x))
114 const char *
const ppsz_values[
KEY_MAX],
115 const uint8_t* p_secret, ssize_t i_secret_len,
130 const char *
const ppsz_values[
KEY_MAX],
145 const char *
const ppsz_values[
KEY_MAX]);
239 const char *psz_option_username,
240 const char *psz_option_password,
241 const char *psz_dialog_title,
242 const char *psz_dialog_fmt, ...)
VLC_FORMAT(6, 7);
243 #define vlc_credential_get(a, b, c, d, e, f, ...) \
244 vlc_credential_get(a, VLC_OBJECT(b), c, d, e, f, ##__VA_ARGS__)
258 #define vlc_credential_store(a, b) \
259 vlc_credential_store(a, VLC_OBJECT(b))
267 #define VLC_KEYSTORE_NAME "libVLC"
271 const uint8_t *p_secret,
size_t i_secret_len)
273 p_entry->
p_secret = (uint8_t*) malloc(i_secret_len);
276 memcpy(p_entry->
p_secret, p_secret, i_secret_len);
284 for (
unsigned int j = 0; j <
KEY_MAX; ++j)
302 const char *
const ppsz_values[
KEY_MAX],
303 const uint8_t *p_secret,
304 size_t i_secret_len,
const char *
psz_label);
307 const char *
const ppsz_values[
KEY_MAX],
312 const char *
const ppsz_values[
KEY_MAX]);
const char * psz_password
valid only if vlc_credential_get() returned true
Definition: vlc_keystore.h:175
Definition: vlc_keystore.h:181
#define VLC_FORMAT(x, y)
Definition: vlc_common.h:100
Definition: vlc_keystore.h:51
#define VLC_API
Definition: fourcc_gen.c:30
void vlc_credential_init(vlc_credential *p_credential, const vlc_url_t *p_url)
Init a credential struct.
Definition: keystore.c:344
#define VLC_COMMON_MEMBERS
Backward compatibility macro.
Definition: vlc_common.h:453
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:73
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:270
Definition: vlc_keystore.h:294
Definition: vlc_main.h:33
char * ppsz_values[KEY_MAX]
Set of key/values.
Definition: vlc_keystore.h:68
Definition: vlc_keystore.h:57
Definition: vlc_keystore.h:180
bool b_store
Definition: vlc_keystore.h:197
char * psz_split_domain
Definition: vlc_keystore.h:190
vlc_keystore_key
List of keys that can be stored via the keystore API.
Definition: vlc_keystore.h:50
Keystore entry returned by vlc_keystore_find()
Definition: vlc_keystore.h:65
Definition: vlc_keystore.h:53
uint8_t * p_secret
Secret password.
Definition: vlc_keystore.h:70
#define VLC_EGENERIC
Unspecified error.
Definition: vlc_common.h:350
void libvlc_InternalKeystoreClean(libvlc_int_t *p_libvlc)
Definition: keystore.c:138
unsigned int(* pf_find)(vlc_keystore *p_keystore, const char *const ppsz_values[KEY_MAX], vlc_keystore_entry **pp_entries)
See vlc_keystore_find()
Definition: vlc_keystore.h:306
Definition: vlc_keystore.h:58
vlc_keystore * p_keystore
Definition: vlc_keystore.h:186
vlc_keystore_sys * p_sys
Definition: vlc_keystore.h:298
char * psz_dialog_username
Definition: vlc_keystore.h:194
char * psz_var_username
Definition: vlc_keystore.h:191
const vlc_url_t * p_url
url to store or to search
Definition: vlc_keystore.h:165
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:103
int(* pf_store)(vlc_keystore *p_keystore, const char *const ppsz_values[KEY_MAX], const uint8_t *p_secret, size_t i_secret_len, const char *psz_label)
See vlc_keystore_store()
Definition: vlc_keystore.h:301
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:112
Internal module descriptor.
Definition: modules.h:79
vlc_keystore_entry * p_entries
Definition: vlc_keystore.h:187
char * psz_dialog_password
Definition: vlc_keystore.h:195
Definition: vlc_keystore.h:55
#define vlc_keystore_create(x)
Definition: vlc_keystore.h:90
bool b_from_keystore
Definition: vlc_keystore.h:196
enum vlc_credential::@184 i_get_order
Definition: vlc_keystore.h:52
Definition: vlc_keystore.h:54
module_t * p_module
Definition: vlc_keystore.h:297
char * psz_var_password
Definition: vlc_keystore.h:192
Definition: vlc_url.h:145
The main vlc_object_t structure.
Definition: vlc_objects.h:39
Definition: vlc_keystore.h:56
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:349
Definition: vlc_keystore.h:183
size_t i_secret_len
Length of the secret.
Definition: vlc_keystore.h:72
const char * psz_authtype
http authtype to search, can be overridden after a call to vlc_credential_get()
Definition: vlc_keystore.h:171
#define VLC_USED
Definition: fourcc_gen.c:31
int libvlc_InternalKeystoreInit(libvlc_int_t *p_libvlc)
Definition: keystore.c:128
#define vlc_credential_store(a, b)
Definition: vlc_keystore.h:258
void vlc_keystore_release(vlc_keystore *p_keystore)
Release a keystore object.
Definition: keystore.c:64
struct vlc_keystore_sys vlc_keystore_sys
Definition: vlc_keystore.h:293
static void vlc_keystore_release_entry(vlc_keystore_entry *p_entry)
Definition: vlc_keystore.h:282
Definition: vlc_keystore.h:162
char psz_label[13]
Definition: vout_intf.c:82
unsigned int i_entries_count
Definition: vlc_keystore.h:188
void vlc_credential_clean(vlc_credential *p_credential)
Clean a credential struct.
Definition: keystore.c:354
#define vlc_credential_get(a, b, c, d, e, f,...)
Definition: vlc_keystore.h:243
const char * psz_username
valid only if vlc_credential_get() returned true
Definition: vlc_keystore.h:173
Definition: vlc_keystore.h:182
unsigned int(* pf_remove)(vlc_keystore *p_keystore, const char *const ppsz_values[KEY_MAX])
See vlc_keystore_remove()
Definition: vlc_keystore.h:311
const char * psz_realm
http realm or smb domain to search, can be overridden after a call to vlc_credential_get()
Definition: vlc_keystore.h:168
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:120
Definition: vlc_keystore.h:179