2023-02-11 20:49:42 +00:00
|
|
|
// This file Copyright © 2005-2023 Transmission authors and contributors.
|
2022-01-20 18:27:56 +00:00
|
|
|
// 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
|
|
|
|
2022-12-26 21:13:21 +00:00
|
|
|
#include <libtransmission/transmission.h> /* tr_variant, tr_session */
|
|
|
|
#include <libtransmission/quark.h>
|
|
|
|
|
2022-04-08 01:50:26 +00:00
|
|
|
#include <cstdint> // int64_t
|
2021-10-18 20:22:31 +00:00
|
|
|
#include <string>
|
2022-04-01 19:16:33 +00:00
|
|
|
#include <string_view>
|
2021-10-18 20:22:31 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2022-04-01 19:16:33 +00:00
|
|
|
void gtr_pref_init(std::string_view config_dir);
|
2009-01-13 16:50:23 +00:00
|
|
|
|
2023-01-21 12:06:20 +00:00
|
|
|
int64_t gtr_pref_int_get(tr_quark key);
|
|
|
|
void gtr_pref_int_set(tr_quark key, int64_t value);
|
2008-09-23 19:11:04 +00:00
|
|
|
|
2023-01-21 12:06:20 +00:00
|
|
|
double gtr_pref_double_get(tr_quark key);
|
|
|
|
void gtr_pref_double_set(tr_quark key, double value);
|
2009-02-13 18:23:56 +00:00
|
|
|
|
2023-01-21 12:06:20 +00:00
|
|
|
bool gtr_pref_flag_get(tr_quark key);
|
|
|
|
void gtr_pref_flag_set(tr_quark key, bool value);
|
2008-09-23 19:11:04 +00:00
|
|
|
|
2023-01-21 12:06:20 +00:00
|
|
|
std::vector<std::string> gtr_pref_strv_get(tr_quark key);
|
2021-05-25 16:21:41 +00:00
|
|
|
|
2023-01-21 12:06:20 +00:00
|
|
|
std::string gtr_pref_string_get(tr_quark key);
|
|
|
|
void gtr_pref_string_set(tr_quark key, std::string_view value);
|
2007-09-27 20:57:58 +00:00
|
|
|
|
2023-01-21 12:06:20 +00:00
|
|
|
void gtr_pref_save(tr_session* /*session*/);
|
2021-10-18 20:22:31 +00:00
|
|
|
tr_variant* gtr_pref_get_all();
|