summaryrefslogtreecommitdiff
path: root/gdata/gdata-batch-operation.c
Commit message (Collapse)AuthorAgeFilesLines
* gdata: Port various core APIs to GTask from GSimpleAsyncResultPhilip Withnall2017-08-081-27/+17
| | | | | | | | 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>
* docs: Replace ‘**/’ gtk-doc comment endings with ‘*/’Philip Withnall2017-01-241-14/+14
| | | | | ‘*/’ is more standard, so this is basically a housekeeping improvement in coding style.
* core: Add GDataBatchable.is_supported virtual methodPhilip Withnall2015-07-051-0/+26
| | | | | | 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).
* core: Allow the GDataFeed type to be passed to _gdata_feed_new()Philip Withnall2014-12-121-1/+2
| | | | | | | This will be used internally later to support constructing custom empty feeds for pagination purposes. https://bugzilla.gnome.org/show_bug.cgi?id=741345
* core: Mark all API as stable and impose API and ABI stability guaranteesPhilip Withnall2014-11-031-1/+1
| | | | | | | | 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.
* core: Fix idle callback priority for batch operation callbacksPhilip Withnall2013-07-021-3/+6
| | | | | | | | | 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.
* introspection: Fix introspection for GCancellable parametersP. F. Chimento2011-06-071-2/+2
| | | | | ...and progress callbacks in non-async functions See bug #649728
* core: Remove the old authentication API in favour of a new GDataAuthorizer APIPhilip Withnall2011-06-051-3/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* core: Fix handling early cancellation of batch operationsPhilip Withnall2010-12-111-0/+5
| | | | | | | | | | 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.
* core: Rearrange some of the batch operation codePhilip Withnall2010-12-101-36/+30
| | | | | This replaces a g_hash_table_foreach() call with use of a GHashTableIter, saving some function calls and reusing existing variables better.
* core: Ensure GDataBatchOperation's operations' callbacks are always calledPhilip Withnall2010-12-101-20/+63
| | | | | Even in error conditions, the callbacks for each of the operations in a GDataBatchOperation should be called, or memory leaks could result.
* core: Use gint64 timestamps instead of GTimeValsPhilip Withnall2010-10-041-2/+2
| | | | | | 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.
* core: Use the GDataEntry.get_entry_uri() method for batch queriesPhilip Withnall2010-08-261-4/+11
| | | | | | 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.
* [introspection] Add missing annotations to GDataBatchOperationPhilip Withnall2010-08-021-5/+5
|
* [introspection] Add missing annotations to GDataAccessRulePhilip Withnall2010-08-021-1/+1
|
* [introspection] Add (closure) annotationsPhilip Withnall2010-07-261-5/+5
|
* [core] Batch operation supportPhilip Withnall2010-07-121-0/+696
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