[gnome-online-accounts/wip/hadess/remove-pocket: 133/133] Remove Pocket and deprecate org.gnome.OnlineAccounts.ReadLater



commit f36db5cd77b25dcbef57fd0682b7bd3fd57d2cee
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jan 24 10:12:02 2019 +0100

    Remove Pocket and deprecate org.gnome.OnlineAccounts.ReadLater
    
    The non-standard OAuth is causing maintenance problem and the maintainer
    has already disabled Pocket in certain distributions, as there aren't
    any core GNOME applications using it as part of the core experience.
    
    Remove the code so that applications don't try and use this
    implementation with no future.
    
    https://gitlab.gnome.org/GNOME/gnome-online-accounts/merge_requests/18

 README                                             |  11 -
 configure.ac                                       |  19 -
 data/dbus-interfaces.xml                           |   4 +
 data/icons/meson.build                             |   2 -
 data/icons/scalable/Makefile.am                    |   1 -
 data/icons/scalable/goa-account-pocket.svg         | 145 -------
 data/icons/symbolic/Makefile.am                    |   1 -
 .../icons/symbolic/goa-account-pocket-symbolic.svg |  41 --
 gnome-online-accounts.doap                         |   2 +-
 meson.build                                        |  14 -
 meson_options.txt                                  |   3 -
 po/POTFILES.in                                     |   1 -
 src/examples/Makefile.am                           |   7 +-
 src/examples/add-pocket.c                          | 103 -----
 src/examples/meson.build                           |   1 -
 src/goabackend/Makefile.am                         |   1 -
 src/goabackend/goabackendenums.h                   |   2 +-
 src/goabackend/goaobjectskeletonutils.c            |  23 --
 src/goabackend/goaobjectskeletonutils.h            |   3 -
 src/goabackend/goapocketprovider.c                 | 437 ---------------------
 src/goabackend/goapocketprovider.h                 |  37 --
 src/goabackend/goaprovider.c                       |   4 -
 src/goabackend/meson.build                         |   1 -
 23 files changed, 7 insertions(+), 856 deletions(-)
---
diff --git a/README b/README
index e7bb786a..62e32fc1 100644
--- a/README
+++ b/README
@@ -62,17 +62,6 @@ We are allowed to embed the client_secret in the source code. See
 https://developers.google.com/accounts/docs/OAuth2InstalledApp#overview
 
 
-Pocket
-------
-
-OAuth 2.0 variant:
-https://getpocket.com/developer/docs/authentication
-
-Authenticating with a Firefox Account is not documented. These slides are
-useful:
-http://www.slideshare.net/KuoE0/pocket-authentication-with-oauth-on-firefox-os
-
-
 Windows Live
 ------------
 
diff --git a/configure.ac b/configure.ac
index 71392e81..a967947f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -345,24 +345,6 @@ if test "$enable_windows_live" != "no"; then
   AC_DEFINE(GOA_WINDOWS_LIVE_ENABLED, 1, [Enable Windows Live data provider])
 fi
 
