2022-01-20 18:27:56 +00:00
|
|
|
// This file Copyright © 2012-2022 Mnemosyne LLC.
|
2022-08-08 18:05:39 +00:00
|
|
|
// It may be used under GPLv2 (SPDX: GPL-2.0-only), GPLv3 (SPDX: GPL-3.0-only),
|
2022-01-20 18:27:56 +00:00
|
|
|
// or any future license endorsed by Mnemosyne LLC.
|
|
|
|
// License text can be found in the licenses/ folder.
|
2012-12-22 20:35:19 +00:00
|
|
|
|
2016-03-29 16:37:21 +00:00
|
|
|
#pragma once
|
2012-12-22 20:35:19 +00:00
|
|
|
|
2021-10-15 13:28:47 +00:00
|
|
|
#include <cstddef> // size_t
|
2021-11-01 23:29:13 +00:00
|
|
|
#include <optional>
|
2021-10-15 13:28:47 +00:00
|
|
|
#include <string_view>
|
|
|
|
|
2012-12-22 20:35:19 +00:00
|
|
|
/* Quarks — a 2-way association between a string and a unique integer identifier */
|
2021-10-06 14:26:07 +00:00
|
|
|
using tr_quark = size_t;
|
2012-12-22 20:35:19 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Predefined Quarks.
|
|
|
|
*
|
|
|
|
* TODO: it would be nice to clean up all the naming inconsistencies
|
|
|
|
* between RPC and settings. This will be a mess and we shouldn't be
|
|
|
|
* in a hurry to do it.
|
|
|
|
*/
|
|
|
|
enum
|
|
|
|
{
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_NONE, /* represented as an empty string */
|
|
|
|
TR_KEY_activeTorrentCount, /* rpc */
|
|
|
|
TR_KEY_activity_date, /* resume file */
|
|
|
|
TR_KEY_activityDate, /* rpc */
|
|
|
|
TR_KEY_added, /* pex */
|
|
|
|
TR_KEY_added_date, /* rpc */
|
|
|
|
TR_KEY_added_f, /* pex */
|
|
|
|
TR_KEY_added6, /* pex */
|
|
|
|
TR_KEY_added6_f, /* pex */
|
|
|
|
TR_KEY_addedDate, /* rpc */
|
|
|
|
TR_KEY_address, /* rpc */
|
|
|
|
TR_KEY_alt_speed_down, /* rpc, settings */
|
|
|
|
TR_KEY_alt_speed_enabled, /* rpc, settings */
|
|
|
|
TR_KEY_alt_speed_time_begin, /* rpc, settings */
|
|
|
|
TR_KEY_alt_speed_time_day, /* rpc, settings */
|
|
|
|
TR_KEY_alt_speed_time_enabled, /* rpc, settings */
|
|
|
|
TR_KEY_alt_speed_time_end, /* rpc, settings */
|
|
|
|
TR_KEY_alt_speed_up, /* rpc, settings */
|
|
|
|
TR_KEY_announce, /* metainfo */
|
2022-07-20 19:04:52 +00:00
|
|
|
TR_KEY_announce_ip, /* metainfo, settings */
|
|
|
|
TR_KEY_announce_ip_enabled, /* metainfo, settings */
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_announce_list, /* metainfo */
|
|
|
|
TR_KEY_announceState, /* rpc */
|
2020-11-14 18:43:42 +00:00
|
|
|
TR_KEY_anti_brute_force_enabled, /* rpc */
|
|
|
|
TR_KEY_anti_brute_force_threshold, /* rpc */
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_arguments, /* rpc */
|
2022-06-11 17:06:07 +00:00
|
|
|
TR_KEY_availability, // rpc
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_bandwidth_priority,
|
|
|
|
TR_KEY_bandwidthPriority,
|
|
|
|
TR_KEY_bind_address_ipv4,
|
|
|
|
TR_KEY_bind_address_ipv6,
|
|
|
|
TR_KEY_bitfield,
|
|
|
|
TR_KEY_blocklist_date,
|
|
|
|
TR_KEY_blocklist_enabled,
|
|
|
|
TR_KEY_blocklist_size,
|
|
|
|
TR_KEY_blocklist_updates_enabled,
|
|
|
|
TR_KEY_blocklist_url,
|
|
|
|
TR_KEY_blocks,
|
|
|
|
TR_KEY_bytesCompleted,
|
|
|
|
TR_KEY_cache_size_mb,
|
|
|
|
TR_KEY_clientIsChoked,
|
|
|
|
TR_KEY_clientIsInterested,
|
|
|
|
TR_KEY_clientName,
|
|
|
|
TR_KEY_comment,
|
|
|
|
TR_KEY_comment_utf_8,
|
|
|
|
TR_KEY_compact_view,
|
|
|
|
TR_KEY_complete,
|
|
|
|
TR_KEY_config_dir,
|
|
|
|
TR_KEY_cookies,
|
|
|
|
TR_KEY_corrupt,
|
|
|
|
TR_KEY_corruptEver,
|
|
|
|
TR_KEY_created_by,
|
|
|
|
TR_KEY_created_by_utf_8,
|
|
|
|
TR_KEY_creation_date,
|
|
|
|
TR_KEY_creator,
|
|
|
|
TR_KEY_cumulative_stats,
|
|
|
|
TR_KEY_current_stats,
|
|
|
|
TR_KEY_date,
|
|
|
|
TR_KEY_dateCreated,
|
2022-02-20 17:54:20 +00:00
|
|
|
TR_KEY_default_trackers,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_delete_local_data,
|
|
|
|
TR_KEY_desiredAvailable,
|
|
|
|
TR_KEY_destination,
|
2020-04-27 21:34:02 +00:00
|
|
|
TR_KEY_details_window_height,
|
|
|
|
TR_KEY_details_window_width,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_dht_enabled,
|
|
|
|
TR_KEY_dnd,
|
|
|
|
TR_KEY_done_date,
|
|
|
|
TR_KEY_doneDate,
|
|
|
|
TR_KEY_download_dir,
|
|
|
|
TR_KEY_download_dir_free_space,
|
|
|
|
TR_KEY_download_queue_enabled,
|
|
|
|
TR_KEY_download_queue_size,
|
|
|
|
TR_KEY_downloadCount,
|
|
|
|
TR_KEY_downloadDir,
|
|
|
|
TR_KEY_downloadLimit,
|
|
|
|
TR_KEY_downloadLimited,
|
|
|
|
TR_KEY_downloadSpeed,
|
|
|
|
TR_KEY_downloaded,
|
|
|
|
TR_KEY_downloaded_bytes,
|
|
|
|
TR_KEY_downloadedBytes,
|
|
|
|
TR_KEY_downloadedEver,
|
|
|
|
TR_KEY_downloaders,
|
|
|
|
TR_KEY_downloading_time_seconds,
|
|
|
|
TR_KEY_dropped,
|
|
|
|
TR_KEY_dropped6,
|
|
|
|
TR_KEY_e,
|
2019-11-12 23:13:42 +00:00
|
|
|
TR_KEY_editDate,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_encoding,
|
|
|
|
TR_KEY_encryption,
|
|
|
|
TR_KEY_error,
|
|
|
|
TR_KEY_errorString,
|
|
|
|
TR_KEY_eta,
|
|
|
|
TR_KEY_etaIdle,
|
|
|
|
TR_KEY_fields,
|
2020-10-13 15:33:56 +00:00
|
|
|
TR_KEY_file_count,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_fileStats,
|
|
|
|
TR_KEY_filename,
|
|
|
|
TR_KEY_files,
|
|
|
|
TR_KEY_files_added,
|
|
|
|
TR_KEY_files_unwanted,
|
|
|
|
TR_KEY_files_wanted,
|
|
|
|
TR_KEY_filesAdded,
|
|
|
|
TR_KEY_filter_mode,
|
|
|
|
TR_KEY_filter_text,
|
|
|
|
TR_KEY_filter_trackers,
|
|
|
|
TR_KEY_flagStr,
|
|
|
|
TR_KEY_flags,
|
2019-11-09 23:02:23 +00:00
|
|
|
TR_KEY_format,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_fromCache,
|
|
|
|
TR_KEY_fromDht,
|
|
|
|
TR_KEY_fromIncoming,
|
|
|
|
TR_KEY_fromLpd,
|
|
|
|
TR_KEY_fromLtep,
|
|
|
|
TR_KEY_fromPex,
|
|
|
|
TR_KEY_fromTracker,
|
2022-03-18 13:11:59 +00:00
|
|
|
TR_KEY_group,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_hasAnnounced,
|
|
|
|
TR_KEY_hasScraped,
|
|
|
|
TR_KEY_hashString,
|
|
|
|
TR_KEY_have,
|
|
|
|
TR_KEY_haveUnchecked,
|
|
|
|
TR_KEY_haveValid,
|
|
|
|
TR_KEY_honorsSessionLimits,
|
|
|
|
TR_KEY_host,
|
|
|
|
TR_KEY_id,
|
|
|
|
TR_KEY_idle_limit,
|
|
|
|
TR_KEY_idle_mode,
|
|
|
|
TR_KEY_idle_seeding_limit,
|
|
|
|
TR_KEY_idle_seeding_limit_enabled,
|
|
|
|
TR_KEY_ids,
|
|
|
|
TR_KEY_incomplete,
|
|
|
|
TR_KEY_incomplete_dir,
|
|
|
|
TR_KEY_incomplete_dir_enabled,
|
|
|
|
TR_KEY_info,
|
|
|
|
TR_KEY_inhibit_desktop_hibernation,
|
|
|
|
TR_KEY_ipv4,
|
|
|
|
TR_KEY_ipv6,
|
|
|
|
TR_KEY_isBackup,
|
|
|
|
TR_KEY_isDownloadingFrom,
|
|
|
|
TR_KEY_isEncrypted,
|
|
|
|
TR_KEY_isFinished,
|
|
|
|
TR_KEY_isIncoming,
|
|
|
|
TR_KEY_isPrivate,
|
|
|
|
TR_KEY_isStalled,
|
|
|
|
TR_KEY_isUTP,
|
|
|
|
TR_KEY_isUploadingTo,
|
2019-02-17 09:33:57 +00:00
|
|
|
TR_KEY_labels,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_lastAnnouncePeerCount,
|
|
|
|
TR_KEY_lastAnnounceResult,
|
|
|
|
TR_KEY_lastAnnounceStartTime,
|
|
|
|
TR_KEY_lastAnnounceSucceeded,
|
|
|
|
TR_KEY_lastAnnounceTime,
|
|
|
|
TR_KEY_lastAnnounceTimedOut,
|
|
|
|
TR_KEY_lastScrapeResult,
|
|
|
|
TR_KEY_lastScrapeStartTime,
|
|
|
|
TR_KEY_lastScrapeSucceeded,
|
|
|
|
TR_KEY_lastScrapeTime,
|
|
|
|
TR_KEY_lastScrapeTimedOut,
|
|
|
|
TR_KEY_leecherCount,
|
|
|
|
TR_KEY_leftUntilDone,
|
|
|
|
TR_KEY_length,
|
|
|
|
TR_KEY_location,
|
|
|
|
TR_KEY_lpd_enabled,
|
|
|
|
TR_KEY_m,
|
|
|
|
TR_KEY_magnetLink,
|
|
|
|
TR_KEY_main_window_height,
|
|
|
|
TR_KEY_main_window_is_maximized,
|
|
|
|
TR_KEY_main_window_layout_order,
|
|
|
|
TR_KEY_main_window_width,
|
|
|
|
TR_KEY_main_window_x,
|
|
|
|
TR_KEY_main_window_y,
|
|
|
|
TR_KEY_manualAnnounceTime,
|
|
|
|
TR_KEY_max_peers,
|
|
|
|
TR_KEY_maxConnectedPeers,
|
|
|
|
TR_KEY_memory_bytes,
|
|
|
|
TR_KEY_memory_units,
|
|
|
|
TR_KEY_message_level,
|
|
|
|
TR_KEY_metadataPercentComplete,
|
|
|
|
TR_KEY_metadata_size,
|
|
|
|
TR_KEY_metainfo,
|
|
|
|
TR_KEY_method,
|
|
|
|
TR_KEY_min_request_interval,
|
|
|
|
TR_KEY_move,
|
|
|
|
TR_KEY_msg_type,
|
|
|
|
TR_KEY_mtimes,
|
|
|
|
TR_KEY_name,
|
|
|
|
TR_KEY_name_utf_8,
|
|
|
|
TR_KEY_nextAnnounceTime,
|
|
|
|
TR_KEY_nextScrapeTime,
|
|
|
|
TR_KEY_nodes,
|
|
|
|
TR_KEY_nodes6,
|
|
|
|
TR_KEY_open_dialog_dir,
|
|
|
|
TR_KEY_p,
|
|
|
|
TR_KEY_path,
|
|
|
|
TR_KEY_path_utf_8,
|
|
|
|
TR_KEY_paused,
|
|
|
|
TR_KEY_pausedTorrentCount,
|
|
|
|
TR_KEY_peer_congestion_algorithm,
|
|
|
|
TR_KEY_peer_id_ttl_hours,
|
|
|
|
TR_KEY_peer_limit,
|
|
|
|
TR_KEY_peer_limit_global,
|
|
|
|
TR_KEY_peer_limit_per_torrent,
|
|
|
|
TR_KEY_peer_port,
|
|
|
|
TR_KEY_peer_port_random_high,
|
|
|
|
TR_KEY_peer_port_random_low,
|
|
|
|
TR_KEY_peer_port_random_on_start,
|
|
|
|
TR_KEY_peer_socket_tos,
|
|
|
|
TR_KEY_peerIsChoked,
|
|
|
|
TR_KEY_peerIsInterested,
|
|
|
|
TR_KEY_peers,
|
|
|
|
TR_KEY_peers2,
|
|
|
|
TR_KEY_peers2_6,
|
|
|
|
TR_KEY_peersConnected,
|
|
|
|
TR_KEY_peersFrom,
|
|
|
|
TR_KEY_peersGettingFromUs,
|
|
|
|
TR_KEY_peersSendingToUs,
|
2022-02-13 07:27:47 +00:00
|
|
|
TR_KEY_percentComplete,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_percentDone,
|
|
|
|
TR_KEY_pex_enabled,
|
|
|
|
TR_KEY_piece,
|
|
|
|
TR_KEY_piece_length,
|
|
|
|
TR_KEY_pieceCount,
|
|
|
|
TR_KEY_pieceSize,
|
|
|
|
TR_KEY_pieces,
|
|
|
|
TR_KEY_play_download_complete_sound,
|
|
|
|
TR_KEY_port,
|
|
|
|
TR_KEY_port_forwarding_enabled,
|
|
|
|
TR_KEY_port_is_open,
|
|
|
|
TR_KEY_preallocation,
|
|
|
|
TR_KEY_prefetch_enabled,
|
2020-10-13 15:33:56 +00:00
|
|
|
TR_KEY_primary_mime_type,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_priorities,
|
|
|
|
TR_KEY_priority,
|
|
|
|
TR_KEY_priority_high,
|
|
|
|
TR_KEY_priority_low,
|
|
|
|
TR_KEY_priority_normal,
|
|
|
|
TR_KEY_private,
|
|
|
|
TR_KEY_progress,
|
|
|
|
TR_KEY_prompt_before_exit,
|
|
|
|
TR_KEY_queue_move_bottom,
|
|
|
|
TR_KEY_queue_move_down,
|
|
|
|
TR_KEY_queue_move_top,
|
|
|
|
TR_KEY_queue_move_up,
|
|
|
|
TR_KEY_queue_stalled_enabled,
|
|
|
|
TR_KEY_queue_stalled_minutes,
|
|
|
|
TR_KEY_queuePosition,
|
|
|
|
TR_KEY_rateDownload,
|
|
|
|
TR_KEY_rateToClient,
|
|
|
|
TR_KEY_rateToPeer,
|
|
|
|
TR_KEY_rateUpload,
|
|
|
|
TR_KEY_ratio_limit,
|
|
|
|
TR_KEY_ratio_limit_enabled,
|
|
|
|
TR_KEY_ratio_mode,
|
2022-01-23 15:57:21 +00:00
|
|
|
TR_KEY_read_clipboard,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_recent_download_dir_1,
|
|
|
|
TR_KEY_recent_download_dir_2,
|
|
|
|
TR_KEY_recent_download_dir_3,
|
|
|
|
TR_KEY_recent_download_dir_4,
|
2022-08-22 02:26:13 +00:00
|
|
|
TR_KEY_recent_relocate_dir_1,
|
|
|
|
TR_KEY_recent_relocate_dir_2,
|
|
|
|
TR_KEY_recent_relocate_dir_3,
|
|
|
|
TR_KEY_recent_relocate_dir_4,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_recheckProgress,
|
|
|
|
TR_KEY_remote_session_enabled,
|
|
|
|
TR_KEY_remote_session_host,
|
|
|
|
TR_KEY_remote_session_password,
|
|
|
|
TR_KEY_remote_session_port,
|
|
|
|
TR_KEY_remote_session_requres_authentication,
|
|
|
|
TR_KEY_remote_session_username,
|
|
|
|
TR_KEY_removed,
|
|
|
|
TR_KEY_rename_partial_files,
|
|
|
|
TR_KEY_reqq,
|
|
|
|
TR_KEY_result,
|
|
|
|
TR_KEY_rpc_authentication_required,
|
|
|
|
TR_KEY_rpc_bind_address,
|
|
|
|
TR_KEY_rpc_enabled,
|
2018-01-11 18:00:41 +00:00
|
|
|
TR_KEY_rpc_host_whitelist,
|
|
|
|
TR_KEY_rpc_host_whitelist_enabled,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_rpc_password,
|
|
|
|
TR_KEY_rpc_port,
|
2022-02-23 21:09:54 +00:00
|
|
|
TR_KEY_rpc_socket_mode,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_rpc_url,
|
|
|
|
TR_KEY_rpc_username,
|
|
|
|
TR_KEY_rpc_version,
|
|
|
|
TR_KEY_rpc_version_minimum,
|
2021-10-13 03:03:28 +00:00
|
|
|
TR_KEY_rpc_version_semver,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_rpc_whitelist,
|
|
|
|
TR_KEY_rpc_whitelist_enabled,
|
|
|
|
TR_KEY_scrape,
|
|
|
|
TR_KEY_scrape_paused_torrents_enabled,
|
|
|
|
TR_KEY_scrapeState,
|
2021-10-12 21:32:32 +00:00
|
|
|
TR_KEY_script_torrent_added_enabled,
|
|
|
|
TR_KEY_script_torrent_added_filename,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_script_torrent_done_enabled,
|
|
|
|
TR_KEY_script_torrent_done_filename,
|
2022-02-14 04:07:12 +00:00
|
|
|
TR_KEY_script_torrent_done_seeding_enabled,
|
|
|
|
TR_KEY_script_torrent_done_seeding_filename,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_seconds_active,
|
|
|
|
TR_KEY_secondsActive,
|
|
|
|
TR_KEY_secondsDownloading,
|
|
|
|
TR_KEY_secondsSeeding,
|
|
|
|
TR_KEY_seed_queue_enabled,
|
|
|
|
TR_KEY_seed_queue_size,
|
|
|
|
TR_KEY_seedIdleLimit,
|
|
|
|
TR_KEY_seedIdleMode,
|
|
|
|
TR_KEY_seedRatioLimit,
|
|
|
|
TR_KEY_seedRatioLimited,
|
|
|
|
TR_KEY_seedRatioMode,
|
|
|
|
TR_KEY_seederCount,
|
|
|
|
TR_KEY_seeding_time_seconds,
|
|
|
|
TR_KEY_session_count,
|
|
|
|
TR_KEY_session_id,
|
|
|
|
TR_KEY_sessionCount,
|
|
|
|
TR_KEY_show_backup_trackers,
|
|
|
|
TR_KEY_show_extra_peer_details,
|
|
|
|
TR_KEY_show_filterbar,
|
|
|
|
TR_KEY_show_notification_area_icon,
|
|
|
|
TR_KEY_show_options_window,
|
|
|
|
TR_KEY_show_statusbar,
|
|
|
|
TR_KEY_show_toolbar,
|
|
|
|
TR_KEY_show_tracker_scrapes,
|
2022-02-12 17:30:27 +00:00
|
|
|
TR_KEY_sitename,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_size_bytes,
|
|
|
|
TR_KEY_size_units,
|
|
|
|
TR_KEY_sizeWhenDone,
|
|
|
|
TR_KEY_sort_mode,
|
|
|
|
TR_KEY_sort_reversed,
|
2021-10-18 23:05:39 +00:00
|
|
|
TR_KEY_source,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_speed,
|
|
|
|
TR_KEY_speed_Bps,
|
|
|
|
TR_KEY_speed_bytes,
|
|
|
|
TR_KEY_speed_limit_down,
|
|
|
|
TR_KEY_speed_limit_down_enabled,
|
|
|
|
TR_KEY_speed_limit_up,
|
|
|
|
TR_KEY_speed_limit_up_enabled,
|
|
|
|
TR_KEY_speed_units,
|
|
|
|
TR_KEY_start_added_torrents,
|
|
|
|
TR_KEY_start_minimized,
|
|
|
|
TR_KEY_startDate,
|
|
|
|
TR_KEY_status,
|
|
|
|
TR_KEY_statusbar_stats,
|
|
|
|
TR_KEY_tag,
|
2022-08-26 02:27:11 +00:00
|
|
|
TR_KEY_tcp_enabled,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_tier,
|
|
|
|
TR_KEY_time_checked,
|
|
|
|
TR_KEY_torrent_added,
|
|
|
|
TR_KEY_torrent_added_notification_command,
|
|
|
|
TR_KEY_torrent_added_notification_enabled,
|
|
|
|
TR_KEY_torrent_complete_notification_command,
|
|
|
|
TR_KEY_torrent_complete_notification_enabled,
|
|
|
|
TR_KEY_torrent_complete_sound_command,
|
|
|
|
TR_KEY_torrent_complete_sound_enabled,
|
|
|
|
TR_KEY_torrent_duplicate,
|
|
|
|
TR_KEY_torrent_get,
|
|
|
|
TR_KEY_torrent_set,
|
|
|
|
TR_KEY_torrent_set_location,
|
|
|
|
TR_KEY_torrentCount,
|
|
|
|
TR_KEY_torrentFile,
|
|
|
|
TR_KEY_torrents,
|
|
|
|
TR_KEY_totalSize,
|
|
|
|
TR_KEY_total_size,
|
|
|
|
TR_KEY_trackerAdd,
|
2022-02-18 17:52:01 +00:00
|
|
|
TR_KEY_trackerList,
|
2017-04-19 12:04:45 +00:00
|
|
|
TR_KEY_trackerRemove,
|
|
|
|
TR_KEY_trackerReplace,
|
|
|
|
TR_KEY_trackerStats,
|
|
|
|
TR_KEY_trackers,
|
|
|
|
TR_KEY_trash_can_enabled,
|
|
|
|
TR_KEY_trash_original_torrent_files,
|
|
|
|
TR_KEY_umask,
|
|
|
|
TR_KEY_units,
|
|
|
|
TR_KEY_upload_slots_per_torrent,
|
|
|
|
TR_KEY_uploadLimit,
|
|
|
|
TR_KEY_uploadLimited,
|
|
|
|
TR_KEY_uploadRatio,
|
|
|
|
TR_KEY_uploadSpeed,
|
|
|
|
TR_KEY_upload_only,
|
|
|
|
TR_KEY_uploaded,
|
|
|
|
TR_KEY_uploaded_bytes,
|
|
|
|
TR_KEY_uploadedBytes,
|
|
|
|
TR_KEY_uploadedEver,
|
|
|
|
TR_KEY_url_list,
|
|
|
|
TR_KEY_use_global_speed_limit,
|
|
|
|
TR_KEY_use_speed_limit,
|
|
|
|
TR_KEY_user_has_given_informed_consent,
|
|
|
|
TR_KEY_ut_comment,
|
|
|
|
TR_KEY_ut_holepunch,
|
|
|
|
TR_KEY_ut_metadata,
|
|
|
|
TR_KEY_ut_pex,
|
|
|
|
TR_KEY_ut_recommend,
|
|
|
|
TR_KEY_utp_enabled,
|
|
|
|
TR_KEY_v,
|
|
|
|
TR_KEY_version,
|
|
|
|
TR_KEY_wanted,
|
|
|
|
TR_KEY_watch_dir,
|
|
|
|
TR_KEY_watch_dir_enabled,
|
|
|
|
TR_KEY_webseeds,
|
|
|
|
TR_KEY_webseedsSendingToUs,
|
|
|
|
TR_N_KEYS
|
2012-12-22 20:35:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Find the quark that matches the specified string
|
|
|
|
*
|
|
|
|
* @return true if the specified string exists as a quark
|
|
|
|
*/
|
2022-04-05 03:51:56 +00:00
|
|
|
[[nodiscard]] std::optional<tr_quark> tr_quark_lookup(std::string_view key);
|
2012-12-22 20:35:19 +00:00
|
|
|
|
2021-11-02 01:01:27 +00:00
|
|
|
/**
|
|
|
|
* Get the string view that corresponds to the specified quark.
|
|
|
|
*
|
|
|
|
* Note: this view is guaranteed to be zero-terminated at view[std::size(view)]
|
|
|
|
*/
|
2022-04-05 03:51:56 +00:00
|
|
|
[[nodiscard]] std::string_view tr_quark_get_string_view(tr_quark quark);
|
2012-12-22 20:35:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new quark for the specified string. If a quark already
|
|
|
|
* exists for that string, it is returned so that no duplicates are
|
|
|
|
* created.
|
|
|
|
*/
|
2022-04-05 03:51:56 +00:00
|
|
|
[[nodiscard]] tr_quark tr_quark_new(std::string_view);
|