In the sixth beta release for cpdb-libs 2.0.0 we have done more changes for sandboxed packaging, job data is streamed through domain sockets now and the frontend not being a D-Bus service any more. Also several crashers got fixed.
- Stream print data through a Unix domain socket
To ease making a Snap from the CPDB backend for CUPS (and other CPDB backends in the future) we now transfer the print job data from the dialog to the backend via a Unix domain socket and not by dropping the data into a file (PR #30). - Add newly appearing backends while the dialog is open
CPDB Backends can get installed or removed at any time, also while a print dialog is open. Now a background thread is added to observe the come and go of backends and to update the printer list appropriately. New API functions arecpdbStartBackendListRefreshing()
andcpdbStopBackendListRefreshing()
, to start and stop this thread (PR #32). - Added support for CPDB backends running permanently
Do not only find backends as registered D-Bus services (*.service
) files but also permanently running backends which are not necessarily registered D-Bus services - Let the frontend not be a D-Bus service, only the backends
To control hiding temporary or remote printers in the backend's printer list we have added methods to the D-Bus service provided by the backends now. Before, the frontends were also D-Bus services just to send signals to the backends for controling the filtering (PR #32). - Convenience API functions to start/stop listing printers
Added convenience API functionscpdbStartListingPrinters()
andcpdbStopListingPrinters()
to be called when opening and closing the print dialog, resp. (PR #32). - Removed API functions
cpdbGetAllJobs()
,cpdbGetActiveJobsCount()
,cpdbCancelJob()
, andcpdbPrintFilePath()
and the corresponding D-Bus methods (PR #30). - Removed support for the
FILE
CPDB backend (PR #30). cpdbActivateBackends()
: Fixed crash caused by wrong unreferencingcpdbConnectToDBus()
: Useg_main_context_get_thread_default()
for wait loopg_main_context_get_thread_default()
always returns a valid context and neverNULL
. This way we avoid crashes.- Fixed crash when Handling saved settings
LetcpdbReadSettingsFromDisk()
return an empty data structure instead ofNULL
when there are no saved settings. Also letcpdbIgnoreLastSavedSettings()
always output and empty data structure. - Removed the commands,
get-all-jobs
,get-active-jobs-count
, andcancel-job
from thecpdb-text-frontend
utility (PR #30). cpdb-text-frontend
: Removed unnecessaryg_main_loop
Theg_main_loop
is not actually needed, the main thread can just wait for the background thread usingg_thread_join()
.cpdb-text-frontend
: Shut down cleanly withstop
command
Instead of committing suicide withexit(0);
we actually quit the main loop now.cpdb-text-frontend
: Spawn command interpreter not before the start of the main loop, to assure thatstop
command quits main loop and we do not fall into an infinite loop.cpdb-text-frontend
:acquire_translations_callback()
: Only issue the success message and list the translation if the loading of the translations actually succeeded.