sch.c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. ischeme_t sch = {
  2. PLUGIN_LIST
  3. PLUGIN {
  4. .name = "plugin1",
  5. .id = "id1",
  6. .file = "file1",
  7. },
  8. PLUGIN {
  9. .name = "plugin2",
  10. .id = "id2",
  11. .file = "file2",
  12. },
  13. END_PLUGIN_LIST,
  14. PTYPE_LIST
  15. PTYPE {
  16. .name = "ptype1",
  17. .help = "help1",
  18. ACTION_LIST
  19. ACTION {
  20. .sym = "internal",
  21. .script = "cat /etc/passwd",
  22. },
  23. ACTION {
  24. .sym = "internal",
  25. .script = "cat /etc/group",
  26. },
  27. END_ACTION_LIST,
  28. },
  29. PTYPE {
  30. .name = "ptype2",
  31. .help = "help2",
  32. },
  33. END_PTYPE_LIST,
  34. VIEW_LIST
  35. VIEW {
  36. .name = "view1",
  37. COMMAND_LIST
  38. COMMAND {
  39. .name = "command1",
  40. .help = "help1",
  41. },
  42. COMMAND {
  43. .name = "command2",
  44. .help = "help1",
  45. },
  46. COMMAND {
  47. .name = "command3",
  48. .help = "help1",
  49. },
  50. END_COMMAND_LIST,
  51. },
  52. VIEW {
  53. .name = "view2",
  54. },
  55. VIEW {
  56. .name = "view1",
  57. COMMAND_LIST
  58. COMMAND {
  59. .name = "command4",
  60. .help = "help1",
  61. },
  62. COMMAND {
  63. .name = "command5",
  64. .help = "help1",
  65. PARAM_LIST
  66. PARAM {
  67. .name = "param1",
  68. .help = "helpparam1",
  69. .ptype = "ptype1",
  70. },
  71. PARAM {
  72. .name = "param2",
  73. .help = "helpparam2",
  74. .ptype = "ptype2",
  75. PARAM_LIST
  76. PARAM {
  77. .name = "param3",
  78. .help = "helpparam1",
  79. .ptype = "ptype1",
  80. },
  81. PARAM {
  82. .name = "param4",
  83. .help = "helpparam2",
  84. .ptype = "ptype2",
  85. },
  86. END_PARAM_LIST,
  87. },
  88. END_PARAM_LIST,
  89. ACTION_LIST
  90. ACTION {
  91. .sym = "internal",
  92. .script = "cat /etc/passwd",
  93. },
  94. ACTION {
  95. .sym = "internal",
  96. .script = "cat /etc/group",
  97. },
  98. END_ACTION_LIST,
  99. },
  100. END_COMMAND_LIST,
  101. },
  102. //VIEW {
  103. // },
  104. END_VIEW_LIST,
  105. };