Add ev_job_load_new_with_data() to load files from data in memory
@murrayc
Submitted by Murray Cumming Link to original bug (#654832)
Description
Created attachment 192170 0001-Add-ev_job_load_new_with_data-to-load-files-from-dat.patch
This works for me, though it's only implemented for the PDF backend so far.
From the commit message:
Add ev_job_load_new_with_data() to load files from data in memory.
* libview/ev-jobs.h b/libview/ev-jobs.[h|c]: Add data and data_length struct
fields. Add ev_job_load_new_with_data() to set them.
ev_job_load_run(): Call the new ev_document_load_from_data() function instead
of ev_document_load(), if data is set.
* libdocument/ev-document-factory.[h|c]:
Add ev_document_factory_get_document_from_data(), using the same strucure as
the existing ev_document_factory_get_document(uri). Note that this does not
yet support compressed data.
* libdocument/ev-document.[h|c]: Add a load_data() vfunc.
Add ev_document_load_from_data(), calling that vfunc, like the existing
ev_document_load().
* backend/pdf/ev-poppler.cc: Add pdf_document_load_data(), implementating
the EvDocument load_data vfunc.
Patch 192170, "0001-Add-ev_job_load_new_with_data-to-load-files-from-dat.patch":
0001-Add-ev_job_load_new_with_data-to-load-files-from-dat.patch
Version: git master