Ejemplo n.º 1
0
 virtual void handleAdhocCommand( const JID& from, const Adhoc::Command& command,
                                  const std::string& /*sess*/ )
 {
     if( command.node() == "helloworld" )
         printf( "Hello World!, by %s\n", from.full().c_str() );
     else if( command.node() == "config" )
         printf( "configuration command called by %s\n", from.full().c_str() );
     else if( command.node() == "shutdown" )
     {
         printf( "shutting down, by %s\n", from.full().c_str() );
     }
 }
Ejemplo n.º 2
0
 virtual void handleAdhocCommand( const JID& /*from*/, const Adhoc::Command& command,
                                  const std::string& /*sess*/ )
 {
   if( m_test == 5 && command.node() == "foocmd" )
     m_result = true;
 }