conf-enums.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. /*
  2. * Define various enumerations used in the storage format of PuTTY's
  3. * settings.
  4. *
  5. * Each CONF_ENUM here defines an identifier that config options can
  6. * cite using their STORAGE_ENUM property. Within each enum, the
  7. * VALUE(x,y) records indicate that if the internal value of the
  8. * integer Conf property in question is x, then it's stored in the
  9. * saved settings as y.
  10. *
  11. * This allows the internal enumerations to be rearranged without
  12. * breaking storage compatibility, and also allows for the fact that
  13. * (for embarrassing historical reasons) the tri-state FORCE_OFF /
  14. * FORCE_ON / AUTO enumeration has several different storage
  15. * representations depending on the Conf option.
  16. *
  17. * VALUE_OBSOLETE(x,y) records only work one way: they indicate how a
  18. * legacy value in saved session data should be interpreted, but also
  19. * say that that value should no longer be generated in newly saved
  20. * data. That is, they indicate that y maps to x, but not that x maps
  21. * to y.
  22. */
  23. CONF_ENUM(addressfamily,
  24. VALUE(ADDRTYPE_UNSPEC, 0),
  25. VALUE(ADDRTYPE_IPV4, 1),
  26. VALUE(ADDRTYPE_IPV6, 2),
  27. )
  28. CONF_ENUM(on_off_auto,
  29. VALUE(FORCE_ON, 0),
  30. VALUE(FORCE_OFF, 1),
  31. VALUE(AUTO, 2),
  32. )
  33. CONF_ENUM(off_auto_on,
  34. VALUE(FORCE_OFF, 0),
  35. VALUE(AUTO, 1),
  36. VALUE(FORCE_ON, 2),
  37. )
  38. CONF_ENUM(auto_off_on,
  39. VALUE(AUTO, 0),
  40. VALUE(FORCE_OFF, 1),
  41. VALUE(FORCE_ON, 2),
  42. )
  43. CONF_ENUM(off1_on2,
  44. VALUE(FORCE_OFF, 1),
  45. VALUE(FORCE_ON, 2),
  46. )
  47. CONF_ENUM(ssh_protocol,
  48. VALUE(0, 0),
  49. VALUE(3, 3),
  50. /* Save value 1 used to mean 'prefer SSH-1 but allow 2'; 2 vice versa.
  51. * We no longer support SSH-1 vs SSH-2 agnosticism, so we translate each
  52. * to the preferred version only. */
  53. VALUE_OBSOLETE(0, 1),
  54. VALUE_OBSOLETE(3, 2),
  55. )
  56. CONF_ENUM(serparity,
  57. VALUE(SER_PAR_NONE, 0),
  58. VALUE(SER_PAR_ODD, 1),
  59. VALUE(SER_PAR_EVEN, 2),
  60. VALUE(SER_PAR_MARK, 3),
  61. VALUE(SER_PAR_SPACE, 4),
  62. )
  63. CONF_ENUM(serflow,
  64. VALUE(SER_FLOW_NONE, 0),
  65. VALUE(SER_FLOW_XONXOFF, 1),
  66. VALUE(SER_FLOW_RTSCTS, 2),
  67. VALUE(SER_FLOW_DSRDTR, 3),
  68. )
  69. CONF_ENUM(supdup_charset,
  70. VALUE(SUPDUP_CHARSET_ASCII, 0),
  71. VALUE(SUPDUP_CHARSET_ITS, 1),
  72. VALUE(SUPDUP_CHARSET_WAITS, 2),
  73. )
  74. CONF_ENUM(proxy_type,
  75. VALUE(PROXY_NONE, 0),
  76. VALUE(PROXY_SOCKS4, 1),
  77. VALUE(PROXY_SOCKS5, 2),
  78. VALUE(PROXY_HTTP, 3),
  79. VALUE(PROXY_TELNET, 4),
  80. VALUE(PROXY_CMD, 5),
  81. VALUE(PROXY_SSH_TCPIP, 6),
  82. VALUE(PROXY_SSH_EXEC, 7),
  83. VALUE(PROXY_SSH_SUBSYSTEM, 8),
  84. )
  85. CONF_ENUM(old_proxy_type,
  86. VALUE(PROXY_NONE, 0),
  87. VALUE(PROXY_HTTP, 1),
  88. VALUE(PROXY_SOCKS5, 2), /* really, both SOCKS 4 and 5 */
  89. VALUE(PROXY_TELNET, 3),
  90. VALUE(PROXY_CMD, 4),
  91. )
  92. CONF_ENUM(funky_type,
  93. VALUE(FUNKY_TILDE, 0),
  94. VALUE(FUNKY_LINUX, 1),
  95. VALUE(FUNKY_XTERM, 2),
  96. VALUE(FUNKY_VT400, 3),
  97. VALUE(FUNKY_VT100P, 4),
  98. VALUE(FUNKY_SCO, 5),
  99. VALUE(FUNKY_XTERM_216, 6),
  100. )
  101. CONF_ENUM(sharrow_type,
  102. VALUE(SHARROW_APPLICATION, 0),
  103. VALUE(SHARROW_BITMAP, 1),
  104. )
  105. CONF_ENUM(remote_qtitle_action,
  106. VALUE(TITLE_NONE, 0),
  107. VALUE(TITLE_EMPTY, 1),
  108. VALUE(TITLE_REAL, 2),
  109. )
  110. CONF_ENUM(cursor_type,
  111. VALUE(CURSOR_BLOCK, 0),
  112. VALUE(CURSOR_UNDERLINE, 1),
  113. VALUE(CURSOR_VERTICAL_LINE, 2),
  114. )
  115. CONF_ENUM(beep,
  116. VALUE(BELL_DISABLED, 0),
  117. VALUE(BELL_DEFAULT, 1),
  118. VALUE(BELL_VISUAL, 2),
  119. VALUE(BELL_WAVEFILE, 3),
  120. VALUE(BELL_PCSPEAKER, 4),
  121. )
  122. CONF_ENUM(beep_indication,
  123. VALUE(B_IND_DISABLED, 0),
  124. VALUE(B_IND_FLASH, 1),
  125. VALUE(B_IND_STEADY, 2),
  126. )
  127. CONF_ENUM(resize_effect,
  128. VALUE(RESIZE_TERM, 0),
  129. VALUE(RESIZE_DISABLED, 1),
  130. VALUE(RESIZE_FONT, 2),
  131. VALUE(RESIZE_EITHER, 3),
  132. )
  133. CONF_ENUM(font_quality,
  134. VALUE(FQ_DEFAULT, 0),
  135. VALUE(FQ_ANTIALIASED, 1),
  136. VALUE(FQ_NONANTIALIASED, 2),
  137. VALUE(FQ_CLEARTYPE, 3),
  138. )
  139. CONF_ENUM(log_type,
  140. VALUE(LGTYP_NONE, 0),
  141. VALUE(LGTYP_ASCII, 1),
  142. VALUE(LGTYP_DEBUG, 2),
  143. VALUE(LGTYP_PACKETS, 3),
  144. VALUE(LGTYP_SSHRAW, 4),
  145. )
  146. CONF_ENUM(log_to_existing_file,
  147. VALUE(LGXF_OVR, 1),
  148. VALUE(LGXF_APN, 0),
  149. VALUE(LGXF_ASK, -1),
  150. )
  151. CONF_ENUM(bold_style,
  152. VALUE(BOLD_STYLE_FONT, 0),
  153. VALUE(BOLD_STYLE_COLOUR, 1),
  154. VALUE(BOLD_STYLE_FONT | BOLD_STYLE_COLOUR, 2),
  155. )
  156. CONF_ENUM(mouse_buttons,
  157. VALUE(MOUSE_COMPROMISE, 0),
  158. VALUE(MOUSE_XTERM, 1),
  159. VALUE(MOUSE_WINDOWS, 2),
  160. )
  161. CONF_ENUM(line_drawing,
  162. VALUE(VT_XWINDOWS, 0),
  163. VALUE(VT_OEMANSI, 1),
  164. VALUE(VT_OEMONLY, 2),
  165. VALUE(VT_POORMAN, 3),
  166. VALUE(VT_UNICODE, 4),
  167. )
  168. CONF_ENUM(x11_auth,
  169. VALUE(X11_NO_AUTH, 0),
  170. VALUE(X11_MIT, 1),
  171. VALUE(X11_XDM, 2),
  172. )