diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-12-15 17:35:54 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-12-22 10:53:39 +0000 |
commit | db71602731da030c999f2821b2b4a64611b90b99 (patch) | |
tree | d90d14a7b1a467111d75984137e9ca41fc02abe7 /toxcore/tox.h | |
parent | 2328cb74abccd563f0cd8d14d30e5314822d321e (diff) |
Use `tox_options_set_*` instead of direct member access.
Also added a `tox_options_copy` function for cloning an options object.
This can be useful when creating several Tox instances with slightly
varying options.
Diffstat (limited to 'toxcore/tox.h')
-rw-r--r-- | toxcore/tox.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h index 5497d9e7..26378067 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h | |||
@@ -727,6 +727,12 @@ typedef enum TOX_ERR_OPTIONS_NEW { | |||
727 | struct Tox_Options *tox_options_new(TOX_ERR_OPTIONS_NEW *error); | 727 | struct Tox_Options *tox_options_new(TOX_ERR_OPTIONS_NEW *error); |
728 | 728 | ||
729 | /** | 729 | /** |
730 | * Allocates a new Tox_Options object and initialises it with the values from the | ||
731 | * passed object. | ||
732 | */ | ||
733 | void tox_options_copy(struct Tox_Options *options, const struct Tox_Options *rhs); | ||
734 | |||
735 | /** | ||
730 | * Releases all resources associated with an options objects. | 736 | * Releases all resources associated with an options objects. |
731 | * | 737 | * |
732 | * Passing a pointer that was not returned by tox_options_new results in | 738 | * Passing a pointer that was not returned by tox_options_new results in |