2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-16 08:52:21 +00:00
Commit Graph

17 Commits

Author SHA1 Message Date
Jay Berkenbilt
564dc03607 QPDFJob: start real API
Create QPDFJob_options.cc to hold API implementation functions.
Reorganize a little in preparation for moving public member variables
private and creating the real QPDFJob API that will be used by callers
as well as the argv/json initialization methods.
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
1d099ab743 QPDFJob: placeholder for initializeFromJson 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
b9cd693a5b QPDFJob: allocate QPDFArgParser on stack
The previous commits have removed all references to memory from
QPDFArgParser from QPDFJob. This commit removes the constraint that
QPDFArgParser remain in scope. This is a prerequisite to allowing JSON
as an alternative way to initialize QPDFJob and to initialize it
directly using a public API.
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
d526d4c17f QPDFJob: convert Under/Overlay to use shared pointers 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
88891a75a2 QPDFJob: convert Under/Overlay ranges to strings 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
e48bfce930 QPDFJob: convert PageSpec to used shared pointer 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
e4905983d2 QPDFJob: convert outfilename to shared pointer 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
e5edfc786f QPDFJob: convert infilename to shared pointer 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
ee7824cf28 QPDFJob: convert encryption_file args to shared pointers 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
021db6f226 QPDFJob: convert password to shared pointer 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
1a8c2eb93b QPDFJob: use std::shared_ptr over PointerHolder where possible
Also fix QPDFArgParser
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
bd89aac360 QPDFJob increment: move arg parsing into QPDFJob
Move ArgParser from qpdf.cc into QPDFJob.cc. It still works with
millions of public member variables, but now qpdf.cc is minimal and
just calls stable library functions.
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
12396702af QPDFJob: reorder functions, no other changes 2022-01-30 13:11:03 -05:00
Jay Berkenbilt
2394dd8519 QPDFJob increment: static functions to member functions
Convert remaining static functions that take QPDFJob& as a parameter
to member functions. Utility functions that don't take QPDFJob& remain
static functions and can probably just stay that way since the keep
extra complexity out of QPDFJob.hh.
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
2f631997f2 QPDFJob increment: remove std::cout, std::cerr, whoami
Remove remaining temporary duplication of hard-coded values and direct
access to std::cout, std::cerr, and whoami in favor of parameters in
QPDFJob. This moves a few more static methods into QPDFJob member
functions.
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
1ddf5b4b4b QPDFJob increment: get rid of exit, handle verbose
Remove all calls to exit() from QPDFJob. Handle code that runs in
verbose mode to enable it to make use of output streams and message
prefix (whoami) from QPDFJob. This removes temporarily duplicated exit
code logic and most access to whoami/std::cout outside of QPDFJob
proper.
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
0910e767ad QPDFJob increment: basic QPDFJob structure
Move most of the methods called from qpdf.cc after argument parsing
into QPDFJob. In this increment, enough QPDFJob API has been added to
handle the branch of QPDFJob::run() that creates output with an
appropriate division between qpdf.cc and QPDFJob.

There are temporary bits of code to enable everything to compile and
pass the test suite, including some duplication and hard-coded values.
2022-01-30 13:11:03 -05:00