Added the new TypeEx property and fixed Type

The Type property is now almost consistent with the MediaServer2Spec Type
property.  This should remove a source of constant confusion and
fix a number of bugs, in for example the download sync controller.
dLeyna-server's implementation of Type differs only from MediaServer2Spec
in one way.  dLeyna-server has introduced one new value, item.unclassified,
which is used when the object in question is an item but not one of the
items supported by MediaServer2Spec, i.e., not an audio, video or image
item.

A new property, TypeEx has been introduced.  TypeEx contains the
extended type information for an object, i.e., the value Type used
to hold (althought the values have changed), so if applications want
the extended type they can still retrieve it.

Both Type and TypeEx are searchable.  The superset of values specified
by TypeEx are permitted when creating a container, both in the type
of the container and it its create classes.

The extended type is exposed in the CreateClasses of a container and in
the LastChange event.

Type is no longer permitted in Update.  TypeEx must be used.

From an API point of view there are two breakagaes:

1. Applications that used Type to retrieve extended type information,
   need to be updated to use TypeEx.  Applications that used Type
   in their search queries might also need to be updated.
2. Applications that updated the Type of an object will need to be
   updated to use TypeEx instead.

There is one slightly unpleasent hack required to report the correct
values for Search and Sort Caps.  A correct solution would require
making the p_map hash table many to many, which would result in a bigger
change.  I've left this improvement for another commit.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
[Documentation] Tidied up the API.txt file.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
[Klockwork] NULL pointer may be dereferenced. (#3)

Fix issue #3: device_type may be NULL and may be dereferenced.

Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
[Klockwork] NULL pointer may be dereferenced. (#26)

Fix issue #26: ip_address may be NULL and may be dereferenced.

Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
[Klockwork] NULL pointer may be dereferenced. (#27)

Fix issue #27: ip_address may be NULL and may be dereferenced.

Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
[Cleanup] Code cleanup after code review

- Don't initialize result in task creation.
Avoid specific cases. It doesn't make the code more readable, nor smaller.

- if/else cleaning.
Make default action in if statement, and error management in else statement.
Most common usage.

- Factorize code.
Move same function call from each switch/case, outside the switch.
Reduce code.

Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
[Server] Update following the publish_object() connector API change

Signed-off-by: Regis Merlino <regis.merlino@intel.com>
[Build] Fix small typo in the summary at the end of configure.ac

Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
[Build] Ship the internal library in a private directory

The libdleyna-server-1.0.so library is not really meant for public
consumption and it's just an internal implementation detail.

To prevent any confusion, ship it in a package-specific subdirectory of
the configured libdir.

Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>