using namespace Fiddler;


struct EFD_pmMessage {
	int type;
	int count;
	char* pmdata1;
	char* pmdata2;
};

#pragma once
typedef void (WINAPI *RecvCallbackFun)(EFD_pmMessage* pmmessage,char * url,char * head,char * cookie,unsigned int raw, unsigned int rawLen);
extern "C" _declspec(dllexport) int __stdcall InitFiddler(int port, int callback);
extern "C" _declspec(dllexport) void __stdcall CloseFiddler();
extern "C" _declspec(dllexport) void __stdcall AutoStartFiddlerProxy(bool start);
extern "C" _declspec(dllexport) void __stdcall StartSSL(bool start);
extern "C" _declspec(dllexport) void __stdcall SetBase64(int* url);
extern "C" _declspec(dllexport) int __stdcall CreateRootCert();
extern "C" _declspec(dllexport) int __stdcall InstCert();
extern "C" _declspec(dllexport) bool __stdcall rootCertIsTrusted();
extern "C" _declspec(dllexport) bool __stdcall rootCertIsMachineTrusted();
extern "C" _declspec(dllexport) bool __stdcall rootCertExists();
extern "C" _declspec(dllexport) bool __stdcall removeCerts();
extern "C" _declspec(dllexport) char* __stdcall sslGetCert();
extern "C" _declspec(dllexport) char* __stdcall sslGetKey();
extern "C" _declspec(dllexport) void __stdcall sslSetCert(char *);
extern "C" _declspec(dllexport) void __stdcall sslSetKey(char *);
extern "C" _declspec(dllexport) void __stdcall SetUpstreamGatewayTo(char *);
extern "C" _declspec(dllexport) void __stdcall UpdateConfig(int);
extern "C" _declspec(dllexport) void __stdcall customCertificate(char*);
extern "C" _declspec(dllexport) int  __stdcall RecvRepeatHtml(EFD_pmMessage*, char*, char*);
extern "C" _declspec(dllexport) int  __stdcall RecvResetHtml(EFD_pmMessage*, char*);
extern "C" _declspec(dllexport) int  __stdcall RecvInsertBody(EFD_pmMessage*, char*);
extern "C" _declspec(dllexport) int  __stdcall RecvInsertCookie(EFD_pmMessage*, char*);
extern "C" _declspec(dllexport) int  __stdcall RecvRemoveCookie(EFD_pmMessage*);
extern "C" _declspec(dllexport) int  __stdcall RecvResetState(EFD_pmMessage*, char*, char*);



#define RECV_INSERT_BODY 2001
#define RECV_REPLACE_BODY 2002
#define RECV_RESET_BODY 2003
#define RECV_REMOVE_COOKIE 2004
#define RECV_INSERT_COOKIE 2005
#define RECV_RESET_STATE 2006

