|
Packit Service |
b23acc |
// SPDX-License-Identifier: LGPL-2.1+
|
|
Packit Service |
b23acc |
/*
|
|
Packit Service |
b23acc |
* Copyright (C) 2019 Red Hat, Inc.
|
|
Packit Service |
b23acc |
*/
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
#ifndef __NM_KEYFILE_AUX_H__
|
|
Packit Service |
b23acc |
#define __NM_KEYFILE_AUX_H__
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
/*****************************************************************************/
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
typedef struct _NMKeyFileDB NMKeyFileDB;
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
typedef void (*NMKeyFileDBLogFcn) (NMKeyFileDB *self,
|
|
Packit Service |
b23acc |
int syslog_level,
|
|
Packit Service |
b23acc |
gpointer user_data,
|
|
Packit Service |
b23acc |
const char *fmt,
|
|
Packit Service |
b23acc |
...) G_GNUC_PRINTF (4, 5);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
typedef void (*NMKeyFileDBGotDirtyFcn) (NMKeyFileDB *self,
|
|
Packit Service |
b23acc |
gpointer user_data);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
NMKeyFileDB *nm_key_file_db_new (const char *filename,
|
|
Packit Service |
b23acc |
const char *group,
|
|
Packit Service |
b23acc |
NMKeyFileDBLogFcn log_fcn,
|
|
Packit Service |
b23acc |
NMKeyFileDBGotDirtyFcn got_dirty_fcn,
|
|
Packit Service |
b23acc |
gpointer user_data);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
void nm_key_file_db_start (NMKeyFileDB *self);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
NMKeyFileDB *nm_key_file_db_ref (NMKeyFileDB *self);
|
|
Packit Service |
b23acc |
void nm_key_file_db_unref (NMKeyFileDB *self);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
void nm_key_file_db_destroy (NMKeyFileDB *self);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
const char *nm_key_file_db_get_filename (NMKeyFileDB *self);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
gboolean nm_key_file_db_is_dirty (NMKeyFileDB *self);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
char *nm_key_file_db_get_value (NMKeyFileDB *self,
|
|
Packit Service |
b23acc |
const char *key);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
char **nm_key_file_db_get_string_list (NMKeyFileDB *self,
|
|
Packit Service |
b23acc |
const char *key,
|
|
Packit Service |
b23acc |
gsize *out_len);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
void nm_key_file_db_remove_key (NMKeyFileDB *self,
|
|
Packit Service |
b23acc |
const char *key);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
void nm_key_file_db_set_value (NMKeyFileDB *self,
|
|
Packit Service |
b23acc |
const char *key,
|
|
Packit Service |
b23acc |
const char *value);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
void nm_key_file_db_set_string_list (NMKeyFileDB *self,
|
|
Packit Service |
b23acc |
const char *key,
|
|
Packit Service |
b23acc |
const char *const*value,
|
|
Packit Service |
b23acc |
gssize len);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
void nm_key_file_db_to_file (NMKeyFileDB *self,
|
|
Packit Service |
b23acc |
gboolean force);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
/*****************************************************************************/
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
#endif /* __NM_KEYFILE_AUX_H__ */
|