home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2003 June
/
PCWorld_2003-06_cd.bin
/
KOMUNIK
/
MIRRORIT
/
SRC
/
HTTPSOCKET.H
< prev
next >
Wrap
C/C++ Source or Header
|
1998-03-10
|
3KB
|
118 lines
#if !defined(AFX_HTTPSOCKET_H__229A7CE1_5CDE_11D1_AF0A_0000C0003048__INCLUDED_)
#define AFX_HTTPSOCKET_H__229A7CE1_5CDE_11D1_AF0A_0000C0003048__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// HTTPSocket.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CHTTPSocket command target
class CHTTPSocket : public CAsyncSocket
{
// Attributes
public:
// Operations
public:
CHTTPSocket();
virtual ~CHTTPSocket();
// Overrides
public:
void ReplaceStr(CString & str, CString from, CString to);
void unescape(CString & str);
CString domain(CString str);
void AddDump(CString str);
void AddLog(CString type, CString str);
BOOL m_recv;
CString basenet_loc;
CString location;
BOOL m_bRedirect;
CString mimeencode(CString str);
BOOL regularCompare(LPCSTR str, LPCSTR mask);
BOOL inserverlist(CString server, CString list);
BOOL m_bFileInited;
BOOL m_bError;
CString FormatTime(CTime time);
CTime ValidTime(CTime time);
CTime asc(CString str);
CTime RFC850(CString str);
CTime RFC1123(CString str);
CString m_filename;
int islocal(CString url);
int m_filestatus;
int initfile();
CString makelocal(CString url, CString sbase);
CString getfilename(CString url);
int * m_numBytes;
CString base;
CString expandedURL(CString rel, CString base);
BOOL tagLink(CString name, CString param);
CByteArray htmltemp;
CStringList * links;
CSession * session;
int OutputData(BYTE *odata, int len);
BOOL m_bDocument;
void StatusRead(int size);
BOOL m_bProgress;
CProgressCtrl * m_progress;
BOOL m_bFirstLine;
int m_iCode;
CMapStringToString m_Header;
CString m_sBlockRemain;
int ProcessHeader(int size);
BOOL m_bInHeader;
void SendRequest(CString request);
BOOL m_bSent;
CByteArray m_buf;
BOOL m_bClose;
CFile m_File;
BOOL m_bConnect;
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHTTPSocket)
public:
virtual void OnClose(int nErrorCode);
virtual void OnConnect(int nErrorCode);
virtual void OnReceive(int nErrorCode);
virtual void OnSend(int nErrorCode);
//}}AFX_VIRTUAL
// Generated message map functions
//{{AFX_MSG(CHTTPSocket)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
// Implementation
protected:
private:
CString convert83c(CString str);
CString convert83fragc(CString str);
CString shortenc(CString str, int max);
CString shorten(CString str, int max);
CString convert83(CString str);
CString convert83frag(CString str);
CString strDelete(CString & str, int start, int count);
CString convertname(CString str);
int gethex(char c);
CString getname(CString str);
CString getpath(CString str);
int m_requestindex;
CString m_request;
};
int CreateDirectory2(CString dir);
int CreateDirectoryTree(CString dir);
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_HTTPSOCKET_H__229A7CE1_5CDE_11D1_AF0A_0000C0003048__INCLUDED_)