bfg-common 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (782) hide show
  1. package/.eslintrc.js +21 -0
  2. package/.idea/inspectionProfiles/Project_Default.xml +49 -0
  3. package/.idea/modules.xml +8 -0
  4. package/.idea/prettier.xml +6 -0
  5. package/.idea/uikit.iml +12 -0
  6. package/.idea/vcs.xml +6 -0
  7. package/.prettierrc +5 -0
  8. package/PROJECT_STRUCTURE.md +42 -0
  9. package/README.md +42 -0
  10. package/assets/img/bg1.jpeg +0 -0
  11. package/assets/img/bg2.jpeg +0 -0
  12. package/assets/img/icons/icon-cps-dark-mode.png +0 -0
  13. package/assets/img/icons/icon-cps.png +0 -0
  14. package/assets/img/icons/icon-datastore.svg +1 -0
  15. package/assets/img/icons/icon-hcs.svg +4 -0
  16. package/assets/img/icons/icon-life-m-dark.svg +4 -0
  17. package/assets/img/icons/icon-life-m-light.svg +4 -0
  18. package/assets/img/icons/icon-ro-dark.svg +2 -0
  19. package/assets/img/icons/icon-ro-light.svg +3 -0
  20. package/assets/img/icons/icons-sprite-dark-1.svg +1 -0
  21. package/assets/img/icons/icons-sprite-dark-2.svg +1 -0
  22. package/assets/img/icons/icons-sprite-dark-3.svg +1 -0
  23. package/assets/img/icons/icons-sprite-dark-4.svg +1 -0
  24. package/assets/img/icons/icons-sprite-dark-5.svg +1 -0
  25. package/assets/img/icons/icons-sprite-light-1.svg +1 -0
  26. package/assets/img/icons/icons-sprite-light-2.svg +1 -0
  27. package/assets/img/icons/icons-sprite-light-3.svg +1 -0
  28. package/assets/img/icons/icons-sprite-light-4.svg +1 -0
  29. package/assets/img/icons/icons-sprite-light-5.svg +1 -0
  30. package/assets/img/icons/info.svg +8 -0
  31. package/assets/img/icons/sprite.png +0 -0
  32. package/assets/img/icons/summary-cluster.svg +1 -0
  33. package/assets/img/icons/vc.svg +53 -0
  34. package/assets/img/icons/vm-ui-icons.png +0 -0
  35. package/assets/img/logo copy.svg +50 -0
  36. package/assets/img/logo.png +0 -0
  37. package/assets/img/logo.svg +51 -0
  38. package/assets/localization/local_be.json +1851 -0
  39. package/assets/localization/local_en.json +1851 -0
  40. package/assets/localization/local_hy.json +1851 -0
  41. package/assets/localization/local_kk.json +1851 -0
  42. package/assets/localization/local_ru.json +1851 -0
  43. package/assets/localization/local_zh.json +1851 -0
  44. package/assets/scss/clarity/clr-ui.min.css +8 -0
  45. package/assets/scss/common/animations.scss +28 -0
  46. package/assets/scss/common/global.scss +178 -0
  47. package/assets/scss/common/icons/icons-1.scss +188 -0
  48. package/assets/scss/common/icons/icons-2.scss +208 -0
  49. package/assets/scss/common/icons/icons-3.scss +176 -0
  50. package/assets/scss/common/icons/icons-4.scss +179 -0
  51. package/assets/scss/common/icons/icons-5.scss +53 -0
  52. package/assets/scss/common/icons/icons.scss +14 -0
  53. package/assets/scss/common/mixins.scss +39 -0
  54. package/assets/scss/common/normalize.scss +320 -0
  55. package/assets/scss/common/theme.scss +230 -0
  56. package/assets/scss/common/utilities.scss +18 -0
  57. package/assets/scss/common/variables.scss +43 -0
  58. package/assets/scss/main.scss +13 -0
  59. package/components/atoms/DiagramIcon.vue +287 -0
  60. package/components/atoms/TheIcon.vue +1687 -0
  61. package/components/atoms/TheIcon2.vue +318 -0
  62. package/components/atoms/alert/Alert.spec.ts +38 -0
  63. package/components/atoms/alert/Alert.vue +84 -0
  64. package/components/atoms/alert/Notification.spec.ts +34 -0
  65. package/components/atoms/alert/Notification.vue +167 -0
  66. package/components/atoms/alert/models/enums.ts +12 -0
  67. package/components/atoms/alert/models/interfaces.ts +27 -0
  68. package/components/atoms/alert/models/types.ts +7 -0
  69. package/components/atoms/autocomplete/Autocomplete.vue +236 -0
  70. package/components/atoms/collapse/CollapseNav.vue +153 -0
  71. package/components/atoms/collapse/CollapseNavItem.vue +190 -0
  72. package/components/atoms/collapse/models/interfaces.ts +9 -0
  73. package/components/atoms/combobox/Combobox.vue +131 -0
  74. package/components/atoms/datepicker/Datepicker.vue +612 -0
  75. package/components/atoms/datepicker/config/allShortMonths.ts +103 -0
  76. package/components/atoms/datepicker/config/datapicker.ts +43 -0
  77. package/components/atoms/datepicker/models/interfaces.ts +8 -0
  78. package/components/atoms/dropdown/Portlet.spec.ts +26 -0
  79. package/components/atoms/dropdown/Portlet.vue +111 -0
  80. package/components/atoms/dropdown/dropdown/Dropdown.vue +148 -0
  81. package/components/atoms/dropdown/dropdown/models/interfaces.ts +8 -0
  82. package/components/atoms/dropdown/tree/Tree.vue +134 -0
  83. package/components/atoms/dropdown/tree/models/interfaces.ts +9 -0
  84. package/components/atoms/input/Search.vue +16 -0
  85. package/components/atoms/list/SelectList.vue +62 -0
  86. package/components/atoms/list/SimpleList.vue +29 -0
  87. package/components/atoms/list/dragDropList/DragDropList.vue +139 -0
  88. package/components/atoms/list/dragDropList/config/events.ts +4 -0
  89. package/components/atoms/loader/BarLoader.vue +21 -0
  90. package/components/atoms/loader/Loader.vue +26 -0
  91. package/components/atoms/loader/PreLoader.vue +34 -0
  92. package/components/atoms/loader/Preloader.spec.ts +24 -0
  93. package/components/atoms/modal/Modal.spec.ts +55 -0
  94. package/components/atoms/modal/Modal.vue +241 -0
  95. package/components/atoms/modal/bySteps/BySteps.spec.ts +66 -0
  96. package/components/atoms/modal/bySteps/BySteps.vue +234 -0
  97. package/components/atoms/modal/byStepsSecond/ByStepsSecond.vue +174 -0
  98. package/components/atoms/models/interfaces.ts +11 -0
  99. package/components/atoms/nav/NavBar.spec.ts +34 -0
  100. package/components/atoms/nav/NavBar.vue +116 -0
  101. package/components/atoms/nav/VerticalNavBar.vue +89 -0
  102. package/components/atoms/nav/models/interfaces.ts +5 -0
  103. package/components/atoms/notificationBar/NotificationBar.vue +175 -0
  104. package/components/atoms/notificationBar/models/enums.ts +27 -0
  105. package/components/atoms/notificationBar/models/interfaces.ts +6 -0
  106. package/components/atoms/notificationBar/models/types.ts +1 -0
  107. package/components/atoms/perPage/PerPage.vue +52 -0
  108. package/components/atoms/popover/Popover.vue +48 -0
  109. package/components/atoms/popup/SimplePopup.vue +90 -0
  110. package/components/atoms/select/TheSelect.vue +175 -0
  111. package/components/atoms/select/models/interfaces.ts +4 -0
  112. package/components/atoms/stack/StackBlock.vue +171 -0
  113. package/components/atoms/stack/StackContent.vue +60 -0
  114. package/components/atoms/step/VerticalStep.spec.ts +68 -0
  115. package/components/atoms/step/VerticalStep.vue +104 -0
  116. package/components/atoms/step/models/verticalStepItem.ts +7 -0
  117. package/components/atoms/switch/Switch.vue +107 -0
  118. package/components/atoms/table/compact/Compact.vue +526 -0
  119. package/components/atoms/table/compact/models/interfaces.ts +11 -0
  120. package/components/atoms/table/dataGrid/DataGrid.spec.ts +61 -0
  121. package/components/atoms/table/dataGrid/DataGrid.vue +1283 -0
  122. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +204 -0
  123. package/components/atoms/table/dataGrid/DataGridPage.vue +189 -0
  124. package/components/atoms/table/dataGrid/DataGridPagination.vue +83 -0
  125. package/components/atoms/table/dataGrid/config/itemsPerPage.ts +20 -0
  126. package/components/atoms/table/dataGrid/models/interfaces.ts +24 -0
  127. package/components/atoms/table/dataGrid/models/types.ts +5 -0
  128. package/components/atoms/table/dataGrid/utils/constructDataTable.ts +33 -0
  129. package/components/atoms/table/info/Info.vue +60 -0
  130. package/components/atoms/table/info/models/interfaces.ts +6 -0
  131. package/components/atoms/table/simpleEvent/SimpleEvent.vue +98 -0
  132. package/components/atoms/table/simpleEvent/models/interfaces.ts +9 -0
  133. package/components/atoms/table/simpleInfo/SimpleInfo.vue +68 -0
  134. package/components/atoms/table/simpleInfo/models/interfaces.ts +4 -0
  135. package/components/atoms/table/simpleTable/SimpleTable.vue +291 -0
  136. package/components/atoms/table/simpleTable/models/interfaces.ts +10 -0
  137. package/components/atoms/tabs/Tabs.vue +189 -0
  138. package/components/atoms/tabs/VerticalTabs.vue +81 -0
  139. package/components/atoms/tabs/models/interfaces.ts +4 -0
  140. package/components/atoms/tabs/models/types.ts +1 -0
  141. package/components/atoms/tooltip/Models/interfaces.ts +4 -0
  142. package/components/atoms/tooltip/Signpost.vue +224 -0
  143. package/components/atoms/tooltip/Text.vue +39 -0
  144. package/components/atoms/tooltip/Tooltip.vue +57 -0
  145. package/components/atoms/tooltip/TooltipError.vue +113 -0
  146. package/components/common/accordion/Accordion.vue +176 -0
  147. package/components/common/accordion/Recursion.vue +195 -0
  148. package/components/common/accordion/models/interfaces.ts +14 -0
  149. package/components/common/adapterManager/AdapterManager.vue +715 -0
  150. package/components/common/adapterManager/AddAdapterModal.vue +464 -0
  151. package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -0
  152. package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -0
  153. package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -0
  154. package/components/common/adapterManager/config/index.ts +19 -0
  155. package/components/common/adapterManager/ui/NoSelectedAdapter.vue +39 -0
  156. package/components/common/adapterManager/ui/SecondTitle.vue +37 -0
  157. package/components/common/adapterManager/ui/actions/ActionsBar.vue +93 -0
  158. package/components/common/adapterManager/ui/actions/AddAdapterButton.vue +28 -0
  159. package/components/common/adapterManager/ui/actions/MoveDownAdapterButton.vue +33 -0
  160. package/components/common/adapterManager/ui/actions/MoveUpAdapterButton.vue +33 -0
  161. package/components/common/adapterManager/ui/actions/RemoveAdapterButton.vue +34 -0
  162. package/components/common/adapterManager/ui/actions/VerticalSeparator.vue +11 -0
  163. package/components/common/adapterManager/ui/table/Adapters.vue +91 -0
  164. package/components/common/adapterManager/ui/table/Header.vue +89 -0
  165. package/components/common/adapterManager/ui/table/Table.vue +167 -0
  166. package/components/common/addNetworking/AddNetworking.vue +982 -0
  167. package/components/common/addNetworking/Wizard.vue +286 -0
  168. package/components/common/addNetworking/config/addNetworkingSteps.ts +404 -0
  169. package/components/common/addNetworking/config/index.ts +46 -0
  170. package/components/common/addNetworking/config/initialData.ts +78 -0
  171. package/components/common/addNetworking/config/portPropertiesStep.ts +19 -0
  172. package/components/common/addNetworking/config/selectSwitch.ts +19 -0
  173. package/components/common/addNetworking/config/sendData.ts +87 -0
  174. package/components/common/addNetworking/config/temporaryData.ts +8 -0
  175. package/components/common/addNetworking/config/validation.ts +23 -0
  176. package/components/common/addNetworking/mappers/mappers.ts +166 -0
  177. package/components/common/addNetworking/modals/SelectNetwork.vue +149 -0
  178. package/components/common/addNetworking/modals/SelectStandardSwitch.vue +125 -0
  179. package/components/common/addNetworking/modals/SelectSwitch.vue +114 -0
  180. package/components/common/addNetworking/models/enums.ts +7 -0
  181. package/components/common/addNetworking/models/interfaces.ts +207 -0
  182. package/components/common/addNetworking/models/types.ts +5 -0
  183. package/components/common/addNetworking/steps/ConnectionSettings.vue +269 -0
  184. package/components/common/addNetworking/steps/CreateStandardSwitch.vue +91 -0
  185. package/components/common/addNetworking/steps/Header.vue +53 -0
  186. package/components/common/addNetworking/steps/IpFourSettings.vue +361 -0
  187. package/components/common/addNetworking/steps/PhysicalAdapter.vue +24 -0
  188. package/components/common/addNetworking/steps/PortProperties.vue +481 -0
  189. package/components/common/addNetworking/steps/ReadyComplete.vue +29 -0
  190. package/components/common/addNetworking/steps/SelectConnectionType.vue +106 -0
  191. package/components/common/addNetworking/steps/SelectedTargetDevice.vue +563 -0
  192. package/components/common/addNetworking/utils/index.ts +212 -0
  193. package/components/common/browse/Browse.vue +182 -0
  194. package/components/common/browse/blocks/Container.vue +102 -0
  195. package/components/common/browse/blocks/Title.vue +66 -0
  196. package/components/common/browse/blocks/contents/Files.vue +68 -0
  197. package/components/common/browse/blocks/info/Date.vue +21 -0
  198. package/components/common/browse/blocks/info/Size.vue +17 -0
  199. package/components/common/browse/blocks/info/Text.vue +17 -0
  200. package/components/common/browse/blocks/models/types.ts +1 -0
  201. package/components/common/browse/models/interfaces.ts +5 -0
  202. package/components/common/context/Context.spec.ts +20 -0
  203. package/components/common/context/Context.vue +97 -0
  204. package/components/common/context/ContextRecursion.spec.ts +55 -0
  205. package/components/common/context/ContextRecursion.vue +251 -0
  206. package/components/common/context/models/interfaces.ts +26 -0
  207. package/components/common/details/DetailsItem.vue +106 -0
  208. package/components/common/details/DetailsList.vue +23 -0
  209. package/components/common/details/model/interfaces.ts +9 -0
  210. package/components/common/diagramMain/Diagram.vue +186 -0
  211. package/components/common/diagramMain/DiagramMain.vue +979 -0
  212. package/components/common/diagramMain/Header.vue +160 -0
  213. package/components/common/diagramMain/Highlights.vue +102 -0
  214. package/components/common/diagramMain/adapter/Adapter.vue +105 -0
  215. package/components/common/diagramMain/adapter/AdapterItem.vue +227 -0
  216. package/components/common/diagramMain/adapter/AdapterItems.vue +57 -0
  217. package/components/common/diagramMain/adapter/Block.vue +41 -0
  218. package/components/common/diagramMain/adapter/Contents.vue +96 -0
  219. package/components/common/diagramMain/adapter/Lines.vue +52 -0
  220. package/components/common/diagramMain/adapter/SecondBlock.vue +42 -0
  221. package/components/common/diagramMain/config/index.ts +51 -0
  222. package/components/common/diagramMain/config/initial.ts +38 -0
  223. package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +236 -0
  224. package/components/common/diagramMain/modals/MigrateVmkernelAdapter.vue +535 -0
  225. package/components/common/diagramMain/modals/config/adapterModal.ts +110 -0
  226. package/components/common/diagramMain/modals/config/diagramConfig.ts +17 -0
  227. package/components/common/diagramMain/modals/config/index.ts +57 -0
  228. package/components/common/diagramMain/modals/config/initial.ts +195 -0
  229. package/components/common/diagramMain/modals/config/migrateVmkernelAdapterSteps.ts +81 -0
  230. package/components/common/diagramMain/modals/config/networkModal.ts +337 -0
  231. package/components/common/diagramMain/modals/config/portModal.ts +201 -0
  232. package/components/common/diagramMain/modals/config/switchModal.ts +172 -0
  233. package/components/common/diagramMain/modals/config/vCenterModal.ts +30 -0
  234. package/components/common/diagramMain/modals/config/validation.ts +3 -0
  235. package/components/common/diagramMain/modals/config/vmKernelAdapter.ts +90 -0
  236. package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +41 -0
  237. package/components/common/diagramMain/modals/editSettings/EditSettings.vue +490 -0
  238. package/components/common/diagramMain/modals/editSettings/EditSettingsModal.vue +714 -0
  239. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +211 -0
  240. package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +178 -0
  241. package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +161 -0
  242. package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +165 -0
  243. package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +392 -0
  244. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -0
  245. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -0
  246. package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -0
  247. package/components/common/diagramMain/modals/steps/ConnectionSettings.vue +206 -0
  248. package/components/common/diagramMain/modals/steps/SelectVmkernelAdapter.vue +221 -0
  249. package/components/common/diagramMain/modals/steps/VmkernelAdapterReadyComplete.vue +50 -0
  250. package/components/common/diagramMain/modals/utils/index.ts +9 -0
  251. package/components/common/diagramMain/modals/viewSettings/Info.vue +94 -0
  252. package/components/common/diagramMain/modals/viewSettings/ViewSettings.vue +171 -0
  253. package/components/common/diagramMain/modals/viewSettings/ViewSettingsModal.vue +93 -0
  254. package/components/common/diagramMain/models/enums.ts +27 -0
  255. package/components/common/diagramMain/models/interfaces.ts +586 -0
  256. package/components/common/diagramMain/models/types.ts +9 -0
  257. package/components/common/diagramMain/network/Block.vue +55 -0
  258. package/components/common/diagramMain/network/Contents.vue +238 -0
  259. package/components/common/diagramMain/network/Lines.vue +65 -0
  260. package/components/common/diagramMain/network/Network.vue +117 -0
  261. package/components/common/diagramMain/network/NoNetwork.vue +47 -0
  262. package/components/common/diagramMain/network/SecondBlock.vue +51 -0
  263. package/components/common/diagramMain/port/Port.vue +301 -0
  264. package/components/common/diagramMain/port/Ports.vue +41 -0
  265. package/components/common/diagramMain/switch/Switch.vue +71 -0
  266. package/components/common/diagramMain/switch/SwitchSelected.vue +29 -0
  267. package/components/common/diagramMain/utils/utils.ts +218 -0
  268. package/components/common/feedback/Buttons.vue +232 -0
  269. package/components/common/feedback/Feedback.vue +236 -0
  270. package/components/common/feedback/Message.vue +468 -0
  271. package/components/common/feedback/VisitPortal.vue +54 -0
  272. package/components/common/feedback/config/drawingPanel.ts +31 -0
  273. package/components/common/feedback/config/feedbackTabs.ts +24 -0
  274. package/components/common/feedback/models/interfaces.ts +15 -0
  275. package/components/common/graph/Graph.vue +107 -0
  276. package/components/common/graph/utils/renderGraph.ts +389 -0
  277. package/components/common/headline/Headline.vue +32 -0
  278. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +343 -0
  279. package/components/common/mainNavigationPanel/models/interfaces.ts +6 -0
  280. package/components/common/mainNavigationPanel/models/types.ts +1 -0
  281. package/components/common/modals/Rename.vue +165 -0
  282. package/components/common/modals/config/defaultForm.ts +18 -0
  283. package/components/common/modals/config/renameLabelWidth.ts +3 -0
  284. package/components/common/modals/models/interfaces.ts +5 -0
  285. package/components/common/monitor/advanced/Advanced.vue +149 -0
  286. package/components/common/monitor/advanced/GraphView.vue +200 -0
  287. package/components/common/monitor/advanced/models/interfaces.ts +6 -0
  288. package/components/common/monitor/advanced/models/types.ts +1 -0
  289. package/components/common/monitor/advanced/table/Table.vue +90 -0
  290. package/components/common/monitor/advanced/table/config/performanceDatatable.ts +116 -0
  291. package/components/common/monitor/advanced/table/models/interfaces.ts +12 -0
  292. package/components/common/monitor/advanced/table/models/types.ts +10 -0
  293. package/components/common/monitor/advanced/tools/Tools.vue +281 -0
  294. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +109 -0
  295. package/components/common/monitor/advanced/tools/chartOptionsModal/Notification.vue +33 -0
  296. package/components/common/monitor/advanced/tools/chartOptionsModal/actions/Actions.vue +79 -0
  297. package/components/common/monitor/advanced/tools/chartOptionsModal/actions/config/optionsActions.ts +13 -0
  298. package/components/common/monitor/advanced/tools/chartOptionsModal/actions/saveOptionsModal/SaveOptionsModal.vue +53 -0
  299. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +47 -0
  300. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/Table.vue +104 -0
  301. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/tableConfig.ts +73 -0
  302. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces.ts +15 -0
  303. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/types.ts +7 -0
  304. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +18 -0
  305. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +388 -0
  306. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/config/dateForm.ts +59 -0
  307. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +107 -0
  308. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/config/objectTable.ts +54 -0
  309. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/models/interfaces.ts +4 -0
  310. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/models/types.ts +1 -0
  311. package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/Metrics.vue +32 -0
  312. package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/config/optionsMetrics.ts +104 -0
  313. package/components/common/monitor/advanced/tools/config/advancedToolbar.ts +73 -0
  314. package/components/common/monitor/advanced/tools/models/interfaces.ts +4 -0
  315. package/components/common/monitor/config/getValidDateByOption.ts +14 -0
  316. package/components/common/monitor/models/interfaces.ts +16 -0
  317. package/components/common/monitor/overview/Overview.vue +412 -0
  318. package/components/common/monitor/overview/filters/Filters.vue +210 -0
  319. package/components/common/monitor/overview/filters/config/filterOptions.ts +56 -0
  320. package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +220 -0
  321. package/components/common/monitor/overview/filters/customIntervalModal/config/dateChecker.ts +35 -0
  322. package/components/common/monitor/overview/filters/models/interfaces.ts +6 -0
  323. package/components/common/monitor/overview/filters/models/types.ts +3 -0
  324. package/components/common/perPage/PerPage.vue +51 -0
  325. package/components/common/recursionTree/RecursionTree.vue +201 -0
  326. package/components/common/recursionTree/models/interfaces.ts +19 -0
  327. package/components/common/resource/models/interfaces.ts +9 -0
  328. package/components/common/resource/models/types.ts +1 -0
  329. package/components/common/resource/progressBlock/ProgressBlock.vue +105 -0
  330. package/components/common/resource/simple/Simple.vue +58 -0
  331. package/components/common/resource/simple/models/enums.ts +5 -0
  332. package/components/common/resource/utils.ts +33 -0
  333. package/components/common/select/button/ButtonDropdown.vue +100 -0
  334. package/components/common/select/button/models/interfaces.ts +6 -0
  335. package/components/common/select/radio/RadioGroup.vue +71 -0
  336. package/components/common/select/radio/models/interfaces.ts +10 -0
  337. package/components/common/spiceConsole/Drawer.vue +233 -0
  338. package/components/common/spiceConsole/SpiceConsole.vue +87 -0
  339. package/components/common/spiceConsole/keyboard/Keyboard.vue +402 -0
  340. package/components/common/spiceConsole/keyboard/config/keyboardRows.ts +891 -0
  341. package/components/common/spiceConsole/keyboard/models/interfaces.ts +17 -0
  342. package/components/common/spiceConsole/models/types.ts +1 -0
  343. package/components/common/split/horizontal/Horizontal.vue +306 -0
  344. package/components/common/split/horizontal/models/interfaces.ts +5 -0
  345. package/components/common/split/vertical/Vertical.vue +213 -0
  346. package/components/common/split/vertical/models/interfaces.ts +3 -0
  347. package/components/common/tools/Actions.vue +141 -0
  348. package/components/common/tools/models/interfaces.ts +6 -0
  349. package/components/common/vm/actions/add/Add.vue +654 -0
  350. package/components/common/vm/actions/add/FolderTreeView.vue +83 -0
  351. package/components/common/vm/actions/add/config/capabilities.ts +670 -0
  352. package/components/common/vm/actions/add/customizeHardware/CustomizeHardware.vue +236 -0
  353. package/components/common/vm/actions/add/customizeHardware/config/navItems.ts +19 -0
  354. package/components/common/vm/actions/add/customizeHardware/models/interfaces.ts +7 -0
  355. package/components/common/vm/actions/add/customizeHardware/virtualHardware/VirtualHardware.vue +611 -0
  356. package/components/common/vm/actions/add/customizeHardware/virtualHardware/browseView/BrowseView.vue +203 -0
  357. package/components/common/vm/actions/add/customizeHardware/virtualHardware/browseView/models/interfaces.ts +8 -0
  358. package/components/common/vm/actions/add/customizeHardware/virtualHardware/bus/Bus.vue +86 -0
  359. package/components/common/vm/actions/add/customizeHardware/virtualHardware/bus/config/options.ts +13 -0
  360. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +223 -0
  361. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/config/fileTypes.ts +9 -0
  362. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/config/options.ts +11 -0
  363. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +55 -0
  364. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/models/types.ts +1 -0
  365. package/components/common/vm/actions/add/customizeHardware/virtualHardware/config/binaryOptions.ts +12 -0
  366. package/components/common/vm/actions/add/customizeHardware/virtualHardware/config/dropdownItems.ts +52 -0
  367. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/CoresPerSocket.vue +97 -0
  368. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Cpu.vue +368 -0
  369. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/CpuHotPlug.vue +49 -0
  370. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/CpuModel.vue +220 -0
  371. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Hv.vue +93 -0
  372. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Iommu.vue +52 -0
  373. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/MaxCpu.vue +99 -0
  374. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Pc.vue +54 -0
  375. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Sa.vue +102 -0
  376. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/config/cpuOptions.ts +19 -0
  377. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/shares/Shares.vue +151 -0
  378. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/shares/config/options.ts +28 -0
  379. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/tooltip/Tooltip.vue +58 -0
  380. package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/Limit.vue +210 -0
  381. package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/config/options.ts +28 -0
  382. package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/Memory.vue +278 -0
  383. package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/MemoryHotPlug.vue +53 -0
  384. package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/config/memoryOptions.ts +23 -0
  385. package/components/common/vm/actions/add/customizeHardware/virtualHardware/models/interfaces.ts +125 -0
  386. package/components/common/vm/actions/add/customizeHardware/virtualHardware/models/types.ts +4 -0
  387. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/DiskFile.vue +24 -0
  388. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/Location.vue +171 -0
  389. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/MaximumSize.vue +27 -0
  390. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +447 -0
  391. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/cache/Cache.vue +80 -0
  392. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/cache/config/options.ts +7 -0
  393. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/limitIops/LimitIops.vue +147 -0
  394. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/limitIops/config/options.ts +28 -0
  395. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/mode/Mode.vue +87 -0
  396. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/mode/config/options.ts +18 -0
  397. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/provisioning/Provisioning.vue +87 -0
  398. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/provisioning/config/options.ts +15 -0
  399. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/sharing/Sharing.vue +85 -0
  400. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/sharing/config/options.ts +12 -0
  401. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/Location.vue +141 -0
  402. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +252 -0
  403. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/adapterType/AdapterType.vue +86 -0
  404. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/adapterType/config/options.ts +9 -0
  405. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +140 -0
  406. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/macAddress/config/options.ts +11 -0
  407. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +157 -0
  408. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/config/options.ts +7 -0
  409. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIo.vue +44 -0
  410. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +49 -0
  411. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/config/options.ts +10 -0
  412. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/note/Note.vue +27 -0
  413. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGrid.vue +41 -0
  414. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelection.vue +56 -0
  415. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +65 -0
  416. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newUsbController/config/options.ts +6 -0
  417. package/components/common/vm/actions/add/customizeHardware/virtualHardware/other/InputDevices.vue +21 -0
  418. package/components/common/vm/actions/add/customizeHardware/virtualHardware/other/Other.vue +27 -0
  419. package/components/common/vm/actions/add/customizeHardware/virtualHardware/reservation/Reservation.vue +228 -0
  420. package/components/common/vm/actions/add/customizeHardware/virtualHardware/reservation/config/options.ts +33 -0
  421. package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/Graphics.vue +45 -0
  422. package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/TotalVideoMemory.vue +120 -0
  423. package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/VideoCard.vue +169 -0
  424. package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/config/options.ts +11 -0
  425. package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/model/Model.vue +57 -0
  426. package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/model/config/options.ts +10 -0
  427. package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +82 -0
  428. package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/numberDisplays/config/options.ts +14 -0
  429. package/components/common/vm/actions/add/customizeHardware/vmoptions/Vmoptions.vue +141 -0
  430. package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/BootOptions.vue +110 -0
  431. package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/Menu.vue +45 -0
  432. package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/Secure.vue +45 -0
  433. package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +50 -0
  434. package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/delay/config/config.ts +14 -0
  435. package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +83 -0
  436. package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/firmware/config/config.ts +11 -0
  437. package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/order/Order.vue +195 -0
  438. package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/order/models/interfaces.ts +8 -0
  439. package/components/common/vm/actions/add/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +114 -0
  440. package/components/common/vm/actions/add/customizeHardware/vmoptions/models/interfaces.ts +34 -0
  441. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/CopyPaste.vue +45 -0
  442. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/FileTransfer.vue +49 -0
  443. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/FolderSharing.vue +50 -0
  444. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/PlaybackCompression.vue +49 -0
  445. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/PowerControl.vue +49 -0
  446. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +226 -0
  447. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/imgCompression/ImgCompression.vue +82 -0
  448. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/imgCompression/config/config.ts +14 -0
  449. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/jpegCompression/JpegCompression.vue +82 -0
  450. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/jpegCompression/config/config.ts +12 -0
  451. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +50 -0
  452. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/keymap/config/config.ts +6 -0
  453. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/mouseMode/MouseMode.vue +52 -0
  454. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/mouseMode/config/config.ts +11 -0
  455. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +134 -0
  456. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/password/models/interfaces.ts +5 -0
  457. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/password/utils.ts +12 -0
  458. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/sharePolicy/SharePolicy.vue +52 -0
  459. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/sharePolicy/config/config.ts +11 -0
  460. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +82 -0
  461. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/config/config.ts +12 -0
  462. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/type/Type.vue +82 -0
  463. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/type/config/config.ts +7 -0
  464. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +56 -0
  465. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/config/config.ts +14 -0
  466. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/zlibCompression/ZlibCompression.vue +82 -0
  467. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/zlibCompression/config/config.ts +12 -0
  468. package/components/common/vm/actions/add/customizeHardware/vmoptions/tools/Tools.vue +63 -0
  469. package/components/common/vm/actions/add/models/enums.ts +89 -0
  470. package/components/common/vm/actions/add/models/interfaces.ts +125 -0
  471. package/components/common/vm/actions/add/models/types.ts +63 -0
  472. package/components/common/vm/actions/add/readyToComplete/ReadyToComplete.vue +15 -0
  473. package/components/common/vm/actions/add/select/compatibility/Compatibility.vue +151 -0
  474. package/components/common/vm/actions/add/select/computeResource/ComputeResource.spec.ts +479 -0
  475. package/components/common/vm/actions/add/select/computeResource/ComputeResource.vue +158 -0
  476. package/components/common/vm/actions/add/select/computeResource/TreeView.vue +126 -0
  477. package/components/common/vm/actions/add/select/createType/CreateType.vue +61 -0
  478. package/components/common/vm/actions/add/select/createType/config/items.ts +26 -0
  479. package/components/common/vm/actions/add/select/models/interfaces.ts +32 -0
  480. package/components/common/vm/actions/add/select/models/types.ts +44 -0
  481. package/components/common/vm/actions/add/select/name/Name.vue +163 -0
  482. package/components/common/vm/actions/add/select/os/os.vue +221 -0
  483. package/components/common/vm/actions/add/select/storage/Storage.vue +176 -0
  484. package/components/common/vm/actions/add/select/storage/config/config.ts +148 -0
  485. package/components/common/vm/actions/add/select/storage/models/types.ts +15 -0
  486. package/components/common/vm/actions/add/utils.ts +118 -0
  487. package/components/common/vm/actions/editSettings/EditSettings.vue +312 -0
  488. package/components/common/vm/actions/editSettings/models/types.ts +23 -0
  489. package/components/common/vm/actions/editSettings/utils.ts +48 -0
  490. package/components/common/vm/actions/models/interfaces.ts +6 -0
  491. package/components/common/vm/actions/models/types.ts +11 -0
  492. package/components/common/vm/actions/utils.ts +221 -0
  493. package/components/common/wizards/datastore/add/Add.vue +382 -0
  494. package/components/common/wizards/datastore/add/config/stepItems.ts +160 -0
  495. package/components/common/wizards/datastore/add/local/Local.vue +67 -0
  496. package/components/common/wizards/datastore/add/local/createName/CreateName.vue +159 -0
  497. package/components/common/wizards/datastore/add/local/createName/config/defaultForm.ts +15 -0
  498. package/components/common/wizards/datastore/add/models/interfaces.ts +35 -0
  499. package/components/common/wizards/datastore/add/models/types.ts +14 -0
  500. package/components/common/wizards/datastore/add/nfs/Nfs.vue +91 -0
  501. package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +95 -0
  502. package/components/common/wizards/datastore/add/nfs/accessibility/config/tabsPannel.ts +24 -0
  503. package/components/common/wizards/datastore/add/nfs/accessibility/models/interfaces.ts +9 -0
  504. package/components/common/wizards/datastore/add/nfs/accessibility/models/types.ts +5 -0
  505. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/TablesView.vue +141 -0
  506. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/config/compatibleTable.ts +54 -0
  507. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/config/hostsTableItems.ts +75 -0
  508. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/config/incompatibleTable.ts +68 -0
  509. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/config/tableKeys.ts +15 -0
  510. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -0
  511. package/components/common/wizards/datastore/add/nfs/configuration/config/defaultForm.ts +33 -0
  512. package/components/common/wizards/datastore/add/nfs/configuration/models/interfaces.ts +12 -0
  513. package/components/common/wizards/datastore/add/nfs/configuration/serversList/DeletePopover.vue +97 -0
  514. package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -0
  515. package/components/common/wizards/datastore/add/nfs/configuration/serversList/config/serversListConfig.ts +41 -0
  516. package/components/common/wizards/datastore/add/nfs/configuration/serversList/config/tableKeys.ts +3 -0
  517. package/components/common/wizards/datastore/add/nfs/configuration/serversList/models/interfaces.ts +11 -0
  518. package/components/common/wizards/datastore/add/nfs/configuration/serversList/models/types.ts +1 -0
  519. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -0
  520. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/config/radioOptions.ts +24 -0
  521. package/components/common/wizards/datastore/add/nfs/version/Version.vue +70 -0
  522. package/components/common/wizards/datastore/add/nfs/version/config/versionOptions.ts +20 -0
  523. package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +77 -0
  524. package/components/common/wizards/datastore/add/readyComplete/config/propertiesDetails.ts +165 -0
  525. package/components/common/wizards/datastore/add/readyComplete/models/interfaces.ts +4 -0
  526. package/components/common/wizards/datastore/add/sharedStorm/SharedStorm.vue +85 -0
  527. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +447 -0
  528. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/config/defaultForm.ts +18 -0
  529. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/config/selectOptions.ts +14 -0
  530. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -0
  531. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/config/hostsTable.ts +87 -0
  532. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/config/tableKeys.ts +11 -0
  533. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/models/interfaces.ts +55 -0
  534. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/models/types.ts +14 -0
  535. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -0
  536. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/config/selectOptions.ts +46 -0
  537. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/graphicTooltip/graphicTooltip.vue +64 -0
  538. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/sizeGraphic/sizeGraphic.vue +225 -0
  539. package/components/common/wizards/datastore/add/sharedStorm/version/Version.vue +70 -0
  540. package/components/common/wizards/datastore/add/sharedStorm/version/config/versionOptions.ts +19 -0
  541. package/components/common/wizards/datastore/add/types/Types.vue +79 -0
  542. package/components/common/wizards/datastore/add/types/config/typeOptions.ts +31 -0
  543. package/components/common/wizards/datastore/add/utils.ts +69 -0
  544. package/components/models/interfaces.ts +14 -0
  545. package/composables/deepCopy.ts +21 -0
  546. package/composables/useDiff.ts +15 -0
  547. package/composables/useLocal.ts +36 -0
  548. package/composables/useLocalStorage.ts +45 -0
  549. package/composables/useThrottle.ts +32 -0
  550. package/composables/useUniqueId.ts +5 -0
  551. package/config/regExp.ts +13 -0
  552. package/eslint/index.js +15 -0
  553. package/eslint/no-import-type.js +17 -0
  554. package/eslint/no-invalid-type-prefix.js +32 -0
  555. package/minify.js +51 -0
  556. package/models/composables/useMyFetch/interfaces.ts +4 -0
  557. package/models/composables/useMyFetch/types.ts +1 -0
  558. package/models/enums.ts +21 -0
  559. package/models/interfaces.ts +29 -0
  560. package/models/plugins/date/interfaces.ts +5 -0
  561. package/models/plugins/date/types.ts +1 -0
  562. package/models/plugins/validation/interfaces.ts +21 -0
  563. package/models/plugins/validation/types.ts +1 -0
  564. package/models/store/host/interfaces.ts +38 -0
  565. package/models/store/interfaces.ts +47 -0
  566. package/models/store/network/interfaces.ts +13 -0
  567. package/models/store/storage/interfaces.ts +32 -0
  568. package/models/store/vm/interfaces.ts +87 -0
  569. package/models/types.ts +6 -0
  570. package/nuxt.config.ts +8 -0
  571. package/package.json +39 -0
  572. package/plugins/binary.ts +122 -0
  573. package/plugins/date.ts +179 -0
  574. package/plugins/recursion.ts +199 -0
  575. package/plugins/spice-console/spice.console.ts +128 -0
  576. package/plugins/text.ts +48 -0
  577. package/plugins/validation.ts +172 -0
  578. package/public/favicon.ico +0 -0
  579. package/public/spice-console/application/WorkerProcess.js +3350 -0
  580. package/public/spice-console/application/WorkerProcess_back.js +3144 -0
  581. package/public/spice-console/application/WorkerProcess_meta.js +3103 -0
  582. package/public/spice-console/application/WorkerProcess_reverse.js +3214 -0
  583. package/public/spice-console/application/agent.js +175 -0
  584. package/public/spice-console/application/application.js +641 -0
  585. package/public/spice-console/application/checkActivity.js +50 -0
  586. package/public/spice-console/application/clientgui.js +842 -0
  587. package/public/spice-console/application/clipboard/clipboarddataparser.js +92 -0
  588. package/public/spice-console/application/clipboard/local/localClipboard.js +110 -0
  589. package/public/spice-console/application/clipboard.js +82 -0
  590. package/public/spice-console/application/codec.js +257 -0
  591. package/public/spice-console/application/imagecache.js +81 -0
  592. package/public/spice-console/application/inputmanager.js +270 -0
  593. package/public/spice-console/application/packetfactory.js +202 -0
  594. package/public/spice-console/application/packetfilter.js +103 -0
  595. package/public/spice-console/application/packetprocess.js +75 -0
  596. package/public/spice-console/application/rasteroperation.js +118 -0
  597. package/public/spice-console/application/spiceconnection.js +197 -0
  598. package/public/spice-console/application/stream.js +67 -0
  599. package/public/spice-console/application/virtualmouse.js +109 -0
  600. package/public/spice-console/keymaps/keyevent.js +36 -0
  601. package/public/spice-console/keymaps/keymap.js +229 -0
  602. package/public/spice-console/keymaps/keymapes.js +375 -0
  603. package/public/spice-console/keymaps/keymapesObj.js +317 -0
  604. package/public/spice-console/keymaps/keymapus.js +317 -0
  605. package/public/spice-console/keymaps/scanCodeObjModifier.js +65 -0
  606. package/public/spice-console/keymaps/scanCodeObjProvider.js +60 -0
  607. package/public/spice-console/lib/AsyncConsumer.js +204 -0
  608. package/public/spice-console/lib/AsyncWorker.js +60 -0
  609. package/public/spice-console/lib/CollisionDetector.js +27 -0
  610. package/public/spice-console/lib/DataLogger.js +197 -0
  611. package/public/spice-console/lib/GenericObjectPool.js +152 -0
  612. package/public/spice-console/lib/GlobalPool.js +114 -0
  613. package/public/spice-console/lib/ImageUncompressor.js +138 -0
  614. package/public/spice-console/lib/IntegrationBenchmark.js +64 -0
  615. package/public/spice-console/lib/PacketWorkerIdentifier.js +107 -0
  616. package/public/spice-console/lib/SyncAsyncHandler.js +46 -0
  617. package/public/spice-console/lib/base64.js +298 -0
  618. package/public/spice-console/lib/biginteger.js +1640 -0
  619. package/public/spice-console/lib/bowser.js +276 -0
  620. package/public/spice-console/lib/decoder/dixie.js +7930 -0
  621. package/public/spice-console/lib/decoder/jmuxer.js +2815 -0
  622. package/public/spice-console/lib/displayRouter.js +83 -0
  623. package/public/spice-console/lib/encrypt.js +191 -0
  624. package/public/spice-console/lib/flipper.js +39 -0
  625. package/public/spice-console/lib/graphic.js +1230 -0
  626. package/public/spice-console/lib/graphicdebug.js +223 -0
  627. package/public/spice-console/lib/images/bitmap.js +194 -0
  628. package/public/spice-console/lib/images/jsquic_family.js +84 -0
  629. package/public/spice-console/lib/images/jsquic_rgba.js +343 -0
  630. package/public/spice-console/lib/images/jsquic_uncompress.js +530 -0
  631. package/public/spice-console/lib/images/lz.js +717 -0
  632. package/public/spice-console/lib/images/png.js +275 -0
  633. package/public/spice-console/lib/jgestures.min.js +44 -0
  634. package/public/spice-console/lib/jquery-2.0.3.js +8829 -0
  635. package/public/spice-console/lib/jquery-mousewheel.js +84 -0
  636. package/public/spice-console/lib/jquery-visibility.min.js +2 -0
  637. package/public/spice-console/lib/jsbn.js +578 -0
  638. package/public/spice-console/lib/jsbn2.js +675 -0
  639. package/public/spice-console/lib/lodash.4.0.0.min.js +136 -0
  640. package/public/spice-console/lib/modernizr.js +39 -0
  641. package/public/spice-console/lib/pixastic.js +3244 -0
  642. package/public/spice-console/lib/prettyprint.js +794 -0
  643. package/public/spice-console/lib/prng4.js +64 -0
  644. package/public/spice-console/lib/queue.js +259 -0
  645. package/public/spice-console/lib/rasterEngine.js +907 -0
  646. package/public/spice-console/lib/rng.js +87 -0
  647. package/public/spice-console/lib/runqueue.js +103 -0
  648. package/public/spice-console/lib/sha1.js +124 -0
  649. package/public/spice-console/lib/stuckkeyshandler.js +122 -0
  650. package/public/spice-console/lib/timelapsedetector.js +62 -0
  651. package/public/spice-console/lib/utils.js +327 -0
  652. package/public/spice-console/lib/virtualjoystick.js +370 -0
  653. package/public/spice-console/network/busconnection.js +195 -0
  654. package/public/spice-console/network/clusternodechooser.js +49 -0
  655. package/public/spice-console/network/connectioncontrol.js +60 -0
  656. package/public/spice-console/network/packetcontroller.js +62 -0
  657. package/public/spice-console/network/packetextractor.js +73 -0
  658. package/public/spice-console/network/packetlinkfactory.js +64 -0
  659. package/public/spice-console/network/packetreassembler.js +77 -0
  660. package/public/spice-console/network/reassemblerfactory.js +39 -0
  661. package/public/spice-console/network/sizedefiner.js +86 -0
  662. package/public/spice-console/network/socket.js +120 -0
  663. package/public/spice-console/network/socketqueue.js +95 -0
  664. package/public/spice-console/network/spicechannel.js +310 -0
  665. package/public/spice-console/network/websocketwrapper.js +75 -0
  666. package/public/spice-console/process/busprocess.js +309 -0
  667. package/public/spice-console/process/cursorprocess.js +110 -0
  668. package/public/spice-console/process/displaypreprocess.js +152 -0
  669. package/public/spice-console/process/displayprocess.js +210 -0
  670. package/public/spice-console/process/inputprocess.js +204 -0
  671. package/public/spice-console/process/mainprocess.js +78 -0
  672. package/public/spice-console/process/playbackprocess.js +233 -0
  673. package/public/spice-console/resources/magnifier.png +0 -0
  674. package/public/spice-console/resources/mouse.png +0 -0
  675. package/public/spice-console/resources/mouse_cursor.gif +0 -0
  676. package/public/spice-console/resources/mouse_cursor.png +0 -0
  677. package/public/spice-console/run.js +181 -0
  678. package/public/spice-console/spiceobjects/generated/protocol.js +537 -0
  679. package/public/spice-console/spiceobjects/spiceobjects.js +3474 -0
  680. package/public/spice-console/swcanvas/swcanvas.js +82 -0
  681. package/public/spice-console/tools/generate.php +269 -0
  682. package/public/spice-console/tools/generateKeyboardLayout.php +63 -0
  683. package/public/spice-console/tools/generateSpiceObject.php +81 -0
  684. package/public/spice-console-minify/application/WorkerProcess.min.js +1 -0
  685. package/public/spice-console-minify/application/WorkerProcess_back.min.js +1 -0
  686. package/public/spice-console-minify/application/WorkerProcess_meta.min.js +1 -0
  687. package/public/spice-console-minify/application/WorkerProcess_reverse.min.js +1 -0
  688. package/public/spice-console-minify/application/agent.min.js +1 -0
  689. package/public/spice-console-minify/application/application.min.js +1 -0
  690. package/public/spice-console-minify/application/checkActivity.min.js +1 -0
  691. package/public/spice-console-minify/application/clientgui.min.js +1 -0
  692. package/public/spice-console-minify/application/clipboard/clipboarddataparser.min.js +1 -0
  693. package/public/spice-console-minify/application/clipboard/local/localClipboard.min.js +1 -0
  694. package/public/spice-console-minify/application/clipboard.min.js +1 -0
  695. package/public/spice-console-minify/application/codec.min.js +1 -0
  696. package/public/spice-console-minify/application/imagecache.min.js +1 -0
  697. package/public/spice-console-minify/application/inputmanager.min.js +1 -0
  698. package/public/spice-console-minify/application/packetfactory.min.js +1 -0
  699. package/public/spice-console-minify/application/packetfilter.min.js +1 -0
  700. package/public/spice-console-minify/application/packetprocess.min.js +1 -0
  701. package/public/spice-console-minify/application/rasteroperation.min.js +1 -0
  702. package/public/spice-console-minify/application/spiceconnection.min.js +1 -0
  703. package/public/spice-console-minify/application/stream.min.js +1 -0
  704. package/public/spice-console-minify/application/virtualmouse.min.js +1 -0
  705. package/public/spice-console-minify/keymaps/keyevent.min.js +1 -0
  706. package/public/spice-console-minify/keymaps/keymap.min.js +1 -0
  707. package/public/spice-console-minify/keymaps/keymapes.min.js +1 -0
  708. package/public/spice-console-minify/keymaps/keymapesObj.min.js +1 -0
  709. package/public/spice-console-minify/keymaps/keymapus.min.js +1 -0
  710. package/public/spice-console-minify/keymaps/scanCodeObjModifier.min.js +1 -0
  711. package/public/spice-console-minify/keymaps/scanCodeObjProvider.min.js +1 -0
  712. package/public/spice-console-minify/lib/AsyncConsumer.min.js +1 -0
  713. package/public/spice-console-minify/lib/AsyncWorker.min.js +1 -0
  714. package/public/spice-console-minify/lib/CollisionDetector.min.js +1 -0
  715. package/public/spice-console-minify/lib/DataLogger.min.js +1 -0
  716. package/public/spice-console-minify/lib/GenericObjectPool.min.js +1 -0
  717. package/public/spice-console-minify/lib/GlobalPool.min.js +1 -0
  718. package/public/spice-console-minify/lib/ImageUncompressor.min.js +1 -0
  719. package/public/spice-console-minify/lib/IntegrationBenchmark.min.js +1 -0
  720. package/public/spice-console-minify/lib/PacketWorkerIdentifier.min.js +1 -0
  721. package/public/spice-console-minify/lib/SyncAsyncHandler.min.js +1 -0
  722. package/public/spice-console-minify/lib/base64.min.js +1 -0
  723. package/public/spice-console-minify/lib/biginteger.min.js +1 -0
  724. package/public/spice-console-minify/lib/bowser.min.js +1 -0
  725. package/public/spice-console-minify/lib/decoder/dixie.min.js +5 -0
  726. package/public/spice-console-minify/lib/decoder/jmuxer.min.js +1 -0
  727. package/public/spice-console-minify/lib/displayRouter.min.js +1 -0
  728. package/public/spice-console-minify/lib/encrypt.min.js +1 -0
  729. package/public/spice-console-minify/lib/flipper.min.js +1 -0
  730. package/public/spice-console-minify/lib/graphic.min.js +1 -0
  731. package/public/spice-console-minify/lib/graphicdebug.min.js +1 -0
  732. package/public/spice-console-minify/lib/images/bitmap.min.js +1 -0
  733. package/public/spice-console-minify/lib/images/jsquic_family.min.js +1 -0
  734. package/public/spice-console-minify/lib/images/jsquic_rgba.min.js +1 -0
  735. package/public/spice-console-minify/lib/images/jsquic_uncompress.min.js +1 -0
  736. package/public/spice-console-minify/lib/images/lz.min.js +1 -0
  737. package/public/spice-console-minify/lib/images/png.min.js +1 -0
  738. package/public/spice-console-minify/lib/jgestures.min.js +25 -0
  739. package/public/spice-console-minify/lib/jquery-2.0.3.min.js +25 -0
  740. package/public/spice-console-minify/lib/jquery-mousewheel.min.js +12 -0
  741. package/public/spice-console-minify/lib/jquery-visibility.min.js +2 -0
  742. package/public/spice-console-minify/lib/jsbn.min.js +1 -0
  743. package/public/spice-console-minify/lib/jsbn2.min.js +1 -0
  744. package/public/spice-console-minify/lib/lodash.4.0.0.min.js +6 -0
  745. package/public/spice-console-minify/lib/modernizr.min.js +1 -0
  746. package/public/spice-console-minify/lib/pixastic.min.js +1 -0
  747. package/public/spice-console-minify/lib/prettyprint.min.js +1 -0
  748. package/public/spice-console-minify/lib/prng4.min.js +1 -0
  749. package/public/spice-console-minify/lib/queue.min.js +1 -0
  750. package/public/spice-console-minify/lib/rasterEngine.min.js +1 -0
  751. package/public/spice-console-minify/lib/rng.min.js +1 -0
  752. package/public/spice-console-minify/lib/runqueue.min.js +1 -0
  753. package/public/spice-console-minify/lib/sha1.min.js +1 -0
  754. package/public/spice-console-minify/lib/stuckkeyshandler.min.js +1 -0
  755. package/public/spice-console-minify/lib/timelapsedetector.min.js +1 -0
  756. package/public/spice-console-minify/lib/utils.min.js +1 -0
  757. package/public/spice-console-minify/lib/virtualjoystick.min.js +1 -0
  758. package/public/spice-console-minify/network/busconnection.min.js +1 -0
  759. package/public/spice-console-minify/network/clusternodechooser.min.js +1 -0
  760. package/public/spice-console-minify/network/connectioncontrol.min.js +1 -0
  761. package/public/spice-console-minify/network/packetcontroller.min.js +1 -0
  762. package/public/spice-console-minify/network/packetextractor.min.js +1 -0
  763. package/public/spice-console-minify/network/packetlinkfactory.min.js +1 -0
  764. package/public/spice-console-minify/network/packetreassembler.min.js +1 -0
  765. package/public/spice-console-minify/network/reassemblerfactory.min.js +1 -0
  766. package/public/spice-console-minify/network/sizedefiner.min.js +1 -0
  767. package/public/spice-console-minify/network/socket.min.js +1 -0
  768. package/public/spice-console-minify/network/socketqueue.min.js +1 -0
  769. package/public/spice-console-minify/network/spicechannel.min.js +1 -0
  770. package/public/spice-console-minify/network/websocketwrapper.min.js +1 -0
  771. package/public/spice-console-minify/process/busprocess.min.js +1 -0
  772. package/public/spice-console-minify/process/cursorprocess.min.js +1 -0
  773. package/public/spice-console-minify/process/displaypreprocess.min.js +1 -0
  774. package/public/spice-console-minify/process/displayprocess.min.js +1 -0
  775. package/public/spice-console-minify/process/inputprocess.min.js +1 -0
  776. package/public/spice-console-minify/process/mainprocess.min.js +1 -0
  777. package/public/spice-console-minify/process/playbackprocess.min.js +1 -0
  778. package/public/spice-console-minify/run.min.js +1 -0
  779. package/public/spice-console-minify/spiceobjects/generated/protocol.min.js +1 -0
  780. package/public/spice-console-minify/spiceobjects/spiceobjects.min.js +1 -0
  781. package/public/spice-console-minify/swcanvas/swcanvas.min.js +1 -0
  782. package/tsconfig.json +4 -0
