[PATCH 00/18] Flickr's personal source (grilo plugins part)
- From: "Juan A. Suarez Romero" <jasuarez igalia com>
- To: grilo-list gnome org
- Subject: [PATCH 00/18] Flickr's personal source (grilo plugins part)
- Date: Wed, 7 Jul 2010 18:19:55 +0200
I've been working during last days on a new feature for Flickr plugin: allowing
access to private content of a user.
It is important to note that to use this feature, a valid flickr account is
required.
How it works? Flickr's plugin allows for an optional 'token' string in its
configuration. This token associates an application with an user account,
granting rights to access the content. It is up to the user to authorize this
relation. As a matter of use, grilo-test-ui will ask user to authorize
read-only access; if he accepts, a valid token will be created and added to the
plugin configuration.
Beside the old flickr source, a new one will be shown, that allows to browse
and search in user's account (the personal source). Showing personal sources
for other people is as easy as getting new tokens that joins grilo-test-ui with
the people flickr account.
And now, the small issue which I would like to hear opinions for.
Getting a valid token requires to invoke two Flickr's API functions, and
showing an URL carefully designed. While doing this is not a very big issue, it
is actually a pain in the ass, as requires to carefully write them, use
signatures, and so on.
As most of these problems are already addressed in flickr's plugin itself, I
decided to add a couple of functions to make the developer's life easier. This
functions are used for instance in grilo-test-ui. But how to distribute these
functions? Choices that come to my mind are:
a) Do nothing. Each application needs to take care of how to get the token in
they want to use it. In case of grilo-test-ui, user must provide a valid token.
b) Just add the functions/code in grilo-test-ui. Other applications would need
to address the problem as they want.
c) Creating a separated project with this functions. It's a bit weird having a
small library with a very reduced subset of Flickr's API, and tightly tuned to
be used with Grilo.
d) Add the functions to the plugin .so file. A bit weird, as for instance
grilo-test-ui will be loading dynamically the module, as well as it will
dynamically linked against the library.
e) Add them to a small and separated library in flickr plugin. This is the
option I choosed. Besides the flickr-plugin .so library, a
libgriloflickrauth.so library is created and installed in standard place,
containing these set of functions. When packaging in a distro, the best choice
would to create a separated package from the plugin itself containing this
small library, so users can install it or not if required.
What is your opinion?
Juan A. Suarez Romero (18):
flickr: Add helper function to get a frob
flickr: Add helper function to create flickr's API signature
flickr: Add helper function to retrive a XML node value
flickr: Add helper function to get Flickr's login link
flickr: Add helper function to get token
flickr: Swap token and secret parameters
flickr: Move code to gflickr.c
flickr: reuse get_api_sig() function
flickr: Simplify gflickr's callbacks
flickr: Add helper function to check a token
flickr: pass GFlickr in callbacks
flickr: Instantiates personal sources
flickr: Add helper function to get photosets list
flickr: Add helper function to get photos from a photoset
flickr: Use largest image if original can not be downloaded
flickr: Do not add empty descriptions nor titles
flickr: Set up personal sources
flickr: Add pkgconfig for Flickr authorization
configure.ac | 2 +
grilo-flickr-uninstalled.pc.in | 13 +
grilo-flickr.pc.in | 13 +
src/flickr/Makefile.am | 21 +-
src/flickr/gflickr.c | 713 +++++++++++++++++++++++++++++++++++-----
src/flickr/gflickr.h | 50 +++-
src/flickr/grl-flickr-auth.c | 99 ++++++
src/flickr/grl-flickr-auth.h | 46 +++
src/flickr/grl-flickr.c | 435 ++++++++++++++++++++-----
9 files changed, 1220 insertions(+), 172 deletions(-)
create mode 100644 grilo-flickr-uninstalled.pc.in
create mode 100644 grilo-flickr.pc.in
create mode 100644 src/flickr/grl-flickr-auth.c
create mode 100644 src/flickr/grl-flickr-auth.h
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]