summaryrefslogtreecommitdiff
path: root/exports/disco.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-19 16:19:01 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-19 16:19:01 +0200
commitabe3588e56850403f7ebaf3c9090552e5f4830c6 (patch)
tree2e9301bed577ca3d711361f255df43cd46a097da /exports/disco.go
parent5f2e7ef988ac1267fe5038419b19b0154f9d5a84 (diff)
Exports: Simplify building
- Remove subdir c - Do not compile c code as a separate shared library - Move all definitions/declarations into the preamble as they shouldn't be shared anyways. So no headers are needed - Define the callback as static, needed so we don't get a duplicate declaration
Diffstat (limited to 'exports/disco.go')
-rw-r--r--exports/disco.go35
1 files changed, 33 insertions, 2 deletions
diff --git a/exports/disco.go b/exports/disco.go
index a08f8ba..bd5a663 100644
--- a/exports/disco.go
+++ b/exports/disco.go
@@ -1,9 +1,40 @@
package main
/*
-// for free
+// for free and size_t
#include <stdlib.h>
-#include "c/disco.h"
+
+typedef struct discoveryServer {
+ const char* authentication_url_template;
+ const char* base_url;
+ const char* country_code;
+ const char* display_name;
+ const char* keyword_list;
+ const char** public_key_list;
+ size_t total_public_keys;
+ const char* server_type;
+ const char** support_contact;
+ size_t total_support_contact;
+} discoveryServer;
+
+typedef struct discoveryServers {
+ unsigned long long int version;
+ discoveryServer** servers;
+ size_t total_servers;
+} discoveryServers;
+
+typedef struct discoveryOrganization {
+ const char* display_name;
+ const char* org_id;
+ const char* secure_internet_home;
+ const char* keyword_list;
+} discoveryOrganization;
+
+typedef struct discoveryOrganizations {
+ unsigned long long int version;
+ discoveryOrganization** organizations;
+ size_t total_organizations;
+} discoveryOrganizations;
*/
import "C"