PortableScanner_def_g.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. #ifndef __PORTABLESCANNER_DEF_G_H
  2. #define __PORTABLESCANNER_DEF_G_H
  3. #pragma once
  4. // This code is generated by spgen tool!
  5. #include "SpHelper.h"
  6. namespace PortableScanner {
  7. //
  8. // const goes here
  9. //
  10. #define PSSTATUS_INVALID 0
  11. #define PSSTATUS_NOTHOLD 1
  12. #define PSSTATUS_IDLE 2
  13. #define PSSTATUS_PREVIEW 3
  14. #define PSSTATUS_PICTURE 4
  15. enum CapTypeEnum {
  16. CAMTYPE_UNKNOWN = 0,
  17. CAMTYPE_ENV, /*PAD£¬Ç°ÖÃÉãÏñÍ·*/
  18. CAMTYPE_OPT,
  19. CAMTYPE_EWS,
  20. CAMTYPE_HSPS,
  21. CAMTYPE_CIRCLE,
  22. CAMTYPE_MAX
  23. };
  24. #define PortableScannerService_Method_BindCameraDevice 0
  25. #define PortableScannerService_Method_DropOffDevice 1
  26. #define PortableScannerService_Method_StartPreview 2
  27. #define PortableScannerService_Method_CancelPreview 3
  28. #define PortableScannerService_Method_ScanImage 4
  29. #define PortableScannerService_Method_ScanImageEx 5
  30. #define PortableScannerService_Method_SetProperty 6
  31. #define PortableScannerService_Method_SetWinPos 7
  32. #define PortableScannerService_Method_ShowProperty 8
  33. #define PortableScannerService_Method_GetDevStatus 9
  34. #define PortableScannerService_Method_GetDevInfo 65535
  35. #define PortableScannerService_Method_Exit 10
  36. #define PortableScannerService_MethodSignature_BindCameraDevice 138118389
  37. #define PortableScannerService_MethodSignature_DropOffDevice 1948487618
  38. #define PortableScannerService_MethodSignature_StartPreview 220854261
  39. #define PortableScannerService_MethodSignature_CancelPreview 961536349
  40. #define PortableScannerService_MethodSignature_ScanImage -296593544
  41. #define PortableScannerService_MethodSignature_ScanImageEx -979149528
  42. #define PortableScannerService_MethodSignature_SetProperty -712141050
  43. #define PortableScannerService_MethodSignature_SetWinPos 1478816537
  44. #define PortableScannerService_MethodSignature_ShowProperty -2138273708
  45. #define PortableScannerService_MethodSignature_GetDevStatus -1140141235
  46. #define PortableScannerService_MethodSignature_GetDevInfo 296205965
  47. #define PortableScannerService_MethodSignature_Exit -1158854104
  48. struct PortableScannerService_BindCameraDevice_Req
  49. {
  50. CSimpleStringA devName;
  51. int devId;
  52. int type;
  53. short force;
  54. void Serialize(SpBuffer &Buf)
  55. {
  56. auto & buf = Buf & devName & devId & type & force;
  57. }
  58. };
  59. struct PortableScannerService_BindCameraDevice_Ans
  60. {
  61. int usedId;
  62. CSimpleStringA checkcode;
  63. void Serialize(SpBuffer &Buf)
  64. {
  65. auto & buf = Buf & usedId & checkcode;
  66. }
  67. };
  68. struct PortableScannerService_DropOffDevice_Info
  69. {
  70. void Serialize(SpBuffer &Buf)
  71. {
  72. }
  73. };
  74. struct PortableScannerService_StartPreview_Req
  75. {
  76. short rotateType;
  77. short scanType;
  78. short colorType;
  79. short reserved1;
  80. short reserved2;
  81. short reserved3;
  82. short reserved4;
  83. void Serialize(SpBuffer &Buf)
  84. {
  85. auto & buf = Buf & rotateType & scanType & colorType & reserved1 & reserved2 & reserved3 & reserved4;
  86. }
  87. };
  88. struct PortableScannerService_StartPreview_Ans
  89. {
  90. int retCode;
  91. int reserved1;
  92. CAutoArray<int> reserved2;
  93. void Serialize(SpBuffer &Buf)
  94. {
  95. auto & buf = Buf & retCode & reserved1 & reserved2;
  96. }
  97. };
  98. struct PortableScannerService_CancelPreview_Req
  99. {
  100. bool bOnlyHide;
  101. int reserved1;
  102. void Serialize(SpBuffer &Buf)
  103. {
  104. auto & buf = Buf & bOnlyHide & reserved1;
  105. }
  106. };
  107. struct PortableScannerService_CancelPreview_Ans
  108. {
  109. void Serialize(SpBuffer &Buf)
  110. {
  111. }
  112. };
  113. struct PortableScannerService_ScanImage_Req
  114. {
  115. int reserved1;
  116. int reserved2;
  117. void Serialize(SpBuffer &Buf)
  118. {
  119. auto & buf = Buf & reserved1 & reserved2;
  120. }
  121. };
  122. struct PortableScannerService_ScanImage_Ans
  123. {
  124. CSimpleStringA filePath;
  125. CBlob imageData;
  126. int reserved1;
  127. CSimpleStringA reserved2;
  128. void Serialize(SpBuffer &Buf)
  129. {
  130. auto & buf = Buf & filePath & imageData & reserved1 & reserved2;
  131. }
  132. };
  133. struct PortableScannerService_ScanImageEx_Req
  134. {
  135. int reserved1;
  136. int reserved2;
  137. void Serialize(SpBuffer &Buf)
  138. {
  139. auto & buf = Buf & reserved1 & reserved2;
  140. }
  141. };
  142. struct PortableScannerService_ScanImageEx_Ans
  143. {
  144. CSimpleStringA filePath;
  145. CBlob imageData;
  146. int reserved1;
  147. CSimpleStringA reserved2;
  148. void Serialize(SpBuffer &Buf)
  149. {
  150. auto & buf = Buf & filePath & imageData & reserved1 & reserved2;
  151. }
  152. };
  153. struct PortableScannerService_SetProperty_Req
  154. {
  155. short rotateType;
  156. short scanType;
  157. short colorType;
  158. short reserved1;
  159. short reserved2;
  160. short reserved3;
  161. short reserved4;
  162. void Serialize(SpBuffer &Buf)
  163. {
  164. auto & buf = Buf & rotateType & scanType & colorType & reserved1 & reserved2 & reserved3 & reserved4;
  165. }
  166. };
  167. struct PortableScannerService_SetProperty_Ans
  168. {
  169. int retCode;
  170. int reserved1;
  171. CAutoArray<int> reserved2;
  172. void Serialize(SpBuffer &Buf)
  173. {
  174. auto & buf = Buf & retCode & reserved1 & reserved2;
  175. }
  176. };
  177. struct PortableScannerService_SetWinPos_Req
  178. {
  179. int type;
  180. int pointX;
  181. int pointY;
  182. int nWidth;
  183. int reserved4;
  184. void Serialize(SpBuffer &Buf)
  185. {
  186. auto & buf = Buf & type & pointX & pointY & nWidth & reserved4;
  187. }
  188. };
  189. struct PortableScannerService_SetWinPos_Ans
  190. {
  191. void Serialize(SpBuffer &Buf)
  192. {
  193. }
  194. };
  195. struct PortableScannerService_ShowProperty_Req
  196. {
  197. void Serialize(SpBuffer &Buf)
  198. {
  199. }
  200. };
  201. struct PortableScannerService_ShowProperty_Ans
  202. {
  203. void Serialize(SpBuffer &Buf)
  204. {
  205. }
  206. };
  207. struct PortableScannerService_GetDevStatus_Req
  208. {
  209. void Serialize(SpBuffer &Buf)
  210. {
  211. }
  212. };
  213. struct PortableScannerService_GetDevStatus_Ans
  214. {
  215. int connected;
  216. int showing;
  217. int previewing;
  218. int devIndex;
  219. short type;
  220. CSimpleStringA checkcode;
  221. void Serialize(SpBuffer &Buf)
  222. {
  223. auto & buf = Buf & connected & showing & previewing & devIndex & type & checkcode;
  224. }
  225. };
  226. struct PortableScannerService_GetDevInfo_Req
  227. {
  228. void Serialize(SpBuffer &Buf)
  229. {
  230. }
  231. };
  232. struct PortableScannerService_GetDevInfo_Ans
  233. {
  234. CSimpleStringA type;
  235. CSimpleStringA model;
  236. CSimpleStringA version;
  237. int state;
  238. void Serialize(SpBuffer &Buf)
  239. {
  240. auto & buf = Buf & type & model & version & state;
  241. }
  242. };
  243. struct PortableScannerService_Exit_Info
  244. {
  245. void Serialize(SpBuffer &Buf)
  246. {
  247. }
  248. };
  249. ///////////////////////////
  250. } // namespace PortableScanner
  251. #endif // __PORTABLESCANNER_DEF_G_H