<commit_before>//
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2007      <NAME> <<EMAIL>>
// Copyright 2007      <NAME>  <<EMAIL>>
// Copyright 2008,2009 <NAME> <<EMAIL>>
// Copyright 2008      <NAME> <<EMAIL>>
//


#ifndef QHTTPNETWORKPLUGIN_H
#define QHTTPNETWORKPLUGIN_H

#include "NetworkPlugin.h"
#include "HttpJob.h"

#include <QtCore/QByteArray>
#include <QtCore/QString>

class QBuffer;
class QHttp;
class QUrl;

namespace Marble
{

class QHttpHttpJob: public HttpJob
{
    Q_OBJECT

 public:
    QHttpHttpJob( const QUrl & sourceUrl, const QString & destFileName, const QString & id );
    ~QHttpHttpJob();

    QByteArray & data();

 public Q_SLOTS:
    virtual void execute();

 private Q_SLOTS:
    void httpRequestFinished( int requestId, bool error );

 private:
    QByteArray  m_data;
    QBuffer    *m_buffer;
    QHttp       *m_http; // FIXME: cleans this up after 4.1
    int m_currentRequest;
};

inline QByteArray & QHttpHttpJob::data()
{
    return m_data;
}


class QHttpNetworkPlugin: public NetworkPlugin
{
    Q_OBJECT

 public:
    virtual QString name() const;
    virtual QString nameId() const;
    virtual QString guiString() const;
    virtual QString description() const;
    virtual QIcon icon() const;
    virtual void initialize();
    virtual bool isInitialized() const;

    virtual NetworkPlugin * newInstance() const;
    virtual HttpJob *createJob( const QUrl &source, const QString &destination, const QString &id );
};

}

#endif // QHTTPNETWORKPLUGIN_H<commit_msg>Fix plugin loading.<commit_after>//
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2007      <NAME> <<EMAIL>>
// Copyright 2007      <NAME>  <<EMAIL>>
// Copyright 2008,2009 <NAME> <<EMAIL>>
// Copyright 2008      <NAME> <<EMAIL>>
//


#ifndef QHTTPNETWORKPLUGIN_H
#define QHTTPNETWORKPLUGIN_H

#include "NetworkPlugin.h"
#include "HttpJob.h"

#include <QtCore/QByteArray>
#include <QtCore/QString>

class QBuffer;
class QHttp;
class QUrl;

namespace Marble
{

class QHttpHttpJob: public HttpJob
{
    Q_OBJECT

 public:
    QHttpHttpJob( const QUrl & sourceUrl, const QString & destFileName, const QString & id );
    ~QHttpHttpJob();

    QByteArray & data();

 public Q_SLOTS:
    virtual void execute();

 private Q_SLOTS:
    void httpRequestFinished( int requestId, bool error );

 private:
    QByteArray  m_data;
    QBuffer    *m_buffer;
    QHttp       *m_http; // FIXME: cleans this up after 4.1
    int m_currentRequest;
};

inline QByteArray & QHttpHttpJob::data()
{
    return m_data;
}


class QHttpNetworkPlugin: public NetworkPlugin
{
    Q_OBJECT
    Q_INTERFACES( Marble::NetworkPluginInterface )

 public:
    virtual QString name() const;
    virtual QString nameId() const;
    virtual QString guiString() const;
    virtual QString description() const;
    virtual QIcon icon() const;
    virtual void initialize();
    virtual bool isInitialized() const;

    virtual NetworkPlugin * newInstance() const;
    virtual HttpJob *createJob( const QUrl &source, const QString &destination, const QString &id );
};

}

#endif // QHTTPNETWORKPLUGIN_H
{'fraction_non_alphanumeric': 0.1002615518744551, 'fraction_numerical': 0.012786980528916013, 'mean_word_length': 3.499346405228758, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4661348', 'n_tokens_mistral': 1117, 'n_tokens_neox': 1058, 'n_words': 357}