| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
GSimpleAsyncResult has been deprecated for quite a long time, and we’re
way overdue on porting to GTask. Start doing that for some of the core
classes. Still a number of instances of it left, though.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
|
|
|
|
| |
‘*/’ is more standard, so this is basically a housekeeping improvement
in coding style.
|
|
|
|
|
|
| |
This new API is intended to be used by GDataYouTubeService to allow it
to indicate which batch operations it supports (since this has changed
since v3 of the API — now batch operations are no longer supported).
|
|
|
|
|
|
|
| |
This will be used internally later to support constructing custom empty
feeds for pagination purposes.
https://bugzilla.gnome.org/show_bug.cgi?id=741345
|
|
|
|
|
|
|
|
| |
It’s time for libgdata to grow up and start guaranteeing some stability
for its users. In this vein, it’s already been API stable for around 3
years (since 0.9.1) — it’s about time that was made explicit.
http://upstream-tracker.org/versions/libgdata.html is quite interesting.
|
|
|
|
|
|
|
|
|
| |
Occasionally, the callback for an async batch operation as a whole was being
called before the callbacks for the individual operations in the batch. This
was causing the YouTube tests to spuriously fail every so often.
Fix this by setting the callback priority for operation callbacks to be the
same as that of the entire batch.
|
|
|
|
|
| |
...and progress callbacks in non-async functions
See bug #649728
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
If we left cancellation handling to the GSimpleAsyncResult, our code to
propagate errors to all the operation's callbacks was not being called if
the GCancellable was cancelled really early in running the operation (e.g.
before calling gdata_batch_operation_run[_async]()).
This commit fixes the problem by disabling GSimpleAsyncResult's cancellation
handling feature for batch operations.
|
|
|
|
|
| |
This replaces a g_hash_table_foreach() call with use of a GHashTableIter,
saving some function calls and reusing existing variables better.
|
|
|
|
|
| |
Even in error conditions, the callbacks for each of the operations in a
GDataBatchOperation should be called, or memory leaks could result.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
To fix the YouTube batch operations so that video IDs can be used in queries
instead of self URIs, GDataEntry.get_entry_uri() needs to be used to get the
"ID" to send in a batch query.
|
| |
|
| |
|
| |
|
|
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
|