X64 transport [Part 5] (Update plugins.cpp)
[xy_vsfilter.git] / src / apps / mplayerc / WebClientSocket.h
blobf7a5232be7016424813a580e8537e67f46b82927
1 #pragma once
3 class CWebServer;
5 class CWebClientSocket : public CAsyncSocket
7 CWebServer* m_pWebServer;
8 CMainFrame* m_pMainFrame;
10 CString m_hdr;
12 struct cookie_attribs {CString path, expire, domain;};
13 CAtlStringMap<cookie_attribs> m_cookieattribs;
15 void Clear();
16 void Header();
18 protected:
19 void OnReceive(int nErrorCode);
20 void OnClose(int nErrorCode);
22 public:
23 CWebClientSocket(CWebServer* pWebServer, CMainFrame* pMainFrame);
24 virtual ~CWebClientSocket();
26 bool SetCookie(CString name, CString value = _T(""), __time64_t expire = -1, CString path = _T("/"), CString domain = _T(""));
28 CString m_sessid;
29 CString m_cmd, m_path, m_query, m_ver;
30 CStringA m_data;
31 CAtlStringMap<> m_hdrlines;
32 CAtlStringMap<> m_get, m_post, m_cookie;
33 CAtlStringMap<> m_request;
35 bool OnCommand(CStringA& hdr, CStringA& body, CStringA& mime);
36 bool OnIndex(CStringA& hdr, CStringA& body, CStringA& mime);
37 bool OnBrowser(CStringA& hdr, CStringA& body, CStringA& mime);
38 bool OnControls(CStringA& hdr, CStringA& body, CStringA& mime);
39 bool OnStatus(CStringA& hdr, CStringA& body, CStringA& mime);
40 bool OnError404(CStringA& hdr, CStringA& body, CStringA& mime);
41 bool OnPlayer(CStringA& hdr, CStringA& body, CStringA& mime);
42 bool OnSnapShotJpeg(CStringA& hdr, CStringA& body, CStringA& mime);
43 bool OnConvRes(CStringA& hdr, CStringA& body, CStringA& mime);