Commit Graph

22 Commits

Author SHA1 Message Date
Charles Kerr 884135d853
fix: sonarcloud (#2356)
* refactor: replace #define with constexpr in some utils

* fix: use-std-string-instead-of-c-array sonarcloud warning

* fix: use init-statement sonarcloud warning

* fix: explain-empty-function sonarcloud warning

* fix: move #include directive to top sonarcloud warning

* fix: replace-void-ptr-arg-with-more-meaningful-type sonarcloud warning

* fix: replace-redundant-type-with-auto warning

* fix: use-init-statement sonarcloud warning

* fix: make type a pointer-to-const sonarcloud warning

* fix: cli tyop

* fix: replace-redundant-type-with-auto warning

* fix: use-init-statement sonarcloud warning

* fix: replace-redundant-type-with-auto warning

* fix: use-init-statement sonarcloud warning

* fix: replace-redundant-type-with-auto warning

* fix: make type a pointer-to-const sonarcloud warning

* fix: make type a pointer-to-const sonarcloud warning

* fix: replace-redundant-type-with-auto warning

* refactor: replace #define with constexpr in rpcimpl
2021-12-28 11:23:47 -06:00
Charles Kerr fa35b8ad39
refactor: use std::string in tr_variantToStr() (#2351)
* refactor: use std::string in tr_variantToStr()
2021-12-27 16:47:25 -06:00
Charles Kerr b62b8f28bf
fix: exit time dtor warnings (#2338) 2021-12-24 20:07:33 -06:00
Charles Kerr 7ca0b4cc25
fix: sonarcloud (#2327) 2021-12-17 14:48:02 -06:00
Charles Kerr 2277fde4e0
refactor: prefer tr_strv*() funcs (#2317) 2021-12-15 20:09:46 -06:00
Charles Kerr de75b26e7f fixup! multiple tracker-add/-remove (#2284)
chore: code_style.sh
2021-12-09 22:34:43 -06:00
Michal Kubiak 33de02df06
multiple tracker-add/-remove (#2284)
simple patch allowing multiple declaration in transmission-remote passing
several --tracker-add or --tracker-remove will result in extending list passed
to the transmission-deamon by each subsequent call

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-12-09 22:33:37 -06:00
Charles Kerr d5aead4b41
fix: non-portable strftime format string (#2290)
Xref: b61b1e2c16
2021-12-09 14:30:39 -06:00
Charles Kerr a79a868257
refactor: make tr_variantFromBuf() public (#2187)
* refactor: add tr_variantFromBuf() and support inplace json/benc parsing
2021-11-17 23:37:35 -06:00
Charles Kerr 250a2e3cc5
refactor: remove unused pieces of str to variant (#2166)
* feat: add tr_variantInitStrView()

* refactor: remove unused function tr_variantFromJsonFull

* refactor: tr_variantFromJson() now takes a string_view

* refactor: tr_variantFromBenc() now takes a string_view

* refactor: remove unused source arg from tr_variantFromBencFull()

* refactor: make tr_variantFromBuf() private
2021-11-15 01:21:57 -06:00
Charles Kerr 9d3791ab1d
refactor: remove tr_variantDictFindStr from transmission-remote (#2155) 2021-11-14 11:11:29 -06:00
Charles Kerr bdf1bb6d17
refactor: tr_strv*() util functions (#2123)
* feat: add tr_strv utils
2021-11-09 18:13:47 -06:00
Charles Kerr c472cbd88d
refactor: only use [[maybe_unused]] if arg might be used (#2033)
* refactor: [[maybe_unused]] iff arg _might_ be used

If the arg is never used, comment out its name.
If the arg is _sometimes_ used e.g. with ifdefs, use [[maybe_unused]].
2021-10-24 11:41:54 -05:00
Charles Kerr 236a0965fa
refactor: tr_variant*Str() functions now take a std::string_view (#1990)
* refactor tr_variant*Str functions now take a std::string_view

* refactor: tr_torrentPrimaryMimeType returns a string-view
2021-10-19 21:30:50 -05:00
Daniel Kamil Kozar 77b11232f2
Add support for creating torrents with a source flag (#443)
* Add support for creating torrents with a source flag

* Add the source flag functionality for Mac OSX

* Source flag should be a part of the info dictionary

* Address review comments

* Rename "sourceFlag" to "source" since "Flag" is usually reserved for booleans.
* Free the "source" pointer in tr_metainfoFree.
* Add information about transmission-create argument to its manpage.

* Replace all occurences of "sourceFlag" with "source" and use "Source tag" in UI

* Settle on just "Source" in UI

* The last usage of "flag" hopefully bites the dust! ;-)

* Add a missing free for the source in tr_metainfoFree

* Add a "source" field to the torrent-get RPC method

* uncrustify

* Test for torrents having different infohashes due to different source flags.

This is the whole point of this feature, so it makes sense to test it.

* case is important

* try to incorporate the macosx xml changes
2021-10-18 18:05:39 -05:00
Charles Kerr 7e5e1f3812
refactor: tr_rpc_parse_list_str() takes a std::string_view (#1966) 2021-10-15 18:34:22 -05:00
Charles Kerr 3e7b8eb7bb
refactor: tr_parseNumberRange() takes a std::string_view (#1962)
* tr_parseNumberRange() now takes a std::string_view
2021-10-15 17:15:33 -05:00
Charles Kerr 1fb5a79813
refactor: use maybe unused attribute (#1918)
* refactor: replace TR_UNUSED with [[maybe_unused]]
2021-10-10 11:52:26 -05:00
Charles Kerr f876a100a0
refactor: add [[fallthrough]] annotation (#1886) 2021-10-06 12:24:02 -05:00
Charles Kerr 003685b40a
refactor: use nullptr instead of NULL (#1884)
* refactor: use nullptr instead of NULL.

No functional changes; just more C++ification
2021-10-06 11:32:17 -05:00
Charles Kerr 7f2578008d
refactor: tr_parseNumberRange returns std::vector. (#1838)
* refactor: tr_parseNumberRange returns std::vector.
2021-09-25 14:37:28 -05:00
Charles Kerr 1ee88c019f
refactor: port daemon and utils to C++ (#1825)
* refactor: compile daemon/ and utils/ as C++

Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2021-09-21 18:03:39 -05:00
Renamed from utils/remote.c (Browse further)