mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
aad1e0ad3f
Messenger is slightly twisty when it comes to sending connection status callbacks It will very likely need at the very least a partial refactor to clean it up a bit. Toxcore shouldn't need void *userdata as deep as is currently does. (amend 1) Because of the nature of toxcore connection callbacks, I decided to change this commit from statelessness for connections changes to statelessness for friend requests. It's simpler this was and doesn't include doing anything foolish in the time between commits. group fixup because grayhatter doesn't want to do it "arguably correct" is not how you write security sensitive code Clear a compiler warning about types within a function. |
||
---|---|---|
.. | ||
README.md | ||
tox.in.h | ||
toxav.in.h |
This folder contains the input file (tox.in.h
) that has to be used to generate the tox.h
api with: https://github.com/iphydf/apidsl
Minimal requirements
There are some minimal requirements to contribute to tox.h
:
- unix environment
astyle
>=2.03
apidsl
(you can use provided service with curl instead)
Quick way
If you want to do it quickly and you don't have time for anything other than copypasting commands, you should have curl
installed.
- Make sure that you have
curl
and>=astyle-2.03
installed - Modify
tox.in.h
- Run command below ↓
Command to run from toxcore
directory (quick way, involves using curl):
# For tox.h:
curl -X POST --data-binary @- https://apidsl.herokuapp.com/apidsl \
< other/apidsl/tox.in.h \
| astyle --options=other/astyle/astylerc \
> toxcore/tox.h
# For toxav.h:
curl -X POST --data-binary @- https://apidsl.herokuapp.com/apidsl \
< other/apidsl/toxav.in.h \
| astyle --options=other/astyle/astylerc \
> toxav/toxav.h
You may want to make sure with git diff
that changes made in tox.h
reflect changes in tox.in.h
.
And you're done.
Manually
If you prefer to have more control over what is happening, there are steps below:
- Install
apidsl
- Install
astyle
, version 2.03 or later. - Modify
tox.in.h
- Use
apidsl
??
- Parse generated
tox.h
with astyle, minimal command for it would be:
astyle --options=other/astyle/astylerc toxcore/tox.h
Always pass output from apidsl
through astyle.