cffi.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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/Object.h"
  17. #include "benc/List.h"
  18. #include "benc/Dict.h"
  19. #include "interface/Iface.h"
  20. #include "interface/test/RustIface_test.h"
  21. #include "crypto/CryptoAuth.h"
  22. #include "crypto/CryptoAuth_pvt.h" // encryptRndNonce
  23. #include "crypto/random/test/DeterminentRandomSeed.h"
  24. #include "util/platform/Sockaddr.h"
  25. #include "util/version/Version.h"
  26. // #include "util/events/EventBase.h"
  27. #include "wire/PFChan.h"
  28. #include "wire/Control.h"
  29. enum RBindings_Version {
  30. RBindings_Version_CurrentProtocol = Version_CURRENT_PROTOCOL,
  31. };
  32. // This structure is guaranteed to be present in the generated rust code
  33. // Any types which are not transitively included in either this structure
  34. // or in one of the functions will not be generated. This prevents generating
  35. // a bunch of platform-specific trash like uint_fast8_t etc.
  36. struct RBindings_Whitelist {
  37. Iface_t b;
  38. enum CryptoAuth_addUser_Res c;
  39. Message_t d;
  40. List_Item_t e;
  41. Dict_Entry_t ee;
  42. Object_t eee;
  43. Log_t* f;
  44. enum RBindings_Version g;
  45. Sockaddr_t h;
  46. PFChan_FromPathfinder_t i;
  47. PFChan_FromCore_t ii;
  48. enum Log_Level j;
  49. Allocator_t* k;
  50. struct Sockaddr_storage l;
  51. struct Sockaddr m;
  52. Random_t* n;
  53. Control_LlAddr_t o;
  54. };