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.

218 lines
6.0 KiB

  1. //**********************************************************************
  2. // File name: ISPCSV.H
  3. //
  4. // Definition of CISPCSV
  5. //
  6. // Copyright (c) 1992 - 1996 Microsoft Corporation. All rights reserved.
  7. //**********************************************************************
  8. #if !defined( _ISPCSV_H_ )
  9. #define _ISPCSV_H_
  10. #include "ccsv.h"
  11. #define MAX_GUID 50
  12. #define TEMP_BUFFER_LENGTH 1024
  13. #define NUM_ISPCSV_FIELDS 14
  14. class CISPCSV
  15. {
  16. private:
  17. int iISPLogoIndex;
  18. // The following members represent the content of a single line from the CSV file.
  19. int iSpecialVal; // if bIsSpecial is TRUE, then 0 = NO Offers and -1 = OLS offer
  20. BOOL bCNS;
  21. BOOL bIsSpecial; // If true, then CNS value was "special"
  22. BOOL bSecureConnection;
  23. WORD wOfferID;
  24. DWORD dwCfgFlag;
  25. DWORD dwRequiredUserInputFlags;
  26. WCHAR szISPLogoPath [MAX_PATH];
  27. WCHAR szISPTierLogoPath [MAX_PATH];
  28. WCHAR szISPTeaserPath [MAX_PATH];
  29. WCHAR szISPMarketingHTMPath [MAX_PATH];
  30. WCHAR szISPFilePath [MAX_PATH];
  31. WCHAR szISPName [MAX_ISP_NAME];
  32. WCHAR szCNSIconPath [MAX_PATH];
  33. WCHAR szBillingFormPath [MAX_PATH];
  34. WCHAR szPayCSVPath [MAX_PATH];
  35. WCHAR szOfferGUID [MAX_GUID];
  36. WCHAR szMir [MAX_ISP_NAME];
  37. WORD wLCID;
  38. HICON hbmTierIcon;
  39. public:
  40. CISPCSV(void)
  41. {
  42. memset(this, 0, sizeof(CISPCSV));
  43. }
  44. ~CISPCSV(void);
  45. HRESULT ReadOneLine (CCSVFile far *pcCSVFile);
  46. HRESULT ReadFirstLine (CCSVFile far *pcCSVFile);
  47. void StripQuotes (LPWSTR lpszDst, LPWSTR lpszSrc);
  48. BOOL ReadDW (DWORD far *pdw, CCSVFile far *pcCSVFile);
  49. BOOL ReadW (WORD far *pw, CCSVFile far *pcCSVFile);
  50. BOOL ReadWEx (WORD far *pw, CCSVFile far *pcCSVFile); //Accepts -1 as a valid number. currently this is used for LCID, since all langs has a LDID == -1
  51. BOOL ReadB (BYTE far *pb, CCSVFile far *pcCSVFile);
  52. BOOL ReadBOOL (BOOL far *pbool, CCSVFile far *pcCSVFile);
  53. BOOL ReadSPECIAL (BOOL far *pbool, BOOL far *pbIsSpecial, int far *pInt, CCSVFile far *pcCSVFile);
  54. BOOL ReadSZ (LPWSTR psz, DWORD dwSize, CCSVFile far *pcCSVFile);
  55. BOOL ReadToEOL (CCSVFile far *pcCSVFile);
  56. BOOL ValidateFile (WCHAR* pszFile);
  57. void MakeCompleteURL (LPWSTR lpszURL, LPWSTR lpszSRC);
  58. LPWSTR get_szISPLogoPath(void)
  59. {
  60. return szISPLogoPath;
  61. }
  62. LPWSTR get_szISPTierLogoPath(void)
  63. {
  64. return szISPTierLogoPath;
  65. }
  66. void set_ISPTierLogoIcon(HICON hIcon)
  67. {
  68. hbmTierIcon = hIcon;
  69. }
  70. HICON get_ISPTierLogoIcon(void)
  71. {
  72. return hbmTierIcon;
  73. }
  74. LPWSTR get_szISPTeaserPath(void)
  75. {
  76. return szISPTeaserPath;
  77. }
  78. LPWSTR get_szISPMarketingHTMPath(void)
  79. {
  80. return szISPMarketingHTMPath;
  81. }
  82. DWORD get_dwCFGFlag()
  83. {
  84. return dwCfgFlag;
  85. }
  86. void set_dwCFGFlag(DWORD dwNewCfgFlag)
  87. {
  88. dwCfgFlag = dwNewCfgFlag;
  89. }
  90. DWORD get_dwRequiredUserInputFlags()
  91. {
  92. return dwRequiredUserInputFlags;
  93. }
  94. void set_dwRequiredUserInputFlags(DWORD dwFlags)
  95. {
  96. dwRequiredUserInputFlags = dwFlags;
  97. }
  98. void set_szBillingFormPath(WCHAR* pszFile)
  99. {
  100. lstrcpy(szBillingFormPath, pszFile);
  101. }
  102. LPWSTR get_szBillingFormPath(void)
  103. {
  104. return szBillingFormPath;
  105. }
  106. void set_ISPLogoImageIndex(int iImage)
  107. {
  108. iISPLogoIndex = iImage;
  109. }
  110. void set_szISPName(WCHAR* pszName)
  111. {
  112. lstrcpy(szISPName, pszName);
  113. }
  114. LPWSTR get_szISPName()
  115. {
  116. return szISPName;
  117. }
  118. int get_ISPLogoIndex()
  119. {
  120. return iISPLogoIndex;
  121. }
  122. void set_bCNS(BOOL bVal)
  123. {
  124. bCNS = bVal;
  125. }
  126. BOOL get_bCNS()
  127. {
  128. return bCNS;
  129. }
  130. void set_bIsSpecial(BOOL bVal)
  131. {
  132. bIsSpecial = bVal;
  133. }
  134. BOOL get_bIsSpecial()
  135. {
  136. return bIsSpecial;
  137. }
  138. int get_iSpecial()
  139. {
  140. return iSpecialVal;
  141. }
  142. void set_szPayCSVPath(WCHAR* pszFile)
  143. {
  144. lstrcpy(szPayCSVPath, pszFile);
  145. }
  146. LPWSTR get_szPayCSVPath()
  147. {
  148. return szPayCSVPath;
  149. }
  150. void set_szISPFilePath(WCHAR* pszFile)
  151. {
  152. lstrcpy(szISPFilePath, pszFile);
  153. }
  154. LPWSTR get_szISPFilePath()
  155. {
  156. return szISPFilePath;
  157. }
  158. LPWSTR get_szOfferGUID()
  159. {
  160. return szOfferGUID;
  161. }
  162. WORD get_wOfferID()
  163. {
  164. return wOfferID;
  165. }
  166. LPWSTR get_szMir()
  167. {
  168. return szMir;
  169. }
  170. WORD get_wLCID()
  171. {
  172. return wLCID;
  173. }
  174. };
  175. #endif