summaryrefslogtreecommitdiff
path: root/plugins/shotwell-publishing/PhotosService.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-04-28 16:45:51 +0200
committerJörg Frings-Fürst <debian@jff.email>2019-04-28 16:45:51 +0200
commit7385922cd37e4ffe65f4af34b2795307a76670c4 (patch)
tree2d908584bfb663268004e19a23e02ce6c65034c5 /plugins/shotwell-publishing/PhotosService.vala
parent6dd5e6966c6ec10d38d4b620a053ae262ac60d86 (diff)
parent6710aa856175300e598b23b701c0d2741f2cb6b3 (diff)
Update upstream source from tag 'upstream/0.30.4'
Update to upstream version '0.30.4' with Debian dir 2d4b66e5f883875fb1420e1b17811073c8065d44
Diffstat (limited to 'plugins/shotwell-publishing/PhotosService.vala')
-rw-r--r--plugins/shotwell-publishing/PhotosService.vala58
1 files changed, 58 insertions, 0 deletions
diff --git a/plugins/shotwell-publishing/PhotosService.vala b/plugins/shotwell-publishing/PhotosService.vala
new file mode 100644
index 0000000..8e328f4
--- /dev/null
+++ b/plugins/shotwell-publishing/PhotosService.vala
@@ -0,0 +1,58 @@
+/* Copyright 2016 Software Freedom Conservancy Inc.
+ * Copyright 2019 Jens Georg <mail@jensge.org>
+ *
+ * This software is licensed under the GNU LGPL (version 2.1 or later).
+ * See the COPYING file in this distribution.
+ */
+
+namespace Publishing.GooglePhotos {
+
+public class Service : Object, Spit.Pluggable, Spit.Publishing.Service {
+ private const string ICON_FILENAME = "google-photos.svg";
+
+ private static Gdk.Pixbuf[] icon_pixbuf_set = null;
+
+ static construct {
+ icon_pixbuf_set = Resources.load_from_resource(Resources.RESOURCE_PATH + "/" + ICON_FILENAME);
+ }
+
+ public Service(GLib.File resource_directory) {}
+
+ public int get_pluggable_interface(int min_host_interface, int max_host_interface) {
+ return Spit.negotiate_interfaces(min_host_interface, max_host_interface,
+ Spit.Publishing.CURRENT_INTERFACE);
+ }
+
+ public unowned string get_id() {
+ return "org.gnome.shotwell.publishing.google-photos";
+ }
+
+ public unowned string get_pluggable_name() {
+ return "Google Photos";
+ }
+
+ public void get_info(ref Spit.PluggableInfo info) {
+ info.authors = "Jens Georg";
+ info.copyright = _("Copyright 2019 Jens Georg <mail@jensge.org>");
+ info.translators = Resources.TRANSLATORS;
+ info.version = _VERSION;
+ info.website_name = Resources.WEBSITE_NAME;
+ info.website_url = Resources.WEBSITE_URL;
+ info.is_license_wordwrapped = false;
+ info.license = Resources.LICENSE;
+ info.icons = icon_pixbuf_set;
+ }
+
+ public Spit.Publishing.Publisher create_publisher(Spit.Publishing.PluginHost host) {
+ return new Publishing.GooglePhotos.Publisher(this, host);
+ }
+
+ public Spit.Publishing.Publisher.MediaType get_supported_media() {
+ return (Spit.Publishing.Publisher.MediaType.PHOTO |
+ Spit.Publishing.Publisher.MediaType.VIDEO);
+ }
+
+ public void activation(bool enabled) {
+ }
+}
+} // namespace GooglePhotos