cffi.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* vim: set expandtab ts=4 sw=4: */
  2. /*
  3. * You may redistribute this program and/or modify it under the terms of
  4. * the GNU General Public License as published by the Free Software Foundation,
  5. * either version 3 of the License, or (at your option) any later version.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  14. */
  15. // This file is used to generate src/cffi.rs using bindgen
  16. #include "benc/String.h"
  17. #include "interface/Iface.h"
  18. #include "interface/test/RustIface_test.h"
  19. #include "crypto/CryptoAuth.h"
  20. #include "crypto/CryptoAuth_pvt.h" // encryptRndNonce
  21. #include "crypto/random/test/DeterminentRandomSeed.h"
  22. #include "util/platform/Sockaddr.h"
  23. #include "util/version/Version.h"
  24. #include "util/events/EventBase.h"
  25. enum RBindings_Version {
  26. RBindings_Version_CurrentProtocol = Version_CURRENT_PROTOCOL,
  27. };
  28. // This structure is guaranteed to be present in the generated rust code
  29. // Also all functions in the above headers will be present.
  30. // Any types which are not transitively included in either this structure
  31. // or in one of the functions will not be generated. This prevents generating
  32. // a bunch of platform-specific trash like uint_fast8_t etc.
  33. struct RBindings_Whitelist {
  34. Iface_t b;
  35. enum CryptoAuth_addUser_Res c;
  36. Message_t d;
  37. String_t e;
  38. Log_t* f;
  39. enum RBindings_Version g;
  40. };