| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pagination model previously used by GDataQuery was to assume that
the server would return an empty GDataFeed once the final page was
passed by calling gdata_query_next_page().
Unfortunately, the Google Documents servers don’t do that — instead,
they provide a next page URI in each GDataFeed, and don’t provide one on
the final page. GDataQuery did not support this kind of explicit
knowledge about the current page being the final one.
Add support for it with a delightful set of hacky internal functions.
Return a dummy empty feed from GDataService if passed a GDataQuery which
is flagged as having reached the end of its pagination.
https://bugzilla.gnome.org/show_bug.cgi?id=741345
|
|
|
|
|
|
|
| |
This will be used internally later to support constructing custom empty
feeds for pagination purposes.
https://bugzilla.gnome.org/show_bug.cgi?id=741345
|
|
|
|
|
|
|
|
|
| |
Instead, use g_main_context_invoke(), which guarantees to call the
callback synchronously if the GMainContext is owned, and in an idle
callback otherwise. This is exactly what we want for implementing
callbacks which could come from this thread or a worker thread.
https://bugzilla.gnome.org/show_bug.cgi?id=741345
|
|
|
|
| |
Dodgy casts are the worst.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This also includes initial code for detection of the Content-Type of received
messages, and parsing JSON or XML depending on that.
This breaks ABI (but not API), and adds a dependency on json-glib ≥ 0.15.
Complete unit tests are included. Further work is expected for integrating
JSON support into GDataService, ready for use with the Tasks service.
This work is originally by Pēteris Krišjānis <pecisk@gmail.com>, with
additions by Philip Withnall <philip@tecnocode.co.uk>.
Helps: https://bugzilla.gnome.org/show_bug.cgi?id=657539
|
|
|
|
|
| |
This will be useful for unit testing, allowing network traffic to be
redirected to a local unit testing server.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we're compiled with --enable-gnome, we now allocate passwords and auth.
tokens in non-pageable memory where possible. Where not possible (due to API
constraints imposed by ourselves or libsoup) we ensure that the details are
zeroed out before being freed.
This is all with the aim of never having passwords or auth. tokens hit disk
or be leaked in other ways.
It hasn't been formally reviewed or certified, and there are probably cases
I've missed (which are bugs).
This adds an optional dependency on libgnome-keyring when compiled with
--enable-gnome.
Helps: bgo#656783
|
|
|
|
|
|
|
|
|
| |
Add a new log level, GDATA_LOG_FULL_UNREDACTED = 4, and redact usernames,
passwords and auth. tokens from all log levels below it. Thus, taking a
debug log with LIBGDATA_DEBUG=3 will no longer inadvertently reveal the
user's password.
Helps: bgo#656783
|
|
|
|
|
|
|
| |
Progress callbacks should only be made in idle callbacks if the operation is
being performed asynchronously. If it's being performed synchronously, we
should be able to guarantee that all progress callbacks have been executed
by the time the synchronous operation function call returns.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This separates authentication and authorisation from the services themselves,
allowing authorisation schemes to be plugged in as they pop into and out of
fashion.
This removes the old gdata_service_authenticate() methods, replacing
them with an equivalent GDataClientLoginAuthorizer.
Full test cases are provided, covering everything except parsing of error
responses from the server by GDataClientLoginAuthorizer.
This makes the following API changes:
• Rename GDataAuthenticationError to GDataClientLoginAuthorizerError
Rename GDATA_AUTHENTICATION_ERROR and gdata_authentication_error_quark()
similarly.
• Remove gdata_service_authenticate() in favour of
using GDataClientLoginAuthorizer with GDataService::authorizer:
- Remove gdata_service_authenticate(),
gdata_service_authenticate_async() and
gdata_service_authenticate_finish().
- Replace gdata_service_is_authenticated() by
gdata_service_is_authorized() with much the same functionality.
- Add GDataService::authorizer, gdata_service_get_authorizer(),
gdata_service_set_authorizer() and
gdata_service_get_authorization_domains().
- Remove gdata_service_get_client_id() in favour of
GDataClientLoginAuthorizer::client-id.
- Remove gdata_service_get_username() in favour of
GDataClientLoginAuthorizer::username.
- Remove gdata_service_get_password() in favour of
GDataClientLoginAuthorizer::password.
- Remove GDataServiceClass->service_name in favour of
GDataAuthorizationDomain::service-name.
- Remove GDataServiceClass->authentication_uri and
GDataServiceClass->parse_authentication_response in favour of
different GDataAuthorizer implementations.
- Add GDataAuthorizer parameters to and remove client_id parameters from:
gdata_calendar_service_new(), gdata_contacts_service_new(),
gdata_documents_service_new(), gdata_picasaweb_service_new() and
gdata_youtube_service_new().
• Add GDataAuthorizationDomain.
- Add GDataServiceClass->get_authorization_domains and
gdata_service_get_authorization_domains().
- Add auth. domain getters to various GDataService subclasses:
gdata_youtube_service_get_primary_authorization_domain(),
gdata_contacts_service_get_primary_authorization_domain(),
gdata_calendar_service_get_primary_authorization_domain(),
gdata_picasaweb_service_get_primary_authorization_domain(),
gdata_documents_service_get_primary_authorization_domain() and
gdata_documents_service_get_spreadsheet_authorization_domain().
- Add auth. domain properties to various standalone request objects:
GDataDownloadStream::authorization-domain with
gdata_download_stream_get_authorization_domain(),
GDataUploadStream::authorization-domain with
gdata_upload_stream_get_authorization_domain() and
GDataBatchOperation::authorization-domain with
gdata_batch_operation_get_authorization_domain().
- Add GDataAccessHandlerIface->get_authorization_domain. This doesn't
have to be implemented by existing GDataAccessHandlers, but it's
highly recommended.
- Add a GDataAuthorizationDomain parameter to
GDataServiceClass->append_query_headers,
gdata_service_query(), gdata_service_query_async(),
gdata_service_query_single_entry(),
gdata_service_query_single_entry_async(), gdata_service_insert_entry(),
gdata_service_insert_entry_async(), gdata_service_update_entry(),
gdata_service_update_entry_async(), gdata_service_delete_entry(),
gdata_service_delete_entry_async(),
gdata_batchable_create_operation(),
gdata_download_stream_new() and gdata_upload_stream_new().
• Add GDataAuthorizer as described above, implemented by
GDataClientLoginAuthorizer.
Helps: bgo#646285
|
|
|
|
|
| |
Use HTTPS for all communications with the server, removing the
LIBGDATA_FORCE_HTTP environment variable. Closes: bgo#644940
|
|
|
|
|
|
|
| |
This will allow the GDataUploadStream and GDataDownloadStream message-sending
code to be rebased on it to fix cancellation races.
Helps: bgo#637036
|
|
|
|
| |
It was unused and private.
|
|
|
|
|
|
| |
This means we no longer have to register GTimeVal with the GType system, and
everything is generally neater because we never used GTimeVal's microsecond
precision anyway.
|
|
|
|
|
|
|
| |
This allows building URIs in a printf()-style manner, while automatically
escaping the strings being substituted into the URI. This means that
malformed input can't cause requests to fail or execute incorrectly by
producing invalid or incorrect URIs.
|
|
|
|
|
| |
This breaks API by removing the various download methods from
GDataDocumentsPresentation, GDataDocumentsSpreadsheet and GDataDocumentsText.
|
|
|
|
|
|
| |
It's the new parent class of GDataDocumentsPresentation,
GDataDocumentsSpreadsheet and GDataDocumentsText. This breaks API.
Helps: bgo#607616
|
| |
|
|
|
|
|
|
| |
This allows code which was previously in GDataParsable subclasses' *_new()
functions to be moved into their constructor() functions, making them more
suitable for bindings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add batch operation support. Batch operations are executed by creating a new
GDataBatchOperation, adding the required operations to it, then running it
(sync or async). Batch operations are only supported by services which
implement GDataBatchable.
This includes full test cases and documentation.
Closes: bgo#579169
|
|
|
|
|
|
|
| |
Add G_GNUC_PURE to all applicable getter functions, which should allow gcc to
optimise calls to libgdata in some cases. This required a little rewrite of
the authentication system to ensure the username and password (etc.) are only
changed on the #GDataService from the main thread.
|
| |
|
|
|
|
|
| |
Make indentation and whitespacing consistent throughout the entire project.
I am so sad.
|
|
|
|
|
|
|
|
|
|
|
| |
Make use of libsoup's message cancellation functionality, rather than
checking for cancellation ourselves at arbitrary points during operations.
This fixes cancellation support for sync and async operations, and adds an
API guarantee that if an operation is cancelled before its network activity
has finished (or started), the operation will always return a cancelled
error. If an operation is cancelled after its network activity has finished,
the operation will always return its results as normal.
|
|
|
|
|
|
| |
This is in addition to G_GNUC_WARN_UNUSED_RESULT, so that we get the benefit
of compiler aliasing optimisations, plus a reminder to not discard returned
values without freeing/unreffing them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add a LIBGDATA_DEBUG environment variable which allows setting the debug
output level (from none, through messages and headers, to full network
logging). This variable is now used in the test suite, so that output from
test programs can be piped to a log file and the network traces analysed
later.
The network logging uses libsoup's inbuilt logging facilities.
Closes: bgo#605699
|
|
|
|
|
|
|
|
|
|
| |
Use HTTPS request URIs wherever services support them, as sensitive data
could potentially be transmitted. So far, only the Calendar, Contacts and
PicasaWeb services support HTTPS.
If the LIBGDATA_FORCE_HTTP environment variable is defined, all requests
(except authentication requests, which must always be HTTPS) will be forced
to be HTTP, for debugging purposes.
|
|
|
|
| |
Add download APIs and infrastructure for GDataMedia and GDataThumbnail
|
|
|
|
|
|
| |
GDataDownloadStream is a subclass of GInputStream which allows large files to
be downloaded in a more controlled manner than by just specifying the
file to save them to.
|
|
|
|
|
|
| |
This reduces the number of small allocations required when building up
an XML output tree by a large number. XML output checks in the test
suites can act as a test case.
|
|
|
|
|
| |
Patch from Thibault Saunier <saunierthibault@gmail.com> to change the
semantics of the *_download_document() functions. Closes: bgo#589545
|
|
|
|
|
| |
Added support for Google Documents, from work done by Thibault Saunier
<saunierthibault@gmail.com>. Closes bgo#587073 and bgo#588282.
|
|
|
|
|
| |
Added sync and async query functions to retrieve the details of a single video
based on its video ID. Test cases and documentation are included.
|
|
|
|
|
|
|
| |
Previously, each call to _gdata_parsable_get_xml would create its own GString,
then destroy it at the end. Now, the same GString is reused throughout a tree
of calls to _gdata_parsable_get_xml, saving quite a few allocations/frees
(in exchange for more reallocations).
|
|
|
|
|
|
|
| |
This introduces new element_name and element_namespaces fields to the
GDataParsableClass struct, allowing for simpler parsing of XML by linking
XML element names to parsable object types. Some of the GDataParsable API
is now public, which will allow for a more comprehensive test suite in future.
|
|
|
|
|
|
|
| |
Converted all the Atom structs to GObjects, and moved them to an "atom"
directory. This entailed moving get_xml and get_namespaces to GDataParsable,
which simplifies things anyway. The documentation for the new Atom objects
is mostly complete, but no new test cases have been added. Helps: bgo#579170
|
|
|
|
|
|
|
| |
Reworded a number of strings to make them (hopefully) easier to translate, and
added translator comments to every string which takes parameters. Moved a few
existing translator comments so gettext actually picks them up.
Closes: bgo#584417
|
|
|
|
|
|
| |
GDataCalendarFeed is a subclass of GDataFeed, and implements parsing of two
Calendar-specific feed properties. Documentation is included, but there are
no test cases.
|
|
|
|
|
|
| |
Adds a new abstract class, GDataParsable, which adds extensible XML parsing
functionality to inheriting classes. A little documentation is included, but
there is no real public API for the class.
|
|
|
|
|
|
| |
Pure dates (not including a time) were not being handled at all. Parsing
and producing XML for them now works, and a date parsing test case has been
added.
|
|
|
|
|
|
| |
Added G_GNUC_WARN_UNUSED_RESULT attributes to all functions which return
allocated memory, especially the _insert_entry and _update_entry functions,
which return the updated entries, which might be missed by some users.
|
|
|
|
| |
The code to create entries from XML strings was duplicated in several places and has now been refactored out into _gdata_entry_new_from_xml.
|
|
|
|
|
| |
Add support for storing the XML for unknown elements, and including it when updating entries, so that data added by protocol updates isn't lost by
older versions of libgdata. Adds a test case.
|
|
|
|
|
| |
Redirects from the server are now handled correctly when inserting, updating or deleting entries. The code to send SoupMessages has been refactored
a little, and gdata_service_get_session has consequently been removed.
|
| |
|
| |
|
|
|
|
|
|
| |
and GDataFeed.
Privatised some API in the process.
|