SIPPhone_server_g.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. #ifndef __SIPPHONE_SERVER_G_H
  2. #define __SIPPHONE_SERVER_G_H
  3. #pragma once
  4. // This code is generated by spgen tool!
  5. #include "SIPPhone_def_g.h"
  6. namespace SIPPhone {
  7. class PhoneService_ServerSessionBase : public CServerSessionBase
  8. {
  9. public:
  10. PhoneService_ServerSessionBase()
  11. {
  12. /// override by user
  13. }
  14. virtual ~PhoneService_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 PhoneService_Method_MakeCall:
  25. if (dwSignature == PhoneService_MethodSignature_MakeCall) {
  26. bOverlap = true;
  27. } else {
  28. Error = Error_MethodSignatureFailed;
  29. }
  30. break;
  31. case PhoneService_Method_HangupCall:
  32. if (dwSignature == PhoneService_MethodSignature_HangupCall) {
  33. bOverlap = true;
  34. } else {
  35. Error = Error_MethodSignatureFailed;
  36. }
  37. break;
  38. case PhoneService_Method_StartVideo:
  39. if (dwSignature == PhoneService_MethodSignature_StartVideo) {
  40. bOverlap = true;
  41. } else {
  42. Error = Error_MethodSignatureFailed;
  43. }
  44. break;
  45. case PhoneService_Method_StopVideo:
  46. if (dwSignature == PhoneService_MethodSignature_StopVideo) {
  47. bOverlap = true;
  48. } else {
  49. Error = Error_MethodSignatureFailed;
  50. }
  51. break;
  52. case PhoneService_Method_RealErrorCheck:
  53. if (dwSignature == PhoneService_MethodSignature_RealErrorCheck) {
  54. bOverlap = true;
  55. } else {
  56. Error = Error_MethodSignatureFailed;
  57. }
  58. break;
  59. case PhoneService_Method_ReleaseCall:
  60. if (dwSignature == PhoneService_MethodSignature_ReleaseCall) {
  61. bOverlap = true;
  62. } else {
  63. Error = Error_MethodSignatureFailed;
  64. }
  65. break;
  66. case PhoneService_Method_BeginState:
  67. if (dwSignature == PhoneService_MethodSignature_BeginState) {
  68. bOverlap = false;
  69. } else {
  70. Error = Error_MethodSignatureFailed;
  71. }
  72. break;
  73. case PhoneService_Method_EndState:
  74. if (dwSignature == PhoneService_MethodSignature_EndState) {
  75. bOverlap = true;
  76. } else {
  77. Error = Error_MethodSignatureFailed;
  78. }
  79. break;
  80. case PhoneService_Method_SetCallingParam:
  81. if (dwSignature == PhoneService_MethodSignature_SetCallingParam) {
  82. bOverlap = true;
  83. } else {
  84. Error = Error_MethodSignatureFailed;
  85. }
  86. break;
  87. case PhoneService_Method_GetHandfreeOutVolume:
  88. if (dwSignature == PhoneService_MethodSignature_GetHandfreeOutVolume) {
  89. bOverlap = true;
  90. } else {
  91. Error = Error_MethodSignatureFailed;
  92. }
  93. break;
  94. case PhoneService_Method_SetHandfreeOutVolume:
  95. if (dwSignature == PhoneService_MethodSignature_SetHandfreeOutVolume) {
  96. bOverlap = true;
  97. } else {
  98. Error = Error_MethodSignatureFailed;
  99. }
  100. break;
  101. case PhoneService_Method_SetPickupOutVolume:
  102. if (dwSignature == PhoneService_MethodSignature_SetPickupOutVolume) {
  103. bOverlap = true;
  104. } else {
  105. Error = Error_MethodSignatureFailed;
  106. }
  107. break;
  108. case PhoneService_Method_GetPickupOutVolume:
  109. if (dwSignature == PhoneService_MethodSignature_GetPickupOutVolume) {
  110. bOverlap = true;
  111. } else {
  112. Error = Error_MethodSignatureFailed;
  113. }
  114. break;
  115. case PhoneService_Method_StartVideoRender:
  116. if (dwSignature == PhoneService_MethodSignature_StartVideoRender) {
  117. bOverlap = true;
  118. } else {
  119. Error = Error_MethodSignatureFailed;
  120. }
  121. break;
  122. case PhoneService_Method_StopVideoRender:
  123. if (dwSignature == PhoneService_MethodSignature_StopVideoRender) {
  124. bOverlap = true;
  125. } else {
  126. Error = Error_MethodSignatureFailed;
  127. }
  128. break;
  129. case PhoneService_Method_GetHandfreeInVolume:
  130. if (dwSignature == PhoneService_MethodSignature_GetHandfreeInVolume) {
  131. bOverlap = true;
  132. } else {
  133. Error = Error_MethodSignatureFailed;
  134. }
  135. break;
  136. case PhoneService_Method_SetHandfreeInVolume:
  137. if (dwSignature == PhoneService_MethodSignature_SetHandfreeInVolume) {
  138. bOverlap = true;
  139. } else {
  140. Error = Error_MethodSignatureFailed;
  141. }
  142. break;
  143. case PhoneService_Method_SetPickupInVolume:
  144. if (dwSignature == PhoneService_MethodSignature_SetPickupInVolume) {
  145. bOverlap = true;
  146. } else {
  147. Error = Error_MethodSignatureFailed;
  148. }
  149. break;
  150. case PhoneService_Method_GetPickupInVolume:
  151. if (dwSignature == PhoneService_MethodSignature_GetPickupInVolume) {
  152. bOverlap = true;
  153. } else {
  154. Error = Error_MethodSignatureFailed;
  155. }
  156. break;
  157. default:
  158. Error = Error_MethodNotFound;
  159. break;
  160. }
  161. return Error;
  162. }
  163. int CheckMessageSignature(DWORD dwMessageID, DWORD dwSignature)
  164. {
  165. ErrorCodeEnum Error = Error_Succeed;
  166. switch (dwMessageID) {
  167. case PhoneService_Method_MakeCall:
  168. if (dwSignature != PhoneService_MethodSignature_MakeCall) {
  169. Error = Error_MethodSignatureFailed;
  170. }
  171. break;
  172. case PhoneService_Method_HangupCall:
  173. if (dwSignature != PhoneService_MethodSignature_HangupCall) {
  174. Error = Error_MethodSignatureFailed;
  175. }
  176. break;
  177. case PhoneService_Method_StartVideo:
  178. if (dwSignature != PhoneService_MethodSignature_StartVideo) {
  179. Error = Error_MethodSignatureFailed;
  180. }
  181. break;
  182. case PhoneService_Method_StopVideo:
  183. if (dwSignature != PhoneService_MethodSignature_StopVideo) {
  184. Error = Error_MethodSignatureFailed;
  185. }
  186. break;
  187. case PhoneService_Method_RealErrorCheck:
  188. if (dwSignature != PhoneService_MethodSignature_RealErrorCheck) {
  189. Error = Error_MethodSignatureFailed;
  190. }
  191. break;
  192. case PhoneService_Method_ReleaseCall:
  193. if (dwSignature != PhoneService_MethodSignature_ReleaseCall) {
  194. Error = Error_MethodSignatureFailed;
  195. }
  196. break;
  197. case PhoneService_Method_BeginState:
  198. if (dwSignature != PhoneService_MethodSignature_BeginState) {
  199. Error = Error_MethodSignatureFailed;
  200. }
  201. break;
  202. case PhoneService_Method_EndState:
  203. if (dwSignature != PhoneService_MethodSignature_EndState) {
  204. Error = Error_MethodSignatureFailed;
  205. }
  206. break;
  207. case PhoneService_Method_SetCallingParam:
  208. if (dwSignature != PhoneService_MethodSignature_SetCallingParam) {
  209. Error = Error_MethodSignatureFailed;
  210. }
  211. break;
  212. case PhoneService_Method_GetHandfreeOutVolume:
  213. if (dwSignature != PhoneService_MethodSignature_GetHandfreeOutVolume) {
  214. Error = Error_MethodSignatureFailed;
  215. }
  216. break;
  217. case PhoneService_Method_SetHandfreeOutVolume:
  218. if (dwSignature != PhoneService_MethodSignature_SetHandfreeOutVolume) {
  219. Error = Error_MethodSignatureFailed;
  220. }
  221. break;
  222. case PhoneService_Method_SetPickupOutVolume:
  223. if (dwSignature != PhoneService_MethodSignature_SetPickupOutVolume) {
  224. Error = Error_MethodSignatureFailed;
  225. }
  226. break;
  227. case PhoneService_Method_GetPickupOutVolume:
  228. if (dwSignature != PhoneService_MethodSignature_GetPickupOutVolume) {
  229. Error = Error_MethodSignatureFailed;
  230. }
  231. break;
  232. case PhoneService_Method_StartVideoRender:
  233. if (dwSignature != PhoneService_MethodSignature_StartVideoRender) {
  234. Error = Error_MethodSignatureFailed;
  235. }
  236. break;
  237. case PhoneService_Method_StopVideoRender:
  238. if (dwSignature != PhoneService_MethodSignature_StopVideoRender) {
  239. Error = Error_MethodSignatureFailed;
  240. }
  241. break;
  242. case PhoneService_Method_GetHandfreeInVolume:
  243. if (dwSignature != PhoneService_MethodSignature_GetHandfreeInVolume) {
  244. Error = Error_MethodSignatureFailed;
  245. }
  246. break;
  247. case PhoneService_Method_SetHandfreeInVolume:
  248. if (dwSignature != PhoneService_MethodSignature_SetHandfreeInVolume) {
  249. Error = Error_MethodSignatureFailed;
  250. }
  251. break;
  252. case PhoneService_Method_SetPickupInVolume:
  253. if (dwSignature != PhoneService_MethodSignature_SetPickupInVolume) {
  254. Error = Error_MethodSignatureFailed;
  255. }
  256. break;
  257. case PhoneService_Method_GetPickupInVolume:
  258. if (dwSignature != PhoneService_MethodSignature_GetPickupInVolume) {
  259. Error = Error_MethodSignatureFailed;
  260. }
  261. break;
  262. default:
  263. Error = Error_MethodNotFound;
  264. break;
  265. }
  266. return Error;
  267. }
  268. virtual void Handle_MakeCall(SpReqAnsContext<PhoneService_MakeCall_Req, PhoneService_MakeCall_Ans>::Pointer ctx)
  269. {
  270. /// override by user
  271. }
  272. virtual void Handle_HangupCall(SpReqAnsContext<PhoneService_HangupCall_Req, PhoneService_HangupCall_Ans>::Pointer ctx)
  273. {
  274. /// override by user
  275. }
  276. virtual void Handle_StartVideo(SpOnewayCallContext<PhoneService_StartVideo_Info>::Pointer ctx)
  277. {
  278. /// override by user
  279. }
  280. virtual void Handle_StopVideo(SpOnewayCallContext<PhoneService_StopVideo_Info>::Pointer ctx)
  281. {
  282. /// override by user
  283. }
  284. virtual void Handle_RealErrorCheck(SpOnewayCallContext<PhoneService_RealErrorCheck_Info>::Pointer ctx)
  285. {
  286. /// override by user
  287. }
  288. virtual void Handle_ReleaseCall(SpReqAnsContext<PhoneService_ReleaseCall_Req, PhoneService_ReleaseCall_Ans>::Pointer ctx)
  289. {
  290. /// override by user
  291. }
  292. virtual void Handle_BeginState(SpSubscribeContext<PhoneService_BeginState_Sub, PhoneService_PhoneState_Info>::Pointer ctx)
  293. {
  294. /// override by user
  295. }
  296. virtual void Handle_EndState(SpOnewayCallContext<PhoneService_EndState_Info>::Pointer ctx)
  297. {
  298. /// override by user
  299. }
  300. virtual void Handle_SetCallingParam(SpOnewayCallContext<PhoneService_SetCallingParam_Info>::Pointer ctx)
  301. {
  302. /// override by user
  303. }
  304. virtual void Handle_GetHandfreeOutVolume(SpReqAnsContext<PhoneService_GetHandfreeOutVolume_Req, PhoneService_GetHandfreeOutVolume_Ans>::Pointer ctx)
  305. {
  306. /// override by user
  307. }
  308. virtual void Handle_SetHandfreeOutVolume(SpReqAnsContext<PhoneService_SetHandfreeOutVolume_Req, PhoneService_SetHandfreeOutVolume_Ans>::Pointer ctx)
  309. {
  310. /// override by user
  311. }
  312. virtual void Handle_SetPickupOutVolume(SpReqAnsContext<PhoneService_SetPickupOutVolume_Req, PhoneService_SetPickupOutVolume_Ans>::Pointer ctx)
  313. {
  314. /// override by user
  315. }
  316. virtual void Handle_GetPickupOutVolume(SpReqAnsContext<PhoneService_GetPickupOutVolume_Req, PhoneService_GetPickupOutVolume_Ans>::Pointer ctx)
  317. {
  318. /// override by user
  319. }
  320. virtual void Handle_StartVideoRender(SpOnewayCallContext<PhoneService_StartVideoRender_Info>::Pointer ctx)
  321. {
  322. /// override by user
  323. }
  324. virtual void Handle_StopVideoRender(SpOnewayCallContext<PhoneService_StopVideoRender_Info>::Pointer ctx)
  325. {
  326. /// override by user
  327. }
  328. virtual void Handle_GetHandfreeInVolume(SpReqAnsContext<PhoneService_GetHandfreeInVolume_Req, PhoneService_GetHandfreeInVolume_Ans>::Pointer ctx)
  329. {
  330. /// override by user
  331. }
  332. virtual void Handle_SetHandfreeInVolume(SpReqAnsContext<PhoneService_SetHandfreeInVolume_Req, PhoneService_SetHandfreeInVolume_Ans>::Pointer ctx)
  333. {
  334. /// override by user
  335. }
  336. virtual void Handle_SetPickupInVolume(SpReqAnsContext<PhoneService_SetPickupInVolume_Req, PhoneService_SetPickupInVolume_Ans>::Pointer ctx)
  337. {
  338. /// override by user
  339. }
  340. virtual void Handle_GetPickupInVolume(SpReqAnsContext<PhoneService_GetPickupInVolume_Req, PhoneService_GetPickupInVolume_Ans>::Pointer ctx)
  341. {
  342. /// override by user
  343. }
  344. virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
  345. {
  346. CAutoBuffer Buf;
  347. DWORD dwMessageID;
  348. DWORD dwMessageSignature;
  349. ErrorCodeEnum Error = pTransactionContext->GetReceiveBuffer(dwMessageID, dwMessageSignature, Buf);
  350. if (Error == Error_Succeed) {
  351. #ifdef DEBUG
  352. assert(CheckMessageSignature(dwMessageID, dwMessageSignature) == Error_Succeed);
  353. #else
  354. if (CheckMessageSignature(dwMessageID, dwMessageSignature) != Error_Succeed) {
  355. pTransactionContext->SendAnswer(Error_MethodSignatureFailed);
  356. return;
  357. }
  358. #endif
  359. switch (dwMessageID) {
  360. case PhoneService_Method_MakeCall:
  361. {
  362. SpReqAnsContext<PhoneService_MakeCall_Req,PhoneService_MakeCall_Ans>::Pointer ctx;
  363. ctx.Attach(new SpReqAnsContext<PhoneService_MakeCall_Req,PhoneService_MakeCall_Ans>(pTransactionContext));
  364. SpBuffer2Object(Buf, ctx->Req);
  365. pTransactionContext->GetLinkContext(ctx->link);
  366. EntityResource::setLink(ctx->link);
  367. Handle_MakeCall(ctx);
  368. }
  369. break;
  370. case PhoneService_Method_HangupCall:
  371. {
  372. SpReqAnsContext<PhoneService_HangupCall_Req,PhoneService_HangupCall_Ans>::Pointer ctx;
  373. ctx.Attach(new SpReqAnsContext<PhoneService_HangupCall_Req,PhoneService_HangupCall_Ans>(pTransactionContext));
  374. SpBuffer2Object(Buf, ctx->Req);
  375. pTransactionContext->GetLinkContext(ctx->link);
  376. EntityResource::setLink(ctx->link);
  377. Handle_HangupCall(ctx);
  378. }
  379. break;
  380. case PhoneService_Method_StartVideo:
  381. {
  382. SpOnewayCallContext<PhoneService_StartVideo_Info>::Pointer ctx;
  383. ctx.Attach(new SpOnewayCallContext<PhoneService_StartVideo_Info>());
  384. SpBuffer2Object(Buf, ctx->Info);
  385. pTransactionContext->GetLinkContext(ctx->link);
  386. EntityResource::setLink(ctx->link);
  387. Handle_StartVideo(ctx);
  388. }
  389. break;
  390. case PhoneService_Method_StopVideo:
  391. {
  392. SpOnewayCallContext<PhoneService_StopVideo_Info>::Pointer ctx;
  393. ctx.Attach(new SpOnewayCallContext<PhoneService_StopVideo_Info>());
  394. SpBuffer2Object(Buf, ctx->Info);
  395. pTransactionContext->GetLinkContext(ctx->link);
  396. EntityResource::setLink(ctx->link);
  397. Handle_StopVideo(ctx);
  398. }
  399. break;
  400. case PhoneService_Method_RealErrorCheck:
  401. {
  402. SpOnewayCallContext<PhoneService_RealErrorCheck_Info>::Pointer ctx;
  403. ctx.Attach(new SpOnewayCallContext<PhoneService_RealErrorCheck_Info>());
  404. SpBuffer2Object(Buf, ctx->Info);
  405. pTransactionContext->GetLinkContext(ctx->link);
  406. EntityResource::setLink(ctx->link);
  407. Handle_RealErrorCheck(ctx);
  408. }
  409. break;
  410. case PhoneService_Method_ReleaseCall:
  411. {
  412. SpReqAnsContext<PhoneService_ReleaseCall_Req,PhoneService_ReleaseCall_Ans>::Pointer ctx;
  413. ctx.Attach(new SpReqAnsContext<PhoneService_ReleaseCall_Req,PhoneService_ReleaseCall_Ans>(pTransactionContext));
  414. SpBuffer2Object(Buf, ctx->Req);
  415. pTransactionContext->GetLinkContext(ctx->link);
  416. EntityResource::setLink(ctx->link);
  417. Handle_ReleaseCall(ctx);
  418. }
  419. break;
  420. case PhoneService_Method_BeginState:
  421. {
  422. SpSubscribeContext<PhoneService_BeginState_Sub,PhoneService_PhoneState_Info>::Pointer ctx;
  423. ctx.Attach(new SpSubscribeContext<PhoneService_BeginState_Sub,PhoneService_PhoneState_Info>(pTransactionContext));
  424. SpBuffer2Object(Buf, ctx->Req);
  425. Handle_BeginState(ctx);
  426. }
  427. break;
  428. case PhoneService_Method_EndState:
  429. {
  430. SpOnewayCallContext<PhoneService_EndState_Info>::Pointer ctx;
  431. ctx.Attach(new SpOnewayCallContext<PhoneService_EndState_Info>());
  432. SpBuffer2Object(Buf, ctx->Info);
  433. Handle_EndState(ctx);
  434. }
  435. break;
  436. case PhoneService_Method_SetCallingParam:
  437. {
  438. SpOnewayCallContext<PhoneService_SetCallingParam_Info>::Pointer ctx;
  439. ctx.Attach(new SpOnewayCallContext<PhoneService_SetCallingParam_Info>());
  440. SpBuffer2Object(Buf, ctx->Info);
  441. pTransactionContext->GetLinkContext(ctx->link);
  442. EntityResource::setLink(ctx->link);
  443. Handle_SetCallingParam(ctx);
  444. }
  445. break;
  446. case PhoneService_Method_GetHandfreeOutVolume:
  447. {
  448. SpReqAnsContext<PhoneService_GetHandfreeOutVolume_Req,PhoneService_GetHandfreeOutVolume_Ans>::Pointer ctx;
  449. ctx.Attach(new SpReqAnsContext<PhoneService_GetHandfreeOutVolume_Req,PhoneService_GetHandfreeOutVolume_Ans>(pTransactionContext));
  450. SpBuffer2Object(Buf, ctx->Req);
  451. pTransactionContext->GetLinkContext(ctx->link);
  452. EntityResource::setLink(ctx->link);
  453. Handle_GetHandfreeOutVolume(ctx);
  454. }
  455. break;
  456. case PhoneService_Method_SetHandfreeOutVolume:
  457. {
  458. SpReqAnsContext<PhoneService_SetHandfreeOutVolume_Req,PhoneService_SetHandfreeOutVolume_Ans>::Pointer ctx;
  459. ctx.Attach(new SpReqAnsContext<PhoneService_SetHandfreeOutVolume_Req,PhoneService_SetHandfreeOutVolume_Ans>(pTransactionContext));
  460. SpBuffer2Object(Buf, ctx->Req);
  461. pTransactionContext->GetLinkContext(ctx->link);
  462. EntityResource::setLink(ctx->link);
  463. Handle_SetHandfreeOutVolume(ctx);
  464. }
  465. break;
  466. case PhoneService_Method_SetPickupOutVolume:
  467. {
  468. SpReqAnsContext<PhoneService_SetPickupOutVolume_Req,PhoneService_SetPickupOutVolume_Ans>::Pointer ctx;
  469. ctx.Attach(new SpReqAnsContext<PhoneService_SetPickupOutVolume_Req,PhoneService_SetPickupOutVolume_Ans>(pTransactionContext));
  470. SpBuffer2Object(Buf, ctx->Req);
  471. pTransactionContext->GetLinkContext(ctx->link);
  472. EntityResource::setLink(ctx->link);
  473. Handle_SetPickupOutVolume(ctx);
  474. }
  475. break;
  476. case PhoneService_Method_GetPickupOutVolume:
  477. {
  478. SpReqAnsContext<PhoneService_GetPickupOutVolume_Req,PhoneService_GetPickupOutVolume_Ans>::Pointer ctx;
  479. ctx.Attach(new SpReqAnsContext<PhoneService_GetPickupOutVolume_Req,PhoneService_GetPickupOutVolume_Ans>(pTransactionContext));
  480. SpBuffer2Object(Buf, ctx->Req);
  481. pTransactionContext->GetLinkContext(ctx->link);
  482. EntityResource::setLink(ctx->link);
  483. Handle_GetPickupOutVolume(ctx);
  484. }
  485. break;
  486. case PhoneService_Method_StartVideoRender:
  487. {
  488. SpOnewayCallContext<PhoneService_StartVideoRender_Info>::Pointer ctx;
  489. ctx.Attach(new SpOnewayCallContext<PhoneService_StartVideoRender_Info>());
  490. SpBuffer2Object(Buf, ctx->Info);
  491. pTransactionContext->GetLinkContext(ctx->link);
  492. EntityResource::setLink(ctx->link);
  493. Handle_StartVideoRender(ctx);
  494. }
  495. break;
  496. case PhoneService_Method_StopVideoRender:
  497. {
  498. SpOnewayCallContext<PhoneService_StopVideoRender_Info>::Pointer ctx;
  499. ctx.Attach(new SpOnewayCallContext<PhoneService_StopVideoRender_Info>());
  500. SpBuffer2Object(Buf, ctx->Info);
  501. pTransactionContext->GetLinkContext(ctx->link);
  502. EntityResource::setLink(ctx->link);
  503. Handle_StopVideoRender(ctx);
  504. }
  505. break;
  506. case PhoneService_Method_GetHandfreeInVolume:
  507. {
  508. SpReqAnsContext<PhoneService_GetHandfreeInVolume_Req,PhoneService_GetHandfreeInVolume_Ans>::Pointer ctx;
  509. ctx.Attach(new SpReqAnsContext<PhoneService_GetHandfreeInVolume_Req,PhoneService_GetHandfreeInVolume_Ans>(pTransactionContext));
  510. SpBuffer2Object(Buf, ctx->Req);
  511. pTransactionContext->GetLinkContext(ctx->link);
  512. EntityResource::setLink(ctx->link);
  513. Handle_GetHandfreeInVolume(ctx);
  514. }
  515. break;
  516. case PhoneService_Method_SetHandfreeInVolume:
  517. {
  518. SpReqAnsContext<PhoneService_SetHandfreeInVolume_Req,PhoneService_SetHandfreeInVolume_Ans>::Pointer ctx;
  519. ctx.Attach(new SpReqAnsContext<PhoneService_SetHandfreeInVolume_Req,PhoneService_SetHandfreeInVolume_Ans>(pTransactionContext));
  520. SpBuffer2Object(Buf, ctx->Req);
  521. pTransactionContext->GetLinkContext(ctx->link);
  522. EntityResource::setLink(ctx->link);
  523. Handle_SetHandfreeInVolume(ctx);
  524. }
  525. break;
  526. case PhoneService_Method_SetPickupInVolume:
  527. {
  528. SpReqAnsContext<PhoneService_SetPickupInVolume_Req,PhoneService_SetPickupInVolume_Ans>::Pointer ctx;
  529. ctx.Attach(new SpReqAnsContext<PhoneService_SetPickupInVolume_Req,PhoneService_SetPickupInVolume_Ans>(pTransactionContext));
  530. SpBuffer2Object(Buf, ctx->Req);
  531. pTransactionContext->GetLinkContext(ctx->link);
  532. EntityResource::setLink(ctx->link);
  533. Handle_SetPickupInVolume(ctx);
  534. }
  535. break;
  536. case PhoneService_Method_GetPickupInVolume:
  537. {
  538. SpReqAnsContext<PhoneService_GetPickupInVolume_Req,PhoneService_GetPickupInVolume_Ans>::Pointer ctx;
  539. ctx.Attach(new SpReqAnsContext<PhoneService_GetPickupInVolume_Req,PhoneService_GetPickupInVolume_Ans>(pTransactionContext));
  540. SpBuffer2Object(Buf, ctx->Req);
  541. pTransactionContext->GetLinkContext(ctx->link);
  542. EntityResource::setLink(ctx->link);
  543. Handle_GetPickupInVolume(ctx);
  544. }
  545. break;
  546. default:
  547. assert(0);
  548. break;
  549. }
  550. } else {
  551. pTransactionContext->SendAnswer(Error);
  552. }
  553. }
  554. };
  555. ///////////////////////////
  556. } // namespace SIPPhone
  557. #endif // __SIPPHONE_SERVER_G_H