/[H8]/trunk/test-server/TerminalSocket.h
ViewVC logotype

Annotation of /trunk/test-server/TerminalSocket.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 112 - (hide annotations) (download)
Mon May 28 16:28:03 2007 UTC (17 years ago) by torben
File MIME type: text/plain
File size: 775 byte(s)
Now we have a working test-server...
1 torben 110 #pragma once
2     #include "afxsock.h"
3     #include "sigslot.h"
4     #include "SalesItem.h"
5    
6     #include <vector>
7    
8    
9     class TerminalSocket :
10     public CSocket
11     {
12     unsigned char m_buffer[1024];
13     CString m_message;
14     int m_termid;
15     double m_total;
16    
17 torben 112
18 torben 110 std::vector<SalesItemLine> m_items;
19    
20     public:
21     TerminalSocket(void);
22     virtual ~TerminalSocket(void);
23     virtual void OnReceive(int nErrorCode);
24    
25     sigslot::signal0<> dataRecieved;
26    
27     CString GetMessage() { return m_message; }
28    
29    
30     void HelloPackage();//0
31     void SalesDescriptionPackage();//1
32     void RequestTotalPackage();//2
33     void RequestChangePackage();//3
34     void AbortLastPackage();//4
35     void AbortSessionPackage();//5
36     void GoodByePackage();//6
37    
38 torben 112
39     bool m_isOpen;
40 torben 110 SalesItem FetchItemInfo(const CString& barcode);
41     };

  ViewVC Help
Powered by ViewVC 1.1.20