示例#1
0
void Window::removeChild( const co::base::UUID& id )
{
    EQASSERT( getConfig()->isRunning( ));

    Channel* channel = _findChannel( id );
    EQASSERT( channel );
    if( channel )
        channel->postDelete();
}
示例#2
0
bool Window::_cmdDestroyChannel( co::ICommand& cmd )
{
    co::ObjectICommand command( cmd );
    LBLOG( LOG_INIT ) << "Destroy channel " << command << std::endl;

    Channel* channel = _findChannel( command.read< uint128_t >( ));
    LBASSERT( channel );

    const bool stopped = channel->isStopped();
    Config* config = getConfig();
    config->unmapObject( channel );
    channel->send( getServer(), fabric::CMD_CHANNEL_CONFIG_EXIT_REPLY )
        << stopped;
    Global::getNodeFactory()->releaseChannel( channel );

    return true;
}
示例#3
0
bool Window::_cmdDestroyChannel( co::Command& command )
{
    const WindowDestroyChannelPacket* packet =
        command.get<WindowDestroyChannelPacket>();
    LBLOG( LOG_INIT ) << "Destroy channel " << packet << std::endl;

    Channel* channel = _findChannel( packet->channelID );
    LBASSERT( channel );

    ChannelConfigExitReplyPacket reply( packet->channelID,
                                        channel->isStopped( ));
    Config* config = getConfig();
    config->unmapObject( channel );
    Global::getNodeFactory()->releaseChannel( channel );

    getServer()->send( reply ); // do not use Object::send()
    return true;
}