summaryrefslogtreecommitdiffabout
path: root/T42Frame.h
authorMichael Krelin <hacker@klever.net>2004-07-05 01:53:09 (UTC)
committer Michael Krelin <hacker@klever.net>2004-07-05 01:53:09 (UTC)
commit955d4e00adc9f39ab93bf21f07506eb75b013c70 (patch) (unidiff)
tree92493a2c9ac206b822e24a9e5a6f6b1589be6afb /T42Frame.h
downloadT42-955d4e00adc9f39ab93bf21f07506eb75b013c70.zip
T42-955d4e00adc9f39ab93bf21f07506eb75b013c70.tar.gz
T42-955d4e00adc9f39ab93bf21f07506eb75b013c70.tar.bz2
initial commit into svn repository
git-svn-id: http://svn.klever.net/kin/T42/trunk@1 fe716a7a-6dde-0310-88d9-d003556173a8
Diffstat (limited to 'T42Frame.h') (more/less context) (ignore whitespace changes)
-rw-r--r--T42Frame.h169
1 files changed, 169 insertions, 0 deletions
diff --git a/T42Frame.h b/T42Frame.h
new file mode 100644
index 0000000..9f220f1
--- a/dev/null
+++ b/T42Frame.h
@@ -0,0 +1,169 @@
1// T42Frame.h : header file
2//
3
4/////////////////////////////////////////////////////////////////////////////
5// T42Frame frame
6
7 struct TalkEditChars{
8 CHARm_cErase;
9 CHARm_kill;
10 CHARm_wErase;
11};
12
13class T42View;
14class T42Frame : public CFrameWnd
15{
16 DECLARE_DYNCREATE(T42Frame)
17
18// Attributes
19public:
20 BOOL m_bConnected;
21 void SystemMessage(UINT nID,LPCTSTR str);
22 void WSSystemMessage(UINT nID,LONG wsaError);
23 void SystemMessage(UINT nID,UINT nIDi);
24 void SystemMessage(LPCTSTR str);
25 void SystemMessage(UINT nID);
26 BOOL m_bMinimizeSleep;
27 void DeTray();
28 void WakeUp();
29 enum _wakeAction{
30 wakePopup = 1,
31 wakeSound = 2
32 };
33 UINT m_onWake;
34 BOOL m_bSleep;
35 BOOL m_bSleepMinimize;
36 BOOL m_bTrayed;
37 void SetTheIcon(HICON hicon);
38 BOOL m_bTrayMinimize;
39 void LoadLayout();
40 BOOL m_bHaveFocus;
41 HICON m_hFullCup;
42 HICON m_hNormal;
43 void AddToHotList(LPCTSTR str=NULL);
44 BOOL m_bEstablished;
45 virtual void OnUpdateFrameTitle(BOOL bAddToTitle);
46 void SetPeerName(LPCTSTR str=NULL);
47 void SaveLayout();
48 CString m_nameFromIP;
49 BYTE m_ghResolve[MAXGETHOSTSTRUCT];
50 HANDLE m_resolveHandle;
51 void CleanUp();
52 CWnd m_wndFake;
53 void Established(BOOL bEstablished);
54 void ShowMessage(LPCTSTR msg,UINT flags);
55 void ShowMessage(UINT nID,UINT flags);
56 void StatusLine(UINT nID);
57 CString m_Status;
58 void StatusLine(LPCTSTR str);
59 int m_nDatePaneNo;
60 CString m_sendBuffer;
61 BOOL m_bSentEC;
62 UINT m_receivedEC;
63 TalkEditChars m_localEC;
64 TalkEditChars m_remoteEC;
65 BOOL PutRemote(LPCTSTR str);
66 void SelectTalkSocket();
67 LONG m_remoteID;
68 LONG m_localID;
69 void AsyncCtlTransactSucceeded(TalkCtlResponse& response);
70 void AsyncCtlTransactFailed(UINT code,LONG error);
71 enum{
72 ctlFailSendto = 1,
73 ctlFailSelect, ctlFailError
74 };
75 UINTm_ctlSuccess;
76 UINTm_ctlFailure;
77 sockaddr_in m_ctlTarget;
78 BOOL AsyncCtlTransact(TalkCtlMessage& msg,sockaddr_in& target, UINT wmSuccess,UINT wmFailure);
79 TalkCtlMessage m_ctlRequest;
80 TalkCtlResponse m_ctlResponse;
81 CString m_TargetTTY;
82 CString m_LocalUser;
83 BOOL FillInMessage(TalkCtlMessage& msg);
84 SOCKET m_Socket;
85 SOCKADDR_IN m_ctlAddr;
86 SOCKET m_ctlSocket;
87 SOCKADDR_IN m_SourceAddr;
88 SOCKADDR_IN m_TargetAddr;
89 BYTE m_gethostData[MAXGETHOSTSTRUCT];
90 HANDLE m_asyncHandle;
91 CString m_TargetHost;
92 CString m_TargetUser;
93 CString m_Target;
94
95// Operations
96public:
97 T42Frame(); // protected constructor used by dynamic creation
98
99// Overrides
100 // ClassWizard generated virtual function overrides
101 //{{AFX_VIRTUAL(T42Frame)
102 public:
103 virtual void ActivateFrame(int nCmdShow = -1);
104 protected:
105 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
106 //}}AFX_VIRTUAL
107
108// Implementation
109protected:
110 CStatusBar m_wndStatusBar;
111 virtual ~T42Frame();
112public:
113 // Generated message map functions
114 //{{AFX_MSG(T42Frame)
115 afx_msg void OnClose();
116 afx_msg void OnTalkRemoteuser();
117 afx_msg LRESULT OnInitiateTalk(WPARAM,LPARAM);
118 afx_msg LRESULT OnTargetResolved(WPARAM,LPARAM);
119 afx_msg LRESULT OnSourceResolved(WPARAM,LPARAM);
120 afx_msg void OnTimer(UINT nIDEvent);
121 afx_msg LRESULT OnCTLTransact(WPARAM,LPARAM);
122 afx_msg LRESULT OnLookupSuccess(WPARAM,LPARAM);
123 afx_msg LRESULT OnLookupFailure(WPARAM,LPARAM);
124 afx_msg LRESULT OnAnnounceSuccess(WPARAM,LPARAM);
125 afx_msg LRESULT OnAnnounceFailure(WPARAM,LPARAM);
126 afx_msg LRESULT OnLeaveInviteSuccess(WPARAM,LPARAM);
127 afx_msg LRESULT OnLeaveInviteFailure(WPARAM,LPARAM);
128 afx_msg LRESULT OnTalkAccept(WPARAM,LPARAM);
129 afx_msg LRESULT OnLocalRemoveSuccess(WPARAM,LPARAM);
130 afx_msg LRESULT OnLocalRemoveFailure(WPARAM,LPARAM);
131 afx_msg LRESULT OnRemoteRemoveSuccess(WPARAM,LPARAM);
132 afx_msg LRESULT OnRemoteRemoveFailure(WPARAM,LPARAM);
133 afx_msg LRESULT OnTalk(WPARAM,LPARAM);
134 afx_msg LRESULT OnTalkChar(WPARAM,LPARAM);
135 afx_msg LRESULT OnTalkConnect(WPARAM,LPARAM);
136 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
137 afx_msg void OnUpdateDate(CCmdUI* pCmdUI);
138 afx_msg LRESULT OnExitMenuLoop(WPARAM,LPARAM);
139 afx_msg void OnDestroy();
140 afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
141 afx_msg LRESULT OnNameResolved(WPARAM,LPARAM);
142 afx_msg LRESULT OnIPResolved(WPARAM,LPARAM);
143 afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
144 afx_msg LRESULT OnTrayIcon(WPARAM,LPARAM);
145 afx_msg void OnUpdateWindowHideintrayonminimize(CCmdUI* pCmdUI);
146 afx_msg void OnWindowHideintrayonminimize();
147 afx_msg void OnTalkAbort();
148 afx_msg void OnUpdateTalkAbort(CCmdUI* pCmdUI);
149 afx_msg void OnTalkReconnect();
150 afx_msg void OnUpdateTalkReconnect(CCmdUI* pCmdUI);
151 afx_msg void OnUpdateTalkRemoteuser(CCmdUI* pCmdUI);
152 afx_msg void OnUpdateSleepSleep(CCmdUI* pCmdUI);
153 afx_msg void OnSleepSleep();
154 afx_msg void OnUpdateSleepSleeponminimize(CCmdUI* pCmdUI);
155 afx_msg void OnSleepSleeponminimize();
156 afx_msg void OnUpdateSleepWakeupactionMakesound(CCmdUI* pCmdUI);
157 afx_msg void OnSleepWakeupactionMakesound();
158 afx_msg void OnUpdateSleepWakeupactionPopup(CCmdUI* pCmdUI);
159 afx_msg void OnSleepWakeupactionPopup();
160 afx_msg void OnUpdateSleepMinimizeonsleep(CCmdUI* pCmdUI);
161 afx_msg void OnSleepMinimizeonsleep();
162 afx_msg void OnTalkClose();
163 //}}AFX_MSG
164 DECLARE_MESSAGE_MAP()
165private:
166 BOOL InitStatusBar(UINT *pIndicators, int nSize, int nSeconds);
167};
168
169/////////////////////////////////////////////////////////////////////////////