make llarp.h pure C compatable

pull/148/head
Jeff Becker 6 years ago
parent 312ccdf478
commit c3ac2811f6
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -1,12 +1,9 @@
#ifndef LLARP_H_
#define LLARP_H_
#include <dht.h>
#ifdef __cplusplus
#include <ev.h>
#include <mem.h>
#ifdef __cplusplus
#include <logic.hpp>
#include <version.hpp>
#include <handlers/tun.hpp> // for handlers
@ -41,17 +38,26 @@ extern "C"
void
llarp_main_inject_vpn_fd(struct llarp_main *m, int fd);
/// setup main context
/// setup main context, returns 0 on success
int
llarp_main_setup(struct llarp_main *ptr);
/// run main context
/// run main context, returns 0 on success, blocks until program end
int
llarp_main_run(struct llarp_main *ptr);
/// free main context and end all operations
void
llarp_main_free(struct llarp_main *ptr);
#ifdef __cplusplus
void
llarp_main_abort(struct llarp_main *ptr);
const char *
handleBaseCmdLineArgs(int argc, char *argv[]);
/// load nodeDB into memory
int
llarp_main_loadDatabase(struct llarp_main *ptr);
@ -104,15 +110,6 @@ extern "C"
llarp::RouterContact *
llarp_main_getLocalRC(struct llarp_main *ptr);
void
llarp_main_free(struct llarp_main *ptr);
const char *
handleBaseCmdLineArgs(int argc, char *argv[]);
#ifdef __cplusplus
/// get RC from nodeDB
llarp::RouterContact *
llarp_main_getDatabase(struct llarp_main *ptr, byte_t *pk);

Loading…
Cancel
Save