libgupnp-dlna: Detect duplicates in <include>
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 29 Jun 2010 14:25:09 +0000 (19:55 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 29 Jun 2010 17:31:39 +0000 (23:01 +0530)
commit00ad1e80bcb71a176bb24609aa09000c06e92b3d
treecc5808d369868bdf75c8d1aa637cc11e503f9597
parent66ec07fbec61b4858c31c7d5039e869149adc1d5
libgupnp-dlna: Detect duplicates in <include>

Currently, if we include one of the XML files in the profiles directory
from another XML file, the former will get parsed twice (once while
walking the directory, and once again when being included), resulting in
the same set profiles being added to the profile list twice.

This adds some (not fool-proof, but good enough) duplicate detection, so
that we can include one XML file in another. This is particularly useful
for reusing audio profile restrictions in video profiles.
libgupnp-dlna/gupnp-dlna-load.c
libgupnp-dlna/gupnp-dlna-load.h
tests/dlna-profile-parser.c
tests/xml/duplicate-detection/dup1.xml [new file with mode: 0644]
tests/xml/duplicate-detection/dup2.xml [new file with mode: 0644]