- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
MCUNode.cpp
资源名称:视频会议系统.rar [点击查看]
上传用户:popouu88
上传日期:2013-02-11
资源大小:2894k
文件大小:2k
源码类别:
IP电话/视频会议
开发平台:
Visual C++
- // MCUNode.cpp: implementation of the CMCUNode class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "MCUNode.h"
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- CMCUNode::CMCUNode()
- {
- this->cmdTCP = NULL;
- this->mcu_id = 0;
- this->mcu_name = "";
- }
- CMCUNode::~CMCUNode()
- {
- INT_PTR_MAP::iterator itr;
- while( this->online_map.empty( ) )
- {
- itr = this->online_map.begin( );
- CClientNode * node = ( CClientNode * )itr->second;
- this->online_map.erase( itr );
- delete node;
- }
- }
- CClientNode * CMCUNode::AddClientNode( int user_id , const char * user_name , const char * data_name , bool isCharement )
- {
- if( this->online_map.find( user_id ) != this->online_map.end( ) )
- return NULL;
- CClientNode * node = new CClientNode( );
- node->user_id = user_id;
- node->user_name = user_name;
- node->data_name = data_name;
- node->isCharement = isCharement;
- this->online_map[ node->user_id ] = node;
- return node;
- }
- void CMCUNode::RemoveClientNode( int user_id )
- {
- INT_PTR_MAP::iterator itr = this->online_map.find( user_id );
- if( itr != this->online_map.end( ) )
- {
- CClientNode * node = ( CClientNode * )itr->second;
- this->online_map.erase( itr );
- delete node;
- }
- }
- CClientNode * CMCUNode::GetClientNode( int user_id )
- {
- INT_PTR_MAP::iterator itr = this->online_map.find( user_id );
- if( itr != this->online_map.end( ) )
- return ( CClientNode * )itr->second;
- return NULL;
- }