windows-updates-20010819
[openafs.git] / src / WINNT / win9xpanel / WinAfsLoad.h
1 // WinAfsLoad.h : main header file for the WINAFSLOAD application
2 //
3 /* Copyright 2000, International Business Machines Corporation and others.
4         All Rights Reserved.
5  
6         This software has been released under the terms of the IBM Public
7         License.  For details, see the LICENSE file in the top-level source
8         directory or online at http://www.openafs.org/dl/license10.html
9 */
10 #define AFSTITLE "AFS Control Panel"
11
12 #if !defined(AFX_WINAFSLOAD_H__75E145B3_F5C0_11D3_A374_00105A6BCA62__INCLUDED_)
13 #define AFX_WINAFSLOAD_H__75E145B3_F5C0_11D3_A374_00105A6BCA62__INCLUDED_
14
15 #if _MSC_VER > 1000
16 #pragma once
17 #endif // _MSC_VER > 1000
18
19 #ifndef __AFXWIN_H__
20         #error include 'stdafx.h' before including this file for PCH
21 #endif
22
23 #include "resource.h"           // main symbols
24
25 #define LOG ((CWinAfsLoadApp *)AfxGetApp())->Log
26 //#define LOG1(p) ((CWinAfsLoadApp *)AfxGetApp())->Log(p)
27 //#define LOG2(p1,p2) ((CWinAfsLoadApp *)AfxGetApp())->Log(p1,p2)
28 //#define LOG3(p1,p2,p3) ((CWinAfsLoadApp *)AfxGetApp())->Log(p1,p2,p3)
29 #define SHOWLOG(p1) ((CWinAfsLoadApp *)AfxGetApp())->ShowLog(p1)
30 #define PROGRESS(p1,p2) ((CWinAfsLoadApp *)AfxGetApp())->Progress(p1,p2)
31 #define REQUESTUIPOSTEVENT ((CWinAfsLoadApp *)AfxGetApp())->RequestUIPostEvent
32 #define REQUESTUISUSPENDEVENT ((CWinAfsLoadApp *)AfxGetApp())->RequestUISuspendEvent
33
34 /////////////////////////////////////////////////////////////////////////////
35 // CWinAfsLoadApp:
36 // See WinAfsLoad.cpp for the implementation of this class
37 //
38 class CDatalog;
39 class CMyUIThread;
40
41 class CWinAfsLoadApp : public CWinApp
42 {
43         friend class CProgBarDlg;
44         friend class CMyUIThread;
45         void WSANotifyFromUI(WPARAM, const char *);
46         void NotifyFromUI(WPARAM, const char *);
47 public:
48         CString m_sMsg;         //used to pass error messages to calling thread
49         CMyUIThread* m_pCMyUIThread;
50         BOOL m_bShowAfs,m_bLog,m_bLogWindow,m_bConnect;
51         static CString m_sDosAppName;
52         CWinAfsLoadApp();
53         void Log(const char *);
54         void Log(const char *,const char*);
55         void Log(const char *,const DWORD);
56         void Log(const char *,const DWORD,const DWORD);
57         void Log(const char *,const char*,const char*);
58         void Log(const char *f,const char*,const char*,const char*);
59         void ShowLog(BOOL);
60         void ShowPrint(BOOL);
61         void Progress(VOID *wnd, UINT mode);
62         void WaitForEvent(UINT sec,WPARAM *wp,CString *msg);
63         void GetNotifyState(WPARAM *wp,LPARAM *lp);
64         void RequestUISuspendEvent(UINT mode);
65         void RequestUIPostEvent(UINT mode,WPARAM wp,LPARAM lp);
66         void SetNotifyEventSuspend();
67         void SetNotifyEventPostMessage(){m_uNotifyMessage=2;}
68         void ClearNotify(){m_uNotifyMessage=0;}
69         BOOL RegOptions(BOOL fetch);
70
71 // Overrides
72         // ClassWizard generated virtual function overrides
73         //{{AFX_VIRTUAL(CWinAfsLoadApp)
74         public:
75         virtual BOOL InitInstance();
76         virtual int ExitInstance();
77         //}}AFX_VIRTUAL
78
79 // Implementation
80         BOOL static CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam);
81         HWND static m_hAfsLoad,m_hAfsLoadFinish;
82         CString m_sTargetDir;   //location of afsd.exe
83         UINT m_uEvent;
84         UINT m_uNotifyMessage;
85         WPARAM m_wParam;
86         BOOL m_bNoID;
87
88         //{{AFX_MSG(CWinAfsLoadApp)
89         //}}AFX_MSG
90         DECLARE_MESSAGE_MAP()
91         afx_msg LRESULT OnNotifyReturn(WPARAM wParam, LPARAM lParam);
92         afx_msg LRESULT OnAfsEvent(WPARAM wParam, LPARAM lParam);
93 };
94
95 #define CWINAFSLOADAPP ((CWinAfsLoadApp *)AfxGetApp())
96 /////////////////////////////////////////////////////////////////////////////
97
98 //{{AFX_INSERT_LOCATION}}
99 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
100
101 #endif // !defined(AFX_WINAFSLOAD_H__75E145B3_F5C0_11D3_A374_00105A6BCA62__INCLUDED_)