IdGopherConsts.pas 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. {
  2. $Project$
  3. $Workfile$
  4. $Revision$
  5. $DateUTC$
  6. $Id$
  7. This file is part of the Indy (Internet Direct) project, and is offered
  8. under the dual-licensing agreement described on the Indy website.
  9. (http://www.indyproject.org/)
  10. Copyright:
  11. (c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
  12. }
  13. {
  14. $Log$
  15. }
  16. {
  17. Rev 1.2 2004.02.03 5:44:46 PM czhower
  18. Name changes
  19. Rev 1.1 10/17/2003 12:06:16 AM DSiders
  20. Added localization comments.
  21. Rev 1.0 11/13/2002 08:30:10 AM JPMugaas
  22. Initial import from FTP VC.
  23. }
  24. unit IdGopherConsts;
  25. {*******************************************************}
  26. { }
  27. { Indy IdGopherConsts - this just contains }
  28. { Constants used for writing Gopher servers }
  29. { and clients }
  30. { }
  31. { Copyright (C) 2000 Winshoes Working Group }
  32. { Original author: Pete Mee and moved to }
  33. { this unit by J. Peter Mugaas }
  34. { 2000-April-23 }
  35. { }
  36. {*******************************************************}
  37. interface
  38. {$i IdCompilerDefines.inc}
  39. uses
  40. IdGlobal;
  41. Const
  42. {Item constants - comments taken from RFC}
  43. IdGopherItem_Document = '0'; // Item is a file
  44. IdGopherItem_Directory = '1'; // Item is a directory
  45. IdGopherItem_CSO = '2'; // Item is a CSO phone-book server
  46. IdGopherItem_Error = '3'; // Error
  47. IdGopherItem_BinHex = '4'; // Item is a BinHexed Macintosh file.
  48. IdGopherItem_BinDOS = '5'; // Item is DOS binary archive of some sort.
  49. // Client must read until the TCP connection closes. Beware.
  50. IdGopherItem_UUE = '6'; // Item is a UNIX uuencoded file.
  51. IdGopherItem_Search = '7'; // Item is an Index-Search server.
  52. IdGopherItem_Telnet = '8'; // Item points to a text-based telnet session.
  53. IdGopherItem_Binary = '9'; // Item is a binary file.
  54. // Client must read until the TCP connection closes. Beware.
  55. IdGopherItem_Redundant = '+'; // Item is a redundant server
  56. IdGopherItem_TN3270 = 'T'; // Item points to a text-based tn3270 session.
  57. IdGopherItem_GIF = 'g'; // Item is a GIF format graphics file.
  58. IdGopherItem_Image = ':'; // Item is some kind of image file.
  59. // Client decides how to display. Was 'I', but depracted
  60. IdGopherItem_Image2 = 'I'; //Item is some kind of image file -
  61. // this was drepreciated
  62. {Items discovered outside of Gopher RFC - "Gopher+"}
  63. IdGopherItem_Sound = '<'; //Was 'S', but deprecated
  64. IdGopherItem_Sound2 = 'S'; //This was depreciated but should be used with clients
  65. IdGopherItem_Movie = ';'; //Was 'M', but deprecated
  66. IdGopherItem_HTML = 'h';
  67. IdGopherItem_MIME = 'M'; //See above for a potential conflict with Movie
  68. IdGopherItem_Information = 'i'; // Not a file - just information
  69. IdGopherPlusIndicator = IdGopherItem_Redundant; // Observant people will note
  70. // the conflict here...!
  71. IdGopherPlusInformation = '!'; // Formatted information
  72. IdGopherPlusDirectoryInformation = '$';
  73. //Gopher+ additional information
  74. IdGopherPlusInfo = '+INFO: '; {do not localize}
  75. { Info format is the standard Gopher directory entry + TAB + '+'.
  76. The info is contained on the same line as the '+INFO: '}
  77. IdGopherPlusAdmin = '+ADMIN:' + EOL; {do not localize}
  78. { Admin block required for every item. The '+ADMIN:' occurs on a
  79. line of it's own (starting with a space) and is followed by
  80. the fields - one per line.
  81. Required fields:
  82. ' Admin: ' [+ comments] + '<' + admin e-mail address + '>'
  83. ' ModDate: ' [+ comments] + '<' + dateformat:YYYYMMDDhhnnss + '>'
  84. Optional fields regardless of location:
  85. ' Score: ' + relevance-ranking
  86. ' Score-range: ' + lower-bound + ' ' + upper-bound
  87. Optional fields recommended at the root only:
  88. ' Site: ' + site-name
  89. ' Org: ' + organization-description
  90. ' Loc: ' + city + ', ' + state + ', ' + country
  91. ' Geog: ' + latitude + ' ' + longitude
  92. ' TZ: ' + GMT-offset
  93. Additional recorded possibilities:
  94. ' Provider: ' + item-provider-name
  95. ' Author: ' + author
  96. ' Creation-Date: ' + '<' + YYYYMMDDhhnnss + '>'
  97. ' Expiration-Date: ' + '<' + YYYYMMDDhhnnss + '>'
  98. }
  99. IdGopherPlusViews = '+VIEWS:' + EOL; {do not localize}
  100. { View formats are one per line:
  101. ' ' + mime/type [+ langcode] + ': <' + size estimate + '>'
  102. ' ' + logcode = ' ' + ISO-639-Code + '_' + ISO-3166-Code
  103. }
  104. IdGopherPlusAbstract = '+ABSTRACT:' + EOL; {do not localize}
  105. { Is followed by a (multi-)line description. Line(s) begin with
  106. a space.}
  107. IdGopherPlusAsk = '+ASK:'; {do not localize}
  108. //Questions for +ASK section:
  109. IdGopherPlusAskPassword = 'AskP: '; {do not localize}
  110. IdGopherPlusAskLong = 'AskL: '; {do not localize}
  111. IdGopherPlusAskFileName = 'AskF: '; {do not localize}
  112. // Prompted responses for +ASK section:
  113. // Multi-choice, multi-selection
  114. IdGopherPlusSelect = 'Select: '; {do not localize}
  115. // Multi-choice, single-selection
  116. IdGopherPlusChoose = 'Choose: '; {do not localize}
  117. //Multi-choice, single-selection
  118. IdGopherPlusChooseFile = 'ChooseF: '; {do not localize}
  119. //Known response types:
  120. IdGopherPlusData_BeginSign = '+-1' + EOL;
  121. IdGopherPlusData_EndSign = EOL + '.' + EOL;
  122. IdGopherPlusData_UnknownSize = '+-2' + EOL;
  123. IdGopherPlusData_ErrorBeginSign = '--1' + EOL;
  124. IdGopherPlusData_ErrorUnknownSize = '--2' + EOL;
  125. IdGopherPlusError_NotAvailable = '1';
  126. IdGopherPlusError_TryLater = '2';
  127. IdGopherPlusError_ItemMoved = '3';
  128. implementation
  129. end.