| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
A parameter is added to Tumbler's internal error signals to account for
the error domain, and the error code `TUMBLER_ERROR_OTHER_ERROR_DOMAIN`
is added to indicate that the error originated from a third-party API.
When sending the error signal via D-Bus, cancelling errors are filtered
out, and when the error originates from a third-party API, the error
message is prefixed with the domain and code of that error, in a
possibly parsable format.
Fixes #49.
|
|
|
|
| |
Completes d6aeb7d65acf6e41738c78b9d137fab3502d1c58.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is implemented via two new classes:
TumblerLifecycleManager schedules a 300s timeout when tumblerd is
started. When the timeout handler is executed, it emits a "shutdown"
signal which is caught in main.c and asks the main loop to quit. The
timeout is rescheduled whenever another component calls
tumbler_lifecycle_manager_keep_alive() or when the timeout handler is
called and one of the components is still busy processing requests from
client applications.
TumblerComponent is introduced as a new base class for the D-Bus service
classes. Whenever a D-Bus method call is being processed, service
objects increment the component use count by one and decrement it when
the request is finished. They also call the keep alive method after a
D-Bus method call is received to reschedule the timeout.
A component use count of greather than 0 means that components are busy
and the lifecycle manager needs to reschedule the shutdown timeout.
|
|
|
|
|
|
|
| |
This commit introduces a simple PDF/PS thumbnailer based on
poppler-glib. It also adds a new error code TUMBLER_ERROR_NO_CONTENT for
documents that are not empty files but do not contain thumbnailable
content.
|
|
|
|
| |
Thanks to Philip for the original commit.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
There's a new method tumbler_cache_is_thumbnail() now which has to
be implemented by plugins. It is used by TumblerFileInfo in
tumbler_file_info_load() to check whether the file is a thumbnail
itself. In that case, tumbler_file_info_load() will fail with
a TUMBLER_ERROR_IS_THUMBNAIL error.
Add another check in TumblerThresholdScheduler to make unqueuing
requests in the middle of the process work.
|
| |
|
| |
|
|
This commit adds the TUMBLER_ERROR_DOMAIN and TUMBLER_ERROR defines and
a TumblerErrorEnum with currently only containing TUMBLER_ERROR_FAILED.
Also new is the TumblerThumbnailFlavor enum type, together with a few
utility functions related to creating thumbnails:
- tumbler_thumbnail_get_flavors() returns all flavors supported by
the current build of tumbler,
- tumbler_thumbnail_flavor_get_size() returns the size corresponding
to a flavor (e.g. 128 for TUMBLER_THUMBNAIL_FLAVOR_NORMAL),
- tumbler_thumbnail_flavor_get_directory() returns a GFile pointing
to the flavor directory (e.g. $HOME/.thumbnails/normal/ for
TUMBLER_THUMBNAIL_FLAVOR_NORMAL),
- tumbler_thumbnail_get_file() returns a GFile pointing to the
thumbnail destination file of an URI and a flavor,
- tumbler_thumbnail_create_and_open_file() tries to create such a
GFile and also tries to open it for writing, returning the
GFileOutputStream if possible.
|