PInviteUserRES.cpp
资源名称:视频会议系统.rar [点击查看]
上传用户:popouu88
上传日期:2013-02-11
资源大小:2894k
文件大小:1k
源码类别:
IP电话/视频会议
开发平台:
Visual C++
- // PInviteUserRES.cpp: implementation of the PInviteUserRES class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "PInviteUserRES.h"
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- PInviteUserRES::PInviteUserRES()
- {
- this->Tag = PInviteUserRESTAG;
- }
- PInviteUserRES::~PInviteUserRES()
- {
- }
- bool PInviteUserRES::assembleData( int charement_id , int user_id , int ireturn )
- {
- this->buffer.Resize( 5 * INT_SIZE );
- char * now = this->buffer.GetBuffer( );
- *( int * )now = this->buffer.GetSize( ); now += INT_SIZE;
- *( int * )now = this->Tag; now += INT_SIZE;
- *( int * )now = charement_id ; now += INT_SIZE;
- *( int * )now = user_id; now += INT_SIZE;
- *( int * )now = ireturn;
- return true;
- }
- bool PInviteUserRES::parseData( CBuffer & buffer )
- {
- if( ! buffer.GetSize( ) ) return false;
- char * now = buffer.GetBuffer( ) + 2 * INT_SIZE;
- this->charement_id = *( int * )now ; now += INT_SIZE;
- this->user_id = *( int * )now; now += INT_SIZE;
- this->ireturn = *( int * )now ; now += INT_SIZE;
- return true;
- }