2022-02-14 06:22:36 +00:00
|
|
|
#ifndef PBOT_H
|
|
|
|
#define PBOT_H
|
|
|
|
|
|
|
|
#include "laika.h"
|
|
|
|
#include "lpeer.h"
|
2022-02-25 04:13:05 +00:00
|
|
|
#include "lsodium.h"
|
2022-02-14 06:22:36 +00:00
|
|
|
|
|
|
|
#include "panel.h"
|
|
|
|
|
|
|
|
typedef struct sPanel_bot {
|
|
|
|
uint8_t pub[crypto_kx_PUBLICKEYBYTES];
|
2022-02-15 22:57:21 +00:00
|
|
|
char hostname[LAIKA_HOSTNAME_LEN], ipv4[LAIKA_IPV4_LEN];
|
2022-02-14 06:22:36 +00:00
|
|
|
PEERTYPE type;
|
|
|
|
tPanel_listItem *item;
|
|
|
|
char *name; /* heap allocated string */
|
|
|
|
} tPanel_bot;
|
|
|
|
|
2022-02-15 22:57:21 +00:00
|
|
|
tPanel_bot *panelB_newBot(uint8_t *pubKey, char *hostname, char *ipv4);
|
2022-02-14 06:22:36 +00:00
|
|
|
void panelB_freeBot(tPanel_bot *bot);
|
|
|
|
|
|
|
|
/* search connected bots by public key */
|
|
|
|
tPanel_bot *panelB_getBot(uint8_t *pubKey);
|
|
|
|
void panelB_setItem(tPanel_bot *bot, tPanel_listItem *item);
|
|
|
|
|
|
|
|
#endif
|