-
Notifications
You must be signed in to change notification settings - Fork 206
/
Client.h
72 lines (55 loc) · 1.34 KB
/
Client.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Client.h: interface for the CClient class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CLIENT_H__E9B55197_85B2_4ABF_92FF_E6301F346404__INCLUDED_)
#define AFX_CLIENT_H__E9B55197_85B2_4ABF_92FF_E6301F346404__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Server.h"
#include "EncryptDecrypt\Encryption.h"
#include "SendSocket.h"
#include "Popup.h"
class CSendToFriendInfo
{
public:
CSendToFriendInfo()
{
m_pPopup = NULL;
m_pClipList = NULL;
m_pPopup = NULL;
m_manualSend = false;
}
~CSendToFriendInfo()
{
if(m_pClipList)
{
delete m_pClipList;
m_pClipList = NULL;
}
}
CClipList *m_pClipList;
CString m_csIP;
CPopup *m_pPopup;
CString m_csErrorText;
bool m_manualSend;
};
class CClient
{
public:
CClient();
virtual ~CClient();
BOOL SendItem(CClip *pClip, bool manualSend);
BOOL OpenConnection(const TCHAR* servername);
BOOL CloseConnection();
HGLOBAL RequestCopiedFiles(CClipFormat &HDropFormat, CString csIP, CString csComputerName);
protected:
SOCKET m_Connection;
int m_connectionPort;
CSendSocket m_SendSocket;
BOOL SendClipFormat(CClipFormat* pCF);
protected:
};
BOOL SendToFriend(CSendToFriendInfo &Info);
UINT SendClientThread(LPVOID pParam);
#endif // !defined(AFX_CLIENT_H__E9B55197_85B2_4ABF_92FF_E6301F346404__INCLUDED_)