SIPPhone_server_g.h 24 KB

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