Source code of Windows XP (NT5)
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.

103 lines
2.5 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. startafp.hxx
  7. This file contains the class defintion for the SERVICE_WAIT_DIALOG class
  8. FILE HISTORY:
  9. NarenG 14-Oct-1992 Stole from server manager.
  10. */
  11. #ifndef _STARTAFP_HXX_
  12. #define _STARTAFP_HXX_
  13. #include <lmsvc.hxx>
  14. #include <progress.hxx>
  15. #include <strlst.hxx>
  16. //
  17. // TIMER_FREQ is the frequency of our timer messages.
  18. // TIMER_MULT is a multiplier. We'll actually poll the
  19. // service every (TIMER_FREQ * TIMER_MULT) seconds.
  20. // This allows us to advance the progress indicator more
  21. // fequently than we hit the net. Should keep the user better
  22. // amused.
  23. //
  24. #define TIMER_FREQ 500
  25. #define TIMER_MULT 6
  26. #define POLL_TIMER_FREQ (TIMER_FREQ * TIMER_MULT)
  27. #define POLL_DEFAULT_MAX_TRIES 1
  28. extern "C"
  29. {
  30. APIERR StartAfpService(
  31. HWND hWnd,
  32. const TCHAR * pszDisplayName );
  33. APIERR IsAfpServiceRunning(
  34. const TCHAR * pszComputer,
  35. BOOL * fIsRunning );
  36. }
  37. /*************************************************************************
  38. NAME: SERVICE_WAIT_DIALOG
  39. SYNOPSIS: class for 'wait while I do this' dialog
  40. PARENT: DIALOG_WINDOW
  41. TIMER_CALLOUT
  42. INTERFACE: no public methods of interest apart from constructor
  43. CAVEATS: need convert to use BLT_TIMER
  44. HISTORY:
  45. ChuckC 07-Sep-1991 Created
  46. **************************************************************************/
  47. class SERVICE_WAIT_DIALOG : public DIALOG_WINDOW,
  48. public TIMER_CALLOUT
  49. {
  50. //
  51. // Since this class inherits from DIALOG_WINDOW and TIMER_CALLOUT
  52. // which both inherit from BASE, we need to override the BASE
  53. // methods.
  54. //
  55. NEWBASE( DIALOG_WINDOW )
  56. public:
  57. SERVICE_WAIT_DIALOG( HWND hWndOwner,
  58. LM_SERVICE * plmsvc,
  59. const TCHAR * pszDisplayName );
  60. ~SERVICE_WAIT_DIALOG(void);
  61. protected:
  62. virtual VOID OnTimerNotification( TIMER_ID tid );
  63. private:
  64. const TCHAR *_pszDisplayName;
  65. TIMER _timer;
  66. LM_SERVICE *_plmsvc ;
  67. //
  68. // This is the progress indicator which should keep the user amused.
  69. //
  70. PROGRESS_CONTROL _progress;
  71. SLT _sltMessage;
  72. INT _nTickCounter;
  73. };
  74. #endif // _STARTAFP_HXX_