core,tracker: Fix upload of files
authorMarcin Kazmierczak <marcin.kazmierczak@live.com>
Wed, 22 Feb 2012 14:03:12 +0000 (15:03 +0100)
committerJens Georg <jensg@openismus.com>
Mon, 8 Apr 2013 14:32:52 +0000 (16:32 +0200)
commitf31503fc774c665a77b24efed3cb5c7c8b332064
tree2b92564424519eae4b27ea8f23171a91715862d2
parentc9c0a38f09eaf9933d3450b64ede387d4929845b
core,tracker: Fix upload of files

core:
MediaContainer: Add empty children counter. Add check_search_expression
function, which set create_mode on true, when "upnp:createClass" operand
was detected.
SearchableContainer: Use check_search_expression in simple_search function
to determine child counter.
SimpleContainer: Use check_search_expression to search both in empty and
non-empty children, during adding new item.

tests: searchable-container-test: Add children counter to MediaContainer
class. Add empty function check_search_expression in class MediaContainer.

Previously it was impossible to add new item, when matched container was
empty. For example user can't add picture, when don't have any picture.
Now it's possible, because now search function return also empty children
container, when search expression contains "upnp:createClass" operand. This
works when HttpPost was used to upload file.

https://bugzilla.gnome.org/show_bug.cgi?id=660885
src/librygel-server/rygel-media-container.vala
src/librygel-server/rygel-searchable-container.vala
src/librygel-server/rygel-simple-container.vala
tests/rygel-searchable-container-test.vala