ActionDb.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /*****************************************************************************
  24. *
  25. * File: ActionDb.h
  26. * RCS: $XConsortium: ActionDb.h /main/3 1995/10/26 14:58:38 rswiston $
  27. * Description: Internal header file for the action database functions.
  28. * Language: C
  29. * Package: N/A
  30. * Status: Experimental (Do Not Distribute)
  31. *
  32. *
  33. ** (c) Copyright 1993, 1994 Hewlett-Packard Company
  34. ** (c) Copyright 1993, 1994 International Business Machines Corp.
  35. ** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
  36. ** (c) Copyright 1993, 1994 Novell, Inc.
  37. *****************************************************************************/
  38. #ifndef _Dt_ActionDb_h
  39. #define _Dt_ActionDb_h
  40. /*
  41. * The following constants are used by the database parsing code to
  42. * identify the field names for an action definition.
  43. *
  44. * Recognized Field names for any action definition.
  45. */
  46. #define _DtACTION_NAME "ACTION"
  47. #define _DtACTION_TYPE "TYPE"
  48. #define _DtACTION_LABEL "LABEL"
  49. #define _DtACTION_ARG_CLASS "ARG_CLASS"
  50. #define _DtACTION_ARG_MODE "ARG_MODE"
  51. #define _DtACTION_ARG_TYPE "ARG_TYPE"
  52. #define _DtACTION_ARG_COUNT "ARG_COUNT"
  53. #define _DtACTION_DESCRIPTION "DESCRIPTION"
  54. #define _DtACTION_ICON "ICON"
  55. #define _DtACTION_INSTANCE_ICON "INSTANCE_ICON"
  56. /*
  57. * Miscellaneous syntax strings
  58. */
  59. #define _DtACT_ANY "*"
  60. #define _DtACT_LIST_SEPARATOR_CHAR ','
  61. #define _DtACT_GT_CHAR '>'
  62. #define _DtACT_LT_CHAR '<'
  63. /*
  64. * Valid values for ACTION_TYPE
  65. */
  66. #define _DtACTION_MAP "MAP"
  67. #define _DtACTION_COMMAND "COMMAND"
  68. #define _DtACTION_TT_MSG "TT_MSG"
  69. #ifdef _DT_ALLOW_DT_MSGS
  70. #define _DtACTION_DT_REQUEST "DT_REQUEST"
  71. #define _DtACTION_DT_NOTIFY "DT_NOTIFY"
  72. #endif /* _DT_ALLOW_DT_MSGS */
  73. /*
  74. * Field names for "MAP" type actions
  75. */
  76. #define _DtACTION_MAP_ACTION "MAP_ACTION"
  77. /*
  78. * Field names for the "COMMAND" type actions.
  79. */
  80. #define _DtACTION_EXEC_STRING "EXEC_STRING"
  81. #define _DtACTION_EXEC_HOST "EXEC_HOST"
  82. #define _DtACTION_CWD "CWD"
  83. #define _DtACTION_WINDOW_TYPE "WINDOW_TYPE"
  84. #define _DtACTION_TERM_OPTS "TERM_OPTS"
  85. /*
  86. * Field names for "TT_MSG" type actions
  87. */
  88. #define _DtACTION_TT_CLASS "TT_CLASS"
  89. #define _DtACTION_TT_SCOPE "TT_SCOPE"
  90. #define _DtACTION_TT_OPERATION "TT_OPERATION"
  91. #define _DtACTION_TT_FILE "TT_FILE"
  92. /* definitions to decifer TT_ARGn_* fields */
  93. #define _DtACTION_TTN_ARG "TT_ARG"
  94. #define _DtACTION_TTN_MODE "_MODE"
  95. #define _DtACTION_TTN_VTYPE "_VTYPE"
  96. #define _DtACTION_TTN_REP_TYPE "_REP_TYPE"
  97. #define _DtACTION_TTN_VALUE "_VALUE"
  98. #ifdef _DT_ALLOW_DT_MSGS
  99. /*
  100. * Field names for "DT_REQUEST" type actions
  101. */
  102. #define _DtACTION_DT_REQUEST_NAME "DT_REQUEST_NAME"
  103. #define _DtACTION_DT_SVC "DT_SVC"
  104. /*
  105. * Field names for "DT_NOTIFY" type actions
  106. */
  107. #define _DtACTION_DT_NOTIFY_NAME "DT_NOTIFY_NAME"
  108. #define _DtACTION_DT_NGROUP "DT_NGROUP"
  109. /*
  110. * Field names for DT ARGn (either request or notify)
  111. */
  112. #define _DtACTION_DTN_ARG "DT_ARG"
  113. #define _DtACTION_DTN_VALUE "_VALUE"
  114. #endif /* _DT_ALLOW_DT_MSGS */
  115. /*
  116. * Valid Field value strings
  117. * for Command Actions Window Types
  118. */
  119. #define _DtACTION_TERMINAL "TERMINAL"
  120. #define _DtACTION_PERM_TERMINAL "PERM_TERMINAL"
  121. #define _DtACTION_NO_STDIO "NO_STDIO"
  122. /*
  123. * Valid Field values for ARG_CLASS records.
  124. */
  125. #define _DtACTION_BUFFER "BUFFER"
  126. #define _DtACTION_FILE "FILE"
  127. #define _DtACTION_STRING "STRING"
  128. /*
  129. * Valid Field values for ARG_MODE
  130. */
  131. #define _DtACT_ARG_MODE_WRITE "w"
  132. #define _DtACT_ARG_MODE_NOWRITE "!w"
  133. #define _DtACT_ARG_MODE_ANY _DtACT_ANY
  134. /*
  135. * Valid Field values for TT_CLASS records.
  136. */
  137. #define _DtACTION_TT_NOTICE "TT_NOTICE"
  138. #define _DtACTION_TT_REQUEST "TT_REQUEST"
  139. /*
  140. * Valid Field values for TT_SCOPE records.
  141. */
  142. #define _DtACTION_TT_SESSION "TT_SESSION"
  143. #define _DtACTION_TT_BOTH "TT_BOTH"
  144. #define _DtACTION_TT_FILE_IN_SESSION "TT_FILE_IN_SESSION"
  145. /* --- same as TT_MSG's TT_FILE field name --------
  146. #define _DtACTION_TT_FILE "TT_FILE"
  147. */
  148. /*
  149. * Valid Field values for TT_ARGn_MODE
  150. */
  151. #define _DtACTION_TT_MODE_IN "TT_IN"
  152. #define _DtACTION_TT_MODE_OUT "TT_OUT"
  153. #define _DtACTION_TT_MODE_INOUT "TT_INOUT"
  154. /*
  155. * Valid Field values for TT_ARGn_REP_TYPE
  156. */
  157. #define _DtACTION_TT_RTYP_UND "TT_REP_UNDEFINED"
  158. #define _DtACTION_TT_RTYP_INT "TT_REP_INTEGER"
  159. #define _DtACTION_TT_RTYP_BUF "TT_REP_BUFFER"
  160. #define _DtACTION_TT_RTYP_STR "TT_REP_STRING"
  161. /*
  162. * Action Keywords --
  163. * these keywords appear in the action database files
  164. * in the form: %<qualifier><keyword><prompt string>%
  165. * where the optional qualifier in enclosed in: ()
  166. * and the optional prompt string is enclosed in: ""
  167. */
  168. #define _DtACT_DATABASEHOST_STR "DatabaseHost"
  169. #define _DtACT_DISPLAYHOST_STR "DisplayHost"
  170. #define _DtACT_LOCALHOST_STR "LocalHost"
  171. #define _DtACT_SESSIONHOST_STR "SessionHost"
  172. #define _DtACT_ARGS_STR "Args"
  173. #define _DtACT_ARG_UNDER_STR "Arg_"
  174. #define _DtACT_STRING_QUALIFIER "(String)"
  175. #define _DtACT_FILE_QUALIFIER "(File)"
  176. /*
  177. * Default action field value definitions (these should be strings)
  178. * for recognized fields.
  179. */
  180. #define _DtACT_LBL_DFLT NULL
  181. #define _DtACT_TYPE_DFLT _DtACTION_COMMAND
  182. #define _DtACT_ARG_CLASS_DFLT _DtACT_ANY
  183. #define _DtACT_ARG_MODE_DFLT _DtACT_ANY
  184. #define _DtACT_ARG_TYPE_DFLT _DtACT_ANY
  185. #define _DtACT_ARG_CNT_DFLT _DtACT_ANY
  186. #define _DtACT_DESC_DFLT NULL
  187. #define _DtACT_ICON_DFLT NULL
  188. #define _DtACT_MAP_ACT_DFLT NULL
  189. #define _DtACT_EXEC_STRG_DFLT NULL
  190. #define _DtACT_EXEC_HOST_DFLT \
  191. "%" _DtACT_DATABASEHOST_STR "%,%" _DtACT_LOCALHOST_STR "%"
  192. #define _DtACT_CWD_DFLT NULL
  193. #define _DtACT_WIN_TYPE_DFLT _DtACTION_PERM_TERMINAL
  194. #define _DtACT_TERM_OPTS_DFLT NULL
  195. #define _DtACT_TT_CLASS_DFLT NULL
  196. #define _DtACT_TT_SCOPE_DFLT NULL
  197. #define _DtACT_TT_OP_DFLT NULL
  198. #define _DtACT_TT_FILE_DFLT NULL
  199. #ifdef _DT_ALLOW_DT_MSGS
  200. #define _DtACT_DT_REQ_DFLT NULL
  201. #define _DtACT_DT_SVC_DFLT NULL
  202. #define _DtACT_DT_NTFY_DFLT NULL
  203. #define _DtACT_DT_NGRP_DFLT NULL
  204. #endif /* _DT_ALLOW_DT_MSGS */
  205. #endif /* _Dt_ActionDb_h */
  206. /* DON'T ADD ANYTHING AFTER THIS #endif */