2022-01-20 18:27:56 +00:00
|
|
|
// This file copyright (C) 2005-2022 Transmission authors and contributors.
|
|
|
|
// It may be used under the MIT (SPDX: MIT) license.
|
|
|
|
// License text can be found in the licenses/ folder.
|
2006-07-16 19:39:23 +00:00
|
|
|
|
2016-03-29 16:37:21 +00:00
|
|
|
#pragma once
|
2006-07-16 19:39:23 +00:00
|
|
|
|
2009-01-13 16:50:23 +00:00
|
|
|
#include <inttypes.h>
|
2021-10-18 20:22:31 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2012-12-14 04:34:42 +00:00
|
|
|
#include <libtransmission/transmission.h> /* tr_variant, tr_session */
|
2012-12-22 20:35:19 +00:00
|
|
|
#include <libtransmission/quark.h>
|
2011-08-09 02:30:31 +00:00
|
|
|
|
2021-10-18 20:22:31 +00:00
|
|
|
void gtr_pref_init(std::string const& config_dir);
|
2009-01-13 16:50:23 +00:00
|
|
|
|
2017-04-20 16:02:19 +00:00
|
|
|
int64_t gtr_pref_int_get(tr_quark const key);
|
|
|
|
void gtr_pref_int_set(tr_quark const key, int64_t value);
|
2008-09-23 19:11:04 +00:00
|
|
|
|
2017-04-20 16:02:19 +00:00
|
|
|
double gtr_pref_double_get(tr_quark const key);
|
|
|
|
void gtr_pref_double_set(tr_quark const key, double value);
|
2009-02-13 18:23:56 +00:00
|
|
|
|
2021-10-18 20:22:31 +00:00
|
|
|
bool gtr_pref_flag_get(tr_quark const key);
|
|
|
|
void gtr_pref_flag_set(tr_quark const key, bool value);
|
2008-09-23 19:11:04 +00:00
|
|
|
|
2021-10-18 20:22:31 +00:00
|
|
|
std::vector<std::string> gtr_pref_strv_get(tr_quark const key);
|
2021-05-25 16:21:41 +00:00
|
|
|
|
2021-10-18 20:22:31 +00:00
|
|
|
std::string gtr_pref_string_get(tr_quark const key);
|
|
|
|
void gtr_pref_string_set(tr_quark const key, std::string const& value);
|
2007-09-27 20:57:58 +00:00
|
|
|
|
2017-04-19 12:04:45 +00:00
|
|
|
void gtr_pref_save(tr_session*);
|
2021-10-18 20:22:31 +00:00
|
|
|
tr_variant* gtr_pref_get_all();
|