SIPPhone_server_g.h 23 KB

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