Sha256: 4b8b6f8fb41b47d75d870a9ffda8a9bcce7665ee0f08a2ee7107ca0d0fa07684

Contents?: true

Size: 798 Bytes

Versions: 2

Compression:

Stored size: 798 Bytes

Contents

#include "sunscraper.h"
#include "sunscraperthread.h"

extern "C" {
    Sunscraper *sunscraper_create()
    {
        return new Sunscraper();
    }

    void sunscraper_load_html(Sunscraper *sunscraper, const char *html)
    {
        sunscraper->loadHtml(html);
    }

    void sunscraper_load_url(Sunscraper *sunscraper, const char *url)
    {
        sunscraper->loadUrl(url);
    }

    void sunscraper_wait(Sunscraper *sunscraper, unsigned timeout)
    {
        sunscraper->wait(timeout);
    }

    const char *sunscraper_fetch(Sunscraper *sunscraper)
    {
        return sunscraper->fetchAsCString();
    }

    void sunscraper_discard(Sunscraper *sunscraper)
    {
        delete sunscraper;
    }

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sunscraper-1.1.0.beta2 ext/embed/sunscraperexternal.cpp
sunscraper-1.1.0.beta1 ext/embed/sunscraperexternal.cpp