* Use std::unique_ptr to manage UDP core object
N.B.: it's no longer valid to call socket adjustments quirks from
tr_sessionSetUTPEnabled() because the corresponding object may be
not created yet. We have to create (or re-create) it explicitly
(like it's done in tr_sessionSetDHTEnabled()) or just set
is_utp_enabled_ flag of the session and assume that socket
adjustments will be done later when the object is constructed.
* re-add macOS Fullscreen support
re added Full Screen support for macOS. Also refactored window methods in Controller.mm and moved to their own category - ControllerWindowMethods.mm
This has currently only been tested on macOS Monterey, and should be good on earlier versions - but perhaps needs testing on earlier versions of macOS.
fixes#3231#3234
* build: remove unused -DHAVE_ASPRINTF from xcode build
* build: remove unused -DHAVE_ZLIB from cmake and xcode
we use libdeflate instead
* build: remove unused -DHAVE_LIBGEN from xcode
* Make Sparkle optional to allow building without Apple Developer Program
* Display a nice alert for developers clicking "checkForUpdates" when app isn't signed for Sparkle
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* Compatibility to build on the last macOS 32 bit system with its last compatible Xcode
* Code review: Compatibility declarations
* compatibility with `make`
* Code review: headers
* Avoiding dummy NSImageSymbolConfiguration implementation
* clang-format
* Don't force-include compat header
* Remove compat header from pch header
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
* feat: add tr_strbuf class for building tmp strings
Based on fmt::basic_memory_buf, this is a growable string buffer that
has an initial size that's large enough to build most filenames or URLs
without needing heap allocations.
Adds a couple of extra helpers such as a `c_str()` method to make dealing
with old zero-terminated string APIs easier.
* refactor: add SAX-like benc parser
This is the first part of a series of PRs whose end goal is to avoid
the overhead of tr_variant when parsing bencoded data, e.g. when
parsing .torrent files on startup or when parsing announce/scrape
tracker responses.
This PR introduces a SAX-like benc parser, reimplements variant-benc
to use the SAX benc parser (so that we don't have two benc parsers),
and updates the benc + variant tests.
* refactor: add tr_torrent_metainfo class
Can be used for parsing bencoded .torrent data without instantiating
a tr_torrent. This will be used in all the places where client code
needs to test a .torrent file for validity / to add a preview window
before adding the torrent.