@@ -0,0 +1,3474 @@
1
+ /*
2
+ Copyright (c) 2016 eyeOS
3
+
4
+ This file is part of Open365.
5
+
6
+ Open365 is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU Affero General Public License as
8
+ published by the Free Software Foundation, either version 3 of the
9
+ License, or (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU Affero General Public License for more details.
15
+
16
+ You should have received a copy of the GNU Affero General Public License
17
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+ wdi.SpiceObject = {
21
+
22
+ properties: {},
23
+
24
+ //Methods to demarshall
25
+ // bytesToString: function (bytes, nbytes) {
26
+ // var result = '';
27
+ // var numBytes = nbytes || bytes.length;
28
+ //
29
+ // for (var i = 0; i < numBytes; i++) {
30
+ // result += String.fromCharCode(bytes.shift());
31
+ // }
32
+ //
33
+ // return result;
34
+ // },
35
+
36
+ bytesToString: function (bytes) {
37
+ const bytesUint = new Uint8Array(bytes);
38
+ const decoder = new TextDecoder('utf-8');
39
+ return decoder.decode(bytesUint);
40
+ },
41
+
42
+ bytesToURI: function (data) {
43
+ var blob = new Blob([data], {type: "image/jpeg"});
44
+ return URL.createObjectURL(blob);
45
+ },
46
+
47
+ bytesToStringBE: function (bytes, nbytes) {
48
+ var result = '';
49
+ var numBytes = nbytes || bytes.length;
50
+
51
+ for (var i = numBytes; i >= 0; i--) {
52
+ result += String.fromCharCode(bytes[i]);
53
+ }
54
+
55
+ return result;
56
+ },
57
+
58
+ bytesToInt8: function (bytes) {
59
+ return bytes.shift();
60
+ },
61
+
62
+ bytesToInt8NoAllocate: function (bytes) {
63
+ var data = bytes.getByte(0);
64
+ bytes.eatBytes(1);
65
+ return data;
66
+ },
67
+
68
+ bytesToInt16: function (bytes) {
69
+ var low = bytes.shift();
70
+ var high = bytes.shift();
71
+
72
+ return high * Math.pow(16, 2) + low;
73
+ },
74
+
75
+ bytesToInt16BE: function (bytes) {
76
+ var high = bytes.shift();
77
+ var low = bytes.shift();
78
+
79
+ return high * Math.pow(16, 2) + low;
80
+ },
81
+
82
+ bytesToInt32: function (bytes) {
83
+ var low = wdi.SpiceObject.bytesToInt16(bytes);
84
+ var high = wdi.SpiceObject.bytesToInt16(bytes);
85
+
86
+ return high * Math.pow(16, 4) + low;
87
+ },
88
+
89
+ bytesToInt16NoAllocate: function (bytes) {
90
+ var low = bytes.getByte(0);
91
+ var high = bytes.getByte(1);
92
+ bytes.eatBytes(2);
93
+ return high * Math.pow(16, 2) + low;
94
+ },
95
+
96
+ bytesToInt32NoAllocate: function (bytes) {
97
+ var low = wdi.SpiceObject.bytesToInt16NoAllocate(bytes);
98
+ var high = wdi.SpiceObject.bytesToInt16NoAllocate(bytes);
99
+ return high * Math.pow(16, 4) + low;
100
+ },
101
+
102
+ bytesToInt32BE: function (bytes) {
103
+ var high = wdi.SpiceObject.bytesToInt16BE(bytes);
104
+ var low = wdi.SpiceObject.bytesToInt16BE(bytes);
105
+
106
+ return high * Math.pow(16, 4) + low;
107
+ },
108
+
109
+ bytesToInt64: function (bytes) {
110
+ var low = wdi.SpiceObject.bytesToInt32(bytes).toString(2).lpad('0', 32);
111
+ var high = wdi.SpiceObject.bytesToInt32(bytes).toString(2).lpad('0', 32);
112
+
113
+ return BigInteger.parse(high + low, 2);
114
+ },
115
+
116
+ bytesToInt64NoAllocate: function (bytes) {
117
+ var low = wdi.SpiceObject.bytesToInt32NoAllocate(bytes).toString(2).lpad('0', 32);
118
+ var high = wdi.SpiceObject.bytesToInt32NoAllocate(bytes).toString(2).lpad('0', 32);
119
+
120
+ return BigInteger.parse(high + low, 2);
121
+ },
122
+
123
+ bytesToInt64BE: function (bytes) {
124
+ var high = wdi.SpiceObject.bytesToInt32BE(bytes).toString(2).lpad('0', 32);
125
+ var low = wdi.SpiceObject.bytesToInt32BE(bytes).toString(2).lpad('0', 32);
126
+
127
+ return BigInteger.parse(high + low, 2);
128
+ },
129
+
130
+ bytesToArray: function (arr, blockSize, nblocks, endian) {
131
+ var length = arr.length;
132
+ var numBlocks = nblocks || length;
133
+ var endianness = endian || 'LE';
134
+ var numbers = [];
135
+ var f = null;
136
+
137
+ switch (blockSize) {
138
+ case 8:
139
+ f = wdi.SpiceObject.bytesToInt8;
140
+ break;
141
+ case 16:
142
+ endianness == 'LE' ? f = wdi.SpiceObject.bytesToInt16 : f = wdi.SpiceObject.bytesToInt16BE;
143
+ break;
144
+ case 32:
145
+ endianness == 'LE' ? f = wdi.SpiceObject.bytesToInt32 : f = wdi.SpiceObject.bytesToInt32BE;
146
+ break;
147
+ case 64:
148
+ endianness == 'LE' ? f = wdi.SpiceObject.bytesToInt64 : f = wdi.SpiceObject.bytesToInt64BE;
149
+ break;
150
+ default:
151
+ throw new Exception("Not supported number of bits", 1);
152
+ return false;
153
+ }
154
+
155
+ for (var i = 0; i < numBlocks; i++) {
156
+ numbers = numbers.concat(f(arr));
157
+ }
158
+
159
+ return numbers;
160
+ },
161
+
162
+ int32ToDouble: function (number) {
163
+ var sInt = wdi.SpiceObject.unsignedToSigned(number >> 4);
164
+ var decimals = (number & 0x0f) / 0x0f;
165
+ var result = decimals + sInt;
166
+
167
+ return result;
168
+ },
169
+
170
+ unsignedToSigned: function (number, stride) {
171
+ //TODO: ugly?
172
+ var maxBit = Math.pow(2, stride) - 1;
173
+ if (number & Math.pow(2, stride - 1)) {
174
+ number = -1 * (maxBit - number);
175
+ }
176
+ return number;
177
+ },
178
+
179
+ //Methods to marshall
180
+ arrayToBytes: function (arr, blockSize, nblocks) {
181
+ var length = arr.length;
182
+ var numBlocks = nblocks || length;
183
+ var f = null;
184
+ var rawData = [];
185
+
186
+ switch (blockSize) {
187
+ case 8:
188
+ f = wdi.SpiceObject.numberTo8;
189
+ break;
190
+ case 16:
191
+ f = wdi.SpiceObject.numberTo16;
192
+ break;
193
+ case 32:
194
+ f = wdi.SpiceObject.numberTo32;
195
+ break;
196
+ case 64:
197
+ f = wdi.SpiceObject.numberTo64;
198
+ break;
199
+ default:
200
+ throw new Exception("Not supported number of bits", 1);
201
+ return false;
202
+ }
203
+
204
+ for (var i = 0; i < numBlocks; i++) {
205
+ if (i <= length) {
206
+ rawData = rawData.concat(f(arr[i]));
207
+ } else {
208
+ rawData.push(0x00);
209
+ }
210
+ }
211
+
212
+ return rawData;
213
+ },
214
+
215
+ stringToBytes: function (str) {
216
+ // Code from http://stackoverflow.com/a/18729931
217
+ var utf8 = [];
218
+ for (var i=0; i < str.length; i++) {
219
+ var charcode = str.charCodeAt(i);
220
+ if (charcode < 0x80) utf8.push(charcode);
221
+ else if (charcode < 0x800) {
222
+ utf8.push(0xc0 | (charcode >> 6),
223
+ 0x80 | (charcode & 0x3f));
224
+ }
225
+ else if (charcode < 0xd800 || charcode >= 0xe000) {
226
+ utf8.push(0xe0 | (charcode >> 12),
227
+ 0x80 | ((charcode>>6) & 0x3f),
228
+ 0x80 | (charcode & 0x3f));
229
+ }
230
+ // surrogate pair
231
+ else {
232
+ i++;
233
+ // UTF-16 encodes 0x10000-0x10FFFF by
234
+ // subtracting 0x10000 and splitting the
235
+ // 20 bits of 0x0-0xFFFFF into two halves
236
+ charcode = 0x10000 + (((charcode & 0x3ff)<<10)
237
+ | (str.charCodeAt(i) & 0x3ff));
238
+ utf8.push(0xf0 | (charcode >>18),
239
+ 0x80 | ((charcode>>12) & 0x3f),
240
+ 0x80 | ((charcode>>6) & 0x3f),
241
+ 0x80 | (charcode & 0x3f));
242
+ }
243
+ }
244
+ return utf8;
245
+ },
246
+
247
+ arrayBufferToBytes: function(buffer) {
248
+ return (new Uint8Array(buffer)).toJSArray();
249
+ },
250
+
251
+ stringHexToBytes: function (string) {
252
+ var length = string.length;
253
+ var rawData = [];
254
+
255
+ for (var i = 0; i < length; i += 2) {
256
+ rawData.push(parseInt(string[i] + string[i + 1], 16));
257
+ }
258
+
259
+ return rawData;
260
+ },
261
+
262
+ stringBinaryToBytes: function (string, blocksize) {
263
+ string = string.lpad('0', blocksize);
264
+ var rawData = [];
265
+
266
+ for (var i = blocksize; i >= 8; i -= 8) {
267
+ rawData = rawData.concat(parseInt(string.substr(i - 8, 8), 2));
268
+ }
269
+
270
+ return rawData;
271
+ },
272
+
273
+ stringToBytesPadding: function (string, size) {
274
+ var rawData = [];
275
+ var strsize = string.length;
276
+
277
+ for (var i = 0; i < size; i++) {
278
+ if (size > strsize - 1) {
279
+ rawData.push(0x00);
280
+ } else {
281
+ rawData.push(string.charCodeAt(i));
282
+ }
283
+ }
284
+
285
+ return rawData;
286
+ },
287
+
288
+ numberTo64: function (biginteger) {
289
+ var tmp = this.numberTo32((biginteger & 0xffffffffffffffff) >> 32);
290
+ var tmp2 = this.numberTo32(biginteger & 0x00000000ffffffff);
291
+ var rawData = tmp2.concat(tmp);
292
+ return rawData;
293
+ },
294
+
295
+ numberTo32: function (number) {
296
+ var rawData = new Array(3);
297
+
298
+ for (var i = 0; i < 4; i++) {//iterations because of javascript number size
299
+ rawData[i] = number & (255);//Get only the last byte
300
+ number = number >> 8;//Remove the last byte
301
+ }
302
+
303
+ return rawData;
304
+ },
305
+
306
+ numberTo16: function (number) {
307
+ var rawData = new Array(1);
308
+
309
+ for (var i = 0; i < 2; i++) {
310
+ rawData[i] = number & (255);
311
+ number = number >> 8;
312
+ }
313
+
314
+ return rawData;
315
+ },
316
+
317
+ numberTo8: function (number) {
318
+ return [number & (255)];
319
+ },
320
+
321
+ getMessageProperties: function () {
322
+ return this.properties;
323
+ },
324
+
325
+ getMessageProperty: function (propName, defaultValue) {
326
+ if (this.properties.hasOwnProperty(propName)) {
327
+ return this.properties[propName];
328
+ } else {
329
+ return defaultValue;
330
+ }
331
+ }
332
+ };
333
+
334
+ wdi.SpiceDataHeader = $.spcExtend(wdi.SpiceObject, {
335
+ objectSize:6,
336
+
337
+ init: function(c) {
338
+ c?this.setContent(c):false;
339
+ },
340
+
341
+ setContent: function(c) {
342
+ //this.serial = c.serial;
343
+ this.type = c.type;
344
+ this.size = c.size;
345
+ //this.sub_list = c.sub_list;
346
+ },
347
+
348
+ marshall: function() {
349
+ this.rawData = [];
350
+ this.rawData = this.rawData.concat(
351
+ //this.numberTo64(this.serial),
352
+ this.numberTo16(this.type),
353
+ this.numberTo32(this.size)
354
+ //sthis.numberTo32(this.sub_list)W
355
+ );
356
+ return this.rawData;
357
+ },
358
+
359
+ demarshall: function(queue) {
360
+ //this.serial = this.bytesToInt64(queue.shift(8));
361
+ this.type = this.bytesToInt16NoAllocate(queue);
362
+ this.size = this.bytesToInt32NoAllocate(queue);
363
+ //this.sub_list = this.bytesToInt32(queue.shift(4));
364
+
365
+ return this;
366
+ }
367
+ });
368
+
369
+ wdi.SpiceCompatibility = $.spcExtend(wdi.SpiceObject, {
370
+ init: function(c) {
371
+ c ? this.setContent(c) : false;
372
+ },
373
+
374
+ setContent: function(c) {
375
+ this.channel_type = c.channel_type;
376
+ this.caps = c.caps;
377
+ },
378
+
379
+ marshall: function() {
380
+ this.rawData = [];
381
+ this.rawData = [
382
+ this.numberTo8(this.channel_type),
383
+ ...this.caps.map(cap => {
384
+ return this.numberTo32(cap)
385
+ })
386
+ ];
387
+ return this.rawData;
388
+ },
389
+
390
+ demarshall: function(_queue) {
391
+ // this.caps = this.bytesToInt32NoAllocate(queue);
392
+ //
393
+ // return this;
394
+ }
395
+ });
396
+
397
+ wdi.SpiceLinkAuthMechanism = $.spcExtend(wdi.SpiceObject, {
398
+ objectSize:4,
399
+
400
+ init: function(c) {
401
+ c?this.setContent(c):false;
402
+ },
403
+
404
+ setContent: function(c) {
405
+ this.auth_mechanism = c.auth_mechanism;
406
+ },
407
+
408
+ marshall: function() {
409
+ this.rawData = [];
410
+ this.rawData = this.rawData.concat(
411
+ this.numberTo32(this.auth_mechanism)
412
+ );
413
+ return this.rawData;
414
+ },
415
+
416
+ demarshall: function(queue) {
417
+ this.expectedSize = arguments[1] || this.objectSize;
418
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode:3});
419
+ this.auth_mechanism = this.bytesToInt32NoAllocate(queue);
420
+ 'customDemarshall' in this?this.customDemarshall(queue):false;
421
+
422
+ return this;
423
+ }
424
+ });
425
+
426
+ wdi.SpiceLinkReply = $.spcExtend(wdi.SpiceObject, {
427
+ objectSize:178,
428
+
429
+ init: function(c) {
430
+ c?this.setContent(c):false;
431
+ },
432
+
433
+ setContent: function(c) {
434
+ this.error = c.error;
435
+ this.pub_key = c.pub_key;
436
+ this.num_common_caps = c.num_common_caps;
437
+ this.num_channel_caps = c.num_channel_caps;
438
+ this.caps_offset = c.caps_offset;
439
+ },
440
+
441
+ marshall: function() {
442
+ this.rawData = [];
443
+ this.rawData = this.rawData.concat(
444
+ this.numberTo32(this.error),
445
+ this.arrayToBytes(this.pub_key, 8),
446
+ this.numberTo32(this.num_common_caps),
447
+ this.numberTo32(this.num_channel_caps),
448
+ this.numberTo32(this.caps_offset)
449
+ );
450
+ return this.rawData;
451
+ },
452
+
453
+ demarshall: function(queue) {
454
+ this.expectedSize = arguments[1] || this.objectSize;
455
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode:3});
456
+ this.error = this.bytesToInt32NoAllocate(queue);
457
+ this.pub_key = this.bytesToArray(queue.shift(this.expectedSize), 8);
458
+ this.num_common_caps = this.bytesToInt32NoAllocate(queue);
459
+ this.num_channel_caps = this.bytesToInt32NoAllocate(queue);
460
+ this.caps_offset = this.bytesToInt32NoAllocate(queue);
461
+ 'customDemarshall' in this?this.customDemarshall(queue):false;
462
+
463
+ return this;
464
+ }
465
+ });
466
+
467
+ wdi.SpiceLinkEncryptedTicket = $.spcExtend(wdi.SpiceObject, {
468
+ objectSize:128,
469
+
470
+ init: function(c) {
471
+ c?this.setContent(c):false;
472
+ },
473
+
474
+ setContent: function(c) {
475
+ this.encrypted_data = c.encrypted_data;
476
+ },
477
+
478
+ marshall: function() {
479
+ this.rawData = [];
480
+ this.rawData = this.rawData.concat(
481
+ this.stringToBytes(this.encrypted_data, 8)
482
+ );
483
+ return this.rawData;
484
+ },
485
+
486
+ demarshall: function(queue) {
487
+ this.expectedSize = arguments[1] || this.objectSize;
488
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode:3});
489
+ this.encrypted_data = this.bytesToArray(queue.shift(this.expectedSize), 8);
490
+ 'customDemarshall' in this?this.customDemarshall(queue):false;
491
+
492
+ return this;
493
+ }
494
+ });
495
+
496
+ wdi.SpiceLinkMess = $.spcExtend(wdi.SpiceObject, {
497
+ objectSize:18,
498
+
499
+ init: function(c) {
500
+ c?this.setContent(c):false;
501
+ },
502
+
503
+ setContent: function(c) {
504
+ this.connection_id = c.connection_id;
505
+ this.channel_type = c.channel_type;
506
+ this.channel_id = c.channel_id;
507
+ this.num_common_caps = c.num_common_caps;
508
+ this.num_channel_caps = c.num_channel_caps;
509
+ this.caps_offset = c.caps_offset;
510
+ this.common_caps = c.common_caps;
511
+ this.channel_caps = c.channel_caps;
512
+ },
513
+
514
+ marshall: function() {
515
+ this.rawData = [];
516
+ this.rawData = this.rawData.concat(
517
+ this.numberTo32(this.connection_id),
518
+ this.numberTo8(this.channel_type),
519
+ this.numberTo8(this.channel_id),
520
+ this.numberTo32(this.num_common_caps),
521
+ this.numberTo32(this.num_channel_caps),
522
+ this.numberTo32(this.caps_offset)
523
+ );
524
+ if(this.num_common_caps > 0) {
525
+ this.rawData = this.rawData.concat(this.numberTo32(this.common_caps));
526
+ }
527
+ if(this.num_channel_caps > 0) {
528
+ this.rawData = this.rawData.concat(this.numberTo32(this.channel_caps));
529
+ }
530
+ return this.rawData;
531
+ },
532
+
533
+ demarshall: function(queue) {
534
+ this.expectedSize = arguments[1] || this.objectSize;
535
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode:3});
536
+ this.connection_id = this.bytesToInt32NoAllocate(queue);
537
+ this.channel_type = this.bytesToInt8NoAllocate(queue);
538
+ this.channel_id = this.bytesToInt8NoAllocate(queue);
539
+ this.num_common_caps = this.bytesToInt32NoAllocate(queue);
540
+ this.num_channel_caps = this.bytesToInt32NoAllocate(queue);
541
+ this.caps_offset = this.bytesToInt32NoAllocate(queue);
542
+ 'customDemarshall' in this?this.customDemarshall(queue):false;
543
+
544
+ return this;
545
+ }
546
+ });
547
+
548
+ wdi.SpiceLinkHeader = $.spcExtend(wdi.SpiceObject, {
549
+ objectSize:16,
550
+
551
+ init: function(c) {
552
+ c?this.setContent(c):false;
553
+ },
554
+
555
+ setContent: function(c) {
556
+ this.magic = c.magic;
557
+ this.major_version = c.major_version;
558
+ this.minor_version = c.minor_version;
559
+ this.size = c.size;
560
+ },
561
+
562
+ marshall: function() {
563
+ this.rawData = [];
564
+ this.rawData = this.rawData.concat(
565
+ this.numberTo32(this.magic),
566
+ this.numberTo32(this.major_version),
567
+ this.numberTo32(this.minor_version),
568
+ this.numberTo32(this.size)
569
+ );
570
+ return this.rawData;
571
+ },
572
+
573
+ demarshall: function(queue) {
574
+ this.expectedSize = arguments[1] || this.objectSize;
575
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode:3});
576
+ this.magic = this.bytesToInt32NoAllocate(queue);
577
+ this.major_version = this.bytesToInt32NoAllocate(queue);
578
+ this.minor_version = this.bytesToInt32NoAllocate(queue);
579
+ this.size = this.bytesToInt32NoAllocate(queue);
580
+ 'customDemarshall' in this?this.customDemarshall(queue):false;
581
+
582
+ return this;
583
+ }
584
+ });
585
+
586
+ wdi.RedMigrateData = $.spcExtend(wdi.SpiceObject, {
587
+ objectSize: 0,
588
+
589
+ init: function (c) {
590
+ c ? this.setContent(c) : false;
591
+ },
592
+
593
+ setContent: function (c) {
594
+ this.vector = c.vector;
595
+ },
596
+
597
+ marshall: function () {
598
+ this.rawData = [];
599
+ this.rawData = this.rawData.concat(
600
+ this.arrayToBytes(this.vector, 8)
601
+ );
602
+
603
+ return this.rawData;
604
+ },
605
+
606
+ demarshall: function (queue, expSize) {
607
+ this.expectedSize = expSize || this.objectSize;
608
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
609
+ this.vector = this.bytesToArray(queue.shift(this.expectedSize), 8);
610
+
611
+
612
+ return this;
613
+ }
614
+ });
615
+
616
+ wdi.RedMainInit = $.spcExtend(wdi.SpiceObject, {
617
+ objectSize: 32,
618
+
619
+ init: function (c) {
620
+ c ? this.setContent(c) : false;
621
+ },
622
+
623
+ setContent: function (c) {
624
+ this.session_id = c.session_id;
625
+ this.display_channels_hint = c.display_channels_hint;
626
+ this.supported_mouse_modes = c.supported_mouse_modes;
627
+ this.current_mouse_mode = c.current_mouse_mode;
628
+ this.agent_connected = c.agent_connected;
629
+ this.agent_tokens = c.agent_tokens;
630
+ this.multi_media_time = c.multi_media_time;
631
+ this.ram_hint = c.ram_hint;
632
+ },
633
+
634
+ marshall: function () {
635
+ this.rawData = [];
636
+ this.rawData = this.rawData.concat(
637
+ this.numberTo32(this.session_id),
638
+ this.numberTo32(this.display_channels_hint),
639
+ this.numberTo32(this.supported_mouse_modes),
640
+ this.numberTo32(this.current_mouse_mode),
641
+ this.numberTo32(this.agent_connected),
642
+ this.numberTo32(this.agent_tokens),
643
+ this.numberTo32(this.multi_media_time),
644
+ this.numberTo32(this.ram_hint)
645
+ );
646
+ return this.rawData;
647
+ },
648
+
649
+ demarshall: function (queue, expSize) {
650
+ this.expectedSize = expSize || this.objectSize;
651
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
652
+ this.session_id = this.bytesToInt32NoAllocate(queue);
653
+ this.display_channels_hint = this.bytesToInt32NoAllocate(queue);
654
+ this.supported_mouse_modes = this.bytesToInt32NoAllocate(queue);
655
+ this.current_mouse_mode = this.bytesToInt32NoAllocate(queue);
656
+ this.agent_connected = this.bytesToInt32NoAllocate(queue);
657
+ this.agent_tokens = this.bytesToInt32NoAllocate(queue);
658
+ this.multi_media_time = this.bytesToInt32NoAllocate(queue);
659
+ this.ram_hint = this.bytesToInt32NoAllocate(queue);
660
+
661
+
662
+ return this;
663
+ }
664
+ });
665
+
666
+ wdi.SpiceMsgMainAgentConnected = $.spcExtend(wdi.SpiceObject, {
667
+ objectSize: 0,
668
+
669
+ init: function (c) {
670
+ c ? this.setContent(c) : false;
671
+ },
672
+
673
+ setContent: function (c) {
674
+
675
+ },
676
+
677
+
678
+
679
+ demarshall: function (queue, expSize) {
680
+ this.expectedSize = expSize || this.objectSize;
681
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
682
+
683
+
684
+ return this;
685
+ }
686
+ });
687
+
688
+ wdi.SpiceChannelsList = $.spcExtend(wdi.SpiceObject, {
689
+ objectSize: 4,
690
+
691
+ init: function (c) {
692
+ c ? this.setContent(c) : false;
693
+ },
694
+
695
+ setContent: function (c) {
696
+ this.num_of_channels = c.num_of_channels;
697
+ this.channels = c.channels;
698
+ },
699
+
700
+ marshall: function () {
701
+ this.rawData = [];
702
+ this.rawData = this.rawData.concat(
703
+ this.numberTo32(this.num_of_channels),
704
+ this.arrayToBytes(this.channels, 16)
705
+ );
706
+ return this.rawData;
707
+ },
708
+
709
+ demarshall: function (queue, expSize) {
710
+ this.expectedSize = expSize || this.objectSize;
711
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
712
+ this.num_of_channels = this.bytesToInt32NoAllocate(queue);
713
+ this.channels = this.bytesToArray(queue.shift(this.expectedSize), 16);
714
+
715
+
716
+ return this;
717
+ }
718
+ });
719
+
720
+ wdi.RedSetAck = $.spcExtend(wdi.SpiceObject, {
721
+ objectSize: 8,
722
+
723
+ init: function (c) {
724
+ c ? this.setContent(c) : false;
725
+ },
726
+
727
+ setContent: function (c) {
728
+ this.generation = c.generation;
729
+ this.window = c.window;
730
+ },
731
+
732
+ marshall: function () {
733
+ this.rawData = [];
734
+ this.rawData = this.rawData.concat(
735
+ this.numberTo32(this.generation),
736
+ this.numberTo32(this.window)
737
+ );
738
+ return this.rawData;
739
+ },
740
+
741
+ demarshall: function (queue, expSize) {
742
+ this.expectedSize = expSize || this.objectSize;
743
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
744
+ this.generation = this.bytesToInt32NoAllocate(queue);
745
+ this.window = this.bytesToInt32NoAllocate(queue);
746
+
747
+
748
+ return this;
749
+ }
750
+ });
751
+
752
+ //Exactly the same as RedPong
753
+ wdi.RedPing = $.spcExtend(wdi.SpiceObject, {
754
+ objectSize: 12,
755
+
756
+ init: function (c) {
757
+ c ? this.setContent(c) : false;
758
+ },
759
+
760
+ setContent: function (c) {
761
+ this.id = c.id;
762
+ this.time = c.time;
763
+ },
764
+
765
+ marshall: function () {
766
+ this.rawData = [];
767
+ this.rawData = this.rawData.concat(
768
+ this.numberTo32(this.id),
769
+ this.numberTo64(this.time)
770
+ );
771
+ return this.rawData;
772
+ },
773
+
774
+ demarshall: function (queue, expSize) {
775
+ this.expectedSize = expSize || this.objectSize;
776
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
777
+ this.id = this.bytesToInt32NoAllocate(queue);
778
+ this.time = this.bytesToInt64NoAllocate(queue);
779
+
780
+ if (this.expectedSize > 12) {
781
+ queue.shift(this.expectedSize - 12);
782
+ }
783
+
784
+
785
+ return this;
786
+ }
787
+ });
788
+
789
+ wdi.RedMigrate = $.spcExtend(wdi.SpiceObject, {
790
+ objectSize: 4,
791
+
792
+ init: function (c) {
793
+ c ? this.setContent(c) : false;
794
+ },
795
+
796
+ setContent: function (c) {
797
+ this.flags = c.flags;
798
+ },
799
+
800
+ marshall: function () {
801
+ this.rawData = [];
802
+ this.rawData = this.rawData.concat(
803
+ this.numberTo32(this.flags)
804
+ );
805
+ return this.rawData;
806
+ },
807
+
808
+ demarshall: function (queue, expSize) {
809
+ this.expectedSize = expSize || this.objectSize;
810
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
811
+ this.flags = this.bytesToInt32NoAllocate(queue);
812
+
813
+
814
+ return this;
815
+ }
816
+ });
817
+
818
+ wdi.RedWaitForChannel = $.spcExtend(wdi.SpiceObject, {
819
+ objectSize: 10,
820
+
821
+ init: function (c) {
822
+ c ? this.setContent(c) : false;
823
+ },
824
+
825
+ setContent: function (c) {
826
+ this.type = c.type;
827
+ this.id = c.id;
828
+ this.serial = c.serial;
829
+ },
830
+
831
+ marshall: function () {
832
+ this.rawData = [];
833
+ this.rawData = this.rawData.concat(
834
+ this.numberTo8(this.type),
835
+ this.numberTo8(this.id),
836
+ this.numberTo64(this.serial)
837
+ );
838
+ return this.rawData;
839
+ },
840
+
841
+ demarshall: function (queue, expSize) {
842
+ this.expectedSize = expSize || this.objectSize;
843
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
844
+ this.type = this.bytesToInt8NoAllocate(queue);
845
+ this.id = this.bytesToInt8NoAllocate(queue);
846
+ this.serial = this.bytesToInt64NoAllocate(queue);
847
+
848
+
849
+ return this;
850
+ }
851
+ });
852
+
853
+ wdi.RedWaitForChannels = $.spcExtend(wdi.SpiceObject, {
854
+ objectSize: 1,
855
+
856
+ init: function (c) {
857
+ c ? this.setContent(c) : false;
858
+ },
859
+
860
+ setContent: function (c) {
861
+ this.wait_count = c.wait_count;
862
+ this.wait_list = c.wait_list;
863
+ },
864
+
865
+ marshall: function () {
866
+ this.rawData = [];
867
+ this.rawData = this.rawData.concat(
868
+ this.numberTo8(this.wait_count),
869
+ this.arrayToBytes(this.wait_list, 8)
870
+ );
871
+ return this.rawData;
872
+ },
873
+
874
+ demarshall: function (queue, expSize) {
875
+ this.expectedSize = expSize || this.objectSize;
876
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
877
+ this.wait_count = this.bytesToInt8NoAllocate(queue);
878
+ this.wait_list = this.bytesToArray(queue.shift(this.expectedSize), 8);
879
+
880
+
881
+ return this;
882
+ }
883
+ });
884
+
885
+ wdi.RedDisconnect = $.spcExtend(wdi.SpiceObject, {
886
+ objectSize: 12,
887
+
888
+ init: function (c) {
889
+ c ? this.setContent(c) : false;
890
+ },
891
+
892
+ setContent: function (c) {
893
+ this.time_stamp = c.time_stamp;
894
+ this.reason = c.reason;
895
+ },
896
+
897
+ marshall: function () {
898
+ this.rawData = [];
899
+ this.rawData = this.rawData.concat(
900
+ this.numberTo64(this.time_stamp),
901
+ this.numberTo32(this.reason)
902
+ );
903
+ return this.rawData;
904
+ },
905
+
906
+ demarshall: function (queue, expSize) {
907
+ this.expectedSize = expSize || this.objectSize;
908
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
909
+ this.time_stamp = this.bytesToInt64NoAllocate(queue);
910
+ this.reason = this.bytesToInt32NoAllocate(queue);
911
+
912
+
913
+ return this;
914
+ }
915
+ });
916
+
917
+ wdi.RedMigrationBegin = $.spcExtend(wdi.SpiceObject, {
918
+ objectSize: 4,
919
+
920
+ init: function (c) {
921
+ c ? this.setContent(c) : false;
922
+ },
923
+
924
+ setContent: function (c) {
925
+ this.port = c.port;
926
+ this.sport = c.sport;
927
+ this.host_name = c.host_name;
928
+ },
929
+
930
+ marshall: function () {
931
+ this.rawData = [];
932
+ this.rawData = this.rawData.concat(
933
+ this.numberTo16(this.port),
934
+ this.numberTo16(this.sport),
935
+ this.arrayToBytes(this.host_name, 8)
936
+ );
937
+ return this.rawData;
938
+ },
939
+
940
+ demarshall: function (queue, expSize) {
941
+ this.expectedSize = expSize || this.objectSize;
942
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
943
+ this.port = this.bytesToInt16NoAllocate(queue);
944
+ this.sport = this.bytesToInt16NoAllocate(queue);
945
+ this.host_name = this.bytesToArray(queue.shift(this.expectedSize), 8);
946
+
947
+
948
+ return this;
949
+ }
950
+ });
951
+
952
+ wdi.RedNotify = $.spcExtend(wdi.SpiceObject, {
953
+ objectSize: 25,
954
+
955
+ init: function (c) {
956
+ c ? this.setContent(c) : false;
957
+ },
958
+
959
+ setContent: function (c) {
960
+ this.time_stamp = c.time_stamp;
961
+ this.severity = c.severity;
962
+ this.visibility = c.visibility;
963
+ this.what = c.what;
964
+ this.message_len = c.message_len;
965
+ this.message = c.message;
966
+ this.zero = c.zero;
967
+ },
968
+
969
+ marshall: function () {
970
+ this.rawData = [];
971
+ this.rawData = this.rawData.concat(
972
+ this.numberTo64(this.time_stamp),
973
+ this.numberTo32(this.severity),
974
+ this.numberTo32(this.visibility),
975
+ this.numberTo32(this.what),
976
+ this.numberTo32(this.message_len),
977
+ this.arrayToBytes(this.message, 8),
978
+ this.numberTo8(this.zero)
979
+ );
980
+ return this.rawData;
981
+ },
982
+
983
+ demarshall: function (queue, expSize) {
984
+ this.expectedSize = expSize || this.objectSize;
985
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
986
+ this.time_stamp = this.bytesToInt64NoAllocate(queue);
987
+ this.severity = this.bytesToInt32NoAllocate(queue);
988
+ this.visibility = this.bytesToInt32NoAllocate(queue);
989
+ this.what = this.bytesToInt32NoAllocate(queue);
990
+ this.message_len = this.bytesToInt32NoAllocate(queue);
991
+ this.message = this.bytesToString(queue.shift(this.message_len));
992
+ this.zero = this.bytesToInt8NoAllocate(queue);
993
+
994
+
995
+ return this;
996
+ }
997
+ });
998
+
999
+ wdi.RedMode = $.spcExtend(wdi.SpiceObject, {
1000
+ objectSize: 12,
1001
+
1002
+ init: function (c) {
1003
+ c ? this.setContent(c) : false;
1004
+ },
1005
+
1006
+ setContent: function (c) {
1007
+ this.width = c.width;
1008
+ this.height = c.height;
1009
+ this.depth = c.depth;
1010
+ },
1011
+
1012
+ marshall: function () {
1013
+ this.rawData = [];
1014
+ this.rawData = this.rawData.concat(
1015
+ this.numberTo32(this.width),
1016
+ this.numberTo32(this.height),
1017
+ this.numberTo32(this.depth)
1018
+ );
1019
+ return this.rawData;
1020
+ },
1021
+
1022
+ demarshall: function (queue, expSize) {
1023
+ this.expectedSize = expSize || this.objectSize;
1024
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
1025
+ this.width = this.bytesToInt32NoAllocate(queue);
1026
+ this.height = this.bytesToInt32NoAllocate(queue);
1027
+ this.depth = this.bytesToInt32NoAllocate(queue);
1028
+
1029
+
1030
+ return this;
1031
+ }
1032
+ });
1033
+
1034
+ wdi.SpiceCDisplayInit = $.spcExtend(wdi.SpiceObject, {
1035
+ objectSize: 14,
1036
+
1037
+ init: function (c) {
1038
+ c ? this.setContent(c) : false;
1039
+ },
1040
+
1041
+ setContent: function (c) {
1042
+ this.pixmap_cache_id = c.pixmap_cache_id;
1043
+ this.pixmap_cache_size = c.pixmap_cache_size;
1044
+ this.glz_dictionary_id = c.glz_dictionary_id;
1045
+ this.glz_dictionary_window_size = c.glz_dictionary_window_size;
1046
+ },
1047
+
1048
+ marshall: function () {
1049
+ this.rawData = [];
1050
+ this.rawData = this.rawData.concat(
1051
+ this.numberTo8(this.pixmap_cache_id),
1052
+ this.numberTo8(0), //LSB
1053
+ this.numberTo8(127),
1054
+ this.numberTo8(0),
1055
+ this.numberTo8(0),
1056
+ this.numberTo8(0),
1057
+ this.numberTo8(0),
1058
+ this.numberTo8(0),
1059
+ this.numberTo8(0), //MSB
1060
+ this.numberTo8(this.glz_dictionary_id),
1061
+ this.numberTo32(this.glz_dictionary_window_size)
1062
+ );
1063
+ return this.rawData;
1064
+ },
1065
+
1066
+ demarshall: function (queue, expSize) {
1067
+ this.expectedSize = expSize || this.objectSize;
1068
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1069
+ this.pixmap_cache_id = this.bytesToInt8NoAllocate(queue);
1070
+ this.pixmap_cache_size = this.bytesToInt64NoAllocate(queue);
1071
+ this.glz_dictionary_id = this.bytesToInt8NoAllocate(queue);
1072
+ this.glz_dictionary_window_size = this.bytesToInt32NoAllocate(queue);
1073
+
1074
+
1075
+ return this;
1076
+ }
1077
+ });
1078
+
1079
+ wdi.SpiceSurfaceDestroy = $.spcExtend(wdi.SpiceObject, {
1080
+ objectSize: 4,
1081
+
1082
+ init: function (c) {
1083
+ c ? this.setContent(c) : false;
1084
+ },
1085
+
1086
+ setContent: function (c) {
1087
+ this.surface_id = c.surface_id;
1088
+ },
1089
+
1090
+ marshall: function () {
1091
+ this.rawData = [];
1092
+ this.rawData = this.rawData.concat(
1093
+ this.numberTo32(this.surface_id)
1094
+ );
1095
+ return this.rawData;
1096
+ },
1097
+
1098
+ demarshall: function (queue, expSize) {
1099
+ this.expectedSize = expSize || this.objectSize;
1100
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1101
+ this.surface_id = this.bytesToInt32NoAllocate(queue);
1102
+
1103
+
1104
+ return this;
1105
+ }
1106
+ });
1107
+
1108
+ wdi.SpiceSurface = $.spcExtend(wdi.SpiceObject, {
1109
+ objectSize: 20,
1110
+
1111
+ init: function (c) {
1112
+ c ? this.setContent(c) : false;
1113
+ },
1114
+
1115
+ setContent: function (c) {
1116
+ this.surface_id = c.surface_id;
1117
+ this.width = c.width;
1118
+ this.height = c.height;
1119
+ this.format = c.format;
1120
+ this.flags = c.flags;
1121
+ },
1122
+
1123
+ marshall: function () {
1124
+ this.rawData = [];
1125
+ this.rawData = this.rawData.concat(
1126
+ this.numberTo32(this.surface_id),
1127
+ this.numberTo32(this.width),
1128
+ this.numberTo32(this.height),
1129
+ this.numberTo32(this.format),
1130
+ this.numberTo32(this.flags)
1131
+ );
1132
+ return this.rawData;
1133
+ },
1134
+
1135
+ demarshall: function (queue, expSize) {
1136
+ this.expectedSize = expSize || this.objectSize;
1137
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1138
+ this.surface_id = this.bytesToInt32NoAllocate(queue);
1139
+ this.width = this.bytesToInt32NoAllocate(queue);
1140
+ this.height = this.bytesToInt32NoAllocate(queue);
1141
+ this.format = this.bytesToInt32NoAllocate(queue);
1142
+ this.flags = this.bytesToInt32NoAllocate(queue);
1143
+
1144
+
1145
+ return this;
1146
+ }
1147
+ });
1148
+
1149
+ wdi.SpicePath = $.spcExtend(wdi.SpiceObject, {
1150
+ objectSize: 4,
1151
+
1152
+
1153
+ marshall: function () {
1154
+ },
1155
+
1156
+ demarshall: function (queue, expSize) {
1157
+ this.expectedSize = expSize || this.objectSize;
1158
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1159
+ var num = this.num_segments = this.bytesToInt32NoAllocate(queue);
1160
+ this.segments = [];
1161
+
1162
+ for (var i= 0; i < num;i++) {
1163
+ this.segments[i] = new wdi.SpicePathSeg().demarshall(queue);
1164
+ }
1165
+
1166
+ return this;
1167
+ }
1168
+ });
1169
+
1170
+ wdi.SpicePathSeg = $.spcExtend(wdi.SpiceObject, {
1171
+ objectSize: 8,
1172
+
1173
+
1174
+ marshall: function () {
1175
+ },
1176
+
1177
+ demarshall: function (queue, expSize) {
1178
+ this.expectedSize = expSize || this.objectSize;
1179
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1180
+ this.flags = this.bytesToInt8NoAllocate(queue);
1181
+ var count = this.count = this.bytesToInt32NoAllocate(queue);
1182
+ this.points = [];
1183
+ for(var i=0;i<count;i++) {
1184
+ this.points[i] = new wdi.SpicePointFix().demarshall(queue);
1185
+ }
1186
+
1187
+ return this;
1188
+ }
1189
+ });
1190
+
1191
+ wdi.SpicePoint = $.spcExtend(wdi.SpiceObject, {
1192
+ objectSize: 8,
1193
+
1194
+ init: function (c) {
1195
+ c ? this.setContent(c) : false;
1196
+ },
1197
+
1198
+ setContent: function (c) {
1199
+ this.x = c.x;
1200
+ this.y = c.y;
1201
+ },
1202
+
1203
+ marshall: function () {
1204
+ this.rawData = [];
1205
+ this.rawData = this.rawData.concat(
1206
+ this.numberTo32(this.x),
1207
+ this.numberTo32(this.y)
1208
+ );
1209
+ return this.rawData;
1210
+ },
1211
+
1212
+ demarshall: function (queue, expSize) {
1213
+ this.expectedSize = expSize || this.objectSize;
1214
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1215
+ this.x = this.unsignedToSigned(this.bytesToInt32(queue.shift(4)), 32);
1216
+ this.y = this.unsignedToSigned(this.bytesToInt32(queue.shift(4)), 32);
1217
+
1218
+
1219
+ return this;
1220
+ }
1221
+ });
1222
+
1223
+ wdi.SpicePoint16 = $.spcExtend(wdi.SpiceObject, {
1224
+ objectSize: 4,
1225
+
1226
+ init: function (c) {
1227
+ c ? this.setContent(c) : false;
1228
+ },
1229
+
1230
+ setContent: function (c) {
1231
+ this.x = c.x;
1232
+ this.y = c.y;
1233
+ },
1234
+
1235
+ marshall: function () {
1236
+ this.rawData = [];
1237
+ this.rawData = this.rawData.concat(
1238
+ this.numberTo16(this.x),
1239
+ this.numberTo16(this.y)
1240
+ );
1241
+ return this.rawData;
1242
+ },
1243
+
1244
+ demarshall: function (queue, expSize) {
1245
+ this.expectedSize = expSize || this.objectSize;
1246
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1247
+ this.x = this.bytesToInt16NoAllocate(queue);
1248
+ this.y = this.bytesToInt16NoAllocate(queue);
1249
+
1250
+
1251
+ return this;
1252
+ }
1253
+ });
1254
+
1255
+ wdi.SpicePointFix = $.spcExtend(wdi.SpiceObject, {
1256
+ objectSize: 8,
1257
+
1258
+ init: function (c) {
1259
+ c ? this.setContent(c) : false;
1260
+ },
1261
+
1262
+ setContent: function (c) {
1263
+ this.x = c.hasOwnProperty('x') ? c.x : 0;
1264
+ this.y = c.hasOwnProperty('y') ? c.y : 0;
1265
+ },
1266
+
1267
+ marshall: function () {
1268
+ this.rawData = [];
1269
+ this.rawData = this.rawData.concat(
1270
+ this.numberTo32(this.x),
1271
+ this.numberTo32(this.y)
1272
+ );
1273
+ return this.rawData;
1274
+ },
1275
+
1276
+ demarshall: function (queue, expSize) {
1277
+ this.expectedSize = expSize || this.objectSize;
1278
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1279
+ this.x = this.int32ToDouble(this.bytesToInt32(queue.shift(4)), 32);
1280
+ this.y = this.int32ToDouble(this.bytesToInt32(queue.shift(4)), 32);
1281
+
1282
+
1283
+ return this;
1284
+ }
1285
+ });
1286
+
1287
+ wdi.SpiceRect = $.spcExtend(wdi.SpiceObject, {
1288
+ objectSize: 16,
1289
+
1290
+ init: function (c) {
1291
+ c ? this.setContent(c) : false;
1292
+ },
1293
+
1294
+ setContent: function (c) {
1295
+ this.top = c.top;
1296
+ this.left = c.left;
1297
+ this.bottom = c.bottom;
1298
+ this.right = c.right;
1299
+ },
1300
+
1301
+ marshall: function () {
1302
+ this.rawData = [];
1303
+ this.rawData = this.rawData.concat(
1304
+ this.numberTo32(this.top),
1305
+ this.numberTo32(this.left),
1306
+ this.numberTo32(this.bottom),
1307
+ this.numberTo32(this.right)
1308
+ );
1309
+ return this.rawData;
1310
+ },
1311
+
1312
+ demarshall: function (queue, expSize) {
1313
+ //if (queue.getLength() < this.objectSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1314
+ this.top = this.bytesToInt32NoAllocate(queue);
1315
+ this.left = this.bytesToInt32NoAllocate(queue);
1316
+ this.bottom = this.bytesToInt32NoAllocate(queue);
1317
+ this.right = this.bytesToInt32NoAllocate(queue);
1318
+
1319
+ return this;
1320
+ }
1321
+ });
1322
+
1323
+ wdi.SpiceClipRects = $.spcExtend(wdi.SpiceObject, {
1324
+ objectSize: 4,
1325
+
1326
+ init: function (c) {
1327
+ c ? this.setContent(c) : false;
1328
+ },
1329
+
1330
+ setContent: function (c) {
1331
+ this.num_rects = c.num_rects;
1332
+ },
1333
+
1334
+ marshall: function () {
1335
+ this.rawData = [];
1336
+ this.rawData = this.rawData.concat(
1337
+ this.numberTo32(this.num_rects)
1338
+ );
1339
+ for (var i = 0; i < this.num_rects; i++) {
1340
+ this.rawData = this.rawData.concat(this.rects[i].marshall());
1341
+ }
1342
+
1343
+ return this.rawData;
1344
+ },
1345
+
1346
+ demarshall: function (queue, expSize) {
1347
+ this.expectedSize = expSize || this.objectSize;
1348
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1349
+ this.num_rects = this.bytesToInt32NoAllocate(queue);
1350
+
1351
+ if (this.num_rects > 0) {
1352
+ this.rects = [];
1353
+ for (var i = 0; i < this.num_rects; i++) {
1354
+ this.rects[i] = new wdi.SpiceRect().demarshall(queue);
1355
+ }
1356
+ }
1357
+
1358
+ return this;
1359
+ }
1360
+ });
1361
+
1362
+
1363
+ wdi.SpiceClip = $.spcExtend(wdi.SpiceObject, {
1364
+ objectSize: 1,
1365
+
1366
+ init: function (c) {
1367
+ c ? this.setContent(c) : false;
1368
+ },
1369
+
1370
+ setContent: function (c) {
1371
+ this.type = c.type;
1372
+ },
1373
+
1374
+ marshall: function () {
1375
+ this.rawData = [];
1376
+ this.rawData = this.rawData.concat(
1377
+ this.numberTo8(this.type)
1378
+ );
1379
+ if (this.type == wdi.SpiceClipType.SPICE_CLIP_TYPE_RECTS) {
1380
+ this.rawData = this.rawData.concat(
1381
+ this.rects.marshall()
1382
+ );
1383
+ }
1384
+ return this.rawData;
1385
+ },
1386
+
1387
+ demarshall: function (queue, expSize) {
1388
+ this.expectedSize = expSize || this.objectSize;
1389
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1390
+ this.type = this.bytesToInt8NoAllocate(queue);
1391
+
1392
+ if (this.type == wdi.SpiceClipType.SPICE_CLIP_TYPE_RECTS) {
1393
+ this.rects = new wdi.SpiceClipRects().demarshall(queue);
1394
+ }
1395
+ return this;
1396
+ }
1397
+ });
1398
+
1399
+ wdi.SpiceDisplayBase = $.spcExtend(wdi.SpiceObject, {
1400
+ objectSize: 4,
1401
+
1402
+ init: function (c) {
1403
+ c ? this.setContent(c) : false;
1404
+ },
1405
+
1406
+ setContent: function (c) {
1407
+ this.surface_id = c.surface_id;
1408
+ },
1409
+
1410
+ marshall: function () {
1411
+ this.rawData = [];
1412
+ this.rawData = this.rawData.concat(
1413
+ this.numberTo32(this.surface_id),
1414
+ this.box.marshall(),
1415
+ this.clip.marshall()
1416
+ );
1417
+ return this.rawData;
1418
+ },
1419
+
1420
+ demarshall: function (queue, expSize) {
1421
+ this.expectedSize = expSize || this.objectSize;
1422
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1423
+ this.surface_id = this.bytesToInt32NoAllocate(queue);
1424
+ this.box = new wdi.SpiceRect().demarshall(queue);
1425
+ this.clip = new wdi.SpiceClip().demarshall(queue);
1426
+ return this;
1427
+ }
1428
+ });
1429
+
1430
+ wdi.SpiceQMask = $.spcExtend(wdi.SpiceObject, {
1431
+ objectSize: 4,
1432
+
1433
+ init: function (c) {
1434
+ c ? this.setContent(c) : false;
1435
+ },
1436
+
1437
+ setContent: function (c) {
1438
+
1439
+ },
1440
+
1441
+ marshall: function () {
1442
+ var rawData = [];
1443
+ rawData = rawData.concat(
1444
+ this.numberTo8(this.flags),
1445
+ this.pos.marshall(),
1446
+ this.numberTo32(this.offset)
1447
+ );
1448
+ if (this.offset) {
1449
+ rawData = rawData.concat(
1450
+ this.image.marshall()
1451
+ );
1452
+ }
1453
+ return rawData;
1454
+ },
1455
+
1456
+ demarshall: function (queue, expSize) {
1457
+ //in the timeline, demarshalling spiceqmask takes lot of time
1458
+ //and mask is not used anywhere in the code, its still unsupported
1459
+ //so we leave it commented until we realize whats a mask and why it takes sooooo long
1460
+ //to demarshall
1461
+ //to prevent the packet to not be contiguous, remove the bytes and leave
1462
+ queue.eatBytes(13); //the normal qmask size
1463
+ /*
1464
+ this.expectedSize = expSize || this.objectSize;
1465
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1466
+ this.flags = this.bytesToInt8NoAllocate(queue);
1467
+ this.pos = new wdi.SpicePoint().demarshall(queue);
1468
+ this.offset = this.bytesToInt32NoAllocate(queue);
1469
+ if (this.offset) {
1470
+ wdi.Debug.log('THERE IS A MASK IMAGE');
1471
+ var qdata = new wdi.ViewQueue();
1472
+ qdata.setData(queue.getDataOffset(this.offset));
1473
+ this.image = new wdi.SpiceImage().demarshall(qdata);
1474
+ }
1475
+ return this;
1476
+ */
1477
+ }
1478
+ });
1479
+
1480
+ wdi.SpiceImageDescriptor = $.spcExtend(wdi.SpiceObject, {
1481
+ objectSize: 18,
1482
+
1483
+ init: function (c) {
1484
+ c ? this.setContent(c) : false;
1485
+ },
1486
+
1487
+ setContent: function (c) {
1488
+
1489
+ },
1490
+
1491
+ marshall: function () {
1492
+ var rawData = [];
1493
+ rawData = rawData.concat(
1494
+ this.numberTo64(this.id),
1495
+ this.numberTo8(this.type),
1496
+ this.numberTo8(this.flags),
1497
+ this.numberTo32(this.width),
1498
+ this.numberTo32(this.height)
1499
+ );
1500
+ return rawData;
1501
+ },
1502
+
1503
+ demarshall: function (queue, expSize) {
1504
+ this.expectedSize = expSize || this.objectSize;
1505
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1506
+ var id = this.bytesToInt32NoAllocate(queue);
1507
+ this.id = id.toString(16)+this.bytesToInt32NoAllocate(queue).toString(16);
1508
+ this.type = this.bytesToInt8NoAllocate(queue);
1509
+ this.flags = this.bytesToInt8NoAllocate(queue);
1510
+ this.width = this.bytesToInt32NoAllocate(queue);
1511
+ this.height = this.bytesToInt32NoAllocate(queue);
1512
+ this.offset = queue.getPosition();
1513
+
1514
+
1515
+ return this;
1516
+ }
1517
+ });
1518
+
1519
+ wdi.SpiceImage = $.spcExtend(wdi.SpiceObject, {
1520
+ objectSize: 1,
1521
+
1522
+ init: function (c) {
1523
+ c ? this.setContent(c) : false;
1524
+ },
1525
+
1526
+ setContent: function (c) {
1527
+
1528
+ },
1529
+
1530
+ marshall: function () {
1531
+ var rawData = [];
1532
+ rawData = rawData.concat(
1533
+ this.imageDescriptor.marshall(),
1534
+ this.data
1535
+ );
1536
+ return rawData;
1537
+ },
1538
+
1539
+ demarshall: function (queue, expSize) {
1540
+ this.expectedSize = expSize || this.objectSize;
1541
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1542
+ this.imageDescriptor = new wdi.SpiceImageDescriptor().demarshall(queue);
1543
+ this.data = queue.getRawData();
1544
+ return this;
1545
+ }
1546
+ });
1547
+
1548
+ wdi.SpiceDrawCopy = $.spcExtend(wdi.SpiceObject, {
1549
+ objectSize: 4,
1550
+
1551
+ properties: {
1552
+ 'overWriteScreenArea': true
1553
+ },
1554
+
1555
+ init: function (c) {
1556
+ c ? this.setContent(c) : false;
1557
+ },
1558
+
1559
+ setContent: function (c) {
1560
+ this.offset = c.offset;
1561
+ },
1562
+
1563
+ marshall: function () {
1564
+ this.rawData = [];
1565
+ this.rawData = this.rawData.concat(
1566
+ this.base.marshall(),
1567
+ this.numberTo32(this.offset),
1568
+ this.src_area.marshall(),
1569
+ this.numberTo16(this.rop_descriptor),
1570
+ this.numberTo8(this.scale_mode),
1571
+ this.mask.marshall(),
1572
+ this.image.marshall()
1573
+ );
1574
+ return this.rawData;
1575
+ },
1576
+
1577
+ demarshall: function (queue, expSize) {
1578
+ this.expectedSize = expSize || this.objectSize;
1579
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1580
+ this.base = new wdi.SpiceDisplayBase().demarshall(queue);
1581
+ this.offset = this.bytesToInt32NoAllocate(queue);
1582
+ //this.src_bitmap = new wdi.SpiceImageDescriptor().demarshall(queue);
1583
+ this.src_area = new wdi.SpiceRect().demarshall(queue);
1584
+ this.rop_descriptor = this.bytesToInt16NoAllocate(queue);
1585
+ this.scale_mode = this.bytesToInt8NoAllocate(queue);
1586
+ this.mask = new wdi.SpiceQMask().demarshall(queue);
1587
+
1588
+
1589
+ //if offset equals to "at", then there is no need to adapt the queue!
1590
+ //this gives 10ms instead of 30ms in lot of situations
1591
+ if (queue.getPosition() == this.offset) {
1592
+ this.image = new wdi.SpiceImage().demarshall(queue);
1593
+ } else {
1594
+ var qdata = new wdi.ViewQueue();
1595
+ qdata.setData(queue.getDataOffset(this.offset));
1596
+ this.image = new wdi.SpiceImage().demarshall(qdata);
1597
+ }
1598
+
1599
+ return this;
1600
+ }
1601
+ });
1602
+
1603
+ wdi.drawBlend = $.spcExtend(wdi.SpiceObject, {
1604
+ objectSize: 4,
1605
+
1606
+ init: function (c) {
1607
+ c ? this.setContent(c) : false;
1608
+ },
1609
+
1610
+ setContent: function (c) {
1611
+ this.base = c.base;
1612
+ this.alpha_flags = c.alpha_flags;
1613
+ this.alpha = c.alpha;
1614
+ this.offset = c.offset;
1615
+ this.src_area = c.src_area;
1616
+ },
1617
+
1618
+ marshall: function () {
1619
+ var rawData = [];
1620
+ rawData = rawData.concat(
1621
+ this.base.marshall(),
1622
+ this.numberTo32(this.offset),
1623
+ this.src_area.marshall(),
1624
+ this.numberTo16(this.rop_descriptor),
1625
+ this.numberTo8(this.flags),
1626
+ this.mask.marshall(),
1627
+ this.image.marshall()
1628
+ );
1629
+ return rawData;
1630
+ },
1631
+
1632
+ demarshall: function (queue, expSize) {
1633
+ this.expectedSize = expSize || this.objectSize;
1634
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1635
+ this.base = new wdi.SpiceDisplayBase().demarshall(queue);
1636
+ this.offset = this.bytesToInt32NoAllocate(queue);
1637
+ this.src_area = new wdi.SpiceRect().demarshall(queue);
1638
+ this.rop_descriptor = this.bytesToInt16NoAllocate(queue);
1639
+ this.flags = this.bytesToInt8NoAllocate(queue);
1640
+ this.mask = new wdi.SpiceQMask().demarshall(queue);
1641
+
1642
+ this.image = new wdi.SpiceImage().demarshall(queue);
1643
+ return this;
1644
+ }
1645
+ });
1646
+
1647
+ wdi.drawAlphaBlend = $.spcExtend(wdi.SpiceObject, {
1648
+ objectSize: 4,
1649
+
1650
+ init: function (c) {
1651
+ c ? this.setContent(c) : false;
1652
+ },
1653
+
1654
+ setContent: function (c) {
1655
+ this.base = c.base;
1656
+ this.alpha_flags = c.alpha_flags;
1657
+ this.alpha = c.alpha;
1658
+ this.offset = c.offset;
1659
+ this.src_area = c.src_area;
1660
+ },
1661
+
1662
+
1663
+
1664
+ demarshall: function (queue, expSize) {
1665
+ this.expectedSize = expSize || this.objectSize;
1666
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1667
+ this.base = new wdi.SpiceDisplayBase().demarshall(queue);
1668
+ this.alpha_flags = this.bytesToInt8NoAllocate(queue);
1669
+ this.alpha = this.bytesToInt8NoAllocate(queue);
1670
+ this.offset = this.bytesToInt32NoAllocate(queue);
1671
+ this.src_area = new wdi.SpiceRect().demarshall(queue);
1672
+
1673
+ this.image = new wdi.SpiceImage().demarshall(queue);
1674
+ return this;
1675
+ }
1676
+ });
1677
+
1678
+ wdi.drawTransparent = $.spcExtend(wdi.SpiceObject, {
1679
+ objectSize: 4,
1680
+
1681
+ init: function (c) {
1682
+ c ? this.setContent(c) : false;
1683
+ },
1684
+
1685
+ setContent: function (c) {
1686
+
1687
+ },
1688
+
1689
+
1690
+
1691
+ demarshall: function (queue, expSize) {
1692
+ this.expectedSize = expSize || this.objectSize;
1693
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1694
+ this.base = new wdi.SpiceDisplayBase().demarshall(queue);
1695
+ this.offset = this.bytesToInt32NoAllocate(queue);
1696
+ this.src_area = new wdi.SpiceRect().demarshall(queue);
1697
+ this.transparent_color = new wdi.SpiceColor().demarshall(queue);
1698
+ this.transparent_true_color = new wdi.SpiceColor().demarshall(queue);
1699
+ this.image = new wdi.SpiceImage().demarshall(queue);
1700
+ return this;
1701
+ }
1702
+ });
1703
+
1704
+ wdi.SpiceCopyBits = $.spcExtend(wdi.SpiceObject, {
1705
+ objectSize: 4,
1706
+
1707
+ init: function (c) {
1708
+ c ? this.setContent(c) : false;
1709
+ },
1710
+
1711
+ setContent: function (c) {
1712
+ this.offset = c.offset;
1713
+ },
1714
+
1715
+ marshall: function () {
1716
+ var rawData = [];
1717
+ rawData = rawData.concat(
1718
+ this.base.marshall(),
1719
+ this.src_position.marshall()
1720
+ );
1721
+ return rawData;
1722
+
1723
+ },
1724
+
1725
+ demarshall: function (queue, expSize) {
1726
+ this.expectedSize = expSize || this.objectSize;
1727
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1728
+ this.base = new wdi.SpiceDisplayBase().demarshall(queue);
1729
+ this.src_position = new wdi.SpicePoint().demarshall(queue);
1730
+ return this;
1731
+ }
1732
+ });
1733
+
1734
+ wdi.SpiceImageLZRGB = $.spcExtend(wdi.SpiceObject, {
1735
+ objectSize: 32,
1736
+
1737
+ init: function (c) {
1738
+ c ? this.setContent(c) : false;
1739
+ },
1740
+
1741
+ setContent: function (c) {
1742
+
1743
+ },
1744
+
1745
+
1746
+
1747
+ demarshall: function (queue, expSize) {
1748
+ this.expectedSize = expSize || this.objectSize;
1749
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1750
+ this.length = this.bytesToInt32BE(queue.shift(4));
1751
+ this.magic = this.bytesToStringBE(queue.shift(4));
1752
+ this.version = this.bytesToInt32BE(queue.shift(4));
1753
+ this.type = this.bytesToInt32BE(queue.shift(4));
1754
+ this.width = this.bytesToInt32BE(queue.shift(4));
1755
+ this.height = this.bytesToInt32BE(queue.shift(4));
1756
+ this.stride = this.bytesToInt32BE(queue.shift(4));
1757
+ this.top_down = this.bytesToInt32BE(queue.shift(4));
1758
+
1759
+ this.data = queue.shift(this.length);
1760
+
1761
+ return this;
1762
+ }
1763
+ });
1764
+
1765
+ wdi.SpiceMouseModeRequest = $.spcExtend(wdi.SpiceObject, {
1766
+ objectSize: 4,
1767
+
1768
+ init: function (c) {
1769
+ c ? this.setContent(c) : false;
1770
+ },
1771
+
1772
+ setContent: function (c) {
1773
+ this.request_mode = c.request_mode;
1774
+ },
1775
+
1776
+ marshall: function () {
1777
+ this.rawData = [];
1778
+ this.rawData = this.rawData.concat(
1779
+ this.numberTo32(this.request_mode)
1780
+ );
1781
+ return this.rawData;
1782
+ },
1783
+
1784
+ demarshall: function (queue, expSize) {
1785
+ this.expectedSize = expSize || this.objectSize;
1786
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1787
+ this.request_mode = this.bytesToInt32NoAllocate(queue);
1788
+
1789
+
1790
+ return this;
1791
+ }
1792
+ });
1793
+
1794
+ wdi.SpiceMouseMode = $.spcExtend(wdi.SpiceObject, {
1795
+ objectSize: 4,
1796
+
1797
+ init: function (c) {
1798
+ c ? this.setContent(c) : false;
1799
+ },
1800
+
1801
+ setContent: function (c) {
1802
+ this.supported_modes = c.supported_modes;
1803
+ this.current_mode = c.current_mode;
1804
+ },
1805
+
1806
+ marshall: function () {
1807
+ this.rawData = [];
1808
+ this.rawData = this.rawData.concat(
1809
+ this.numberTo32(this.supported_modes),
1810
+ this.numberTo32(this.current_mode)
1811
+ );
1812
+ return this.rawData;
1813
+ },
1814
+
1815
+ demarshall: function (queue, expSize) {
1816
+ this.expectedSize = expSize || this.objectSize;
1817
+ if (queue.getLength() < this.expectedSize) return;
1818
+ this.supported_modes = this.bytesToInt16NoAllocate(queue);
1819
+ this.current_mode = this.bytesToInt16NoAllocate(queue);
1820
+
1821
+
1822
+ return this;
1823
+ }
1824
+ });
1825
+
1826
+ wdi.RedcMousePress = $.spcExtend(wdi.SpiceObject, {
1827
+ objectSize: 3,
1828
+
1829
+ init: function (c) {
1830
+ c ? this.setContent(c) : false;
1831
+ },
1832
+
1833
+ setContent: function (c) {
1834
+ this.button_id = c.button_id;
1835
+ this.buttons_state = c.buttons_state;
1836
+ },
1837
+
1838
+ marshall: function () {
1839
+ this.rawData = [];
1840
+ this.rawData = this.rawData.concat(
1841
+ this.numberTo8(this.button_id),
1842
+ this.numberTo16(this.buttons_state)
1843
+ );
1844
+ return this.rawData;
1845
+ },
1846
+
1847
+ demarshall: function (queue, expSize) {
1848
+ this.expectedSize = expSize || this.objectSize;
1849
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1850
+ this.button_id = this.bytesToInt8NoAllocate(queue);
1851
+ this.buttons_state = this.bytesToInt16NoAllocate(queue);
1852
+
1853
+
1854
+ return this;
1855
+ }
1856
+ });
1857
+
1858
+ wdi.RedcMousePosition = $.spcExtend(wdi.SpiceObject, {
1859
+ objectSize: 11,
1860
+
1861
+ init: function (c) {
1862
+ c ? this.setContent(c) : false;
1863
+ },
1864
+
1865
+ setContent: function (c) {
1866
+ this.x = c.x;
1867
+ this.y = c.y;
1868
+ this.buttons_state = c.buttons_state;
1869
+ this.display_id = c.display_id;
1870
+ },
1871
+
1872
+ marshall: function () {
1873
+ this.rawData = [];
1874
+ this.rawData = this.rawData.concat(
1875
+ this.numberTo32(this.x),
1876
+ this.numberTo32(this.y),
1877
+ this.numberTo16(this.buttons_state),
1878
+ this.numberTo8(this.display_id)
1879
+ );
1880
+ return this.rawData;
1881
+ },
1882
+
1883
+ demarshall: function (queue, expSize) {
1884
+ this.expectedSize = expSize || this.objectSize;
1885
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1886
+ this.x = this.bytesToInt32NoAllocate(queue);
1887
+ this.y = this.bytesToInt32NoAllocate(queue);
1888
+ this.buttons_state = this.bytesToInt16NoAllocate(queue);
1889
+ this.display_id = this.bytesToInt8NoAllocate(queue);
1890
+
1891
+
1892
+ return this;
1893
+ }
1894
+ });
1895
+
1896
+ wdi.RedcMouseMotion = $.spcExtend(wdi.SpiceObject, {
1897
+ objectSize: 10,
1898
+
1899
+ init: function (c) {
1900
+ c ? this.setContent(c) : false;
1901
+ },
1902
+
1903
+ setContent: function (c) {
1904
+ this.x = c.x;
1905
+ this.y = c.y;
1906
+ this.buttons_state = c.buttons_state;
1907
+ },
1908
+
1909
+ marshall: function () {
1910
+ this.rawData = [];
1911
+ this.rawData = this.rawData.concat(
1912
+ this.numberTo32(this.x),
1913
+ this.numberTo32(this.y),
1914
+ this.numberTo16(this.buttons_state)
1915
+ );
1916
+ return this.rawData;
1917
+ },
1918
+
1919
+ demarshall: function (queue, expSize) {
1920
+ this.expectedSize = expSize || this.objectSize;
1921
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1922
+ this.x = this.bytesToInt32NoAllocate(queue);
1923
+ this.y = this.bytesToInt32NoAllocate(queue);
1924
+ this.buttons_state = this.bytesToInt16NoAllocate(queue);
1925
+
1926
+
1927
+ return this;
1928
+ }
1929
+ });
1930
+
1931
+ wdi.SpiceBrush = $.spcExtend(wdi.SpiceObject, {
1932
+ objectSize: 8,
1933
+
1934
+ init: function (c) {
1935
+ c ? this.setContent(c) : false;
1936
+ },
1937
+
1938
+ setContent: function (c) {
1939
+ this.type = c.type;
1940
+ this.color = c.color;
1941
+ },
1942
+
1943
+
1944
+
1945
+ demarshall: function (queue, expSize) {
1946
+ this.expectedSize = expSize || this.objectSize;
1947
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1948
+ this.type = this.bytesToInt8NoAllocate(queue);
1949
+
1950
+ if (this.type == wdi.SpiceBrushType.SPICE_BRUSH_TYPE_PATTERN) {
1951
+ this.pattern = new wdi.SpicePattern().demarshall(queue);
1952
+ } else if (this.type == wdi.SpiceBrushType.SPICE_BRUSH_TYPE_SOLID) {
1953
+ this.color = new wdi.SpiceColor().demarshall(queue);
1954
+ }
1955
+
1956
+ return this;
1957
+ }
1958
+ });
1959
+
1960
+ wdi.SpiceColor = $.spcExtend(wdi.SpiceObject, {
1961
+ objectSize: 4,
1962
+
1963
+ init: function (c) {
1964
+ c ? this.setContent(c) : false;
1965
+ },
1966
+
1967
+ setContent: function (c) {
1968
+
1969
+ },
1970
+
1971
+ marshall: function () {
1972
+ return [this.r, this.g, this.b];
1973
+ },
1974
+
1975
+ demarshall: function (queue, expSize) {
1976
+ this.expectedSize = expSize || this.objectSize;
1977
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
1978
+ this.data = this.bytesToInt32(queue.shift(4)) & 0xffffff; //make sure 24 bits, this is RGB888
1979
+
1980
+ this.r = (this.data >> 16);
1981
+ this.g = ((this.data >> 8) & 0xff);
1982
+ this.b = (this.data & 0xff);
1983
+
1984
+ this.html_color = "rgb(" + this.r + ", " + this.g + ", " + this.b + ")";
1985
+
1986
+ var r = this.r.toString(16);
1987
+ var g = this.g.toString(16);
1988
+ var b = this.b.toString(16);
1989
+
1990
+ if(r.length < 2) {
1991
+ r = '0'+r;
1992
+ }
1993
+
1994
+ if(g.length < 2) {
1995
+ g = '0'+g;
1996
+ }
1997
+
1998
+ if(b.length < 2) {
1999
+ b = '0'+b;
2000
+ }
2001
+
2002
+ this.simple_html_color = '#'+r+g+b;
2003
+ return this;
2004
+ }
2005
+ });
2006
+
2007
+ wdi.RgbaColor = $.spcExtend(wdi.SpiceObject, {
2008
+ objectSize: 4,
2009
+
2010
+ init: function (c) {
2011
+ c ? this.setContent(c) : false;
2012
+ },
2013
+
2014
+ setContent: function (c) {
2015
+
2016
+ },
2017
+
2018
+
2019
+
2020
+ demarshall: function (queue, expSize) {
2021
+ this.expectedSize = expSize || this.objectSize;
2022
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2023
+ this.data = this.bytesToInt32(queue.shift(4)) & 0xffffffff; //make sure 32 bits, this is ARGB8888
2024
+
2025
+ this.a = this.data >>> 24;
2026
+ this.r = (this.data >>> 16) & 0xff;
2027
+ this.g = (this.data >>> 8) & 0xff;
2028
+ this.b = this.data & 0xff;
2029
+
2030
+ this.html_color = "rgb(" + this.r + ", " + this.g + ", " + this.b + ")";
2031
+
2032
+ return this;
2033
+ }
2034
+ });
2035
+
2036
+ wdi.SpicePattern = $.spcExtend(wdi.SpiceObject, {
2037
+ objectSize: 12,
2038
+
2039
+ init: function (c) {
2040
+ c ? this.setContent(c) : false;
2041
+ },
2042
+
2043
+ setContent: function (c) {
2044
+
2045
+ },
2046
+
2047
+
2048
+
2049
+ demarshall: function (queue, expSize) {
2050
+ this.expectedSize = expSize || this.objectSize;
2051
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2052
+ this.offset = this.bytesToInt32NoAllocate(queue);
2053
+ this.point = new wdi.SpicePoint().demarshall(queue);
2054
+ var qdata = new wdi.ViewQueue();
2055
+ qdata.setData(queue.getDataOffset(this.offset));
2056
+ this.image = new wdi.SpiceImage().demarshall(qdata);
2057
+
2058
+ return this;
2059
+ }
2060
+ });
2061
+
2062
+ wdi.SpiceDrawFill = $.spcExtend(wdi.SpiceObject, {
2063
+ objectSize: 4,
2064
+
2065
+ properties: {
2066
+ 'overWriteScreenArea': true
2067
+ },
2068
+
2069
+ init: function (c) {
2070
+ c ? this.setContent(c) : false;
2071
+ },
2072
+
2073
+ setContent: function (c) {
2074
+ this.offset = c.offset;
2075
+ },
2076
+
2077
+ marshall: function () {
2078
+ this.rawData = [];
2079
+ this.rawData = this.rawData.concat(
2080
+ this.numberTo32(this.offset)
2081
+ );
2082
+ return this.rawData;
2083
+ },
2084
+
2085
+ demarshall: function (queue, expSize) {
2086
+ this.expectedSize = expSize || this.objectSize;
2087
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2088
+ this.base = new wdi.SpiceDisplayBase().demarshall(queue);
2089
+ this.brush = new wdi.SpiceBrush().demarshall(queue);
2090
+ this.rop_descriptor = this.bytesToInt16NoAllocate(queue);
2091
+ this.mask = new wdi.SpiceQMask().demarshall(queue);
2092
+
2093
+ if (this.brush.type == wdi.SpiceBrushType.SPICE_BRUSH_TYPE_PATTERN) {
2094
+ this.brush.pattern.image = new wdi.SpiceImageDescriptor().demarshall(queue);
2095
+ this.brush.pattern.imageData = queue.getData();
2096
+ }
2097
+ return this;
2098
+ }
2099
+ });
2100
+
2101
+ wdi.SpiceDrawRop3 = $.spcExtend(wdi.SpiceObject, {
2102
+ objectSize: 4,
2103
+
2104
+
2105
+ marshall: function () {
2106
+ var rawData = [];
2107
+ rawData = rawData.concat(
2108
+ this.base.marshall(),
2109
+ this.numberTo32(this.offset),
2110
+ this.src_area.marshall(),
2111
+ this.brush.marshall(),
2112
+ this.numberTo8(this.rop_descriptor),
2113
+ this.numberTo8(this.scale_mode),
2114
+ this.mask.marshall(),
2115
+ this.src_image.marshall()
2116
+ );
2117
+ if (this.brush.type == wdi.SpiceBrushType.SPICE_BRUSH_TYPE_PATTERN) {
2118
+ rawData = rawData.concat(
2119
+ this.brush.pattern.image.marshall(),
2120
+ this.brush.pattern.imageData
2121
+ );
2122
+ }
2123
+ return rawData;
2124
+ },
2125
+
2126
+ demarshall: function (queue, expSize) {
2127
+ this.expectedSize = expSize || this.objectSize;
2128
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2129
+ this.base = new wdi.SpiceDisplayBase().demarshall(queue);
2130
+ this.offset = this.bytesToInt32NoAllocate(queue);
2131
+ this.src_area = new wdi.SpiceRect().demarshall(queue);
2132
+ this.brush = new wdi.SpiceBrush().demarshall(queue);
2133
+ this.rop_descriptor = this.bytesToInt8NoAllocate(queue);
2134
+ this.scale_mode = this.bytesToInt8NoAllocate(queue);
2135
+ this.mask = new wdi.SpiceQMask().demarshall(queue);
2136
+ this.src_image = new wdi.SpiceImage().demarshall(queue);
2137
+
2138
+ if (this.brush.type == wdi.SpiceBrushType.SPICE_BRUSH_TYPE_PATTERN) {
2139
+ this.brush.pattern.image = new wdi.SpiceImageDescriptor().demarshall(queue);
2140
+ this.brush.pattern.imageData = queue.getData();
2141
+ }
2142
+ return this;
2143
+ }
2144
+ });
2145
+
2146
+ wdi.SpiceDrawBlackness = $.spcExtend(wdi.SpiceObject, {
2147
+ objectSize: 4,
2148
+
2149
+ init: function (c) {
2150
+ c ? this.setContent(c) : false;
2151
+ },
2152
+
2153
+ setContent: function (c) {
2154
+ this.offset = c.offset;
2155
+ },
2156
+
2157
+ marshall: function () {
2158
+ var rawData = [];
2159
+ rawData = rawData.concat(
2160
+ this.base.marshall(),
2161
+ this.mask.marshall()
2162
+ );
2163
+ return rawData;
2164
+ },
2165
+
2166
+ demarshall: function (queue, expSize) {
2167
+ this.expectedSize = expSize || this.objectSize;
2168
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2169
+ this.base = new wdi.SpiceDisplayBase().demarshall(queue);
2170
+ this.mask = new wdi.SpiceQMask().demarshall(queue);
2171
+ return this;
2172
+ }
2173
+ });
2174
+
2175
+ wdi.SpiceDrawWhiteness = $.spcExtend(wdi.SpiceObject, {
2176
+ objectSize: 4,
2177
+
2178
+ init: function (c) {
2179
+ c ? this.setContent(c) : false;
2180
+ },
2181
+
2182
+ setContent: function (c) {
2183
+ this.offset = c.offset;
2184
+ },
2185
+
2186
+ marshall: function () {
2187
+ var rawData = [];
2188
+ rawData = rawData.concat(
2189
+ this.base.marshall(),
2190
+ this.mask.marshall()
2191
+ );
2192
+ return rawData;
2193
+ },
2194
+
2195
+ demarshall: function (queue, expSize) {
2196
+ this.expectedSize = expSize || this.objectSize;
2197
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2198
+ this.base = new wdi.SpiceDisplayBase().demarshall(queue);
2199
+ this.mask = new wdi.SpiceQMask().demarshall(queue);
2200
+ return this;
2201
+ }
2202
+ });
2203
+
2204
+ wdi.SpiceScanCode = $.spcExtend(wdi.SpiceObject, {
2205
+ objectSize: 1,
2206
+
2207
+ init: function (c) {
2208
+ c ? this.setContent(c) : false;
2209
+ },
2210
+
2211
+ setContent: function (scanCode) {
2212
+ this.code = scanCode || 0;
2213
+ this.zero = 0;
2214
+ },
2215
+
2216
+ marshall: function () {
2217
+ this.rawData = [];
2218
+ this.rawData = this.rawData.concat(
2219
+ this.arrayToBytes(this.code, 8),
2220
+ this.numberTo8(this.zero)
2221
+ );
2222
+ return this.rawData;
2223
+ },
2224
+
2225
+ demarshall: function (queue, expSize) {
2226
+ return this;
2227
+ },
2228
+
2229
+ getCode: function () {
2230
+ return this.code;
2231
+ }
2232
+ });
2233
+
2234
+ wdi.RedCursorInit = $.spcExtend(wdi.SpiceObject, {
2235
+ objectSize: 9,
2236
+
2237
+
2238
+ marshall: function () {
2239
+ },
2240
+
2241
+ demarshall: function (queue, expSize) {
2242
+ this.expectedSize = expSize || this.objectSize;
2243
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2244
+ this.position = new wdi.SpicePoint16().demarshall(queue);
2245
+ this.trail_length = this.bytesToInt16NoAllocate(queue);
2246
+ this.trail_frequency = this.bytesToInt16NoAllocate(queue);
2247
+ this.visible = this.bytesToInt8NoAllocate(queue);
2248
+ this.cursor = new wdi.RedCursor().demarshall(queue);
2249
+
2250
+
2251
+ return this;
2252
+ }
2253
+ });
2254
+
2255
+ wdi.RedCursor = $.spcExtend(wdi.SpiceObject, {
2256
+ objectSize: 2,
2257
+
2258
+
2259
+ marshall: function () {
2260
+ this.rawData = [];
2261
+ this.rawData = this.rawData.concat(
2262
+ this.numberTo16(this.flags)
2263
+ );
2264
+ if(!(this.flags & 1)){
2265
+ this.rawData = this.rawData.concat(
2266
+ this.header.marshall(),
2267
+ this.data
2268
+ );
2269
+ }
2270
+ return this.rawData;
2271
+ },
2272
+
2273
+ demarshall: function (queue, expSize) {
2274
+ this.expectedSize = expSize || this.objectSize;
2275
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2276
+ this.flags = this.bytesToInt16NoAllocate(queue);
2277
+
2278
+ this.header = null;
2279
+ this.data = null;
2280
+
2281
+ if (!(this.flags & 1)) {
2282
+ this.header = new wdi.RedCursorHeader().demarshall(queue);
2283
+ this.data = queue.getData();
2284
+ }
2285
+
2286
+ return this;
2287
+ }
2288
+ });
2289
+
2290
+ wdi.RedCursorHeader = $.spcExtend(wdi.SpiceObject, {
2291
+ objectSize: 17,
2292
+
2293
+
2294
+ marshall: function () {
2295
+ this.rawData = [];
2296
+ this.rawData = this.rawData.concat(
2297
+ this.numberTo64(this.unique),
2298
+ this.numberTo8(this.type),
2299
+ this.numberTo16(this.width),
2300
+ this.numberTo16(this.height),
2301
+ this.numberTo16(this.hot_spot_x),
2302
+ this.numberTo16(this.hot_spot_y)
2303
+ );
2304
+ return this.rawData;
2305
+ },
2306
+
2307
+ demarshall: function (queue, expSize) {
2308
+ this.expectedSize = expSize || this.objectSize;
2309
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2310
+ this.unique = this.bytesToInt64NoAllocate(queue);
2311
+ this.type = this.bytesToInt8NoAllocate(queue);
2312
+ this.width = this.bytesToInt16NoAllocate(queue);
2313
+ this.height = this.bytesToInt16NoAllocate(queue);
2314
+ this.hot_spot_x = this.bytesToInt16NoAllocate(queue);
2315
+ this.hot_spot_y = this.bytesToInt16NoAllocate(queue);
2316
+
2317
+
2318
+ return this;
2319
+ }
2320
+ });
2321
+
2322
+ wdi.RedCursorSet = $.spcExtend(wdi.SpiceObject, {
2323
+ objectSize: 5,
2324
+
2325
+ marshall: function () {
2326
+ this.rawData = [];
2327
+ this.rawData = this.rawData.concat(
2328
+ this.position.marshall(),
2329
+ this.numberTo8(this.visible),
2330
+ this.cursor.marshall()
2331
+ );
2332
+ return this.rawData;
2333
+ },
2334
+
2335
+ demarshall: function (queue, expSize) {
2336
+ this.expectedSize = expSize || this.objectSize;
2337
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2338
+ this.position = new wdi.SpicePoint16().demarshall(queue);
2339
+ this.visible = this.bytesToInt8NoAllocate(queue);
2340
+ this.cursor = new wdi.RedCursor().demarshall(queue);
2341
+
2342
+ return this;
2343
+ }
2344
+ });
2345
+
2346
+ wdi.RedCursorHide = $.spcExtend(wdi.SpiceObject, {
2347
+ objectSize: 5,
2348
+
2349
+ marshall: function () {
2350
+ },
2351
+
2352
+ demarshall: function () {
2353
+ return this;
2354
+ }
2355
+ });
2356
+
2357
+ wdi.RasterGlyph = $.spcExtend(wdi.SpiceObject, {
2358
+ objectSize: 20,
2359
+
2360
+ marshall: function () {
2361
+ },
2362
+
2363
+ demarshall: function (queue, flags, numGlyphs) {
2364
+ var bpp = flags == 1 ? 1 : flags * 2;
2365
+ var result = [];
2366
+
2367
+ for (var i = 0; i < numGlyphs; i++) {
2368
+ result[i] = {};
2369
+ result[i].render_pos = new wdi.SpicePoint().demarshall(queue);
2370
+ result[i].glyph_origin = new wdi.SpicePoint().demarshall(queue);
2371
+ result[i].width = this.bytesToInt16NoAllocate(queue);
2372
+ result[i].height = this.bytesToInt16NoAllocate(queue);
2373
+ result[i].data = queue.shift(result[i].height * Math.ceil(result[i].width * bpp / 8));
2374
+ }
2375
+ return result;
2376
+ }
2377
+ });
2378
+
2379
+ wdi.GlyphString = $.spcExtend(wdi.SpiceObject, {
2380
+ objectSize: 3,
2381
+
2382
+ marshall: function () {
2383
+ },
2384
+
2385
+ demarshall: function (queue, expSize) {
2386
+ this.expectedSize = expSize || this.objectSize;
2387
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2388
+ this.len = this.bytesToInt16NoAllocate(queue);
2389
+ this.flags = this.bytesToInt8NoAllocate(queue);
2390
+ this.raster_glyph = new wdi.RasterGlyph().demarshall(queue, this.flags, this.len);
2391
+
2392
+
2393
+ return this;
2394
+ }
2395
+ });
2396
+
2397
+ wdi.SpiceDrawText = $.spcExtend(wdi.SpiceObject, {
2398
+ objectSize: 8,
2399
+
2400
+ init: function (c) {
2401
+ c ? this.setContent(c) : false;
2402
+ },
2403
+
2404
+ setContent: function (c) {
2405
+
2406
+ },
2407
+
2408
+
2409
+
2410
+ demarshall: function (queue, expSize) {
2411
+ this.expectedSize = expSize || this.objectSize;
2412
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2413
+ this.base = new wdi.SpiceDisplayBase().demarshall(queue);
2414
+ this.offset = this.bytesToInt32NoAllocate(queue);
2415
+ this.back_area = new wdi.SpiceRect().demarshall(queue);
2416
+ this.fore_brush = new wdi.SpiceBrush().demarshall(queue);
2417
+ this.back_brush = new wdi.SpiceBrush().demarshall(queue);
2418
+ this.fore_mode = this.bytesToInt16NoAllocate(queue);
2419
+ this.back_mode = this.bytesToInt16NoAllocate(queue);
2420
+ this.glyph_string = new wdi.GlyphString().demarshall(queue);
2421
+ return this;
2422
+ }
2423
+ });
2424
+
2425
+ wdi.SpiceLineAttr = $.spcExtend(wdi.SpiceObject, {
2426
+ objectSize: 8,
2427
+
2428
+
2429
+ marshall: function () {
2430
+ },
2431
+
2432
+ demarshall: function (queue, expSize) {
2433
+ this.expectedSize = expSize || this.objectSize;
2434
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2435
+ this.flags = this.bytesToInt8NoAllocate(queue);
2436
+ if (this.flags) {
2437
+ this.style_nseg = this.bytesToInt8NoAllocate(queue);
2438
+ this.style = this.int32ToDouble(this.bytesToInt32(queue.shift(4)));
2439
+ }
2440
+
2441
+ return this;
2442
+ }
2443
+ });
2444
+
2445
+ wdi.SpiceStroke = $.spcExtend(wdi.SpiceObject, {
2446
+ objectSize: 8,
2447
+
2448
+ init: function (c) {
2449
+ c ? this.setContent(c) : false;
2450
+ },
2451
+
2452
+ setContent: function (c) {
2453
+
2454
+ },
2455
+
2456
+ marshall: function () {
2457
+ },
2458
+
2459
+ demarshall: function (queue, expSize) {
2460
+ this.expectedSize = expSize || this.objectSize;
2461
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2462
+ this.base = new wdi.SpiceDisplayBase().demarshall(queue);
2463
+ this.offset = this.bytesToInt32NoAllocate(queue);
2464
+ this.attr = new wdi.SpiceLineAttr().demarshall(queue);
2465
+ this.brush = new wdi.SpiceBrush().demarshall(queue);
2466
+ this.fore_mode = this.bytesToInt16NoAllocate(queue);
2467
+ this.back_mode = this.bytesToInt16NoAllocate(queue);
2468
+ this.path = new wdi.SpicePath().demarshall(queue);
2469
+ return this;
2470
+ }
2471
+ });
2472
+
2473
+
2474
+ wdi.SpiceDrawInvers = $.spcExtend(wdi.SpiceObject, {
2475
+ objectSize: 8,
2476
+
2477
+ init: function (c) {
2478
+ c ? this.setContent(c) : false;
2479
+ },
2480
+
2481
+ setContent: function (c) {
2482
+
2483
+ },
2484
+
2485
+ marshall: function () {
2486
+ var rawData = [];
2487
+ rawData = rawData.concat(
2488
+ this.base.marshall(),
2489
+ this.mask.marshall()
2490
+ );
2491
+ return rawData;
2492
+ },
2493
+
2494
+ demarshall: function (queue, expSize) {
2495
+ this.expectedSize = expSize || this.objectSize;
2496
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2497
+ this.base = new wdi.SpiceDisplayBase().demarshall(queue);
2498
+ this.mask = new wdi.SpiceQMask().demarshall(queue);
2499
+ return this;
2500
+ }
2501
+ });
2502
+
2503
+ wdi.SpiceStreamCreate = $.spcExtend(wdi.SpiceObject, {
2504
+ objectSize: 8,
2505
+
2506
+ init: function (c) {
2507
+ c ? this.setContent(c) : false;
2508
+ },
2509
+
2510
+ setContent: function (c) {
2511
+
2512
+ },
2513
+
2514
+ marshall: function () {
2515
+ var rawData = [];
2516
+ rawData.concat(
2517
+ this.numberTo32(this.surface_id),
2518
+ this.numberTo32(this.id),
2519
+ this.numberTo8(this.flags),
2520
+ this.numberTo8(this.codec),
2521
+ this.numberTo64(this.stamp),
2522
+ this.numberTo32(this.stream_width),
2523
+ this.numberTo32(this.stream_height),
2524
+ this.numberTo32(this.src_width),
2525
+ this.numberTo32(this.src_height),
2526
+ this.rect.marshall(),
2527
+ this.clip.marshall()
2528
+ );
2529
+ return rawData;
2530
+ },
2531
+
2532
+ demarshall: function (queue, expSize) {
2533
+ this.expectedSize = expSize || this.objectSize;
2534
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2535
+ this.surface_id = this.bytesToInt32NoAllocate(queue);
2536
+ this.id = this.bytesToInt32NoAllocate(queue);
2537
+ this.flags = this.bytesToInt8NoAllocate(queue);
2538
+ this.codec = this.bytesToInt8NoAllocate(queue);
2539
+ this.stamp = this.bytesToInt64NoAllocate(queue);
2540
+ this.stream_width = this.bytesToInt32NoAllocate(queue);
2541
+ this.stream_height = this.bytesToInt32NoAllocate(queue);
2542
+ this.src_width = this.bytesToInt32NoAllocate(queue);
2543
+ this.src_height = this.bytesToInt32NoAllocate(queue);
2544
+ this.rect = new wdi.SpiceRect().demarshall(queue);
2545
+ this.clip = new wdi.SpiceClip().demarshall(queue);
2546
+ return this;
2547
+ }
2548
+ });
2549
+
2550
+ wdi.SpiceStreamDestroy = $.spcExtend(wdi.SpiceObject, {
2551
+ objectSize: 4,
2552
+
2553
+ init: function (c) {
2554
+ c ? this.setContent(c) : false;
2555
+ },
2556
+
2557
+ setContent: function (c) {
2558
+
2559
+ },
2560
+
2561
+ marshall: function () {
2562
+ var rawData = [];
2563
+ rawData = rawData.concat(
2564
+ this.numberTo32(this.surface_id),
2565
+ this.numberTo32(this.id)
2566
+ );
2567
+ return rawData;
2568
+ },
2569
+
2570
+ demarshall: function (queue, expSize) {
2571
+ this.expectedSize = expSize || this.objectSize;
2572
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2573
+ this.surface_id = this.bytesToInt32NoAllocate(queue);
2574
+ this.id = this.bytesToInt32NoAllocate(queue);
2575
+ return this;
2576
+ }
2577
+ });
2578
+
2579
+ wdi.SpiceStreamData = $.spcExtend(wdi.SpiceObject, {
2580
+ objectSize: 8,
2581
+
2582
+ init: function (c) {
2583
+ c ? this.setContent(c) : false;
2584
+ },
2585
+
2586
+ setContent: function (c) {
2587
+
2588
+ },
2589
+
2590
+ marshall: function () {
2591
+ var rawData = [];
2592
+ rawData = rawData.concat(
2593
+ this.numberTo32(this.id),
2594
+ this.numberTo32(this.multi_media_type),
2595
+ this.numberTo32(this.data_size),
2596
+ this.data
2597
+ );
2598
+ return rawData;
2599
+ },
2600
+
2601
+ demarshall: function (queue, expSize) {
2602
+ this.expectedSize = expSize || this.objectSize;
2603
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2604
+ this.id = this.bytesToInt32NoAllocate(queue);
2605
+ this.multi_media_type = this.bytesToInt32NoAllocate(queue);
2606
+ this.data_size = this.bytesToInt32NoAllocate(queue);
2607
+ this.data = queue.getRawData();
2608
+ return this;
2609
+ }
2610
+ });
2611
+
2612
+ wdi.SpiceStreamClip = $.spcExtend(wdi.SpiceObject, {
2613
+ objectSize: 4,
2614
+
2615
+ init: function (c) {
2616
+ c ? this.setContent(c) : false;
2617
+ },
2618
+
2619
+ setContent: function (c) {
2620
+
2621
+ },
2622
+
2623
+ marshall: function () {
2624
+ var rawData = [];
2625
+ rawData = rawData.concat(
2626
+ this.numberTo32(this.id),
2627
+ this.clip.marshall()
2628
+ );
2629
+ return rawData;
2630
+ },
2631
+
2632
+ demarshall: function (queue, expSize) {
2633
+ this.expectedSize = expSize || this.objectSize;
2634
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2635
+ this.id = this.bytesToInt32NoAllocate(queue);
2636
+ this.clip = new wdi.SpiceClip().demarshall(queue);
2637
+ return this;
2638
+ }
2639
+ });
2640
+
2641
+ wdi.SpiceStreamDataSized = $.spcExtend(wdi.SpiceObject, {
2642
+ objectSize: 12,
2643
+
2644
+ init: function (c) {
2645
+ c ? this.setContent(c) : false;
2646
+ },
2647
+
2648
+ setContent: function (c) {
2649
+
2650
+ },
2651
+
2652
+ marshall: function () {
2653
+ var rawData = [];
2654
+ rawData = rawData.concat(
2655
+ this.numberTo32(this.id),
2656
+ this.numberTo32(this.width),
2657
+ this.numberTo32(this.height)
2658
+ )
2659
+ return rawData;
2660
+ },
2661
+
2662
+ demarshall: function (queue, expSize) {
2663
+ this.expectedSize = expSize || this.objectSize;
2664
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2665
+ this.id = this.bytesToInt32NoAllocate(queue);
2666
+ this.width = this.bytesToInt32NoAllocate(queue);
2667
+ this.height = this.bytesToInt32NoAllocate(queue);
2668
+ return this;
2669
+ }
2670
+ });
2671
+
2672
+ // TODO
2673
+ wdi.SpiceStreamActiveReport = $.spcExtend(wdi.SpiceObject, {
2674
+ objectSize: 4,
2675
+
2676
+ init: function (c) {
2677
+ c ? this.setContent(c) : false;
2678
+ },
2679
+
2680
+ setContent: function (c) {
2681
+
2682
+ },
2683
+
2684
+ marshall: function () {
2685
+
2686
+ },
2687
+
2688
+ demarshall: function (queue, expSize) {
2689
+
2690
+ }
2691
+ });
2692
+
2693
+ wdi.SpiceModifierData = $.spcExtend(wdi.SpiceObject, {
2694
+ objectSize: 8,
2695
+
2696
+ init: function (c) {
2697
+ c ? this.setContent(c) : false;
2698
+ },
2699
+
2700
+ setContent: function (c) {
2701
+
2702
+ },
2703
+
2704
+ setModifierData: function (modifierData) {
2705
+ if(modifierData === 6) {
2706
+ wdi.Keymap.capsLock = true
2707
+ wdi.Keymap.numLock = true
2708
+ } else if(modifierData === 4) {
2709
+ wdi.Keymap.capsLock = true
2710
+ wdi.Keymap.numLock = false
2711
+ } else if(modifierData === 2) {
2712
+ wdi.Keymap.capsLock = false
2713
+ wdi.Keymap.numLock = true
2714
+ } else if(modifierData === 0) {
2715
+ wdi.Keymap.capsLock = false
2716
+ wdi.Keymap.numLock = false
2717
+ }
2718
+ },
2719
+
2720
+ marshall: function () {
2721
+ var rawData = [];
2722
+ rawData = rawData.concat(
2723
+ this.numberTo16(this.data)
2724
+ );
2725
+ return rawData;
2726
+ },
2727
+
2728
+ demarshall: function (queue, expSize) {
2729
+ this.expectedSize = expSize || this.objectSize;
2730
+ this.data = this.bytesToInt16NoAllocate(queue);
2731
+ return this;
2732
+ }
2733
+ });
2734
+
2735
+ wdi.SpiceResourceList = $.spcExtend(wdi.SpiceObject, {
2736
+ objectSize: 2,
2737
+
2738
+ init: function (c) {
2739
+ c ? this.setContent(c) : false;
2740
+ },
2741
+
2742
+ setContent: function (c) {
2743
+
2744
+ },
2745
+
2746
+ marshall: function () {
2747
+ var rawData = [];
2748
+ for (var i = 0; i < this.num_items; i++) {
2749
+ rawData = rawData.concat(
2750
+ this.numberTo8(this.items[i].type),
2751
+ this.numberTo64(this.items[i].id)
2752
+ );
2753
+ }
2754
+ return rawData;
2755
+ },
2756
+
2757
+ demarshall: function (queue, expSize) {
2758
+ this.expectedSize = expSize || this.objectSize;
2759
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: 'Not enough queue to read', errorCode: 3});
2760
+ this.num_items = this.bytesToInt16NoAllocate(queue);
2761
+ this.items = [];
2762
+ for (var i = 0; i < this.num_items; i++) {
2763
+ this.items[i] = {
2764
+ type: this.bytesToInt8(queue.shift(1)),
2765
+ id: this.bytesToInt64(queue.shift(8))
2766
+ };
2767
+ }
2768
+ return this;
2769
+ }
2770
+ });
2771
+
2772
+ wdi.SpiceMsgMainAgentTokens = $.spcExtend(wdi.SpiceObject, {
2773
+ objectSize: 4,
2774
+
2775
+ init: function (c) {
2776
+ c ? this.setContent(c) : false;
2777
+ },
2778
+
2779
+ setContent: function (c) {
2780
+ this.num_tokens = c.num_tokens;
2781
+ },
2782
+
2783
+ marshall: function () {
2784
+ this.rawData = [];
2785
+ this.rawData = this.rawData.concat(
2786
+ this.numberTo32(this.num_tokens)
2787
+ );
2788
+ return this.rawData;
2789
+ },
2790
+
2791
+ demarshall: function (queue, expSize) {
2792
+ this.expectedSize = expSize || this.objectSize;
2793
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
2794
+ this.num_tokens = this.bytesToInt32NoAllocate(queue);
2795
+
2796
+
2797
+ return this;
2798
+ }
2799
+ });
2800
+
2801
+ wdi.SpiceMsgMainAgentDisconnected = $.spcExtend(wdi.SpiceObject, {
2802
+ objectSize: 4,
2803
+
2804
+ init: function (c) {
2805
+ c ? this.setContent(c) : false;
2806
+ },
2807
+
2808
+ setContent: function (c) {
2809
+ this.error = c.error;
2810
+ },
2811
+
2812
+ marshall: function () {
2813
+ this.rawData = [];
2814
+ this.rawData = this.rawData.concat(
2815
+ this.numberTo32(this.error)
2816
+ );
2817
+ return this.rawData;
2818
+ },
2819
+
2820
+ demarshall: function (queue, expSize) {
2821
+ this.expectedSize = expSize || this.objectSize;
2822
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
2823
+ this.error = this.bytesToInt32NoAllocate(queue);
2824
+
2825
+
2826
+ return this;
2827
+ }
2828
+ });
2829
+
2830
+ wdi.SpiceMsgMainAgentData = $.spcExtend(wdi.SpiceObject, {
2831
+ objectSize: 4,
2832
+
2833
+ init: function (c) {
2834
+ c ? this.setContent(c) : false;
2835
+ },
2836
+
2837
+ setContent: function (c) {
2838
+ this.agentMessage = c.agentMessage;
2839
+ },
2840
+
2841
+ marshall: function () {
2842
+ this.rawData = [];
2843
+ this.rawData = this.rawData.concat(
2844
+ this.agentMessage.marshall()
2845
+ );
2846
+ return this.rawData;
2847
+ },
2848
+
2849
+ demarshall: function (queue, expSize) {
2850
+ this.expectedSize = expSize || this.objectSize;
2851
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
2852
+ this.agentMessage = new wdi.VDAgentMessage().demarshall(queue);
2853
+
2854
+
2855
+ return this;
2856
+ }
2857
+ });
2858
+
2859
+ wdi.VDIChunkHeader = $.spcExtend(wdi.SpiceObject, {
2860
+ objectSize: 8,
2861
+
2862
+ init: function (c) {
2863
+ c ? this.setContent(c) : false;
2864
+ },
2865
+
2866
+ setContent: function (c) {
2867
+ this.port = c.port;
2868
+ this.size = c.size;
2869
+ this.packet = c.packet;
2870
+ },
2871
+
2872
+ marshall: function () {
2873
+ this.rawData = [];
2874
+ var data = this.packet.marshall();
2875
+ this.rawData = this.rawData.concat(
2876
+ this.numberTo32(this.port),
2877
+ this.numberTo32(data.length),
2878
+ data
2879
+ );
2880
+ return this.rawData;
2881
+ },
2882
+
2883
+ demarshall: function (queue, expSize) {
2884
+ this.expectedSize = expSize || this.objectSize;
2885
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
2886
+
2887
+
2888
+
2889
+ return this;
2890
+ }
2891
+ });
2892
+
2893
+ wdi.VDAgentMessage = $.spcExtend(wdi.SpiceObject, {
2894
+ objectSize: 20,
2895
+
2896
+ init: function (c) {
2897
+ c ? this.setContent(c) : false;
2898
+ },
2899
+
2900
+ setContent: function (c) {
2901
+ this.protocol = c.protocol;
2902
+ this.type = c.type;
2903
+ this.opaque = c.opaque;
2904
+ this.size = c.size;
2905
+ this.data = c.data;
2906
+ },
2907
+
2908
+ marshall: function () {
2909
+ this.rawData = [];
2910
+ var data = this.data.marshall();
2911
+ this.rawData = this.rawData.concat(
2912
+ this.numberTo32(this.protocol),
2913
+ this.numberTo32(this.type),
2914
+ this.numberTo64(this.opaque),
2915
+ this.numberTo32(data.length),
2916
+ data
2917
+ );
2918
+ return this.rawData;
2919
+ },
2920
+
2921
+ demarshall: function (queue, expSize) {
2922
+ this.expectedSize = expSize || this.objectSize;
2923
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
2924
+
2925
+ this.protocol = this.bytesToInt32NoAllocate(queue);
2926
+ this.type = this.bytesToInt32NoAllocate(queue);
2927
+ this.opaque = this.bytesToInt64NoAllocate(queue);
2928
+ this.size = this.bytesToInt32NoAllocate(queue);
2929
+
2930
+ if (this.type == wdi.AgentMessageTypes.VD_AGENT_GET_WINDOWS_LIST) {
2931
+ var str = this.bytesToString(queue.shift(queue.length));
2932
+ if (str == "change") {
2933
+ this.window_list = str;
2934
+ } else {
2935
+ this.window_list = jQuery.parseJSON(str);
2936
+ }
2937
+ } else if(this.type == wdi.AgentMessageTypes.VD_AGENT_ANNOUNCE_CAPABILITIES) {
2938
+ this.caps = new wdi.VDAgentAnnounceCapabilities().demarshall(queue);
2939
+ } else if(this.type == wdi.AgentMessageTypes.VD_AGENT_CLIPBOARD_GRAB) {
2940
+ if(queue.getLength() == 0) {
2941
+ this.clipboardType = wdi.ClipBoardTypes.VD_AGENT_CLIPBOARD_NONE;
2942
+ } else {
2943
+ this.clipboardType = this.bytesToInt32NoAllocate(queue);
2944
+ }
2945
+ } else if(this.type == wdi.AgentMessageTypes.VD_AGENT_CLIPBOARD_REQUEST) {
2946
+ this.clipboardType = this.bytesToInt32NoAllocate(queue);
2947
+ } else if(this.type == wdi.AgentMessageTypes.VD_AGENT_CLIPBOARD) {
2948
+ this.clipboardType = this.bytesToInt32NoAllocate(queue);
2949
+ this.clipboardData = this.bytesToString(queue.shift(queue.length));
2950
+ }
2951
+
2952
+
2953
+
2954
+ return this;
2955
+ }
2956
+ });
2957
+
2958
+ wdi.VDAgentHwndWindow = $.spcExtend(wdi.SpiceObject, {
2959
+ objectSize: 4,
2960
+
2961
+ init: function (c) {
2962
+ c ? this.setContent(c) : false;
2963
+ },
2964
+
2965
+ setContent: function (c) {
2966
+ this.hwnd = c.hwnd;
2967
+ },
2968
+
2969
+ marshall: function () {
2970
+ this.rawData = [];
2971
+ this.rawData = this.rawData.concat(
2972
+ this.numberTo32(this.hwnd)
2973
+ );
2974
+ return this.rawData;
2975
+ },
2976
+
2977
+ demarshall: function (queue, expSize) {
2978
+ this.expectedSize = expSize || this.objectSize;
2979
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
2980
+
2981
+
2982
+
2983
+ return this;
2984
+ }
2985
+ });
2986
+
2987
+ wdi.VDAgentMoveWindow = $.spcExtend(wdi.SpiceObject, {
2988
+ objectSize: 12,
2989
+
2990
+ init: function (c) {
2991
+ c ? this.setContent(c) : false;
2992
+ },
2993
+
2994
+ setContent: function (c) {
2995
+ this.hwnd = c.hwnd;
2996
+ this.x = c.x;
2997
+ this.y = c.y;
2998
+ },
2999
+
3000
+ marshall: function () {
3001
+ this.rawData = [];
3002
+ this.rawData = this.rawData.concat(
3003
+ this.numberTo32(this.hwnd),
3004
+ this.numberTo32(this.x),
3005
+ this.numberTo32(this.y)
3006
+ );
3007
+ return this.rawData;
3008
+ },
3009
+
3010
+ demarshall: function (queue, expSize) {
3011
+ this.expectedSize = expSize || this.objectSize;
3012
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3013
+
3014
+
3015
+
3016
+ return this;
3017
+ }
3018
+ });
3019
+
3020
+ wdi.VDAgentResizeWindow = $.spcExtend(wdi.SpiceObject, {
3021
+ objectSize: 12,
3022
+
3023
+ init: function (c) {
3024
+ c ? this.setContent(c) : false;
3025
+ },
3026
+
3027
+ setContent: function (c) {
3028
+ this.hwnd = c.hwnd;
3029
+ this.width = c.width;
3030
+ this.height = c.height;
3031
+ },
3032
+
3033
+ marshall: function () {
3034
+ this.rawData = [];
3035
+ this.rawData = this.rawData.concat(
3036
+ this.numberTo32(this.hwnd),
3037
+ this.numberTo32(this.width),
3038
+ this.numberTo32(this.height)
3039
+ );
3040
+ return this.rawData;
3041
+ },
3042
+
3043
+ demarshall: function (queue, expSize) {
3044
+ this.expectedSize = expSize || this.objectSize;
3045
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3046
+
3047
+
3048
+
3049
+ return this;
3050
+ }
3051
+ });
3052
+
3053
+ wdi.VDAgentMonitorsConfig = $.spcExtend(wdi.SpiceObject, {
3054
+ objectSize: 8,
3055
+
3056
+ init: function (c) {
3057
+ c ? this.setContent(c) : false;
3058
+ },
3059
+
3060
+ setContent: function (c) {
3061
+ this.num_of_monitors = c.num_of_monitors;
3062
+ this.flags = c.flags;
3063
+ this.data = c.data;
3064
+ },
3065
+
3066
+ marshall: function () {
3067
+ this.rawData = [];
3068
+ this.rawData = this.rawData.concat(
3069
+ this.numberTo32(this.num_of_monitors),
3070
+ this.numberTo32(this.flags),
3071
+ this.data.marshall()
3072
+ );
3073
+ return this.rawData;
3074
+ },
3075
+
3076
+ demarshall: function (queue, expSize) {
3077
+ this.expectedSize = expSize || this.objectSize;
3078
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3079
+
3080
+
3081
+
3082
+ return this;
3083
+ }
3084
+ });
3085
+
3086
+ wdi.VDAgentMonConfig = $.spcExtend(wdi.SpiceObject, {
3087
+ objectSize: 20,
3088
+
3089
+ init: function (c) {
3090
+ c ? this.setContent(c) : false;
3091
+ },
3092
+
3093
+ setContent: function (c) {
3094
+ this.height = c.height;
3095
+ this.width = c.width;
3096
+ this.depth = c.depth;
3097
+ this.x = c.x;
3098
+ this.y = c.y;
3099
+ },
3100
+
3101
+ marshall: function () {
3102
+ this.rawData = [];
3103
+ this.rawData = this.rawData.concat(
3104
+ this.numberTo32(this.height),
3105
+ this.numberTo32(this.width),
3106
+ this.numberTo32(this.depth),
3107
+ this.numberTo32(this.x),
3108
+ this.numberTo32(this.y)
3109
+ );
3110
+ return this.rawData;
3111
+ },
3112
+
3113
+ demarshall: function (queue, expSize) {
3114
+ this.expectedSize = expSize || this.objectSize;
3115
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3116
+
3117
+
3118
+
3119
+ return this;
3120
+ }
3121
+ });
3122
+
3123
+ wdi.VDAgentAnnounceCapabilities = $.spcExtend(wdi.SpiceObject, {
3124
+ objectSize: 8,
3125
+
3126
+ init: function (c) {
3127
+ c ? this.setContent(c) : false;
3128
+ },
3129
+
3130
+ setContent: function (c) {
3131
+ this.request = c.request;
3132
+ this.caps = c.caps;
3133
+ },
3134
+
3135
+ marshall: function () {
3136
+ this.rawData = [];
3137
+ this.rawData = this.rawData.concat(
3138
+ this.numberTo32(this.request),
3139
+ this.numberTo32(this.caps)
3140
+ );
3141
+ return this.rawData;
3142
+ },
3143
+
3144
+ demarshall: function (queue, expSize) {
3145
+ this.expectedSize = expSize || this.objectSize;
3146
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3147
+
3148
+ this.request = this.bytesToInt32NoAllocate(queue);
3149
+ this.caps = this.bytesToInt32NoAllocate(queue);
3150
+
3151
+
3152
+
3153
+ return this;
3154
+ }
3155
+ });
3156
+
3157
+ wdi.VDAgentExecuteCommand = $.spcExtend(wdi.SpiceObject, {
3158
+ objectSize: 4,
3159
+
3160
+ init: function (c) {
3161
+ c ? this.setContent(c) : false;
3162
+ },
3163
+
3164
+ setContent: function (c) {
3165
+ this.size = c.size;
3166
+ this.data = c.data;
3167
+ },
3168
+
3169
+ marshall: function () {
3170
+ this.rawData = [];
3171
+ this.rawData = this.rawData.concat(
3172
+ this.numberTo32(this.size),
3173
+ this.stringToBytes(this.data)
3174
+ );
3175
+ return this.rawData;
3176
+ },
3177
+
3178
+ demarshall: function (queue, expSize) {
3179
+ this.expectedSize = expSize || this.objectSize;
3180
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3181
+
3182
+
3183
+
3184
+ return this;
3185
+ }
3186
+ });
3187
+
3188
+ wdi.VDAgentClipboardRequest = $.spcExtend(wdi.SpiceObject, {
3189
+ objectSize: 4,
3190
+
3191
+ init: function (c) {
3192
+ c ? this.setContent(c) : false;
3193
+ },
3194
+
3195
+ setContent: function (c) {
3196
+ this.type = c.type;
3197
+ },
3198
+
3199
+ marshall: function () {
3200
+ this.rawData = [];
3201
+ this.rawData = this.rawData.concat(
3202
+ this.numberTo32(this.type)
3203
+ );
3204
+ return this.rawData;
3205
+ },
3206
+
3207
+ demarshall: function (queue, expSize) {
3208
+ this.expectedSize = expSize || this.objectSize;
3209
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3210
+
3211
+ this.type = this.bytesToInt32NoAllocate(queue);
3212
+
3213
+ return this;
3214
+ }
3215
+ });
3216
+
3217
+ wdi.VDAgentClipboardGrab = $.spcExtend(wdi.SpiceObject, {
3218
+ objectSize: 4,
3219
+
3220
+ init: function (c) {
3221
+ c ? this.setContent(c) : false;
3222
+ },
3223
+
3224
+ setContent: function (c) {
3225
+ this.types = c.types;
3226
+ },
3227
+
3228
+ marshall: function () {
3229
+ this.rawData = [];
3230
+ this.rawData = this.rawData.concat(
3231
+ this.numberTo32(this.types)
3232
+ );
3233
+ return this.rawData;
3234
+ },
3235
+
3236
+ demarshall: function (queue, expSize) {
3237
+ this.expectedSize = expSize || this.objectSize;
3238
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3239
+
3240
+ this.types = this.bytesToInt32NoAllocate(queue);
3241
+
3242
+
3243
+
3244
+ return this;
3245
+ }
3246
+ });
3247
+
3248
+ wdi.VDAgentClipboard = $.spcExtend(wdi.SpiceObject, {
3249
+ objectSize: 6,
3250
+
3251
+ init: function (c) {
3252
+ c ? this.setContent(c) : false;
3253
+ },
3254
+
3255
+ setContent: function (c) {
3256
+ this.type = c.type;
3257
+ this.data = c.data;
3258
+ },
3259
+
3260
+ marshall: function () {
3261
+ this.rawData = [];
3262
+ var data;
3263
+ if(this.type === wdi.ClipBoardTypes.VD_AGENT_CLIPBOARD_UTF8_TEXT){
3264
+ data = this.stringToBytes(this.data);
3265
+ } else {
3266
+ data = this.arrayBufferToBytes(this.data);
3267
+ }
3268
+ this.rawData = this.rawData.concat(
3269
+ this.numberTo32(this.type),
3270
+ data
3271
+ );
3272
+ return this.rawData;
3273
+ },
3274
+
3275
+ demarshall: function (queue, expSize) {
3276
+ this.expectedSize = expSize || this.objectSize;
3277
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3278
+
3279
+ this.type = this.bytesToInt32NoAllocate(queue);
3280
+ this.data = queue.getData();
3281
+
3282
+
3283
+
3284
+ return this;
3285
+ }
3286
+ });
3287
+
3288
+ wdi.PlaybackMode = $.spcExtend(wdi.SpiceObject, {
3289
+ objectSize: 6,
3290
+
3291
+ init: function (c) {
3292
+ c ? this.setContent(c) : false;
3293
+ },
3294
+
3295
+ setContent: function (c) {
3296
+ this.multimedia_time = c.multimedia_time;
3297
+ this.audio_data_mode = c.audio_data_mode;
3298
+ this.data = c.data;
3299
+ },
3300
+
3301
+
3302
+
3303
+ demarshall: function (queue, expSize) {
3304
+ this.expectedSize = expSize || this.objectSize;
3305
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3306
+
3307
+ this.multimedia_time = this.bytesToInt32NoAllocate(queue);
3308
+ this.audio_data_mode = this.bytesToInt16NoAllocate(queue);
3309
+ this.data = queue.getData();
3310
+
3311
+
3312
+ return this;
3313
+ }
3314
+ });
3315
+
3316
+ wdi.PlaybackStart = $.spcExtend(wdi.SpiceObject, {
3317
+ objectSize: 14,
3318
+ init: function (c) {
3319
+ c ? this.setContent(c) : false;
3320
+ },
3321
+
3322
+ setContent: function (c) {
3323
+ this.channels = c.channels;
3324
+ this.format = c.format;
3325
+ this.frequency = c.frequency;
3326
+ this.time = c.time;
3327
+ },
3328
+
3329
+
3330
+
3331
+ demarshall: function (queue, expSize) {
3332
+ this.expectedSize = expSize || this.objectSize;
3333
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3334
+
3335
+ this.channels = this.bytesToInt32NoAllocate(queue);
3336
+ this.format = this.bytesToInt16NoAllocate(queue);
3337
+ this.frequency = this.bytesToInt32NoAllocate(queue);
3338
+ this.time = this.bytesToInt32NoAllocate(queue);
3339
+
3340
+
3341
+ return this;
3342
+ }
3343
+ });
3344
+
3345
+ wdi.PlaybackData = $.spcExtend(wdi.SpiceObject, {
3346
+ objectSize: 4,
3347
+
3348
+ init: function (c) {
3349
+ c ? this.setContent(c) : false;
3350
+ },
3351
+
3352
+ setContent: function (c) {
3353
+ this.multimedia_time = c.multimedia_time;
3354
+ this.data = c.data;
3355
+ },
3356
+
3357
+
3358
+
3359
+ demarshall: function (queue, expSize) {
3360
+ this.expectedSize = expSize || this.objectSize;
3361
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3362
+
3363
+ this.multimedia_time = this.bytesToInt32NoAllocate(queue);
3364
+ this.data = queue.getData();
3365
+
3366
+
3367
+ return this;
3368
+ }
3369
+ });
3370
+
3371
+ wdi.MainMultiMediaTime = $.spcExtend(wdi.SpiceObject, {
3372
+ objectSize: 4,
3373
+
3374
+ init: function (c) {
3375
+ c ? this.setContent(c) : false;
3376
+ },
3377
+
3378
+ setContent: function (c) {
3379
+ this.multimedia_time = c.multimedia_time;
3380
+ },
3381
+
3382
+ marshall: function () {
3383
+ },
3384
+
3385
+ demarshall: function (queue, expSize) {
3386
+ this.expectedSize = expSize || this.objectSize;
3387
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3388
+
3389
+ this.multimedia_time = this.bytesToInt32NoAllocate(queue);
3390
+
3391
+ return this;
3392
+ }
3393
+ });
3394
+
3395
+ wdi.PlaybackStop = $.spcExtend(wdi.SpiceObject, {
3396
+ objectSize: 0,
3397
+
3398
+
3399
+
3400
+
3401
+ demarshall: function (queue, expSize) {
3402
+ this.expectedSize = expSize || this.objectSize;
3403
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3404
+
3405
+ return this;
3406
+ }
3407
+ });
3408
+
3409
+ wdi.MainMChannelsList = $.spcExtend(wdi.SpiceObject, {
3410
+ objectSize: 4,
3411
+
3412
+ init: function (c) {
3413
+ c ? this.setContent(c) : false;
3414
+ },
3415
+
3416
+ setContent: function (c) {
3417
+ this.num_of_channels = c.num_of_channels;
3418
+ },
3419
+
3420
+ marshall: function () {
3421
+ },
3422
+
3423
+ demarshall: function (queue, expSize) {
3424
+ this.expectedSize = expSize || this.objectSize;
3425
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3426
+
3427
+ this.num_of_channels = this.bytesToInt32NoAllocate(queue);
3428
+ this.channels = [];
3429
+ var type = null;
3430
+ var id = null;
3431
+ for(var i = 0;i<this.num_of_channels;i++) {
3432
+ type = this.bytesToInt8NoAllocate(queue);
3433
+ id = this.bytesToInt8NoAllocate(queue);
3434
+ this.channels.push(type);
3435
+ }
3436
+
3437
+
3438
+ return this;
3439
+ }
3440
+ });
3441
+
3442
+ wdi.SpiceDisplayInvalidAllPalettes = $.spcExtend(wdi.SpiceObject, {
3443
+ objectSize: 0,
3444
+
3445
+ demarshall: function (queue, expSize) {
3446
+ this.expectedSize = expSize || this.objectSize;
3447
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3448
+
3449
+ return this;
3450
+ }
3451
+ });
3452
+
3453
+ wdi.SpiceDisplayMark = $.spcExtend(wdi.SpiceObject, {
3454
+ objectSize: 0,
3455
+
3456
+ demarshall: function (queue, expSize) {
3457
+ this.expectedSize = expSize || this.objectSize;
3458
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3459
+
3460
+ return this;
3461
+ }
3462
+ });
3463
+
3464
+ wdi.SpiceDisplayReset = $.spcExtend(wdi.SpiceObject, {
3465
+ objectSize: 0,
3466
+
3467
+ demarshall: function (queue, expSize) {
3468
+ this.expectedSize = expSize || this.objectSize;
3469
+ if (queue.getLength() < this.expectedSize) throw new wdi.Exception({message: "Not enough queue to read", errorCode: 3});
3470
+
3471
+ return this;
3472
+ }
3473
+ });
3474
+