Beispiel #1
0
  void Adhoc::handleDiscoInfo( const JID& from, const Disco::Info& info, int context )
  {
    if( context != CheckAdhocSupport )
      return;

    util::MutexGuard m( m_adhocTrackMapMutex );

    AdhocTrackMap::iterator it = m_adhocTrackMap.begin();
    for( ; it != m_adhocTrackMap.end() && (*it).second.context != context
                                       && (*it).second.remote  != from; ++it )
      ;
    if( it == m_adhocTrackMap.end() )
      return;

    (*it).second.ah->handleAdhocSupport( from, info.hasFeature( XMLNS_ADHOC_COMMANDS ), (*it).second.handlerContext );
    m_adhocTrackMap.erase( it );
  }
Beispiel #2
0
  void FlexibleOffline::handleDiscoInfo( const JID& /*from*/, const Disco::Info& info, int context )
  {
    if( !m_flexibleOfflineHandler )
      return;

    switch( context )
    {
      case FOCheckSupport:
        m_flexibleOfflineHandler->handleFlexibleOfflineSupport( info.hasFeature( XMLNS_OFFLINE ) );
        break;

      case FORequestNum:
        int num = -1;
        if( info.form() && info.form()->hasField( "number_of_messages" ) )
          num = atoi( info.form()->field( "number_of_messages" )->value().c_str() );

        m_flexibleOfflineHandler->handleFlexibleOfflineMsgNum( num );
        break;
    }
  }
Beispiel #3
0
 virtual void handleDiscoInfo( const JID& /*from*/, const Disco::Info& info, int /*context*/ )
 {
   if( m_test == 8 && info.hasFeature( XMLNS_DISCO_INFO ) && info.hasFeature( "foofeature" )
       && info.hasFeature( "foofeature2" ) )
     m_result = true;
 }