예제 #1
0
void AuthBridge::forbidden()
{
  ChatClient::io()->leave();

  add(AlertMessage(tr("Access denied. %1").arg(retryLink()), ALERT_MESSAGE_ERROR));
  ChatNotify::start(Notify::ShowChat);
}
예제 #2
0
/*!
 * Обработка закрытия авторизационного диалога.
 *
 * \sa AuthClient::cancel()
 */
void AuthBridge::cancel()
{
  if (ChatClient::state() == ChatClient::WaitAuth) {
    if (m_client)
      m_client->cancel();

    m_providers.clear();
    ChatClient::io()->leave();

    add(AlertMessage(tr("Authorization has been canceled by you. %1").arg(retryLink()), ALERT_MESSAGE_ERROR));
  }
}
예제 #3
0
/**\brief Adds a new AlertMessage.
 * \param message C string to message
 */
void Hud::Alert( const char *message, ... )
{
	va_list args;
	char msgBuffer[ 4096 ] = {0};

	va_start( args, message );

	vsnprintf( msgBuffer, 4095, message, args );

	va_end( args );

	AlertMessages.push_back( AlertMessage( msgBuffer, Timer::GetTicks() ) );
}
예제 #4
0
파일: hud.cpp 프로젝트: cthielen/epiar
/**\brief Adds a new AlertMessage.
 * \param message C string of message.
 * \param ... Arguments that are formated into the message.
 */
void Hud::Alert( bool audible, const char *message, ... ) {
	va_list args;
	char msgBuffer[ 2048 ] = {0};

	// Format the Message
	va_start( args, message );
	vsnprintf( msgBuffer, 2047, message, args );
	va_end( args );

	// Store this Message as a new Alert.
	// Use the current time so that it can fade away gracefully.
	AlertMessages.push_back( AlertMessage( msgBuffer, Timer::GetTicks() ) );

	if(audible && AlertBeep) { AlertBeep->Play(); }
}
예제 #5
0
/**
 *	Sends an alert message to Swarm. Thread-safe access.
 *	@param	AlertType		The type of alert.
 *	@param	ObjectGuid		The GUID of the object associated with the alert.
 *	@param	TypeId			The type of object.
 *	@param	MessageText		The text of the message.
 */
void FLightmassSwarm::SendAlertMessage(	NSwarm::TAlertLevel AlertLevel, 
	const FGuid& ObjectGuid, const int32 TypeId, const TCHAR* MessageText)
{
	double StartTime = FPlatformTime::Seconds();

	NSwarm::FAlertMessage AlertMessage(JobGuid, AlertLevel, ObjectGuid, TypeId, MessageText);
	int32 ReturnCode = API.SendMessage( AlertMessage );
	if ((ReturnCode == NSwarm::SWARM_ERROR_CONNECTION_NOT_FOUND) ||
		(ReturnCode == NSwarm::SWARM_ERROR_CONNECTION_DISCONNECTED))
	{
		// The connection has dropped, exit with a special code
		exit(SwarmConnectionDroppedExitCode);
	}
	
	GStatistics.SendMessageTime += FPlatformTime::Seconds() - StartTime;
}
예제 #6
0
uint32 InputNode::Run()
{
  InputMessage message;
 
  // node.init(name);
  node.init("Node3");
   
  while (running)
  {
    // node.subscribe(topic);
    node.subscribe("node_demo/CarInput");
    
    // bool success = node.receive(topic, message);
    bool success = node.receive("node_demo/CarInput", message);
    
    if (success) {
      UE_LOG(LogTemp, Log, TEXT("Input Received"));
      AlertMessage(message);
    }
    FPlatformProcess::Sleep(0.001f);
  }
  
  return 0;
}