void CommunicationService::OnConnectionOpened(Communication::ConnectionInterface* connection) { connections_.push_back(connection); //! @todo connect to vital singals of the connection connect(connection, SIGNAL( FriendRequestReceived(Communication::FriendRequestInterface&) ), SLOT(OnFriendRequestReceived(Communication::FriendRequestInterface&) )); emit( ConnectionOpened(connection) ); }
SHORT CMFPI::OpenConnection(void) { LOGINFO("%s,方法。",__FUNCTION__); if(m_bOpened) { emit ConnectionOpened(); LOGINFO("%s,事件:ConnectionOpened()",__FUNCTION__); return 0; } return N_Open(); }
void CMFPI::WR_RegisterComplete(DWORD dwCommand, HRESULT hResult, LPVOID lpBuffer) { if(LFS_SUCCESS != hResult) { N_Close(); emit OpenFailed(); LOGERROR("%s,注册事件失败,错误码:hResult = %d",__FUNCTION__,hResult); Alarm("07000000"); } else { m_bOpened = true; emit ConnectionOpened(); LOGINFO("%s,事件:ConnectionOpened()",__FUNCTION__); } }
void ConnectionProvider::OnConnectionReady(Communication::ConnectionInterface& connection) { emit( ConnectionOpened(&connection) ); }