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
Please register or sign in to comment