Skip to content
Commit da3aa429 authored by Pēteris Krišjānis's avatar Pēteris Krišjānis Committed by Philip Withnall
Browse files

core: Add get_content_type virtual function to GDataParsable

Adding get_content_type virtual function to GDataParsable to allow
insert/update/delete_entry functions in GDataService to distinguish between
JSON and XML based GDataParsables. GDataParsable subclass who uses JSON
format data define their virtual function and return const gchar* string
application/json. Otherwise GDataParsable own defined virtual function will
return application/atom+xml. For insert/update_entry it allows to choose
between two different calls to build xml or json message, and also in return
parse returned data from online service correctly. For delete_entry it
allows to choose different link from links list, as for json it is stored in
different place.

Helps: https://bugzilla.gnome.org/show_bug.cgi?id=657539
parent fcc2d13d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment