1 // WinAfsLoad.h : main header file for the WINAFSLOAD application
3 /* Copyright 2000, International Business Machines Corporation and others.
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
10 #define AFSTITLE "AFS Control Panel"
12 #if !defined(AFX_WINAFSLOAD_H__75E145B3_F5C0_11D3_A374_00105A6BCA62__INCLUDED_)
13 #define AFX_WINAFSLOAD_H__75E145B3_F5C0_11D3_A374_00105A6BCA62__INCLUDED_
17 #endif // _MSC_VER > 1000
20 #error include 'stdafx.h' before including this file for PCH
23 #include "resource.h" // main symbols
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
34 /////////////////////////////////////////////////////////////////////////////
36 // See WinAfsLoad.cpp for the implementation of this class
41 class CWinAfsLoadApp : public CWinApp
43 friend class CProgBarDlg;
44 friend class CMyUIThread;
45 void WSANotifyFromUI(WPARAM, const char *);
46 void NotifyFromUI(WPARAM, const char *);
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;
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*);
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);
72 // ClassWizard generated virtual function overrides
73 //{{AFX_VIRTUAL(CWinAfsLoadApp)
75 virtual BOOL InitInstance();
76 virtual int ExitInstance();
80 BOOL static CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam);
81 HWND static m_hAfsLoad,m_hAfsLoadFinish;
82 CString m_sTargetDir; //location of afsd.exe
84 UINT m_uNotifyMessage;
88 //{{AFX_MSG(CWinAfsLoadApp)
91 afx_msg LRESULT OnNotifyReturn(WPARAM wParam, LPARAM lParam);
92 afx_msg LRESULT OnAfsEvent(WPARAM wParam, LPARAM lParam);
95 #define CWINAFSLOADAPP ((CWinAfsLoadApp *)AfxGetApp())
96 /////////////////////////////////////////////////////////////////////////////
98 //{{AFX_INSERT_LOCATION}}
99 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
101 #endif // !defined(AFX_WINAFSLOAD_H__75E145B3_F5C0_11D3_A374_00105A6BCA62__INCLUDED_)