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.

173 lines
2.8 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1995 - 1998
  3. All rights reserved.
  4. Module Name:
  5. docdata.hxx
  6. Abstract:
  7. Document Property Sheet Data Set
  8. Author:
  9. Steve Kiraly (SteveKi) 10/25/95
  10. Revision History:
  11. --*/
  12. #ifndef _DOCDATA_HXX
  13. #define _DOCDATA_HXX
  14. /********************************************************************
  15. Document property data.
  16. ********************************************************************/
  17. class TDocumentData : public MSingletonWin {
  18. SIGNATURE( 'docp' )
  19. SAFE_NEW
  20. public:
  21. VAR( HICON, hIcon );
  22. VAR( UINT, uStartPage );
  23. VAR( INT, iCmdShow );
  24. VAR( IDENT, JobId );
  25. VAR( BOOL, bValid );
  26. VAR( DWORD, dwAccess);
  27. VAR( BOOL, bNoAccess );
  28. VAR( BOOL, bAdministrator );
  29. VAR( HANDLE, hPrinter );
  30. VAR( LPJOB_INFO_2, pJobInfo );
  31. VAR( BOOL, bErrorSaving ); // Flag if error saving document data
  32. VAR( INT, iErrorMsgId ); // Message String ID of error message
  33. VAR( TString, strNotifyName );
  34. enum Constants {
  35. kPriorityLowerBound = MIN_PRIORITY,
  36. kPriorityUpperBound = MAX_PRIORITY,
  37. };
  38. TDocumentData::
  39. TDocumentData(
  40. LPCTSTR pszDocumentName,
  41. IN IDENT JobId,
  42. INT iCmdShow,
  43. LPARAM lParam
  44. );
  45. TDocumentData::
  46. ~TDocumentData(
  47. VOID
  48. );
  49. BOOL
  50. TDocumentData::
  51. bLoad(
  52. VOID
  53. );
  54. BOOL
  55. TDocumentData::
  56. bStore(
  57. VOID
  58. );
  59. BOOL
  60. TDocumentData::
  61. bCheckForChange(
  62. VOID
  63. );
  64. private:
  65. //
  66. // Job Info data class.
  67. //
  68. class TJobInfo {
  69. SIGNATURE( 'jiif' )
  70. public:
  71. TJobInfo(
  72. VOID
  73. );
  74. ~TJobInfo(
  75. VOID
  76. );
  77. BOOL
  78. bUpdate(
  79. IN LPJOB_INFO_2 pInfo
  80. );
  81. TString _strNotifyName;
  82. DWORD _dwPriority;
  83. DWORD _dwStartTime;
  84. DWORD _dwUntilTime;
  85. private:
  86. //
  87. // Prevent copying and assignment.
  88. //
  89. TJobInfo::
  90. TJobInfo(
  91. const TJobInfo &
  92. );
  93. TJobInfo &
  94. TJobInfo::
  95. operator =(
  96. const TJobInfo &
  97. );
  98. };
  99. BOOL
  100. TDocumentData::
  101. bGetJobInfo(
  102. IN HANDLE hPrinter,
  103. IN DWORD JobId,
  104. OUT LPJOB_INFO_2 *pJobInfo
  105. );
  106. BOOL
  107. TDocumentData::
  108. bSetJobInfo(
  109. IN HANDLE hPrinter,
  110. IN DWORD JobId,
  111. IN LPJOB_INFO_2 pJob
  112. );
  113. //
  114. // Operator = and copy not defined.
  115. //
  116. TDocumentData &
  117. TDocumentData::
  118. operator =(
  119. const TDocumentData &
  120. );
  121. TDocumentData::
  122. TDocumentData(
  123. const TDocumentData &
  124. );
  125. TJobInfo _JobInfo;
  126. BOOL _bIsDataStored;
  127. };
  128. #endif