home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / tagnames.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  8KB  |  182 lines

  1. // --tagnames.h-------------------------------------------------
  2. // 
  3. // Tag strings used for 822-style header output.
  4. //
  5. // Copyright (C) Microsoft Corp., 1986-1996.  All rights reserved.
  6. //
  7. // -------------------------------------------------------------
  8.  
  9. #ifndef _TAGNAMES_H
  10. #define _TAGNAMES_H
  11.  
  12. #ifdef __cplusplus
  13.  
  14. // convenient size constants
  15. const ULONG     ulMaxOutStringLen   =   (80 + 1);   // maximum length of output strings
  16. const ULONG     ulMaxIDLen          =   255;        // maximum UID length
  17. const ULONG     ulMinIDLen          =   4;          // minimum UID length
  18. const UINT      cbDateTimeString    =   (28 + 1);   // length of date time string
  19.  
  20. // convenient string constants
  21. const LPCSTR   lpszNewLine         =   "\r\n";// blank line
  22. const LPCSTR   lpszNullData        =   "";    // null data
  23. const LPCSTR   lpszBlank           =   "";    // empty string
  24. const LPCSTR   lpszColon           =   ":";   // colon string
  25. const LPCSTR   lpszSpace           =   " ";   // space string
  26. const LPCSTR   lpszUniversalTime   =   " UT"; // universal time string
  27. const LPCSTR   lpszMTAName         =   "/M="; // MTA name prefix
  28. const LPCSTR   lpszPRMDId          =   "/P="; // PRMD name prefix
  29. const LPCSTR   lpszADMDName        =   "/A="; // ADMD name prefix
  30. const LPCSTR   lpszCountry         =   "/C="; // country name prefix
  31. const LPCSTR   lpszCountryEnd      =   "/;";  // country name postfix
  32.  
  33. // Month abbreviations
  34. const LPCSTR   lpszSundayA         =   "Sun, ";
  35. const LPCSTR   lpszMondayA         =   "Mon, ";
  36. const LPCSTR   lpszTuesdayA        =   "Tue, ";
  37. const LPCSTR   lpszWednesdayA      =   "Wed, ";
  38. const LPCSTR   lpszThursdayA       =   "Thu, ";
  39. const LPCSTR   lpszFridayA         =   "Fri, ";
  40. const LPCSTR   lpszSaturdayA       =   "Sat, ";
  41.  
  42. const LPCWSTR  lpszSundayW         =   L"Sun, ";
  43. const LPCWSTR  lpszMondayW         =   L"Mon, ";
  44. const LPCWSTR  lpszTuesdayW        =   L"Tue, ";
  45. const LPCWSTR  lpszWednesdayW      =   L"Wed, ";
  46. const LPCWSTR  lpszThursdayW       =   L"Thu, ";
  47. const LPCWSTR  lpszFridayW         =   L"Fri, ";
  48. const LPCWSTR  lpszSaturdayW       =   L"Sat, ";
  49.  
  50. // Day of week abbreviations
  51. const LPCSTR   lpszJanuaryA        =   "Jan ";
  52. const LPCSTR   lpszFebruaryA       =   "Feb ";
  53. const LPCSTR   lpszMarchA          =   "Mar ";
  54. const LPCSTR   lpszAprilA          =   "Apr ";
  55. const LPCSTR   lpszMayA            =   "May ";
  56. const LPCSTR   lpszJuneA           =   "Jun ";
  57. const LPCSTR   lpszJulyA           =   "Jul ";
  58. const LPCSTR   lpszAugustA         =   "Aug ";
  59. const LPCSTR   lpszSeptemberA      =   "Sep ";
  60. const LPCSTR   lpszOctoberA        =   "Oct ";
  61. const LPCSTR   lpszNovemberA       =   "Nov ";
  62. const LPCSTR   lpszDecemberA       =   "Dec ";
  63.  
  64. const LPCWSTR  lpszJanuaryW        =   L"Jan ";
  65. const LPCWSTR  lpszFebruaryW       =   L"Feb ";
  66. const LPCWSTR  lpszMarchW          =   L"Mar ";
  67. const LPCWSTR  lpszAprilW          =   L"Apr ";
  68. const LPCWSTR  lpszMayW            =   L"May ";
  69. const LPCWSTR  lpszJuneW           =   L"Jun ";
  70. const LPCWSTR  lpszJulyW           =   L"Jul ";
  71. const LPCWSTR  lpszAugustW         =   L"Aug ";
  72. const LPCWSTR  lpszSeptemberW      =   L"Sep ";
  73. const LPCWSTR  lpszOctoberW        =   L"Oct ";
  74. const LPCWSTR  lpszNovemberW       =   L"Nov ";
  75. const LPCWSTR  lpszDecemberW       =   L"Dec ";
  76.  
  77. // Trace action strings
  78. const LPCSTR   lpszExpanded        =   "Expanded";
  79. const LPCSTR   lpszRedirected      =   "Redirected";
  80. const LPCSTR   lpszRelayed         =   "Relayed";
  81. const LPCSTR   lpszRerouted        =   "Rerouted";
  82.  
  83. // priority strings
  84. const LPCSTR   lpszNonUrgent       =   "Non-Urgent";
  85. const LPCSTR   lpszNormalUrgency   =   "Normal";
  86. const LPCSTR   lpszUrgent          =   "Urgent";
  87.  
  88. // importance strings
  89. const LPCSTR   lpszLowImp          =   "Low";
  90. const LPCSTR   lpszNormalImp       =   "Normal";
  91. const LPCSTR   lpszHighImp         =   "High";
  92.  
  93. // Common character constants
  94. const CHAR chColon           =   ':';
  95. const CHAR chReturn          =   '\r';
  96. const CHAR chNewLine         =   '\n';
  97. const CHAR chSpace           =   ' ';
  98. const CHAR chForwardSlash    =   '/';
  99. const CHAR chNull            =   '\0';   // used for null data
  100.  
  101. // "Tag" strings
  102. const LPCSTR lpszTagTnefAttach     =    "X-Tnef-Attach";
  103. const LPCSTR lpszTagMailFrom       =    "MAIL FROM";
  104. const LPCSTR lpszTagRcptTo         =    "RCPT TO";
  105. const LPCSTR lpszTagData           =    "DATA:\r\n";
  106. const LPCSTR lpszTagMsgClass       =    "X-Message-Class";
  107. const LPCSTR lpszTagDate           =    "Date";
  108. const LPCSTR lpszTagMsgID          =    "X-Message-ID";
  109. const LPCSTR lpszTagExternalRcvdBy =    "External-Received-By";
  110. const LPCSTR lpszTagExternalRcvdAt =    "External-Received-At";
  111. const LPCSTR lpszTagExternalAttmBy =    "External-Attempted-By";
  112. const LPCSTR lpszTagExternalDefdAt =    "External-Deferred-At";
  113. const LPCSTR lpszTagInternalRcvdBy =    "Internal-Received-By";
  114. const LPCSTR lpszTagInternalRcvdAt =    "Internal-Received-At";
  115. const LPCSTR lpszTagInternalAttmBy =    "Internal-Attempted-By";
  116. const LPCSTR lpszTagInternalDefdAt =    "Internal-Deferred-At";
  117. const LPCSTR lpszTagFrom           =    "From";
  118. const LPCSTR lpszTagTo             =    "TO";
  119. const LPCSTR lpszTagCC             =    "CC";
  120. const LPCSTR lpszTagBCC            =    "BCC";
  121. const LPCSTR lpszTagSubject        =    "Subject";
  122. const LPCSTR lpszTagPriority       =    "Priority";
  123. const LPCSTR lpszTagImportance     =    "Importance";
  124. const LPCSTR lpszTagBodyHdr        =    "----beginbody";
  125. const LPCSTR lpszTagBodyEnd        =    "\r\n----endbody\r\n";
  126. const LPCSTR lpszTagAttachHdr      =    "----beginattach";
  127. const LPCSTR lpszTagAttachEnd      =    "\r\n----endattach\r\n";
  128. const LPCSTR lpszTagSubjectID      =    "X-Message-Subject-ID";
  129. const LPCSTR lpszTagNotSentTo      =    "Your message was not delivered to";
  130. const LPCSTR lpszTagReason         =    "for the following reason";
  131. const LPCSTR lpszTagDiagCode       =    "Diagnostic code";
  132. const LPCSTR lpszTagNDRCode        =    "NDR code";
  133. const LPCSTR lpszTagSentTo         =    "Your message was successfully delivered to";
  134. const LPCSTR lpszTagAtTime         =    "at";
  135. const LPCSTR lpszTagReadBy         =    "Your message was read by";
  136. const LPCSTR lpszTagNotReadBy      =    "Your message was not read by";
  137. const LPCSTR lpszTagDiscCode       =    "Discard code";
  138. const LPCSTR lpszTagNRNCode        =    "Non-receipt code";
  139. const LPCSTR lpszTagTnefHdr        =    "MAPIMAIL.DAT";
  140.  
  141. // Convenient functional macros
  142. inline VOID AddSpace(LPSTR lpsz)   { strcat(lpsz, lpszSpace); }    // space
  143. inline VOID AddColon(LPSTR lpsz)   { strcat(lpsz, lpszColon); }    // time separator
  144.  
  145. // Look up table size and offset constants.
  146. const UINT  nDays            =   7;  // 7 days per week
  147. const UINT  nMonths          =   12; // 12 months per year
  148. const UINT  nActions         =   4;  // number of trace entry actions
  149. const UINT  nActOffset       =   2;  // trace entry action "offset" from 0
  150. const UINT  nPriorities      =   3;  // number of priority values
  151. const UINT  nPrioOffset      =   1;  // priority value "offset" from 0
  152. const UINT  nImportances     =   3;  // number of importance values
  153.  
  154. // Look up tables
  155.  
  156. // $--STRINGVALUEPAIR----------------------------------------------------------
  157. //
  158. // A paired string and integer value.
  159. //
  160. // ----------------------------------------------------------------------------
  161. typedef struct
  162. {
  163.     LONG    lValue;        // integer value
  164.     LPCWSTR lpszString;    // string value
  165. } STRINGVALUEPAIRW;
  166.  
  167. typedef struct
  168. {
  169.     LONG    lValue;        // integer value
  170.     LPCSTR  lpszString;    // string value
  171. } STRINGVALUEPAIRA;
  172.  
  173. #ifdef UNICODE
  174. #define STRINGVALUEPAIR STRINGVALUEPAIRW
  175. #else
  176. #define STRINGVALUEPAIR STRINGVALUEPAIRA
  177. #endif
  178.  
  179. #endif  // __cplusplus
  180.  
  181. #endif
  182.