macos-use-platform-copy-of-afssettings-20060802
[openafs.git] / src / WINNT / win9xpanel / WinAfsLoadDlg.h
1 // WinAfsLoadDlg.h : header file
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
11 #if !defined(AFX_WINAFSLOADDLG_H__75E145B5_F5C0_11D3_A374_00105A6BCA62__INCLUDED_)
12 #define AFX_WINAFSLOADDLG_H__75E145B5_F5C0_11D3_A374_00105A6BCA62__INCLUDED_
13
14 #if _MSC_VER > 1000
15 #pragma once
16 #endif // _MSC_VER > 1000
17 #include "trayicon.h"
18 #include "datalog.h"
19 #include "cafs.h"
20 #include <afxtempl.h>
21 #include "share.h"
22 #include "transbmp.h"
23 /////////////////////////////////////////////////////////////////////////////
24 // CWinAfsLoadDlg dialog
25 class CSettings;
26 class CEncript;
27
28 class CWinAfsLoadDlg : public CDialog
29 {
30 // Construction
31         friend CSettings;
32 public:
33         CWinAfsLoadDlg(const char *user,const char *pass,CWnd* pParent = NULL); // standard constructor
34         void HandleError(const char *s,BOOL b=TRUE);
35         void BuildDriveList(BOOL newone=FALSE);
36         CList<CString,CString&> m_Drivelist;
37         void OnShowAddMenus();
38         LRESULT OnNotifyReturn(WPARAM wParam, LPARAM lParam);
39         LRESULT OnAfsEvent(WPARAM wParam, LPARAM lParam);
40         BOOL IsGetTokens(){return (!CWINAFSLOADAPP->m_bNoID) && (m_sUsername!="");}
41
42 // Dialog Data
43         //{{AFX_DATA(CWinAfsLoadDlg)
44         enum { IDD = IDD_WINAFSLOAD_DIALOG };
45         CButton m_Down;
46         CButton m_Enable;
47         CButton m_cWorld;
48         CStatic m_cAuthWarn;
49         CButton m_cAuthenicate;
50         CButton m_cSaveUsername;
51         CListCtrl       m_cMountlist;
52         CButton m_cChange;
53         CButton m_cRemove;
54         CButton m_cOptionLine;
55         CButton m_cCheckAdvanceDisplay;
56         CButton m_cConnect;
57         CButton m_cCancel;
58         CEdit   m_cPassword;
59         CEdit   m_cUsername;
60         CString m_sPassword;
61         CString m_sUsername;
62         CString m_sMountDisplay;
63         //}}AFX_DATA
64
65         // ClassWizard generated virtual function overrides
66         //{{AFX_VIRTUAL(CWinAfsLoadDlg)
67         public:
68         virtual BOOL PreTranslateMessage(MSG* pMsg);
69         protected:
70         virtual void DoDataExchange(CDataExchange* pDX);        // DDX/DDV support
71         virtual void PostNcDestroy();
72         //}}AFX_VIRTUAL
73
74 // Implementation
75 protected:
76         CString m_VersionString;
77         CAfs m_cAfs;
78         CTrayIcon       m_trayIcon;             // my tray icon
79         HICON m_hIcon;
80         BOOL m_bHomepath;
81         BOOL m_bServiceIsActive;                //service is active
82         PROCESS_INFORMATION m_procInfo;
83         UINT m_DialogShrink;
84         CRect m_OriginalRect;
85         CString m_sComputername;
86         BOOL TerminateBackground(BOOL bDisplay=TRUE,CString *emsg=NULL);
87         BOOL OnToolTipNotify( UINT id, NMHDR * pNMHDR, LRESULT * pResult );
88         BOOL RegPassword(CString &user,CString &pass,BOOL fetch);
89         CImageList *m_pImagelist;
90         BOOL ProfileData(BOOL put);
91         void AddToList(const char *sDrive,const char *sPath,const char *sShare,const char *sAuto);
92         void ExtractDrive(CString &zdrive,const char *request);
93         int m_iActiveItem;
94         BOOL  DismountAll(CString &msg,INT mode);
95         HACCEL  m_hAccelTable; 
96         CString m_sLoginName;
97         BOOL m_bSaveUsername;           //TRUE means a click will save, FALSE will mean to clear
98         void UpdateMountDisplay();
99         UINT m_nDirTimer;                               //Timer for directory update
100         UINT m_nAutTimer;                       //Timer for authenicate testing
101         BOOL RegLastUser(CString &user,BOOL fetch);
102         void UpdateConnect();
103         UINT m_nShown;                  //SET according level of warning has occured
104         CBrush  m_bkBrush;
105         INT m_seqIndex;                 //index count for whirling world
106         INT m_seqCount;                 //count in each sequence
107         INT m_dirCount;                 //number of 1/2 seconds to wait before checking changes in directory
108         CTransBmp m_bmpWorld;    // Bitmap to display, special bit map that does transparent painting
109         CRect m_WorldRect;
110         BOOL m_bRestartAFSD;            //were we suspended???
111         BOOL m_bConnect;                        //option to automatically start connected
112         INT m_iMode;
113         CEncript *m_pEncript;
114         sockaddr_in m_sHostIP;
115         OSVERSIONINFO m_OSVersion;
116         BOOL IsWin95(){
117                 return (
118                         (m_OSVersion.dwPlatformId==VER_PLATFORM_WIN32_WINDOWS) 
119                         && (m_OSVersion.dwMinorVersion==0)
120                         );
121         }
122         void ErrorDisplayState();
123         int m_PowerResumeDelay;
124         void AddMenu(const char *,const char *);
125         void RemoveMenu(const char *);
126         
127 //      int m_PowerDelay;                       //power delay hack
128
129         // Generated message map functions
130         //{{AFX_MSG(CWinAfsLoadDlg)
131         virtual BOOL OnInitDialog();
132         afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
133         afx_msg void OnPaint();
134         afx_msg void OnConnect();
135         afx_msg void OnCancel();
136         afx_msg void OnCheckadvanced();
137         afx_msg void OnAppOpen();
138         afx_msg void OnChange();
139         afx_msg void OnAdd();
140         afx_msg void OnRemove();
141         afx_msg void OnClickDrivemountlist(NMHDR* pNMHDR, LRESULT* pResult);
142         afx_msg void OnItemchangedDrivemountlist(NMHDR* pNMHDR, LRESULT* pResult);
143         afx_msg BOOL OnQueryEndSession( );
144         afx_msg void OnTimer(UINT nIDEvent);
145         afx_msg void OnAuthenicate();
146         afx_msg void OnDestroy();
147         afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
148         afx_msg void OnShow();
149         afx_msg void OnSuspend();
150         afx_msg void OnResume();
151         afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
152         afx_msg void OnHelpmain();
153         afx_msg void OnSettings();
154         //}}AFX_MSG
155         afx_msg void OnTrayButton0();
156         afx_msg void OnTrayButton1();
157         afx_msg void OnTrayButton2();
158         afx_msg void OnTrayButton3();
159         afx_msg void OnTrayButton4();
160         afx_msg HCURSOR OnQueryDragIcon();
161         afx_msg LRESULT OnPowerBroadcast(WPARAM wParam, LPARAM lParam);
162         afx_msg LRESULT OnErrorMessage(WPARAM wParam, LPARAM lParam);
163         DECLARE_MESSAGE_MAP()
164 };
165
166 //{{AFX_INSERT_LOCATION}}
167 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
168
169 #endif // !defined(AFX_WINAFSLOADDLG_H__75E145B5_F5C0_11D3_A374_00105A6BCA62__INCLUDED_)