toxcore/other/apidsl
iphydf 13ae9e9a93
Move logging to a callback.
This removes the global logger (which by the way was deleted when the first tox
was killed, so other toxes would then stop logging). Various bits of the code
now carry a logger or pass it around. It's a bit less transparent now, but now
there is no need to have a global logger, and clients can decide what to log and
where.
2016-08-27 01:16:14 +01:00
..
README.md Make self_connection_status callback stateless. 2016-08-17 14:57:20 +01:00
tox.in.h Move logging to a callback. 2016-08-27 01:16:14 +01:00
toxav.in.h Remove trailing whitespace from toxav.in.h. 2016-07-07 12:44:16 +02:00

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.

  1. Make sure that you have curl and >=astyle-2.03 installed
  2. Modify tox.in.h
  3. 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:

  1. Install apidsl
  2. Install astyle, version 2.03 or later.
  3. Modify tox.in.h
  4. Use apidsl ??
  5. 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.