SIPPhone_server_g.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  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. case PhoneService_Method_GetAudioDevices:
  158. if (dwSignature == PhoneService_MethodSignature_GetAudioDevices) {
  159. bOverlap = true;
  160. } else {
  161. Error = Error_MethodSignatureFailed;
  162. }
  163. break;
  164. default:
  165. Error = Error_MethodNotFound;
  166. break;
  167. }
  168. return Error;
  169. }
  170. int CheckMessageSignature(DWORD dwMessageID, DWORD dwSignature)
  171. {
  172. ErrorCodeEnum Error = Error_Succeed;
  173. switch (dwMessageID) {
  174. case PhoneService_Method_MakeCall:
  175. if (dwSignature != PhoneService_MethodSignature_MakeCall) {
  176. Error = Error_MethodSignatureFailed;
  177. }
  178. break;
  179. case PhoneService_Method_HangupCall:
  180. if (dwSignature != PhoneService_MethodSignature_HangupCall) {
  181. Error = Error_MethodSignatureFailed;
  182. }
  183. break;
  184. case PhoneService_Method_StartVideo:
  185. if (dwSignature != PhoneService_MethodSignature_StartVideo) {
  186. Error = Error_MethodSignatureFailed;
  187. }
  188. break;
  189. case PhoneService_Method_StopVideo:
  190. if (dwSignature != PhoneService_MethodSignature_StopVideo) {
  191. Error = Error_MethodSignatureFailed;
  192. }
  193. break;
  194. case PhoneService_Method_RealErrorCheck:
  195. if (dwSignature != PhoneService_MethodSignature_RealErrorCheck) {
  196. Error = Error_MethodSignatureFailed;
  197. }
  198. break;
  199. case PhoneService_Method_ReleaseCall:
  200. if (dwSignature != PhoneService_MethodSignature_ReleaseCall) {
  201. Error = Error_MethodSignatureFailed;
  202. }
  203. break;
  204. case PhoneService_Method_BeginState:
  205. if (dwSignature != PhoneService_MethodSignature_BeginState) {
  206. Error = Error_MethodSignatureFailed;
  207. }
  208. break;
  209. case PhoneService_Method_EndState:
  210. if (dwSignature != PhoneService_MethodSignature_EndState) {
  211. Error = Error_MethodSignatureFailed;
  212. }
  213. break;
  214. case PhoneService_Method_SetCallingParam:
  215. if (dwSignature != PhoneService_MethodSignature_SetCallingParam) {
  216. Error = Error_MethodSignatureFailed;
  217. }
  218. break;
  219. case PhoneService_Method_GetHandfreeOutVolume:
  220. if (dwSignature != PhoneService_MethodSignature_GetHandfreeOutVolume) {
  221. Error = Error_MethodSignatureFailed;
  222. }
  223. break;
  224. case PhoneService_Method_SetHandfreeOutVolume:
  225. if (dwSignature != PhoneService_MethodSignature_SetHandfreeOutVolume) {
  226. Error = Error_MethodSignatureFailed;
  227. }
  228. break;
  229. case PhoneService_Method_SetPickupOutVolume:
  230. if (dwSignature != PhoneService_MethodSignature_SetPickupOutVolume) {
  231. Error = Error_MethodSignatureFailed;
  232. }
  233. break;
  234. case PhoneService_Method_GetPickupOutVolume:
  235. if (dwSignature != PhoneService_MethodSignature_GetPickupOutVolume) {
  236. Error = Error_MethodSignatureFailed;
  237. }
  238. break;
  239. case PhoneService_Method_StartVideoRender:
  240. if (dwSignature != PhoneService_MethodSignature_StartVideoRender) {
  241. Error = Error_MethodSignatureFailed;
  242. }
  243. break;
  244. case PhoneService_Method_StopVideoRender:
  245. if (dwSignature != PhoneService_MethodSignature_StopVideoRender) {
  246. Error = Error_MethodSignatureFailed;
  247. }
  248. break;
  249. case PhoneService_Method_GetHandfreeInVolume:
  250. if (dwSignature != PhoneService_MethodSignature_GetHandfreeInVolume) {
  251. Error = Error_MethodSignatureFailed;
  252. }
  253. break;
  254. case PhoneService_Method_SetHandfreeInVolume:
  255. if (dwSignature != PhoneService_MethodSignature_SetHandfreeInVolume) {
  256. Error = Error_MethodSignatureFailed;
  257. }
  258. break;
  259. case PhoneService_Method_SetPickupInVolume:
  260. if (dwSignature != PhoneService_MethodSignature_SetPickupInVolume) {
  261. Error = Error_MethodSignatureFailed;
  262. }
  263. break;
  264. case PhoneService_Method_GetPickupInVolume:
  265. if (dwSignature != PhoneService_MethodSignature_GetPickupInVolume) {
  266. Error = Error_MethodSignatureFailed;
  267. }
  268. break;
  269. case PhoneService_Method_GetAudioDevices:
  270. if (dwSignature != PhoneService_MethodSignature_GetAudioDevices) {
  271. Error = Error_MethodSignatureFailed;
  272. }
  273. break;
  274. default:
  275. Error = Error_MethodNotFound;
  276. break;
  277. }
  278. return Error;
  279. }
  280. virtual void Handle_MakeCall(SpReqAnsContext<PhoneService_MakeCall_Req, PhoneService_MakeCall_Ans>::Pointer ctx)
  281. {
  282. /// override by user
  283. }
  284. virtual void Handle_HangupCall(SpReqAnsContext<PhoneService_HangupCall_Req, PhoneService_HangupCall_Ans>::Pointer ctx)
  285. {
  286. /// override by user
  287. }
  288. virtual void Handle_StartVideo(SpOnewayCallContext<PhoneService_StartVideo_Info>::Pointer ctx)
  289. {
  290. /// override by user
  291. }
  292. virtual void Handle_StopVideo(SpOnewayCallContext<PhoneService_StopVideo_Info>::Pointer ctx)
  293. {
  294. /// override by user
  295. }
  296. virtual void Handle_RealErrorCheck(SpOnewayCallContext<PhoneService_RealErrorCheck_Info>::Pointer ctx)
  297. {
  298. /// override by user
  299. }
  300. virtual void Handle_ReleaseCall(SpReqAnsContext<PhoneService_ReleaseCall_Req, PhoneService_ReleaseCall_Ans>::Pointer ctx)
  301. {
  302. /// override by user
  303. }
  304. virtual void Handle_BeginState(SpSubscribeContext<PhoneService_BeginState_Sub, PhoneService_PhoneState_Info>::Pointer ctx)
  305. {
  306. /// override by user
  307. }
  308. virtual void Handle_EndState(SpOnewayCallContext<PhoneService_EndState_Info>::Pointer ctx)
  309. {
  310. /// override by user
  311. }
  312. virtual void Handle_SetCallingParam(SpOnewayCallContext<PhoneService_SetCallingParam_Info>::Pointer ctx)
  313. {
  314. /// override by user
  315. }
  316. virtual void Handle_GetHandfreeOutVolume(SpReqAnsContext<PhoneService_GetHandfreeOutVolume_Req, PhoneService_GetHandfreeOutVolume_Ans>::Pointer ctx)
  317. {
  318. /// override by user
  319. }
  320. virtual void Handle_SetHandfreeOutVolume(SpReqAnsContext<PhoneService_SetHandfreeOutVolume_Req, PhoneService_SetHandfreeOutVolume_Ans>::Pointer ctx)
  321. {
  322. /// override by user
  323. }
  324. virtual void Handle_SetPickupOutVolume(SpReqAnsContext<PhoneService_SetPickupOutVolume_Req, PhoneService_SetPickupOutVolume_Ans>::Pointer ctx)
  325. {
  326. /// override by user
  327. }
  328. virtual void Handle_GetPickupOutVolume(SpReqAnsContext<PhoneService_GetPickupOutVolume_Req, PhoneService_GetPickupOutVolume_Ans>::Pointer ctx)
  329. {
  330. /// override by user
  331. }
  332. virtual void Handle_StartVideoRender(SpOnewayCallContext<PhoneService_StartVideoRender_Info>::Pointer ctx)
  333. {
  334. /// override by user
  335. }
  336. virtual void Handle_StopVideoRender(SpOnewayCallContext<PhoneService_StopVideoRender_Info>::Pointer ctx)
  337. {
  338. /// override by user
  339. }
  340. virtual void Handle_GetHandfreeInVolume(SpReqAnsContext<PhoneService_GetHandfreeInVolume_Req, PhoneService_GetHandfreeInVolume_Ans>::Pointer ctx)
  341. {
  342. /// override by user
  343. }
  344. virtual void Handle_SetHandfreeInVolume(SpReqAnsContext<PhoneService_SetHandfreeInVolume_Req, PhoneService_SetHandfreeInVolume_Ans>::Pointer ctx)
  345. {
  346. /// override by user
  347. }
  348. virtual void Handle_SetPickupInVolume(SpReqAnsContext<PhoneService_SetPickupInVolume_Req, PhoneService_SetPickupInVolume_Ans>::Pointer ctx)
  349. {
  350. /// override by user
  351. }
  352. virtual void Handle_GetPickupInVolume(SpReqAnsContext<PhoneService_GetPickupInVolume_Req, PhoneService_GetPickupInVolume_Ans>::Pointer ctx)
  353. {
  354. /// override by user
  355. }
  356. virtual void Handle_GetAudioDevices(SpReqAnsContext<PhoneService_GetAudioDevices_Req, PhoneService_GetAudioDevices_Ans>::Pointer ctx)
  357. {
  358. /// override by user
  359. }
  360. virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
  361. {
  362. CAutoBuffer Buf;
  363. DWORD dwMessageID;
  364. DWORD dwMessageSignature;
  365. ErrorCodeEnum Error = pTransactionContext->GetReceiveBuffer(dwMessageID, dwMessageSignature, Buf);
  366. if (Error == Error_Succeed) {
  367. #ifdef DEBUG
  368. assert(CheckMessageSignature(dwMessageID, dwMessageSignature) == Error_Succeed);
  369. #else
  370. if (CheckMessageSignature(dwMessageID, dwMessageSignature) != Error_Succeed) {
  371. pTransactionContext->SendAnswer(Error_MethodSignatureFailed);
  372. return;
  373. }
  374. #endif
  375. switch (dwMessageID) {
  376. case PhoneService_Method_MakeCall:
  377. {
  378. SpReqAnsContext<PhoneService_MakeCall_Req,PhoneService_MakeCall_Ans>::Pointer ctx;
  379. ctx.Attach(new SpReqAnsContext<PhoneService_MakeCall_Req,PhoneService_MakeCall_Ans>(pTransactionContext));
  380. SpBuffer2Object(Buf, ctx->Req);
  381. pTransactionContext->GetLinkContext(ctx->link);
  382. EntityResource::setLink(ctx->link);
  383. Handle_MakeCall(ctx);
  384. }
  385. break;
  386. case PhoneService_Method_HangupCall:
  387. {
  388. SpReqAnsContext<PhoneService_HangupCall_Req,PhoneService_HangupCall_Ans>::Pointer ctx;
  389. ctx.Attach(new SpReqAnsContext<PhoneService_HangupCall_Req,PhoneService_HangupCall_Ans>(pTransactionContext));
  390. SpBuffer2Object(Buf, ctx->Req);
  391. pTransactionContext->GetLinkContext(ctx->link);
  392. EntityResource::setLink(ctx->link);
  393. Handle_HangupCall(ctx);
  394. }
  395. break;
  396. case PhoneService_Method_StartVideo:
  397. {
  398. SpOnewayCallContext<PhoneService_StartVideo_Info>::Pointer ctx;
  399. ctx.Attach(new SpOnewayCallContext<PhoneService_StartVideo_Info>());
  400. SpBuffer2Object(Buf, ctx->Info);
  401. pTransactionContext->GetLinkContext(ctx->link);
  402. EntityResource::setLink(ctx->link);
  403. Handle_StartVideo(ctx);
  404. }
  405. break;
  406. case PhoneService_Method_StopVideo:
  407. {
  408. SpOnewayCallContext<PhoneService_StopVideo_Info>::Pointer ctx;
  409. ctx.Attach(new SpOnewayCallContext<PhoneService_StopVideo_Info>());
  410. SpBuffer2Object(Buf, ctx->Info);
  411. pTransactionContext->GetLinkContext(ctx->link);
  412. EntityResource::setLink(ctx->link);
  413. Handle_StopVideo(ctx);
  414. }
  415. break;
  416. case PhoneService_Method_RealErrorCheck:
  417. {
  418. SpOnewayCallContext<PhoneService_RealErrorCheck_Info>::Pointer ctx;
  419. ctx.Attach(new SpOnewayCallContext<PhoneService_RealErrorCheck_Info>());
  420. SpBuffer2Object(Buf, ctx->Info);
  421. pTransactionContext->GetLinkContext(ctx->link);
  422. EntityResource::setLink(ctx->link);
  423. Handle_RealErrorCheck(ctx);
  424. }
  425. break;
  426. case PhoneService_Method_ReleaseCall:
  427. {
  428. SpReqAnsContext<PhoneService_ReleaseCall_Req,PhoneService_ReleaseCall_Ans>::Pointer ctx;
  429. ctx.Attach(new SpReqAnsContext<PhoneService_ReleaseCall_Req,PhoneService_ReleaseCall_Ans>(pTransactionContext));
  430. SpBuffer2Object(Buf, ctx->Req);
  431. pTransactionContext->GetLinkContext(ctx->link);
  432. EntityResource::setLink(ctx->link);
  433. Handle_ReleaseCall(ctx);
  434. }
  435. break;
  436. case PhoneService_Method_BeginState:
  437. {
  438. SpSubscribeContext<PhoneService_BeginState_Sub,PhoneService_PhoneState_Info>::Pointer ctx;
  439. ctx.Attach(new SpSubscribeContext<PhoneService_BeginState_Sub,PhoneService_PhoneState_Info>(pTransactionContext));
  440. SpBuffer2Object(Buf, ctx->Req);
  441. Handle_BeginState(ctx);
  442. }
  443. break;
  444. case PhoneService_Method_EndState:
  445. {
  446. SpOnewayCallContext<PhoneService_EndState_Info>::Pointer ctx;
  447. ctx.Attach(new SpOnewayCallContext<PhoneService_EndState_Info>());
  448. SpBuffer2Object(Buf, ctx->Info);
  449. Handle_EndState(ctx);
  450. }
  451. break;
  452. case PhoneService_Method_SetCallingParam:
  453. {
  454. SpOnewayCallContext<PhoneService_SetCallingParam_Info>::Pointer ctx;
  455. ctx.Attach(new SpOnewayCallContext<PhoneService_SetCallingParam_Info>());
  456. SpBuffer2Object(Buf, ctx->Info);
  457. pTransactionContext->GetLinkContext(ctx->link);
  458. EntityResource::setLink(ctx->link);
  459. Handle_SetCallingParam(ctx);
  460. }
  461. break;
  462. case PhoneService_Method_GetHandfreeOutVolume:
  463. {
  464. SpReqAnsContext<PhoneService_GetHandfreeOutVolume_Req,PhoneService_GetHandfreeOutVolume_Ans>::Pointer ctx;
  465. ctx.Attach(new SpReqAnsContext<PhoneService_GetHandfreeOutVolume_Req,PhoneService_GetHandfreeOutVolume_Ans>(pTransactionContext));
  466. SpBuffer2Object(Buf, ctx->Req);
  467. pTransactionContext->GetLinkContext(ctx->link);
  468. EntityResource::setLink(ctx->link);
  469. Handle_GetHandfreeOutVolume(ctx);
  470. }
  471. break;
  472. case PhoneService_Method_SetHandfreeOutVolume:
  473. {
  474. SpReqAnsContext<PhoneService_SetHandfreeOutVolume_Req,PhoneService_SetHandfreeOutVolume_Ans>::Pointer ctx;
  475. ctx.Attach(new SpReqAnsContext<PhoneService_SetHandfreeOutVolume_Req,PhoneService_SetHandfreeOutVolume_Ans>(pTransactionContext));
  476. SpBuffer2Object(Buf, ctx->Req);
  477. pTransactionContext->GetLinkContext(ctx->link);
  478. EntityResource::setLink(ctx->link);
  479. Handle_SetHandfreeOutVolume(ctx);
  480. }
  481. break;
  482. case PhoneService_Method_SetPickupOutVolume:
  483. {
  484. SpReqAnsContext<PhoneService_SetPickupOutVolume_Req,PhoneService_SetPickupOutVolume_Ans>::Pointer ctx;
  485. ctx.Attach(new SpReqAnsContext<PhoneService_SetPickupOutVolume_Req,PhoneService_SetPickupOutVolume_Ans>(pTransactionContext));
  486. SpBuffer2Object(Buf, ctx->Req);
  487. pTransactionContext->GetLinkContext(ctx->link);
  488. EntityResource::setLink(ctx->link);
  489. Handle_SetPickupOutVolume(ctx);
  490. }
  491. break;
  492. case PhoneService_Method_GetPickupOutVolume:
  493. {
  494. SpReqAnsContext<PhoneService_GetPickupOutVolume_Req,PhoneService_GetPickupOutVolume_Ans>::Pointer ctx;
  495. ctx.Attach(new SpReqAnsContext<PhoneService_GetPickupOutVolume_Req,PhoneService_GetPickupOutVolume_Ans>(pTransactionContext));
  496. SpBuffer2Object(Buf, ctx->Req);
  497. pTransactionContext->GetLinkContext(ctx->link);
  498. EntityResource::setLink(ctx->link);
  499. Handle_GetPickupOutVolume(ctx);
  500. }
  501. break;
  502. case PhoneService_Method_StartVideoRender:
  503. {
  504. SpOnewayCallContext<PhoneService_StartVideoRender_Info>::Pointer ctx;
  505. ctx.Attach(new SpOnewayCallContext<PhoneService_StartVideoRender_Info>());
  506. SpBuffer2Object(Buf, ctx->Info);
  507. pTransactionContext->GetLinkContext(ctx->link);
  508. EntityResource::setLink(ctx->link);
  509. Handle_StartVideoRender(ctx);
  510. }
  511. break;
  512. case PhoneService_Method_StopVideoRender:
  513. {
  514. SpOnewayCallContext<PhoneService_StopVideoRender_Info>::Pointer ctx;
  515. ctx.Attach(new SpOnewayCallContext<PhoneService_StopVideoRender_Info>());
  516. SpBuffer2Object(Buf, ctx->Info);
  517. pTransactionContext->GetLinkContext(ctx->link);
  518. EntityResource::setLink(ctx->link);
  519. Handle_StopVideoRender(ctx);
  520. }
  521. break;
  522. case PhoneService_Method_GetHandfreeInVolume:
  523. {
  524. SpReqAnsContext<PhoneService_GetHandfreeInVolume_Req,PhoneService_GetHandfreeInVolume_Ans>::Pointer ctx;
  525. ctx.Attach(new SpReqAnsContext<PhoneService_GetHandfreeInVolume_Req,PhoneService_GetHandfreeInVolume_Ans>(pTransactionContext));
  526. SpBuffer2Object(Buf, ctx->Req);
  527. pTransactionContext->GetLinkContext(ctx->link);
  528. EntityResource::setLink(ctx->link);
  529. Handle_GetHandfreeInVolume(ctx);
  530. }
  531. break;
  532. case PhoneService_Method_SetHandfreeInVolume:
  533. {
  534. SpReqAnsContext<PhoneService_SetHandfreeInVolume_Req,PhoneService_SetHandfreeInVolume_Ans>::Pointer ctx;
  535. ctx.Attach(new SpReqAnsContext<PhoneService_SetHandfreeInVolume_Req,PhoneService_SetHandfreeInVolume_Ans>(pTransactionContext));
  536. SpBuffer2Object(Buf, ctx->Req);
  537. pTransactionContext->GetLinkContext(ctx->link);
  538. EntityResource::setLink(ctx->link);
  539. Handle_SetHandfreeInVolume(ctx);
  540. }
  541. break;
  542. case PhoneService_Method_SetPickupInVolume:
  543. {
  544. SpReqAnsContext<PhoneService_SetPickupInVolume_Req,PhoneService_SetPickupInVolume_Ans>::Pointer ctx;
  545. ctx.Attach(new SpReqAnsContext<PhoneService_SetPickupInVolume_Req,PhoneService_SetPickupInVolume_Ans>(pTransactionContext));
  546. SpBuffer2Object(Buf, ctx->Req);
  547. pTransactionContext->GetLinkContext(ctx->link);
  548. EntityResource::setLink(ctx->link);
  549. Handle_SetPickupInVolume(ctx);
  550. }
  551. break;
  552. case PhoneService_Method_GetPickupInVolume:
  553. {
  554. SpReqAnsContext<PhoneService_GetPickupInVolume_Req,PhoneService_GetPickupInVolume_Ans>::Pointer ctx;
  555. ctx.Attach(new SpReqAnsContext<PhoneService_GetPickupInVolume_Req,PhoneService_GetPickupInVolume_Ans>(pTransactionContext));
  556. SpBuffer2Object(Buf, ctx->Req);
  557. pTransactionContext->GetLinkContext(ctx->link);
  558. EntityResource::setLink(ctx->link);
  559. Handle_GetPickupInVolume(ctx);
  560. }
  561. break;
  562. case PhoneService_Method_GetAudioDevices:
  563. {
  564. SpReqAnsContext<PhoneService_GetAudioDevices_Req,PhoneService_GetAudioDevices_Ans>::Pointer ctx;
  565. ctx.Attach(new SpReqAnsContext<PhoneService_GetAudioDevices_Req,PhoneService_GetAudioDevices_Ans>(pTransactionContext));
  566. SpBuffer2Object(Buf, ctx->Req);
  567. pTransactionContext->GetLinkContext(ctx->link);
  568. EntityResource::setLink(ctx->link);
  569. Handle_GetAudioDevices(ctx);
  570. }
  571. break;
  572. default:
  573. assert(0);
  574. break;
  575. }
  576. } else {
  577. pTransactionContext->SendAnswer(Error);
  578. }
  579. }
  580. };
  581. ///////////////////////////
  582. } // namespace SIPPhone
  583. #endif // __SIPPHONE_SERVER_G_H