123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727 |
- #ifndef __SIPPHONE_SERVER_G_H
- #define __SIPPHONE_SERVER_G_H
- #pragma once
- // This code is generated by spgen tool!
- #include "SIPPhone_def_g.h"
- namespace SIPPhone {
- class PhoneService_ServerSessionBase : public CServerSessionBase
- {
- public:
- PhoneService_ServerSessionBase()
- {
- /// override by user
- }
- virtual ~PhoneService_ServerSessionBase()
- {
- /// override by user
- }
- virtual bool IsExclusive() { return false; }
- virtual bool IsSessionOverlap() { return true; }
- virtual ErrorCodeEnum GetMessageAttr(DWORD dwMessageID, DWORD dwSignature, bool &bOverlap)
- {
- ErrorCodeEnum Error = Error_Succeed;
- switch (dwMessageID) {
- case PhoneService_Method_MakeCall:
- if (dwSignature == PhoneService_MethodSignature_MakeCall) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_HangupCall:
- if (dwSignature == PhoneService_MethodSignature_HangupCall) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_StartVideo:
- if (dwSignature == PhoneService_MethodSignature_StartVideo) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_StopVideo:
- if (dwSignature == PhoneService_MethodSignature_StopVideo) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_RealErrorCheck:
- if (dwSignature == PhoneService_MethodSignature_RealErrorCheck) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_ReleaseCall:
- if (dwSignature == PhoneService_MethodSignature_ReleaseCall) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_BeginState:
- if (dwSignature == PhoneService_MethodSignature_BeginState) {
- bOverlap = false;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_EndState:
- if (dwSignature == PhoneService_MethodSignature_EndState) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_SetCallingParam:
- if (dwSignature == PhoneService_MethodSignature_SetCallingParam) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_GetHandfreeOutVolume:
- if (dwSignature == PhoneService_MethodSignature_GetHandfreeOutVolume) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_SetHandfreeOutVolume:
- if (dwSignature == PhoneService_MethodSignature_SetHandfreeOutVolume) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_SetPickupOutVolume:
- if (dwSignature == PhoneService_MethodSignature_SetPickupOutVolume) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_GetPickupOutVolume:
- if (dwSignature == PhoneService_MethodSignature_GetPickupOutVolume) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_StartVideoRender:
- if (dwSignature == PhoneService_MethodSignature_StartVideoRender) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_StopVideoRender:
- if (dwSignature == PhoneService_MethodSignature_StopVideoRender) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_GetHandfreeInVolume:
- if (dwSignature == PhoneService_MethodSignature_GetHandfreeInVolume) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_SetHandfreeInVolume:
- if (dwSignature == PhoneService_MethodSignature_SetHandfreeInVolume) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_SetPickupInVolume:
- if (dwSignature == PhoneService_MethodSignature_SetPickupInVolume) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_GetPickupInVolume:
- if (dwSignature == PhoneService_MethodSignature_GetPickupInVolume) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_GetAudioDevices:
- if (dwSignature == PhoneService_MethodSignature_GetAudioDevices) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_StartCameraRender:
- if (dwSignature == PhoneService_MethodSignature_StartCameraRender) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_StopCameraRender:
- if (dwSignature == PhoneService_MethodSignature_StopCameraRender) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_IsCameraRender:
- if (dwSignature == PhoneService_MethodSignature_IsCameraRender) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_StartBothCameraRender:
- if (dwSignature == PhoneService_MethodSignature_StartBothCameraRender) {
- bOverlap = true;
- } else {
- Error = Error_MethodSignatureFailed;
- }
- break;
- default:
- Error = Error_MethodNotFound;
- break;
- }
- return Error;
- }
- int CheckMessageSignature(DWORD dwMessageID, DWORD dwSignature)
- {
- ErrorCodeEnum Error = Error_Succeed;
- switch (dwMessageID) {
- case PhoneService_Method_MakeCall:
- if (dwSignature != PhoneService_MethodSignature_MakeCall) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_HangupCall:
- if (dwSignature != PhoneService_MethodSignature_HangupCall) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_StartVideo:
- if (dwSignature != PhoneService_MethodSignature_StartVideo) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_StopVideo:
- if (dwSignature != PhoneService_MethodSignature_StopVideo) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_RealErrorCheck:
- if (dwSignature != PhoneService_MethodSignature_RealErrorCheck) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_ReleaseCall:
- if (dwSignature != PhoneService_MethodSignature_ReleaseCall) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_BeginState:
- if (dwSignature != PhoneService_MethodSignature_BeginState) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_EndState:
- if (dwSignature != PhoneService_MethodSignature_EndState) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_SetCallingParam:
- if (dwSignature != PhoneService_MethodSignature_SetCallingParam) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_GetHandfreeOutVolume:
- if (dwSignature != PhoneService_MethodSignature_GetHandfreeOutVolume) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_SetHandfreeOutVolume:
- if (dwSignature != PhoneService_MethodSignature_SetHandfreeOutVolume) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_SetPickupOutVolume:
- if (dwSignature != PhoneService_MethodSignature_SetPickupOutVolume) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_GetPickupOutVolume:
- if (dwSignature != PhoneService_MethodSignature_GetPickupOutVolume) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_StartVideoRender:
- if (dwSignature != PhoneService_MethodSignature_StartVideoRender) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_StopVideoRender:
- if (dwSignature != PhoneService_MethodSignature_StopVideoRender) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_GetHandfreeInVolume:
- if (dwSignature != PhoneService_MethodSignature_GetHandfreeInVolume) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_SetHandfreeInVolume:
- if (dwSignature != PhoneService_MethodSignature_SetHandfreeInVolume) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_SetPickupInVolume:
- if (dwSignature != PhoneService_MethodSignature_SetPickupInVolume) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_GetPickupInVolume:
- if (dwSignature != PhoneService_MethodSignature_GetPickupInVolume) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_GetAudioDevices:
- if (dwSignature != PhoneService_MethodSignature_GetAudioDevices) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_StartCameraRender:
- if (dwSignature != PhoneService_MethodSignature_StartCameraRender) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_StopCameraRender:
- if (dwSignature != PhoneService_MethodSignature_StopCameraRender) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_IsCameraRender:
- if (dwSignature != PhoneService_MethodSignature_IsCameraRender) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- case PhoneService_Method_StartBothCameraRender:
- if (dwSignature != PhoneService_MethodSignature_StartBothCameraRender) {
- Error = Error_MethodSignatureFailed;
- }
- break;
- default:
- Error = Error_MethodNotFound;
- break;
- }
- return Error;
- }
- virtual void Handle_MakeCall(SpReqAnsContext<PhoneService_MakeCall_Req, PhoneService_MakeCall_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_HangupCall(SpReqAnsContext<PhoneService_HangupCall_Req, PhoneService_HangupCall_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_StartVideo(SpOnewayCallContext<PhoneService_StartVideo_Info>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_StopVideo(SpOnewayCallContext<PhoneService_StopVideo_Info>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_RealErrorCheck(SpOnewayCallContext<PhoneService_RealErrorCheck_Info>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_ReleaseCall(SpReqAnsContext<PhoneService_ReleaseCall_Req, PhoneService_ReleaseCall_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_BeginState(SpSubscribeContext<PhoneService_BeginState_Sub, PhoneService_PhoneState_Info>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_EndState(SpOnewayCallContext<PhoneService_EndState_Info>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_SetCallingParam(SpOnewayCallContext<PhoneService_SetCallingParam_Info>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_GetHandfreeOutVolume(SpReqAnsContext<PhoneService_GetHandfreeOutVolume_Req, PhoneService_GetHandfreeOutVolume_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_SetHandfreeOutVolume(SpReqAnsContext<PhoneService_SetHandfreeOutVolume_Req, PhoneService_SetHandfreeOutVolume_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_SetPickupOutVolume(SpReqAnsContext<PhoneService_SetPickupOutVolume_Req, PhoneService_SetPickupOutVolume_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_GetPickupOutVolume(SpReqAnsContext<PhoneService_GetPickupOutVolume_Req, PhoneService_GetPickupOutVolume_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_StartVideoRender(SpOnewayCallContext<PhoneService_StartVideoRender_Info>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_StopVideoRender(SpOnewayCallContext<PhoneService_StopVideoRender_Info>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_GetHandfreeInVolume(SpReqAnsContext<PhoneService_GetHandfreeInVolume_Req, PhoneService_GetHandfreeInVolume_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_SetHandfreeInVolume(SpReqAnsContext<PhoneService_SetHandfreeInVolume_Req, PhoneService_SetHandfreeInVolume_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_SetPickupInVolume(SpReqAnsContext<PhoneService_SetPickupInVolume_Req, PhoneService_SetPickupInVolume_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_GetPickupInVolume(SpReqAnsContext<PhoneService_GetPickupInVolume_Req, PhoneService_GetPickupInVolume_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_GetAudioDevices(SpReqAnsContext<PhoneService_GetAudioDevices_Req, PhoneService_GetAudioDevices_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_StartCameraRender(SpReqAnsContext<PhoneService_StartCameraRender_Req, PhoneService_StartCameraRender_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_StopCameraRender(SpReqAnsContext<PhoneService_StopCameraRender_Req, PhoneService_StopCameraRender_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_IsCameraRender(SpReqAnsContext<PhoneService_IsCameraRender_Req, PhoneService_IsCameraRender_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void Handle_StartBothCameraRender(SpReqAnsContext<PhoneService_StartBothCameraRender_Req, PhoneService_StartBothCameraRender_Ans>::Pointer ctx)
- {
- /// override by user
- }
- virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
- {
- CAutoBuffer Buf;
- DWORD dwMessageID;
- DWORD dwMessageSignature;
- ErrorCodeEnum Error = pTransactionContext->GetReceiveBuffer(dwMessageID, dwMessageSignature, Buf);
- if (Error == Error_Succeed) {
- #ifdef DEBUG
- assert(CheckMessageSignature(dwMessageID, dwMessageSignature) == Error_Succeed);
- #else
- if (CheckMessageSignature(dwMessageID, dwMessageSignature) != Error_Succeed) {
- pTransactionContext->SendAnswer(Error_MethodSignatureFailed);
- return;
- }
- #endif
- switch (dwMessageID) {
- case PhoneService_Method_MakeCall:
- {
- SpReqAnsContext<PhoneService_MakeCall_Req,PhoneService_MakeCall_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_MakeCall_Req,PhoneService_MakeCall_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_MakeCall(ctx);
- }
- break;
- case PhoneService_Method_HangupCall:
- {
- SpReqAnsContext<PhoneService_HangupCall_Req,PhoneService_HangupCall_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_HangupCall_Req,PhoneService_HangupCall_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_HangupCall(ctx);
- }
- break;
- case PhoneService_Method_StartVideo:
- {
- SpOnewayCallContext<PhoneService_StartVideo_Info>::Pointer ctx;
- ctx.Attach(new SpOnewayCallContext<PhoneService_StartVideo_Info>());
- SpBuffer2Object(Buf, ctx->Info);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_StartVideo(ctx);
- }
- break;
- case PhoneService_Method_StopVideo:
- {
- SpOnewayCallContext<PhoneService_StopVideo_Info>::Pointer ctx;
- ctx.Attach(new SpOnewayCallContext<PhoneService_StopVideo_Info>());
- SpBuffer2Object(Buf, ctx->Info);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_StopVideo(ctx);
- }
- break;
- case PhoneService_Method_RealErrorCheck:
- {
- SpOnewayCallContext<PhoneService_RealErrorCheck_Info>::Pointer ctx;
- ctx.Attach(new SpOnewayCallContext<PhoneService_RealErrorCheck_Info>());
- SpBuffer2Object(Buf, ctx->Info);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_RealErrorCheck(ctx);
- }
- break;
- case PhoneService_Method_ReleaseCall:
- {
- SpReqAnsContext<PhoneService_ReleaseCall_Req,PhoneService_ReleaseCall_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_ReleaseCall_Req,PhoneService_ReleaseCall_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_ReleaseCall(ctx);
- }
- break;
- case PhoneService_Method_BeginState:
- {
- SpSubscribeContext<PhoneService_BeginState_Sub,PhoneService_PhoneState_Info>::Pointer ctx;
- ctx.Attach(new SpSubscribeContext<PhoneService_BeginState_Sub,PhoneService_PhoneState_Info>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- Handle_BeginState(ctx);
- }
- break;
- case PhoneService_Method_EndState:
- {
- SpOnewayCallContext<PhoneService_EndState_Info>::Pointer ctx;
- ctx.Attach(new SpOnewayCallContext<PhoneService_EndState_Info>());
- SpBuffer2Object(Buf, ctx->Info);
- Handle_EndState(ctx);
- }
- break;
- case PhoneService_Method_SetCallingParam:
- {
- SpOnewayCallContext<PhoneService_SetCallingParam_Info>::Pointer ctx;
- ctx.Attach(new SpOnewayCallContext<PhoneService_SetCallingParam_Info>());
- SpBuffer2Object(Buf, ctx->Info);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_SetCallingParam(ctx);
- }
- break;
- case PhoneService_Method_GetHandfreeOutVolume:
- {
- SpReqAnsContext<PhoneService_GetHandfreeOutVolume_Req,PhoneService_GetHandfreeOutVolume_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_GetHandfreeOutVolume_Req,PhoneService_GetHandfreeOutVolume_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_GetHandfreeOutVolume(ctx);
- }
- break;
- case PhoneService_Method_SetHandfreeOutVolume:
- {
- SpReqAnsContext<PhoneService_SetHandfreeOutVolume_Req,PhoneService_SetHandfreeOutVolume_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_SetHandfreeOutVolume_Req,PhoneService_SetHandfreeOutVolume_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_SetHandfreeOutVolume(ctx);
- }
- break;
- case PhoneService_Method_SetPickupOutVolume:
- {
- SpReqAnsContext<PhoneService_SetPickupOutVolume_Req,PhoneService_SetPickupOutVolume_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_SetPickupOutVolume_Req,PhoneService_SetPickupOutVolume_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_SetPickupOutVolume(ctx);
- }
- break;
- case PhoneService_Method_GetPickupOutVolume:
- {
- SpReqAnsContext<PhoneService_GetPickupOutVolume_Req,PhoneService_GetPickupOutVolume_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_GetPickupOutVolume_Req,PhoneService_GetPickupOutVolume_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_GetPickupOutVolume(ctx);
- }
- break;
- case PhoneService_Method_StartVideoRender:
- {
- SpOnewayCallContext<PhoneService_StartVideoRender_Info>::Pointer ctx;
- ctx.Attach(new SpOnewayCallContext<PhoneService_StartVideoRender_Info>());
- SpBuffer2Object(Buf, ctx->Info);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_StartVideoRender(ctx);
- }
- break;
- case PhoneService_Method_StopVideoRender:
- {
- SpOnewayCallContext<PhoneService_StopVideoRender_Info>::Pointer ctx;
- ctx.Attach(new SpOnewayCallContext<PhoneService_StopVideoRender_Info>());
- SpBuffer2Object(Buf, ctx->Info);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_StopVideoRender(ctx);
- }
- break;
- case PhoneService_Method_GetHandfreeInVolume:
- {
- SpReqAnsContext<PhoneService_GetHandfreeInVolume_Req,PhoneService_GetHandfreeInVolume_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_GetHandfreeInVolume_Req,PhoneService_GetHandfreeInVolume_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_GetHandfreeInVolume(ctx);
- }
- break;
- case PhoneService_Method_SetHandfreeInVolume:
- {
- SpReqAnsContext<PhoneService_SetHandfreeInVolume_Req,PhoneService_SetHandfreeInVolume_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_SetHandfreeInVolume_Req,PhoneService_SetHandfreeInVolume_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_SetHandfreeInVolume(ctx);
- }
- break;
- case PhoneService_Method_SetPickupInVolume:
- {
- SpReqAnsContext<PhoneService_SetPickupInVolume_Req,PhoneService_SetPickupInVolume_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_SetPickupInVolume_Req,PhoneService_SetPickupInVolume_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_SetPickupInVolume(ctx);
- }
- break;
- case PhoneService_Method_GetPickupInVolume:
- {
- SpReqAnsContext<PhoneService_GetPickupInVolume_Req,PhoneService_GetPickupInVolume_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_GetPickupInVolume_Req,PhoneService_GetPickupInVolume_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_GetPickupInVolume(ctx);
- }
- break;
- case PhoneService_Method_GetAudioDevices:
- {
- SpReqAnsContext<PhoneService_GetAudioDevices_Req,PhoneService_GetAudioDevices_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_GetAudioDevices_Req,PhoneService_GetAudioDevices_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_GetAudioDevices(ctx);
- }
- break;
- case PhoneService_Method_StartCameraRender:
- {
- SpReqAnsContext<PhoneService_StartCameraRender_Req,PhoneService_StartCameraRender_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_StartCameraRender_Req,PhoneService_StartCameraRender_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_StartCameraRender(ctx);
- }
- break;
- case PhoneService_Method_StopCameraRender:
- {
- SpReqAnsContext<PhoneService_StopCameraRender_Req,PhoneService_StopCameraRender_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_StopCameraRender_Req,PhoneService_StopCameraRender_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_StopCameraRender(ctx);
- }
- break;
- case PhoneService_Method_IsCameraRender:
- {
- SpReqAnsContext<PhoneService_IsCameraRender_Req,PhoneService_IsCameraRender_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_IsCameraRender_Req,PhoneService_IsCameraRender_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_IsCameraRender(ctx);
- }
- break;
- case PhoneService_Method_StartBothCameraRender:
- {
- SpReqAnsContext<PhoneService_StartBothCameraRender_Req,PhoneService_StartBothCameraRender_Ans>::Pointer ctx;
- ctx.Attach(new SpReqAnsContext<PhoneService_StartBothCameraRender_Req,PhoneService_StartBothCameraRender_Ans>(pTransactionContext));
- SpBuffer2Object(Buf, ctx->Req);
- pTransactionContext->GetLinkContext(ctx->link);
- EntityResource::setLink(ctx->link);
- Handle_StartBothCameraRender(ctx);
- }
- break;
- default:
- assert(0);
- break;
- }
-
- } else {
- pTransactionContext->SendAnswer(Error);
- }
- }
- };
- ///////////////////////////
- } // namespace SIPPhone
- #endif // __SIPPHONE_SERVER_G_H
|