Sha256: 1b9d5b095971e3354157123e3595adfcd7011e4709b1d4d96f9b588bbb065c8c

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

#include "sunscraperinterface.h"
#include "sunscraperthread.h"

extern "C" {
    unsigned sunscraper_create()
    {
        return SunscraperInterface::instance()->createQuery();
    }

    void sunscraper_load_html(unsigned queryId, const char *html, const char *url)
    {
        SunscraperInterface::instance()->loadHtml(queryId, html, QUrl(url));
    }

    void sunscraper_load_url(unsigned queryId, const char *url)
    {
        SunscraperInterface::instance()->loadUrl(queryId, QUrl(url));
    }

    int sunscraper_wait(unsigned queryId, unsigned timeout)
    {
        return SunscraperInterface::instance()->wait(queryId, timeout);
    }

    const char *sunscraper_fetch(unsigned queryId)
    {
        /* VERIFY that the string won't be deleted prematurely */
        return SunscraperInterface::instance()->fetch(queryId).constData();
    }

    void sunscraper_finalize(unsigned queryId)
    {
        SunscraperInterface::instance()->finalize(queryId);
    }

    void sunscraper_quit()
    {
        SunscraperThread::commitSuicide();
    }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sunscraper-1.2.0 ext/embed/sunscraperexternal.cpp
sunscraper-1.2.0.pre2 ext/embed/sunscraperexternal.cpp
sunscraper-1.2.0.pre1 ext/embed/sunscraperexternal.cpp
sunscraper-1.2.0.beta1 ext/embed/sunscraperexternal.cpp