summaryrefslogtreecommitdiff
path: root/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-22 06:40:44 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-22 06:40:44 +0100
commit8e1c5a834469d804d28ee8ab2cbe2da8e600a789 (patch)
treeb9771456583eaead893cfd8f02e680b58a3da970 /plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
parent80a5f2d8b095e895a5424f90b2ce4684d94c1a32 (diff)
parent3253d99365813f2d2ffd05e10cbb8c11f53d746e (diff)
Merge tag 'upstream/0.26.0'
Upstream version 0.26.0
Diffstat (limited to 'plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala')
-rw-r--r--plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala40
1 files changed, 40 insertions, 0 deletions
diff --git a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
new file mode 100644
index 0000000..17980e6
--- /dev/null
+++ b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
@@ -0,0 +1,40 @@
+namespace Publishing.Authenticator {
+ public class Factory : Spit.Publishing.AuthenticatorFactory, Object {
+ private static Factory instance = null;
+
+ public static Factory get_instance() {
+ if (Factory.instance == null) {
+ Factory.instance = new Factory();
+ }
+
+ return Factory.instance;
+ }
+
+ public Gee.List<string> get_available_authenticators() {
+ var list = new Gee.ArrayList<string>();
+ list.add("flickr");
+ list.add("facebook");
+ list.add("picasa");
+ list.add("youtube");
+
+ return list;
+ }
+
+ public Spit.Publishing.Authenticator? create(string provider,
+ Spit.Publishing.PluginHost host) {
+ switch (provider) {
+ case "flickr":
+ return new Shotwell.Flickr.Flickr(host);
+ case "facebook":
+ return new Shotwell.Facebook.Facebook(host);
+ case "picasa":
+ return new Shotwell.Google.Google("https://picasaweb.google.com/data/", _("You are not currently logged into Picasa Web Albums.\n\nClick Log in to log into Picasa Web Albums in your Web browser. You will have to authorize Shotwell Connect to link to your Picasa Web Albums account."), host);
+
+ case "youtube":
+ return new Shotwell.Google.Google("https://gdata.youtube.com/", _("You are not currently logged into YouTube.\n\nYou must have already signed up for a Google account and set it up for use with YouTube to continue. You can set up most accounts by using your browser to log into the YouTube site at least once."), host);
+ default:
+ return null;
+ }
+ }
+ }
+}