-# Pocket
-AC_DEFINE(GOA_POCKET_NAME, ["pocket"], [ProviderType and extension point name])
-AC_ARG_ENABLE([pocket],
-              [AS_HELP_STRING([--enable-pocket], [Enable Pocket provider])],
-              [],
-              [enable_pocket=yes])
-AC_ARG_WITH(pocket-client-id,
-            [AS_HELP_STRING([--with-pocket-client-id], [Pocket OAuth 2.0 client id])],
-            [],
-            [])
-if test "$with_pocket_client_id" = ""; then
-  with_pocket_client_id="16630-40b25246b56e8ad5310b2883"
-fi
-AC_DEFINE_UNQUOTED(GOA_POCKET_CLIENT_ID, ["$with_pocket_client_id"], [Pocket OAuth 2.0 client id])
-if test "$enable_pocket" != "no"; then
-  AC_DEFINE(GOA_POCKET_ENABLED, 1, [Enable Pocket data provider])
-fi
-
 # Kerberos
 AC_DEFINE(GOA_KERBEROS_NAME, ["kerberos"], [ProviderType and extension point name])
 AC_ARG_ENABLE([kerberos],
@@ -596,7 +578,6 @@ echo "
        Kerberos provider:              ${enable_kerberos}
        Facebook provider:              ${enable_facebook} (OAuth 2.0, id:${with_facebook_client_id})
        Windows Live provider:          ${enable_windows_live} (OAuth 2.0, id:${with_windows_live_client_id})
-        Pocket provider:                ${enable_pocket} (id:${with_pocket_client_id})
        Last.fm provider:               ${enable_lastfm} (id:${with_lastfm_client_id} 
secret:${with_lastfm_client_secret})
 
        Maintainer mode:                ${USE_MAINTAINER_MODE}
diff --git a/data/dbus-interfaces.xml b/data/dbus-interfaces.xml
index 47a72c9a..2fa79824 100644
--- a/data/dbus-interfaces.xml
+++ b/data/dbus-interfaces.xml
@@ -813,8 +813,12 @@
 
       An account object implements this interface if it provides
       read-later-like capabilities.
+
+      The #org.gnome.OnlineAccounts.Todo interface is not used by
+      any account.
   -->
   <interface name="org.gnome.OnlineAccounts.ReadLater">
+    <annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
   </interface>
 
   <!--
diff --git a/data/icons/meson.build b/data/icons/meson.build
index 448904f8..281c5388 100644
--- a/data/icons/meson.build
+++ b/data/icons/meson.build
@@ -9,7 +9,6 @@ icon_scalable_data = [
   'goa-account-lastfm.svg',
   'goa-account-msn.svg',
   'goa-account-owncloud.svg',
-  'goa-account-pocket.svg',
 ]
 
 icon_symbolic_data = [
@@ -22,7 +21,6 @@ icon_symbolic_data = [
   'goa-account-lastfm-symbolic.svg',
   'goa-account-msn-symbolic.svg',
   'goa-account-owncloud-symbolic.svg',
-  'goa-account-pocket-symbolic.svg',
 ]
 
 icons = [
diff --git a/data/icons/scalable/Makefile.am b/data/icons/scalable/Makefile.am
index 6fd80252..5721dd55 100644
--- a/data/icons/scalable/Makefile.am
+++ b/data/icons/scalable/Makefile.am
@@ -11,7 +11,6 @@ icon_DATA =                           \
        goa-account-lastfm.svg          \
        goa-account-msn.svg             \
        goa-account-owncloud.svg        \
-       goa-account-pocket.svg          \
        goa-account-foursquare.svg      \
        $(NULL)
 
diff --git a/data/icons/symbolic/Makefile.am b/data/icons/symbolic/Makefile.am
index aa97fbd9..1ba8100b 100644
--- a/data/icons/symbolic/Makefile.am
+++ b/data/icons/symbolic/Makefile.am
@@ -10,7 +10,6 @@ icon_DATA =                                   \
        goa-account-lastfm-symbolic.svg         \
        goa-account-msn-symbolic.svg            \
        goa-account-owncloud-symbolic.svg       \
-       goa-account-pocket-symbolic.svg         \
        goa-account-foursquare-symbolic.svg     \
        $(NULL)
 
diff --git a/gnome-online-accounts.doap b/gnome-online-accounts.doap
index c7844f7b..b8d4e7c9 100644
--- a/gnome-online-accounts.doap
+++ b/gnome-online-accounts.doap
@@ -12,7 +12,7 @@
   <description xml:lang="en">
 GNOME Online Accounts provides interfaces so that applications and libraries
 in GNOME can access the user's online accounts. It has providers for Google,
-Nextcloud, Facebook, Fedora, Microsoft, Flickr, Pocket, Foursquare, Microsoft
+Nextcloud, Facebook, Fedora, Microsoft, Flickr, Foursquare, Microsoft
 Exchange, Last.fm, IMAP/SMTP and Kerberos.
   </description>
 
diff --git a/meson.build b/meson.build
index ce4b22f2..9a2bbc9e 100644
--- a/meson.build
+++ b/meson.build
@@ -221,15 +221,6 @@ config_h.set_quoted('GOA_OWNCLOUD_NAME', 'owncloud')
 enable_owncloud = get_option('owncloud')
 config_h.set('GOA_OWNCLOUD_ENABLED', enable_owncloud)
 
-# Pocket
-config_h.set_quoted('GOA_POCKET_NAME', 'pocket')
-
-pocket_client_id = get_option('pocket_client_id')
-config_h.set_quoted('GOA_POCKET_CLIENT_ID', pocket_client_id)
-
-enable_pocket = get_option('pocket')
-config_h.set('GOA_POCKET_ENABLED', enable_pocket)
-
 # Windows Live
 config_h.set_quoted('GOA_WINDOWS_LIVE_NAME', 'windows_live')
 
@@ -353,11 +344,6 @@ output += '\n'
 output += '        Media Server provider:          ' + enable_media_server.to_string() + '\n'
 output += '        Microsoft Exchange provider:    ' + enable_exchange.to_string() + '\n'
 output += '        ownCloud provider:              ' + enable_owncloud.to_string() + '\n'
-output += '        Pocket provider:                ' + enable_pocket.to_string()
-if enable_pocket
-  output += ' (id:@0@)'.format(pocket_client_id)
-endif
-output += '\n'
 output += '        Windows Live provider:          ' + enable_windows_live.to_string()
 if enable_windows_live
   output += ' (OAuth 2.0, id:@0@)'.format(windows_live_client_id)
diff --git a/meson_options.txt b/meson_options.txt
index 22d8a8d8..10f51e2f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -31,9 +31,6 @@ option('media_server', type: 'boolean', value: false, description: 'Enable Media
 
 option('owncloud', type: 'boolean', value: true, description: 'Enable ownCloud provider')
 
-option('pocket', type: 'boolean', value: true, description: 'Enable Pocket provider')
-option('pocket_client_id', type: 'string', value: '16630-40b25246b56e8ad5310b2883', description: 'Pocket 
OAuth 2.0 client id')
-
 option('windows_live', type: 'boolean', value: true, description: 'Enable Windows Live provider')
 option('windows_live_client_id', type: 'string', value: '0000000044067703', description: 'Windows Live OAuth 
2.0 client id')
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e948515f..279fb64d 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -17,7 +17,6 @@ src/goabackend/goamediaserverprovider.c
 src/goabackend/goaoauth2provider.c
 src/goabackend/goaoauthprovider.c
 src/goabackend/goaowncloudprovider.c
-src/goabackend/goapocketprovider.c
 src/goabackend/goaprovider.c
 src/goabackend/goasmtpauth.c
 src/goabackend/goautils.c
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
index 01176353..c3237a69 100644
--- a/src/examples/Makefile.am
+++ b/src/examples/Makefile.am
@@ -27,7 +27,7 @@ lastfm_shout_LDADD = $(GLIB_LIBS) $(REST_LIBS) ../goa/libgoa-1.0.la
 lastfm_shout_LDFLAGS = $(WARN_LDFLAGS)
 
 if BUILD_BACKEND
-noinst_PROGRAMS += introspect-providers list-providers add-pocket
+noinst_PROGRAMS += introspect-providers list-providers
 
 introspect_providers_SOURCES = introspect-providers.c
 introspect_providers_CFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS)
@@ -38,11 +38,6 @@ list_providers_SOURCES = list-providers.c
 list_providers_CFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS)
 list_providers_LDADD = $(GLIB_LIBS) $(GTK_LIBS) ../goabackend/libgoa-backend-1.0.la ../goa/libgoa-1.0.la
 list_providers_LDFLAGS = $(WARN_LDFLAGS)
-
-add_pocket_SOURCES = add-pocket.c
-add_pocket_CFLAGS = $(GLIB_CFLAGS) $(REST_CFLAGS)
-add_pocket_LDADD = $(GLIB_LIBS) $(REST_LIBS) ../goa/libgoa-1.0.la
-add_pocket_LDFLAGS = $(WARN_LDFLAGS)
 endif
 
 clean-local :
diff --git a/src/examples/meson.build b/src/examples/meson.build
index 6edd9f15..34583296 100644
--- a/src/examples/meson.build
+++ b/src/examples/meson.build
@@ -8,7 +8,6 @@ if enable_goabackend
   programs += [
     ['introspect-providers', libgoa_backend_dep],
     ['list-providers', libgoa_backend_dep],
-    ['add-pocket', [libgoa_dep, rest_dep]]
   ]
 endif
 
diff --git a/src/goabackend/Makefile.am b/src/goabackend/Makefile.am
index b13534fe..83852378 100644
--- a/src/goabackend/Makefile.am
+++ b/src/goabackend/Makefile.am
@@ -92,7 +92,6 @@ libgoa_backend_1_0_la_SOURCES =                                               \
        goaflickrprovider.h             goaflickrprovider.c             \
        goafoursquareprovider.h         goafoursquareprovider.c         \
        goawindowsliveprovider.h        goawindowsliveprovider.c        \
-       goapocketprovider.h             goapocketprovider.c             \
        goalastfmprovider.h             goalastfmprovider.c             \
        goaobjectskeletonutils.h        goaobjectskeletonutils.c        \
        goautils.h                      goautils.c                      \
diff --git a/src/goabackend/goabackendenums.h b/src/goabackend/goabackendenums.h
index 58a4d8ab..638674aa 100644
--- a/src/goabackend/goabackendenums.h
+++ b/src/goabackend/goabackendenums.h
@@ -67,7 +67,7 @@ typedef enum
  * @GOA_PROVIDER_FEATURE_PHOTOS: Photos storage services (ie. Flickr).
  * @GOA_PROVIDER_FEATURE_FILES: Files storage services (ie. WebDAV).
  * @GOA_PROVIDER_FEATURE_TICKETING: Ticketing services (ie. Kerberos).
- * @GOA_PROVIDER_FEATURE_READ_LATER: Read later services (eg. Pocket).
+ * @GOA_PROVIDER_FEATURE_READ_LATER: Deprecated; currently unused.
  * @GOA_PROVIDER_FEATURE_PRINTERS: Network printing services (e.g. Google Cloud Print).
  * @GOA_PROVIDER_FEATURE_MAPS: Maps related services (e.g. Foursquare, Facebook).
  * @GOA_PROVIDER_FEATURE_MUSIC: Music related services (e.g. Vkontakte).
diff --git a/src/goabackend/goaobjectskeletonutils.c b/src/goabackend/goaobjectskeletonutils.c
index e2ec3e73..657bffd7 100644
--- a/src/goabackend/goaobjectskeletonutils.c
+++ b/src/goabackend/goaobjectskeletonutils.c
@@ -203,26 +203,3 @@ goa_object_skeleton_attach_maps (GoaObjectSkeleton *object,
     }
   g_clear_object (&maps);
 }
-
-void
-goa_object_skeleton_attach_read_later (GoaObjectSkeleton *object,
-                                       gboolean           read_later_enabled)
-{
-  GoaReadLater *readlater = NULL;
-
-  readlater = goa_object_get_read_later (GOA_OBJECT (object));
-  if (read_later_enabled)
-    {
-      if (readlater == NULL)
-        {
-          readlater = goa_read_later_skeleton_new ();
-          goa_object_skeleton_set_read_later (object, readlater);
-        }
-    }
-  else
-    {
-      if (readlater != NULL)
-        goa_object_skeleton_set_read_later (object, NULL);
-    }
-  g_clear_object (&readlater);
-}
diff --git a/src/goabackend/goaobjectskeletonutils.h b/src/goabackend/goaobjectskeletonutils.h
index 0ebdb15e..69969528 100644
--- a/src/goabackend/goaobjectskeletonutils.h
+++ b/src/goabackend/goaobjectskeletonutils.h
@@ -55,9 +55,6 @@ void             goa_object_skeleton_attach_photos         (GoaObjectSkeleton *o
 void             goa_object_skeleton_attach_printers       (GoaObjectSkeleton *object,
                                                             gboolean           printers_enabled);
 
-void             goa_object_skeleton_attach_read_later     (GoaObjectSkeleton *object,
-                                                            gboolean           read_later_enabled);
-
 G_END_DECLS
 
 #endif /* __GOA_OBJECT_SKELETON_UTILS_H__ */
diff --git a/src/goabackend/goaprovider.c b/src/goabackend/goaprovider.c
index 74433b58..9e5bd45a 100644
--- a/src/goabackend/goaprovider.c
+++ b/src/goabackend/goaprovider.c
@@ -30,7 +30,6 @@
 #include "goaflickrprovider.h"
 #include "goafoursquareprovider.h"
 #include "goawindowsliveprovider.h"
-#include "goapocketprovider.h"
 #include "goamediaserverprovider.h"
 #include "goalastfmprovider.h"
 
@@ -951,9 +950,6 @@ static struct
 #ifdef GOA_FLICKR_ENABLED
   { GOA_FLICKR_NAME, goa_flickr_provider_get_type },
 #endif
-#ifdef GOA_POCKET_ENABLED
-  { GOA_POCKET_NAME, goa_pocket_provider_get_type },
-#endif
 #ifdef GOA_FOURSQUARE_ENABLED
   { GOA_FOURSQUARE_NAME, goa_foursquare_provider_get_type },
 #endif
diff --git a/src/goabackend/meson.build b/src/goabackend/meson.build
index 8654fb4a..3ba7d378 100644
--- a/src/goabackend/meson.build
+++ b/src/goabackend/meson.build
@@ -43,7 +43,6 @@ sources = enum_sources + files(
   'goamediaserverprovider.c',
   'goaobjectskeletonutils.c',
   'goaowncloudprovider.c',
-  'goapocketprovider.c',
   'goaprovider.c',
   'goarestproxy.c',
   'goasmtpauth.c',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]