#pragma once

#ifndef __cplusplus
#include <stdbool.h>
#endif

#ifdef __cplusplus
#include <string>

bool StartDekReceiverService(const std::string& listen_host,
                             const std::string& listen_port,
                             const std::string& enclave_signed_path);

bool ReceiveDekAndHandleOnce();
void StopDekReceiverService();
#endif /* __cplusplus */

#ifdef __cplusplus
extern "C" {
#endif

bool KD_StartDekReceiverService(const char* listen_host,
                                const char* listen_port,
                                const char* enclave_signed_path);

bool KD_ReceiveDekAndHandleOnce(void);
void KD_StopDekReceiverService(void);

#ifdef __cplusplus
}
#endif
