/***************************************************************************
                         main.cpp  -  description
                             -------------------
    begin                : Fri Nov 14 10:48:58 CET 2003
    copyright            : (C) 2003 by Adrian Schroeter
    email                : adrian@suse.de
                           2009 Friedrich W. H. Kossebau
                           kossebau@kde.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation                                      *
 *                                                                         *
 ***************************************************************************/

#include "kio_slp.h"

// ioslave
#include "servicelistingurl.h"
// KDE
#include <KComponentData>
// Qt
#include <QtCore/QCoreApplication>
#include <QtCore/QRegExp>


extern "C"
{
    int KDE_EXPORT kdemain( int argc, char **argv )
    {
        // necessary to use other kio slaves
        KComponentData componentData( "kio_slp" );
        QCoreApplication app( argc, argv );

        QRegExp urlMatcher( "^(.*)://([^,]*).*" );
        ServiceListingUrl::matcher = &urlMatcher;

        // start the slave
        ServicesSlave slave( argv[1], argv[2], argv[3] );
        slave.dispatchLoop();
        return 0;
    }
}
