/usr/include/thumbnailer.h is in libthumbnailer-dev 1.1+14.04.20140401.1-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | /*
* Copyright (C) 2013 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Authored by: Jussi Pakkanen <jussi.pakkanen@canonical.com>
*/
#ifndef THUMBNAILER_H_
#define THUMBNAILER_H_
#include<string>
class ThumbnailerPrivate;
enum ThumbnailSize {
TN_SIZE_SMALL, // maximum dimension 128 pixels
TN_SIZE_LARGE, // maximum dimension 256 pixels
TN_SIZE_XLARGE, // maximum dimension 512 pixels
TN_SIZE_ORIGINAL // Whatever the original size was, e.g. 1920x1080 for FullHD video
};
enum ThumbnailPolicy {
TN_LOCAL, // Use only local information
TN_REMOTE, // Use remote services (e.g. album art downloading)
};
/**
* This class provides a way to generate and access
* thumbnails of video, audio and image files.
*
* All methods are blocking.
*
* All methods are thread safe.
*
* Errors are reported as exceptions.
*/
class Thumbnailer {
public:
Thumbnailer();
~Thumbnailer();
/**
* Gets a thumbnail of the given input file in the requested size.
*
* Return value is a string pointing to the thumbnail file. If
* the thumbnail could not be generated and empty string is returned.
*
* Applications should treat the returned file as read only. They should _not_
* delete it.
*
* In case of unexpected problems, the function throws a
* std::runtime_error.
*/
std::string get_thumbnail(const std::string &filename, ThumbnailSize desired_size,
ThumbnailPolicy policy);
/**
* Deprecated. Do not use!
*/
std::string get_thumbnail(const std::string &filename, ThumbnailSize desired_size);
std::string get_album_art(const std::string &artist, const std::string &album,
ThumbnailSize desiredSize, ThumbnailPolicy policy);
private:
Thumbnailer(const Thumbnailer &t);
Thumbnailer & operator=(const Thumbnailer &t);
ThumbnailerPrivate *p;
};
#endif
|