Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

343 lines
7.6 KiB

  1. /*
  2. * WORK.C
  3. *
  4. * RSM Service : Code to service a work item
  5. *
  6. * Author: ErvinP
  7. *
  8. * (c) 2001 Microsoft Corporation
  9. *
  10. */
  11. #include <windows.h>
  12. #include <stdlib.h>
  13. #include <wtypes.h>
  14. #include <ntmsapi.h>
  15. #include "internal.h"
  16. #include "resource.h"
  17. #include "debug.h"
  18. /*
  19. * ServiceOneWorkItem
  20. *
  21. * Service a single work item.
  22. *
  23. * Return TRUE iff the workItem is complete.
  24. */
  25. BOOL ServiceOneWorkItem(LIBRARY *lib, WORKITEM *workItem)
  26. {
  27. BOOL workItemCompleted = FALSE;
  28. switch (workItem->currentOp.opcode){
  29. case NTMS_LM_REMOVE:
  30. workItemCompleted = ServiceRemove(lib, workItem);
  31. break;
  32. // case NTMS_LM_DISABLECHANGER: has same value as NTMS_LM_DISABLELIBRARY
  33. case NTMS_LM_DISABLELIBRARY:
  34. DBGERR(("NTMS_LM_DISABLELIBRARY not yet implemented"));
  35. #if 0
  36. if (xxx){
  37. workItemCompleted = ServiceDisableLibrary(lib, workItem);
  38. }
  39. else {
  40. workItemCompleted = ServiceDisableChanger(lib, workItem);
  41. }
  42. #endif
  43. break;
  44. // case NTMS_LM_ENABLECHANGER: has same value as NTMS_LM_ENABLELIBRARY
  45. case NTMS_LM_ENABLELIBRARY:
  46. DBGERR(("NTMS_LM_ENABLELIBRARY not yet implemented"));
  47. #if 0
  48. if (xxx){
  49. workItemCompleted = ServiceEnableLibrary(lib, workItem);
  50. }
  51. else {
  52. workItemCompleted = ServiceEnableChanger(lib, workItem);
  53. }
  54. #endif
  55. break;
  56. case NTMS_LM_DISABLEDRIVE:
  57. workItemCompleted = ServiceDisableDrive(lib, workItem);
  58. break;
  59. case NTMS_LM_ENABLEDRIVE:
  60. workItemCompleted = ServiceEnableDrive(lib, workItem);
  61. break;
  62. case NTMS_LM_DISABLEMEDIA:
  63. workItemCompleted = ServiceDisableMedia(lib, workItem);
  64. break;
  65. case NTMS_LM_ENABLEMEDIA:
  66. workItemCompleted = ServiceEnableMedia(lib, workItem);
  67. break;
  68. case NTMS_LM_UPDATEOMID:
  69. workItemCompleted = ServiceUpdateOmid(lib, workItem);
  70. break;
  71. case NTMS_LM_INVENTORY:
  72. workItemCompleted = ServiceInventory(lib, workItem);
  73. break;
  74. case NTMS_LM_DOORACCESS:
  75. workItemCompleted = ServiceDoorAccess(lib, workItem);
  76. break;
  77. case NTMS_LM_EJECT:
  78. workItemCompleted = ServiceEject(lib, workItem);
  79. break;
  80. case NTMS_LM_EJECTCLEANER:
  81. workItemCompleted = ServiceEjectCleaner(lib, workItem);
  82. break;
  83. case NTMS_LM_INJECT:
  84. workItemCompleted = ServiceInject(lib, workItem);
  85. break;
  86. case NTMS_LM_INJECTCLEANER:
  87. workItemCompleted = ServiceInjectCleaner(lib, workItem);
  88. break;
  89. case NTMS_LM_PROCESSOMID:
  90. workItemCompleted = ServiceProcessOmid(lib, workItem);
  91. break;
  92. case NTMS_LM_CLEANDRIVE:
  93. workItemCompleted = ServiceCleanDrive(lib, workItem);
  94. break;
  95. case NTMS_LM_DISMOUNT:
  96. workItemCompleted = ServiceDismount(lib, workItem);
  97. break;
  98. case NTMS_LM_MOUNT:
  99. workItemCompleted = ServiceMount(lib, workItem);
  100. break;
  101. case NTMS_LM_WRITESCRATCH:
  102. workItemCompleted = ServiceWriteScratch(lib, workItem);
  103. break;
  104. case NTMS_LM_CLASSIFY:
  105. workItemCompleted = ServiceClassify(lib, workItem);
  106. break;
  107. case NTMS_LM_RESERVECLEANER:
  108. workItemCompleted = ServiceReserveCleaner(lib, workItem);
  109. break;
  110. default:
  111. DBGERR(("ServiceOneWorkItem: illegal opcode %xh.", workItem->currentOp.opcode));
  112. break;
  113. }
  114. return workItemCompleted;
  115. }
  116. BOOL ServiceRemove(LIBRARY *lib, WORKITEM *workItem)
  117. {
  118. BOOL complete = FALSE;
  119. // BUGBUG FINISH
  120. return complete;
  121. }
  122. BOOL ServiceDisableChanger(LIBRARY *lib, WORKITEM *workItem)
  123. {
  124. BOOL complete = FALSE;
  125. // BUGBUG FINISH
  126. return complete;
  127. }
  128. BOOL ServiceDisableLibrary(LIBRARY *lib, WORKITEM *workItem)
  129. {
  130. BOOL complete = FALSE;
  131. // BUGBUG FINISH
  132. return complete;
  133. }
  134. BOOL ServiceEnableChanger(LIBRARY *lib, WORKITEM *workItem)
  135. {
  136. BOOL complete = FALSE;
  137. // BUGBUG FINISH
  138. return complete;
  139. }
  140. BOOL ServiceEnableLibrary(LIBRARY *lib, WORKITEM *workItem)
  141. {
  142. BOOL complete = FALSE;
  143. // BUGBUG FINISH
  144. return complete;
  145. }
  146. BOOL ServiceDisableDrive(LIBRARY *lib, WORKITEM *workItem)
  147. {
  148. BOOL complete = FALSE;
  149. // BUGBUG FINISH
  150. return complete;
  151. }
  152. BOOL ServiceEnableDrive(LIBRARY *lib, WORKITEM *workItem)
  153. {
  154. BOOL complete = FALSE;
  155. // BUGBUG FINISH
  156. return complete;
  157. }
  158. BOOL ServiceDisableMedia(LIBRARY *lib, WORKITEM *workItem)
  159. {
  160. BOOL complete = FALSE;
  161. // BUGBUG FINISH
  162. return complete;
  163. }
  164. BOOL ServiceEnableMedia(LIBRARY *lib, WORKITEM *workItem)
  165. {
  166. BOOL complete = FALSE;
  167. // BUGBUG FINISH
  168. return complete;
  169. }
  170. BOOL ServiceUpdateOmid(LIBRARY *lib, WORKITEM *workItem)
  171. {
  172. BOOL complete = FALSE;
  173. // BUGBUG FINISH
  174. return complete;
  175. }
  176. BOOL ServiceInventory(LIBRARY *lib, WORKITEM *workItem)
  177. {
  178. BOOL complete = FALSE;
  179. // BUGBUG FINISH
  180. return complete;
  181. }
  182. BOOL ServiceDoorAccess(LIBRARY *lib, WORKITEM *workItem)
  183. {
  184. BOOL complete = FALSE;
  185. // BUGBUG FINISH
  186. return complete;
  187. }
  188. BOOL ServiceEject(LIBRARY *lib, WORKITEM *workItem)
  189. {
  190. BOOL complete = FALSE;
  191. // BUGBUG FINISH
  192. return complete;
  193. }
  194. BOOL ServiceEjectCleaner(LIBRARY *lib, WORKITEM *workItem)
  195. {
  196. BOOL complete = FALSE;
  197. // BUGBUG FINISH
  198. return complete;
  199. }
  200. BOOL ServiceInject(LIBRARY *lib, WORKITEM *workItem)
  201. {
  202. BOOL complete = FALSE;
  203. // BUGBUG FINISH
  204. return complete;
  205. }
  206. BOOL ServiceInjectCleaner(LIBRARY *lib, WORKITEM *workItem)
  207. {
  208. BOOL complete = FALSE;
  209. // BUGBUG FINISH
  210. return complete;
  211. }
  212. BOOL ServiceProcessOmid(LIBRARY *lib, WORKITEM *workItem)
  213. {
  214. BOOL complete = FALSE;
  215. // BUGBUG FINISH
  216. return complete;
  217. }
  218. BOOL ServiceCleanDrive(LIBRARY *lib, WORKITEM *workItem)
  219. {
  220. BOOL complete = FALSE;
  221. // BUGBUG FINISH
  222. return complete;
  223. }
  224. BOOL ServiceDismount(LIBRARY *lib, WORKITEM *workItem)
  225. {
  226. BOOL complete = FALSE;
  227. // BUGBUG FINISH
  228. return complete;
  229. }
  230. BOOL ServiceMount(LIBRARY *lib, WORKITEM *workItem)
  231. {
  232. BOOL complete = FALSE;
  233. // BUGBUG FINISH
  234. return complete;
  235. }
  236. BOOL ServiceWriteScratch(LIBRARY *lib, WORKITEM *workItem)
  237. {
  238. BOOL complete = FALSE;
  239. // BUGBUG FINISH
  240. return complete;
  241. }
  242. BOOL ServiceClassify(LIBRARY *lib, WORKITEM *workItem)
  243. {
  244. BOOL complete = FALSE;
  245. // BUGBUG FINISH
  246. return complete;
  247. }
  248. BOOL ServiceReserveCleaner(LIBRARY *lib, WORKITEM *workItem)
  249. {
  250. BOOL complete = FALSE;
  251. // BUGBUG FINISH
  252. return complete;
  253. }
  254. BOOL ServiceReleaseCleaner(LIBRARY *lib, WORKITEM *workItem)
  255. {
  256. BOOL complete = FALSE;
  257. // BUGBUG FINISH
  258. return complete;
  259. }