Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

186 lines
4.8 KiB

  1. //+---------------------------------------------------------------------------
  2. /////////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Microsoft Windows
  5. // Copyright (C) Microsoft Corporation, 1997-2002.
  6. //
  7. // File: log.h
  8. //
  9. // Contents: Definition of CLogOnHoursDlg
  10. //
  11. //----------------------------------------------------------------------------
  12. #if !defined(AFX_LOGHOURS_H__0F68A435_FEE5_11D0_BB0F_00C04FC9A3A3__INCLUDED_)
  13. #define AFX_LOGHOURS_H__0F68A435_FEE5_11D0_BB0F_00C04FC9A3A3__INCLUDED_
  14. #if _MSC_VER >= 1000
  15. #pragma once
  16. #endif // _MSC_VER >= 1000
  17. #include "SchedBas.h"
  18. #ifndef INOUT
  19. #define INOUT
  20. #define ENDORSE(f) // Macro which is the opposite of ASSERT()
  21. #endif
  22. /////////////////////////////////////////////////////////////////////////////
  23. //
  24. // Exported Functions
  25. //
  26. #include "loghrapi.h"
  27. /////////////////////////////////////////////////////////////////////////////
  28. //
  29. // Private Functions
  30. //
  31. /////////////////////////////////////////////////////////////////////////////
  32. HRESULT ShrinkByteArrayToBitArray(const BYTE rgbDataIn[], int cbDataIn, BYTE rgbDataOut[], int cbDataOut);
  33. HRESULT ExpandBitArrayToByteArray(const BYTE rgbDataIn[], int cbDataIn, BYTE rgbDataOut[], int cbDataOut);
  34. void ConvertLogonHoursToGMT(INOUT BYTE rgbData[21], IN bool bAddDaylightBias);
  35. void ConvertLogonHoursFromGMT(INOUT BYTE rgbData[21], IN bool bAddDaylightBias);
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CLogOnHoursDlg dialog
  38. class CLogOnHoursDlg : public CScheduleBaseDlg
  39. {
  40. protected:
  41. CLogOnHoursDlg( UINT nIDTemplate, CWnd* pParentWnd, bool fInputAsGMT, bool bAddDaylightBias);
  42. void Init();
  43. public:
  44. CLogOnHoursDlg(CWnd* pParent, bool fInputAsGMT); // standard constructor
  45. virtual int GetIDD ()
  46. {
  47. return IDD;
  48. }
  49. // Dialog Data
  50. //{{AFX_DATA(CLogOnHoursDlg)
  51. enum { IDD = IDD_LOGON_HOURS };
  52. // NOTE: the ClassWizard will add data members here
  53. //}}AFX_DATA
  54. // ClassWizard generated virtual function overrides
  55. //{{AFX_VIRTUAL(CLogOnHoursDlg)
  56. protected:
  57. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  58. //}}AFX_VIRTUAL
  59. protected:
  60. // Generated message map functions
  61. //{{AFX_MSG(CLogOnHoursDlg)
  62. virtual BOOL OnInitDialog();
  63. virtual void OnOK();
  64. afx_msg void OnButtonAddHours();
  65. afx_msg void OnButtonRemoveHours();
  66. //}}AFX_MSG
  67. DECLARE_MESSAGE_MAP()
  68. protected:
  69. CLegendCell m_legendOn;
  70. CLegendCell m_legendOff;
  71. CButton m_buttonAdd;
  72. CButton m_buttonRemove;
  73. BYTE * m_prgbData21; // Pointer to an array of 21 bytes
  74. public:
  75. protected:
  76. virtual void TimeChange();
  77. virtual UINT GetExpectedArrayLength();
  78. virtual BYTE GetMatrixPercentage (UINT nHour, UINT nDay);
  79. virtual UINT GetPercentageToSet (const BYTE bData);
  80. virtual void InitMatrix ();
  81. virtual void UpdateButtons();
  82. public:
  83. void SetLogonBitArray(INOUT BYTE rgbData[21]);
  84. private:
  85. const bool m_fInputAsGMT;
  86. }; // CLogOnHoursDlg
  87. /////////////////////////////////////////////////////////////////////////////
  88. // CDialinHours dialog
  89. class CDialinHours : public CLogOnHoursDlg
  90. {
  91. // Construction
  92. public:
  93. CDialinHours(CWnd* pParent, bool fInputAsGMT); // standard constructor
  94. virtual int GetIDD ()
  95. {
  96. return IDD;
  97. }
  98. // Dialog Data
  99. //{{AFX_DATA(CDialinHours)
  100. enum { IDD = IDD_DIALIN_HOURS };
  101. // NOTE: the ClassWizard will add data members here
  102. //}}AFX_DATA
  103. // Overrides
  104. // ClassWizard generated virtual function overrides
  105. //{{AFX_VIRTUAL(CDialinHours)
  106. //}}AFX_VIRTUAL
  107. // Implementation
  108. protected:
  109. // Generated message map functions
  110. //{{AFX_MSG(CDialinHours)
  111. // NOTE: the ClassWizard will add member functions here
  112. //}}AFX_MSG
  113. DECLARE_MESSAGE_MAP()
  114. };
  115. /////////////////////////////////////////////////////////////////////////////
  116. // CDirSyncScheduleDlg dialog
  117. class CDirSyncScheduleDlg : public CLogOnHoursDlg
  118. {
  119. // Construction
  120. public:
  121. CDirSyncScheduleDlg(CWnd* pParent = NULL); // standard constructor
  122. virtual int GetIDD ()
  123. {
  124. return IDD;
  125. }
  126. // Dialog Data
  127. //{{AFX_DATA(CDirSyncScheduleDlg)
  128. enum { IDD = IDD_DIRSYNC_SCHEDULE };
  129. // NOTE: the ClassWizard will add data members here
  130. //}}AFX_DATA
  131. // Overrides
  132. // ClassWizard generated virtual function overrides
  133. //{{AFX_VIRTUAL(CDirSyncScheduleDlg)
  134. protected:
  135. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  136. virtual BOOL OnInitDialog();
  137. //}}AFX_VIRTUAL
  138. // Implementation
  139. protected:
  140. // Generated message map functions
  141. //{{AFX_MSG(CDirSyncScheduleDlg)
  142. // NOTE: the ClassWizard will add member functions here
  143. //}}AFX_MSG
  144. DECLARE_MESSAGE_MAP()
  145. };
  146. #endif // !defined(AFX_LOGHOURS_H__0F68A435_FEE5_11D0_BB0F_00C04FC9A3A3__INCLUDED_)