Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

exampletask.cpp Example File
server/plugins/exampletask/exampletask.cpp

    /****************************************************************************
    **
    ** This file is part of the Qt Extended Opensource Package.
    **
    ** Copyright (C) 2009 Trolltech ASA.
    **
    ** $QT_EXTENDED_DUAL_LICENSE$
    **
    ****************************************************************************/

    #include "exampletask.h"
    #include <qtopiaglobal.h>

    #include <QDebug>

    class ExampleTask: public QObject
    {
    public:
        ExampleTask( QObject* parent = 0 ) : QObject(parent)
        {
            //server task code
        }

        ~ExampleTask()
        {
        }
    };

    ExampleTaskPlugin::ExampleTaskPlugin(QObject* parent)
        : ServerTaskPlugin( parent )
    {
    }

    ExampleTaskPlugin::~ExampleTaskPlugin()
    {
    }

    QByteArray ExampleTaskPlugin::name() const
    {
        return QByteArray("ExampleTask");
    }

    QObject* ExampleTaskPlugin::initTask(void* createArg ) const
    {
        Q_UNUSED( createArg );
        return new ExampleTask();
    }

    bool ExampleTaskPlugin::demand() const
    {
        return true;
    }

    QTOPIA_EXPORT_PLUGIN( ExampleTaskPlugin )


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3