Skip to content

Commit

Permalink
cleanup: Remove apidsl for everything except the public API.
Browse files Browse the repository at this point in the history
Apidsl is not powerful enough to express all the things we need and
doesn't know how `#include` works. The generated headers are more complex
than they should be.
  • Loading branch information
iphydf committed Dec 15, 2021
1 parent 44450d3 commit 2fb74fa
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 488 deletions.
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ set(toxcore_PKGCONFIG_REQUIRES)

# LAYER 1: Crypto core
# --------------------
apidsl(toxcore/crypto_core.api.h)
set(toxcore_SOURCES ${toxcore_SOURCES}
toxcore/ccompat.h
toxcore/crypto_core.c
Expand Down Expand Up @@ -189,9 +188,6 @@ set(toxcore_SOURCES ${toxcore_SOURCES}

# LAYER 3: Distributed Hash Table
# -------------------------------
apidsl(toxcore/LAN_discovery.api.h)
apidsl(toxcore/ping.api.h)
apidsl(toxcore/ping_array.api.h)
set(toxcore_SOURCES ${toxcore_SOURCES}
toxcore/DHT.c
toxcore/DHT.h
Expand Down
1 change: 0 additions & 1 deletion toxcore/DHT.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ typedef struct Shared_Keys {
typedef int cryptopacket_handler_cb(void *object, IP_Port ip_port, const uint8_t *source_pubkey,
const uint8_t *data, uint16_t len, void *userdata);

#define DHT_DEFINED
typedef struct DHT DHT;

const uint8_t *dht_get_self_public_key(const DHT *dht);
Expand Down
57 changes: 0 additions & 57 deletions toxcore/LAN_discovery.api.h

This file was deleted.

10 changes: 0 additions & 10 deletions toxcore/LAN_discovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@

#include "DHT.h"

#ifndef DHT_DEFINED
#define DHT_DEFINED
typedef struct DHT DHT;
#endif /* DHT_DEFINED */

#ifndef IP_DEFINED
#define IP_DEFINED
typedef struct IP IP;
#endif /* IP_DEFINED */

/**
* Interval in seconds between LAN discovery packet sending.
*/
Expand Down
253 changes: 0 additions & 253 deletions toxcore/crypto_core.api.h

This file was deleted.

Loading

0 comments on commit 2fb74fa

Please sign in to comment.