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