Sha256: aa2b8d7b55636cd5b6b6ad245d0967b4d3bc5698d6d28060b7396b740116c46b

Contents?: true

Size: 798 Bytes

Versions: 1

Compression:

Stored size: 798 Bytes

Contents

#include "sunscraper.h"
#include "sunscraperworker.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()
    {
        SunscraperWorker::commitSuicide();
    }
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sunscraper-1.1.0.beta3 ext/embed/sunscraperexternal.cpp