summaryrefslogtreecommitdiff
path: root/gdata/gdata-private.h
Commit message (Collapse)AuthorAgeFilesLines
* youtube: WIP work to port to API v3youtube-v3Philip Withnall2015-04-151-0/+2
|
* core: Explicitly support a final page in GDataQuery paginationPhilip Withnall2014-12-121-0/+3
| | | | | | | | | | | | | | | | | 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
* core: Allow the GDataFeed type to be passed to _gdata_feed_new()Philip Withnall2014-12-121-1/+4
| | | | | | | 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: Eliminate unnecessary is_async argument from parser functionsPhilip Withnall2014-12-121-4/+3
| | | | | | | | | 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
* core: Fix strict-aliasing problems with authentication domainsPhilip Withnall2013-11-191-2/+2
| | | | Dodgy casts are the worst.
* core: Add support for JSON to GDataParsable, GDataEntry and GDataFeedPeteris Krisjanis2013-08-291-0/+8
| | | | | | | | | | | | | | | 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
* core: Allow HTTPS port to be overriden using the LIBGDATA_HTTPS_PORT envvarPhilip Withnall2013-08-021-0/+1
| | | | | This will be useful for unit testing, allowing network traffic to be redirected to a local unit testing server.
* core: Ensure passwords and auth. tokens are stored in non-pageable memoryPhilip Withnall2011-10-111-0/+7
| | | | | | | | | | | | | | | | | | 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
* core: Filter sensitive details out of debug log outputPhilip Withnall2011-10-101-2/+6
| | | | | | | | | 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
* core: Ensure that synchronous progress callbacks aren't done in idle callbacksPhilip Withnall2011-06-281-2/+3
| | | | | | | 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.
* core: Remove the old authentication API in favour of a new GDataAuthorizer APIPhilip Withnall2011-06-051-8/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Bug 644940 — Use HTTPS onlyPhilip Withnall2011-03-221-2/+1
| | | | | Use HTTPS for all communications with the server, removing the LIBGDATA_FORCE_HTTP environment variable. Closes: bgo#644940
* core: Expose _gdata_service_actually_send_message() internallyPhilip Withnall2010-12-201-0/+1
| | | | | | | This will allow the GDataUploadStream and GDataDownloadStream message-sending code to be rebased on it to fix cancellation races. Helps: bgo#637036
* core: Remove _gdata_download_stream_find_destination()Philip Withnall2010-12-111-4/+0
| | | | It was unused and private.
* 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: Add a _gdata_service_build_uri() function to escape URI componentsPhilip Withnall2010-08-231-0/+2
| | | | | | | 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.
* [documents] Move download methods to GDataDocumentsDocumentPhilip Withnall2010-08-221-7/+0
| | | | | This breaks API by removing the various download methods from GDataDocumentsPresentation, GDataDocumentsSpreadsheet and GDataDocumentsText.
* [documents] Add GDataDocumentsDocument below GDataDocumentsEntryPhilip Withnall2010-08-221-4/+6
| | | | | | It's the new parent class of GDataDocumentsPresentation, GDataDocumentsSpreadsheet and GDataDocumentsText. This breaks API. Helps: bgo#607616
* [documents] Move initialisation code into constructor() in Documents servicePhilip Withnall2010-08-111-1/+0
|
* [core] Add a GDataParsable:constructed-from-xml propertyPhilip Withnall2010-08-111-0/+1
| | | | | | This allows code which was previously in GDataParsable subclasses' *_new() functions to be moved into their constructor() functions, making them more suitable for bindings.
* [core] Explicitly mark private symbols as G_GNUC_INTERNALPhilip Withnall2010-08-081-34/+34
|
* [core] Batch operation supportPhilip Withnall2010-07-121-0/+6
| | | | | | | | | | | 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
* [core] Mark most getter functions as purePhilip Withnall2010-04-161-5/+5
| | | | | | | 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.
* [core] Remove unused parameters from _gdata_service_query()Philip Withnall2010-04-141-4/+0
|
* [core] Whitespace fixesPhilip Withnall2010-04-121-10/+10
| | | | | Make indentation and whitespacing consistent throughout the entire project. I am so sad.
* [core] Improve cancellation supportPhilip Withnall2010-04-091-1/+2
| | | | | | | | | | | 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.
* [core] Add G_GNUC_MALLOC to all functions returning allocated dataPhilip Withnall2010-04-011-6/+10
| | | | | | 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.
* [core] Move all GTimeVal parsing into a single functionPhilip Withnall2010-03-251-0/+1
|
* Bug 605699 — Add packet capture to test suitePhilip Withnall2010-03-071-1/+17
| | | | | | | | | | | 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
* [core] Use HTTPS URIs wherever possiblePhilip Withnall2010-01-181-0/+2
| | | | | | | | | | 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.
* Bug 598649 — Download API for PicasaWeb images and thumbnailsRichard Schwarting2009-12-061-0/+2
| | | | Add download APIs and infrastructure for GDataMedia and GDataThumbnail
* [core] Added GDataDownloadStream to allow easy downloading of large filesPhilip Withnall2009-08-031-0/+1
| | | | | | 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.
* [core] Added a method to escape text and append it to a GStringPhilip Withnall2009-08-031-0/+1
| | | | | | 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.
* Bug 589545 – *_download_document(): let the client decide where to downloadPhilip Withnall2009-07-271-1/+1
| | | | | Patch from Thibault Saunier <saunierthibault@gmail.com> to change the semantics of the *_download_document() functions. Closes: bgo#589545
* Bug 587073 – Add Google Documents serviceThibault Saunier2009-07-171-0/+13
| | | | | Added support for Google Documents, from work done by Thibault Saunier <saunierthibault@gmail.com>. Closes bgo#587073 and bgo#588282.
* [youtube] Added a query to retrieve the details of a single videoPhilip Withnall2009-07-051-0/+5
| | | | | 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.
* [core] Made the get_xml functions use a single GString throughoutPhilip Withnall2009-07-031-1/+1
| | | | | | | 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).
* [core] Link element names and namespaces to the relevant classesPhilip Withnall2009-06-281-6/+3
| | | | | | | 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.
* [core] Converted Atom structs to GObjectsPhilip Withnall2009-06-141-11/+1
| | | | | | | 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
* Bug 584417 – Strings are not properly formed for localisationPhilip Withnall2009-06-031-7/+6
| | | | | | | 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
* [calendar] Added GDataCalendarFeed to parse Calendar-specific feed propertiesPhilip Withnall2009-05-171-1/+1
| | | | | | GDataCalendarFeed is a subclass of GDataFeed, and implements parsing of two Calendar-specific feed properties. Documentation is included, but there are no test cases.
* [core] Abstract XML parsing from GDataFeed and GDataEntry into GDataParsablePhilip Withnall2009-05-171-1/+8
| | | | | | 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.
* Fixed handling of ISO 8601 dates (not date times) in calendar eventsPhilip Withnall2009-04-231-0/+2
| | | | | | 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.
* Bug 579631 – Add G_GNUC_WARN_UNUSED_RESULT to functionsPhilip Withnall2009-04-201-4/+5
| | | | | | 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.
* Refactored entry creation a littlePhilip Withnall2009-04-161-0/+1
| | | | 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.
* Bug 578662 – Support unknown XML elementsPhilip Withnall2009-04-161-15/+2
| | | | | 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.
* Added proper redirection handling for insertions, updates and deletionsPhilip Withnall2009-04-151-0/+2
| | | | | 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.
* Fixed licence to consistently be LGPLv2.1.Philip Withnall2009-04-011-10/+10
|
* Made a few parser functions private and documented the parser error codes.Philip Withnall2009-03-301-0/+9
|
* Started work on the API documentation, adding documentation to GDataService ↵Philip Withnall2009-03-241-0/+3
| | | | | | and GDataFeed. Privatised some API in the process.