1 /*****************************************************************************
2 * list_util.h: list helper used by memory and file_crypt keystores
3 *****************************************************************************
4 * Copyright © 2015-2016 VLC authors, VideoLAN and VideoLabs
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 *****************************************************************************/
21 #ifndef VLC_KEYSTORE_LIST_UTIL_H_
22 #define VLC_KEYSTORE_LIST_UTIL_H_
25 * Copy KEY_MAX values from ppsz_src to ppsz_dst
27 int ks_values_copy(const char * ppsz_dst
[KEY_MAX
],
28 const char *const ppsz_src
[KEY_MAX
]);
32 vlc_keystore_entry
*p_entries
;
38 * Allocate and return a vlc_keystore_entry that will be stored in the ks_list
40 vlc_keystore_entry
*ks_list_new_entry(struct ks_list
*p_list
);
43 * Free all entries stored in the list
45 void ks_list_free(struct ks_list
*p_list
);
48 * Find an entry in the ks_list that match ppsz_values
50 vlc_keystore_entry
*ks_list_find_entry(struct ks_list
*p_list
,
51 const char *const ppsz_values
[KEY_MAX
],
52 unsigned *p_start_index
);
54 #endif /* VLC_KEYSTORE_LIST_UTIL_H_ */