ResourceWatcher_server_g.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  1. #ifndef __RESOURCEWATCHER_SERVER_G_H
  2. #define __RESOURCEWATCHER_SERVER_G_H
  3. #pragma once
  4. // This code is generated by spgen tool!
  5. #include "ResourceWatcher_def_g.h"
  6. namespace ResourceWatcher {
  7. class ResourceWatcherService_ServerSessionBase : public CServerSessionBase
  8. {
  9. public:
  10. ResourceWatcherService_ServerSessionBase()
  11. {
  12. /// override by user
  13. }
  14. virtual ~ResourceWatcherService_ServerSessionBase()
  15. {
  16. /// override by user
  17. }
  18. virtual bool IsExclusive() { return false; }
  19. virtual bool IsSessionOverlap() { return true; }
  20. virtual ErrorCodeEnum GetMessageAttr(DWORD dwMessageID, DWORD dwSignature, bool &bOverlap)
  21. {
  22. ErrorCodeEnum Error = Error_Succeed;
  23. switch (dwMessageID) {
  24. case ResourceWatcherService_Method_Fetch:
  25. if (dwSignature == ResourceWatcherService_MethodSignature_Fetch) {
  26. bOverlap = true;
  27. } else {
  28. Error = Error_MethodSignatureFailed;
  29. }
  30. break;
  31. case ResourceWatcherService_Method_GetDevInfo:
  32. if (dwSignature == ResourceWatcherService_MethodSignature_GetDevInfo) {
  33. bOverlap = true;
  34. } else {
  35. Error = Error_MethodSignatureFailed;
  36. }
  37. break;
  38. case ResourceWatcherService_Method_GetCardSwiper:
  39. if (dwSignature == ResourceWatcherService_MethodSignature_GetCardSwiper) {
  40. bOverlap = true;
  41. } else {
  42. Error = Error_MethodSignatureFailed;
  43. }
  44. break;
  45. case ResourceWatcherService_Method_GetCpuType:
  46. if (dwSignature == ResourceWatcherService_MethodSignature_GetCpuType) {
  47. bOverlap = true;
  48. } else {
  49. Error = Error_MethodSignatureFailed;
  50. }
  51. break;
  52. case ResourceWatcherService_Method_OperateFile:
  53. if (dwSignature == ResourceWatcherService_MethodSignature_OperateFile) {
  54. bOverlap = true;
  55. } else {
  56. Error = Error_MethodSignatureFailed;
  57. }
  58. break;
  59. case ResourceWatcherService_Method_ExtractEventLog:
  60. if (dwSignature == ResourceWatcherService_MethodSignature_ExtractEventLog) {
  61. bOverlap = true;
  62. } else {
  63. Error = Error_MethodSignatureFailed;
  64. }
  65. break;
  66. case ResourceWatcherService_Method_CheckNetType:
  67. if (dwSignature == ResourceWatcherService_MethodSignature_CheckNetType) {
  68. bOverlap = true;
  69. } else {
  70. Error = Error_MethodSignatureFailed;
  71. }
  72. break;
  73. case ResourceWatcherService_Method_GetBizLinks:
  74. if (dwSignature == ResourceWatcherService_MethodSignature_GetBizLinks) {
  75. bOverlap = true;
  76. } else {
  77. Error = Error_MethodSignatureFailed;
  78. }
  79. break;
  80. case ResourceWatcherService_Method_BizLinkDetect:
  81. if (dwSignature == ResourceWatcherService_MethodSignature_BizLinkDetect) {
  82. bOverlap = true;
  83. } else {
  84. Error = Error_MethodSignatureFailed;
  85. }
  86. break;
  87. case ResourceWatcherService_Method_UpdateDNS:
  88. if (dwSignature == ResourceWatcherService_MethodSignature_UpdateDNS) {
  89. bOverlap = true;
  90. } else {
  91. Error = Error_MethodSignatureFailed;
  92. }
  93. break;
  94. case ResourceWatcherService_Method_GetNetworkInfo:
  95. if (dwSignature == ResourceWatcherService_MethodSignature_GetNetworkInfo) {
  96. bOverlap = true;
  97. } else {
  98. Error = Error_MethodSignatureFailed;
  99. }
  100. break;
  101. case ResourceWatcherService_Method_GetThirdPartyInstallState:
  102. if (dwSignature == ResourceWatcherService_MethodSignature_GetThirdPartyInstallState) {
  103. bOverlap = true;
  104. } else {
  105. Error = Error_MethodSignatureFailed;
  106. }
  107. break;
  108. case ResourceWatcherService_Method_InstallThirdPartyProgram:
  109. if (dwSignature == ResourceWatcherService_MethodSignature_InstallThirdPartyProgram) {
  110. bOverlap = true;
  111. } else {
  112. Error = Error_MethodSignatureFailed;
  113. }
  114. break;
  115. case ResourceWatcherService_Method_GetTerminalVersionList:
  116. if (dwSignature == ResourceWatcherService_MethodSignature_GetTerminalVersionList) {
  117. bOverlap = true;
  118. } else {
  119. Error = Error_MethodSignatureFailed;
  120. }
  121. break;
  122. case ResourceWatcherService_Method_ManipulateVersion:
  123. if (dwSignature == ResourceWatcherService_MethodSignature_ManipulateVersion) {
  124. bOverlap = true;
  125. } else {
  126. Error = Error_MethodSignatureFailed;
  127. }
  128. break;
  129. case ResourceWatcherService_Method_UninstallThirdPartyProgram:
  130. if (dwSignature == ResourceWatcherService_MethodSignature_UninstallThirdPartyProgram) {
  131. bOverlap = true;
  132. } else {
  133. Error = Error_MethodSignatureFailed;
  134. }
  135. break;
  136. case ResourceWatcherService_Method_FilesClean:
  137. if (dwSignature == ResourceWatcherService_MethodSignature_FilesClean) {
  138. bOverlap = true;
  139. } else {
  140. Error = Error_MethodSignatureFailed;
  141. }
  142. break;
  143. default:
  144. Error = Error_MethodNotFound;
  145. break;
  146. }
  147. return Error;
  148. }
  149. int CheckMessageSignature(DWORD dwMessageID, DWORD dwSignature)
  150. {
  151. ErrorCodeEnum Error = Error_Succeed;
  152. switch (dwMessageID) {
  153. case ResourceWatcherService_Method_Fetch:
  154. if (dwSignature != ResourceWatcherService_MethodSignature_Fetch) {
  155. Error = Error_MethodSignatureFailed;
  156. }
  157. break;
  158. case ResourceWatcherService_Method_GetDevInfo:
  159. if (dwSignature != ResourceWatcherService_MethodSignature_GetDevInfo) {
  160. Error = Error_MethodSignatureFailed;
  161. }
  162. break;
  163. case ResourceWatcherService_Method_GetCardSwiper:
  164. if (dwSignature != ResourceWatcherService_MethodSignature_GetCardSwiper) {
  165. Error = Error_MethodSignatureFailed;
  166. }
  167. break;
  168. case ResourceWatcherService_Method_GetCpuType:
  169. if (dwSignature != ResourceWatcherService_MethodSignature_GetCpuType) {
  170. Error = Error_MethodSignatureFailed;
  171. }
  172. break;
  173. case ResourceWatcherService_Method_OperateFile:
  174. if (dwSignature != ResourceWatcherService_MethodSignature_OperateFile) {
  175. Error = Error_MethodSignatureFailed;
  176. }
  177. break;
  178. case ResourceWatcherService_Method_ExtractEventLog:
  179. if (dwSignature != ResourceWatcherService_MethodSignature_ExtractEventLog) {
  180. Error = Error_MethodSignatureFailed;
  181. }
  182. break;
  183. case ResourceWatcherService_Method_CheckNetType:
  184. if (dwSignature != ResourceWatcherService_MethodSignature_CheckNetType) {
  185. Error = Error_MethodSignatureFailed;
  186. }
  187. break;
  188. case ResourceWatcherService_Method_GetBizLinks:
  189. if (dwSignature != ResourceWatcherService_MethodSignature_GetBizLinks) {
  190. Error = Error_MethodSignatureFailed;
  191. }
  192. break;
  193. case ResourceWatcherService_Method_BizLinkDetect:
  194. if (dwSignature != ResourceWatcherService_MethodSignature_BizLinkDetect) {
  195. Error = Error_MethodSignatureFailed;
  196. }
  197. break;
  198. case ResourceWatcherService_Method_UpdateDNS:
  199. if (dwSignature != ResourceWatcherService_MethodSignature_UpdateDNS) {
  200. Error = Error_MethodSignatureFailed;
  201. }
  202. break;
  203. case ResourceWatcherService_Method_GetNetworkInfo:
  204. if (dwSignature != ResourceWatcherService_MethodSignature_GetNetworkInfo) {
  205. Error = Error_MethodSignatureFailed;
  206. }
  207. break;
  208. case ResourceWatcherService_Method_GetThirdPartyInstallState:
  209. if (dwSignature != ResourceWatcherService_MethodSignature_GetThirdPartyInstallState) {
  210. Error = Error_MethodSignatureFailed;
  211. }
  212. break;
  213. case ResourceWatcherService_Method_InstallThirdPartyProgram:
  214. if (dwSignature != ResourceWatcherService_MethodSignature_InstallThirdPartyProgram) {
  215. Error = Error_MethodSignatureFailed;
  216. }
  217. break;
  218. case ResourceWatcherService_Method_GetTerminalVersionList:
  219. if (dwSignature != ResourceWatcherService_MethodSignature_GetTerminalVersionList) {
  220. Error = Error_MethodSignatureFailed;
  221. }
  222. break;
  223. case ResourceWatcherService_Method_ManipulateVersion:
  224. if (dwSignature != ResourceWatcherService_MethodSignature_ManipulateVersion) {
  225. Error = Error_MethodSignatureFailed;
  226. }
  227. break;
  228. case ResourceWatcherService_Method_UninstallThirdPartyProgram:
  229. if (dwSignature != ResourceWatcherService_MethodSignature_UninstallThirdPartyProgram) {
  230. Error = Error_MethodSignatureFailed;
  231. }
  232. break;
  233. case ResourceWatcherService_Method_FilesClean:
  234. if (dwSignature != ResourceWatcherService_MethodSignature_FilesClean) {
  235. Error = Error_MethodSignatureFailed;
  236. }
  237. break;
  238. default:
  239. Error = Error_MethodNotFound;
  240. break;
  241. }
  242. return Error;
  243. }
  244. virtual void Handle_Fetch(SpReqAnsContext<ResourceWatcherService_Fetch_Req, ResourceWatcherService_Fetch_Ans>::Pointer ctx)
  245. {
  246. /// override by user
  247. }
  248. virtual void Handle_GetDevInfo(SpReqAnsContext<ResourceWatcherService_GetDevInfo_Req, ResourceWatcherService_GetDevInfo_Ans>::Pointer ctx)
  249. {
  250. /// override by user
  251. }
  252. virtual void Handle_GetCardSwiper(SpReqAnsContext<ResourceWatcherService_GetCardSwiper_Req, ResourceWatcherService_GetCardSwiper_Ans>::Pointer ctx)
  253. {
  254. /// override by user
  255. }
  256. virtual void Handle_GetCpuType(SpReqAnsContext<ResourceWatcherService_GetCpuType_Req, ResourceWatcherService_GetCpuType_Ans>::Pointer ctx)
  257. {
  258. /// override by user
  259. }
  260. virtual void Handle_OperateFile(SpReqAnsContext<ResourceWatcherService_OperateFile_Req, ResourceWatcherService_OperateFile_Ans>::Pointer ctx)
  261. {
  262. /// override by user
  263. }
  264. virtual void Handle_ExtractEventLog(SpReqAnsContext<ResourceWatcherService_ExtractEventLog_Req, ResourceWatcherService_ExtractEventLog_Ans>::Pointer ctx)
  265. {
  266. /// override by user
  267. }
  268. virtual void Handle_CheckNetType(SpReqAnsContext<ResourceWatcherService_CheckNetType_Req, ResourceWatcherService_CheckNetType_Ans>::Pointer ctx)
  269. {
  270. /// override by user
  271. }
  272. virtual void Handle_GetBizLinks(SpReqAnsContext<ResourceWatcherService_GetBizLinks_Req, ResourceWatcherService_GetBizLinks_Ans>::Pointer ctx)
  273. {
  274. /// override by user
  275. }
  276. virtual void Handle_BizLinkDetect(SpReqAnsContext<ResourceWatcherService_BizLinkDetect_Req, ResourceWatcherService_BizLinkDetect_Ans>::Pointer ctx)
  277. {
  278. /// override by user
  279. }
  280. virtual void Handle_UpdateDNS(SpReqAnsContext<ResourceWatcherService_UpdateDNS_Req, ResourceWatcherService_UpdateDNS_Ans>::Pointer ctx)
  281. {
  282. /// override by user
  283. }
  284. virtual void Handle_GetNetworkInfo(SpReqAnsContext<ResourceWatcherService_GetNetworkInfo_Req, ResourceWatcherService_GetNetworkInfo_Ans>::Pointer ctx)
  285. {
  286. /// override by user
  287. }
  288. virtual void Handle_GetThirdPartyInstallState(SpReqAnsContext<ResourceWatcherService_GetThirdPartyInstallState_Req, ResourceWatcherService_GetThirdPartyInstallState_Ans>::Pointer ctx)
  289. {
  290. /// override by user
  291. }
  292. virtual void Handle_InstallThirdPartyProgram(SpReqAnsContext<ResourceWatcherService_InstallThirdPartyProgram_Req, ResourceWatcherService_InstallThirdPartyProgram_Ans>::Pointer ctx)
  293. {
  294. /// override by user
  295. }
  296. virtual void Handle_GetTerminalVersionList(SpReqAnsContext<ResourceWatcherService_GetTerminalVersionList_Req, ResourceWatcherService_GetTerminalVersionList_Ans>::Pointer ctx)
  297. {
  298. /// override by user
  299. }
  300. virtual void Handle_ManipulateVersion(SpReqAnsContext<ResourceWatcherService_ManipulateVersion_Req, ResourceWatcherService_ManipulateVersion_Ans>::Pointer ctx)
  301. {
  302. /// override by user
  303. }
  304. virtual void Handle_UninstallThirdPartyProgram(SpReqAnsContext<ResourceWatcherService_UninstallThirdPartyProgram_Req, ResourceWatcherService_UninstallThirdPartyProgram_Ans>::Pointer ctx)
  305. {
  306. /// override by user
  307. }
  308. virtual void Handle_FilesClean(SpReqAnsContext<ResourceWatcherService_FilesClean_Req, ResourceWatcherService_FilesClean_Ans>::Pointer ctx)
  309. {
  310. /// override by user
  311. }
  312. virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
  313. {
  314. CAutoBuffer Buf;
  315. DWORD dwMessageID;
  316. DWORD dwMessageSignature;
  317. ErrorCodeEnum Error = pTransactionContext->GetReceiveBuffer(dwMessageID, dwMessageSignature, Buf);
  318. if (Error == Error_Succeed) {
  319. #ifdef DEBUG
  320. assert(CheckMessageSignature(dwMessageID, dwMessageSignature) == Error_Succeed);
  321. #else
  322. if (CheckMessageSignature(dwMessageID, dwMessageSignature) != Error_Succeed) {
  323. pTransactionContext->SendAnswer(Error_MethodSignatureFailed);
  324. return;
  325. }
  326. #endif
  327. switch (dwMessageID) {
  328. case ResourceWatcherService_Method_Fetch:
  329. {
  330. SpReqAnsContext<ResourceWatcherService_Fetch_Req,ResourceWatcherService_Fetch_Ans>::Pointer ctx;
  331. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_Fetch_Req,ResourceWatcherService_Fetch_Ans>(pTransactionContext));
  332. SpBuffer2Object(Buf, ctx->Req);
  333. Handle_Fetch(ctx);
  334. }
  335. break;
  336. case ResourceWatcherService_Method_GetDevInfo:
  337. {
  338. SpReqAnsContext<ResourceWatcherService_GetDevInfo_Req,ResourceWatcherService_GetDevInfo_Ans>::Pointer ctx;
  339. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_GetDevInfo_Req,ResourceWatcherService_GetDevInfo_Ans>(pTransactionContext));
  340. SpBuffer2Object(Buf, ctx->Req);
  341. Handle_GetDevInfo(ctx);
  342. }
  343. break;
  344. case ResourceWatcherService_Method_GetCardSwiper:
  345. {
  346. SpReqAnsContext<ResourceWatcherService_GetCardSwiper_Req,ResourceWatcherService_GetCardSwiper_Ans>::Pointer ctx;
  347. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_GetCardSwiper_Req,ResourceWatcherService_GetCardSwiper_Ans>(pTransactionContext));
  348. SpBuffer2Object(Buf, ctx->Req);
  349. Handle_GetCardSwiper(ctx);
  350. }
  351. break;
  352. case ResourceWatcherService_Method_GetCpuType:
  353. {
  354. SpReqAnsContext<ResourceWatcherService_GetCpuType_Req,ResourceWatcherService_GetCpuType_Ans>::Pointer ctx;
  355. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_GetCpuType_Req,ResourceWatcherService_GetCpuType_Ans>(pTransactionContext));
  356. SpBuffer2Object(Buf, ctx->Req);
  357. Handle_GetCpuType(ctx);
  358. }
  359. break;
  360. case ResourceWatcherService_Method_OperateFile:
  361. {
  362. SpReqAnsContext<ResourceWatcherService_OperateFile_Req,ResourceWatcherService_OperateFile_Ans>::Pointer ctx;
  363. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_OperateFile_Req,ResourceWatcherService_OperateFile_Ans>(pTransactionContext));
  364. SpBuffer2Object(Buf, ctx->Req);
  365. Handle_OperateFile(ctx);
  366. }
  367. break;
  368. case ResourceWatcherService_Method_ExtractEventLog:
  369. {
  370. SpReqAnsContext<ResourceWatcherService_ExtractEventLog_Req,ResourceWatcherService_ExtractEventLog_Ans>::Pointer ctx;
  371. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_ExtractEventLog_Req,ResourceWatcherService_ExtractEventLog_Ans>(pTransactionContext));
  372. SpBuffer2Object(Buf, ctx->Req);
  373. Handle_ExtractEventLog(ctx);
  374. }
  375. break;
  376. case ResourceWatcherService_Method_CheckNetType:
  377. {
  378. SpReqAnsContext<ResourceWatcherService_CheckNetType_Req,ResourceWatcherService_CheckNetType_Ans>::Pointer ctx;
  379. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_CheckNetType_Req,ResourceWatcherService_CheckNetType_Ans>(pTransactionContext));
  380. SpBuffer2Object(Buf, ctx->Req);
  381. Handle_CheckNetType(ctx);
  382. }
  383. break;
  384. case ResourceWatcherService_Method_GetBizLinks:
  385. {
  386. SpReqAnsContext<ResourceWatcherService_GetBizLinks_Req,ResourceWatcherService_GetBizLinks_Ans>::Pointer ctx;
  387. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_GetBizLinks_Req,ResourceWatcherService_GetBizLinks_Ans>(pTransactionContext));
  388. SpBuffer2Object(Buf, ctx->Req);
  389. Handle_GetBizLinks(ctx);
  390. }
  391. break;
  392. case ResourceWatcherService_Method_BizLinkDetect:
  393. {
  394. SpReqAnsContext<ResourceWatcherService_BizLinkDetect_Req,ResourceWatcherService_BizLinkDetect_Ans>::Pointer ctx;
  395. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_BizLinkDetect_Req,ResourceWatcherService_BizLinkDetect_Ans>(pTransactionContext));
  396. SpBuffer2Object(Buf, ctx->Req);
  397. Handle_BizLinkDetect(ctx);
  398. }
  399. break;
  400. case ResourceWatcherService_Method_UpdateDNS:
  401. {
  402. SpReqAnsContext<ResourceWatcherService_UpdateDNS_Req,ResourceWatcherService_UpdateDNS_Ans>::Pointer ctx;
  403. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_UpdateDNS_Req,ResourceWatcherService_UpdateDNS_Ans>(pTransactionContext));
  404. SpBuffer2Object(Buf, ctx->Req);
  405. Handle_UpdateDNS(ctx);
  406. }
  407. break;
  408. case ResourceWatcherService_Method_GetNetworkInfo:
  409. {
  410. SpReqAnsContext<ResourceWatcherService_GetNetworkInfo_Req,ResourceWatcherService_GetNetworkInfo_Ans>::Pointer ctx;
  411. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_GetNetworkInfo_Req,ResourceWatcherService_GetNetworkInfo_Ans>(pTransactionContext));
  412. SpBuffer2Object(Buf, ctx->Req);
  413. Handle_GetNetworkInfo(ctx);
  414. }
  415. break;
  416. case ResourceWatcherService_Method_GetThirdPartyInstallState:
  417. {
  418. SpReqAnsContext<ResourceWatcherService_GetThirdPartyInstallState_Req,ResourceWatcherService_GetThirdPartyInstallState_Ans>::Pointer ctx;
  419. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_GetThirdPartyInstallState_Req,ResourceWatcherService_GetThirdPartyInstallState_Ans>(pTransactionContext));
  420. SpBuffer2Object(Buf, ctx->Req);
  421. Handle_GetThirdPartyInstallState(ctx);
  422. }
  423. break;
  424. case ResourceWatcherService_Method_InstallThirdPartyProgram:
  425. {
  426. SpReqAnsContext<ResourceWatcherService_InstallThirdPartyProgram_Req,ResourceWatcherService_InstallThirdPartyProgram_Ans>::Pointer ctx;
  427. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_InstallThirdPartyProgram_Req,ResourceWatcherService_InstallThirdPartyProgram_Ans>(pTransactionContext));
  428. SpBuffer2Object(Buf, ctx->Req);
  429. Handle_InstallThirdPartyProgram(ctx);
  430. }
  431. break;
  432. case ResourceWatcherService_Method_GetTerminalVersionList:
  433. {
  434. SpReqAnsContext<ResourceWatcherService_GetTerminalVersionList_Req,ResourceWatcherService_GetTerminalVersionList_Ans>::Pointer ctx;
  435. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_GetTerminalVersionList_Req,ResourceWatcherService_GetTerminalVersionList_Ans>(pTransactionContext));
  436. SpBuffer2Object(Buf, ctx->Req);
  437. Handle_GetTerminalVersionList(ctx);
  438. }
  439. break;
  440. case ResourceWatcherService_Method_ManipulateVersion:
  441. {
  442. SpReqAnsContext<ResourceWatcherService_ManipulateVersion_Req,ResourceWatcherService_ManipulateVersion_Ans>::Pointer ctx;
  443. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_ManipulateVersion_Req,ResourceWatcherService_ManipulateVersion_Ans>(pTransactionContext));
  444. SpBuffer2Object(Buf, ctx->Req);
  445. Handle_ManipulateVersion(ctx);
  446. }
  447. break;
  448. case ResourceWatcherService_Method_UninstallThirdPartyProgram:
  449. {
  450. SpReqAnsContext<ResourceWatcherService_UninstallThirdPartyProgram_Req,ResourceWatcherService_UninstallThirdPartyProgram_Ans>::Pointer ctx;
  451. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_UninstallThirdPartyProgram_Req,ResourceWatcherService_UninstallThirdPartyProgram_Ans>(pTransactionContext));
  452. SpBuffer2Object(Buf, ctx->Req);
  453. Handle_UninstallThirdPartyProgram(ctx);
  454. }
  455. break;
  456. case ResourceWatcherService_Method_FilesClean:
  457. {
  458. SpReqAnsContext<ResourceWatcherService_FilesClean_Req,ResourceWatcherService_FilesClean_Ans>::Pointer ctx;
  459. ctx.Attach(new SpReqAnsContext<ResourceWatcherService_FilesClean_Req,ResourceWatcherService_FilesClean_Ans>(pTransactionContext));
  460. SpBuffer2Object(Buf, ctx->Req);
  461. Handle_FilesClean(ctx);
  462. }
  463. break;
  464. default:
  465. assert(0);
  466. break;
  467. }
  468. } else {
  469. pTransactionContext->SendAnswer(Error);
  470. }
  471. }
  472. };
  473. ///////////////////////////
  474. } // namespace ResourceWatcher
  475. #endif // __RESOURCEWATCHER_SERVER_G_H