struct ITBDATA
{
	CString strUser;
	CString strPassword;
	UINT	nBook;
	int		nPage;
	UINT	nIndex;
	CString	strText;
};

void LogRequest(LPVOID pParam, char* pch, CSockAddr sa);

bool ITB_ParseCGILine(char* p, ITBDATA& data);
bool ITB_ReadPostedData(CString& text, char* pRequestBuffer, CHttpBlockingSocket& sConnect);
bool ITB_LibraryProcedure(char* pVerb, char* pFirstLine, char* pRequestBuffer, CHttpBlockingSocket& sConnect, HWND	hWnd, CSockAddr* pSockAddr);

void ITB_Connect(ITBDATA& data, CHttpBlockingSocket& sConnect);

void ITB_GetPage(ITBDATA& data, CHttpBlockingSocket& sConnect);
void ITB_GetSmallPicture(ITBDATA& data, CHttpBlockingSocket& sConnect);
void ITB_GetLargePicture(ITBDATA& data, CHttpBlockingSocket& sConnect);
void ITB_GetPictureHeaders(ITBDATA& data, CHttpBlockingSocket& sConnect);
void ITB_GetNote(ITBDATA& data, CHttpBlockingSocket& sConnect);
void ITB_AddNote(ITBDATA& data, CHttpBlockingSocket& sConnect);
void ITB_ReplaceNote(ITBDATA& data, CHttpBlockingSocket& sConnect);
void ITB_DeleteNote(ITBDATA& data, CHttpBlockingSocket& sConnect);


void ITB_GetContents(ITBDATA& data, CHttpBlockingSocket& sConnect);
void ITB_Find(ITBDATA& data, CHttpBlockingSocket& sConnect);
void ITB_GetIndexWord(ITBDATA& data, CHttpBlockingSocket& sConnect);
void ITB_GetAuthorInfo(ITBDATA& data, CHttpBlockingSocket& sConnect);
void ITB_GetBookInfo(ITBDATA& data, CHttpBlockingSocket& sConnect);

void ITB_GetHighlightedText(ITBDATA& data, CHttpBlockingSocket& sConnect);
void ITB_SetHighlightedText(ITBDATA& data, CHttpBlockingSocket& sConnect);

