[Rename] Rename to dleyna-control

dleyna code is being restructured as decided in
https://lists.01.org/pipermail/dleyna/2013-February/000099.html,
as a result it makes sense to rename media-service-demo to
dleyna-control and move the code from
git://github.com/01org/media-service-demo.git to
git://github.com/01org/dleyna-control.git

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[Search] Refactor: implement asynchronous search

To prevent UI from blocking and to prevent excessive searches, the
custom model needs to be refactored to not do synchronous searches in
on_get_value().

This is achieved by
 * adding  SearchModel.set_request_range() so the view can inform the
   model of the required rows
 * Adding a dict-based cache for the search results
 * Adding row-inserted/changed/deleted signals to the model

Fixes #2

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[player] Use buttons with stock media images

Also use a play/pause button instead of separate ones

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[Player] Remove Stop-button

Remove "Stop" button: it does not give the user much added value
and the relation to pause is not clear to many people (this is
why most modern players do not use it).

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[Player] Update UI based only on gstreamer state

This is simpler and less error-prone than doing it both from
gstreamer and UI event handlers.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[Player] Fix seeking

Do seeks so that the UI doesn't block. Enable seeking
while playing.

Fixes #3

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[Player] Create the adjustment like other widgets

Create the adjustment on init(), only do set_upper()
when duration is available.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[Player] Move play-pause-button next to the progress scale

Change is a purely visual one.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[Search] Refactor: separate generic model code from search

Create a new GenericModel class and put most of SearchModel code
there. Subclass SearchModel from GenericModel. Later we can use
GenericModel for BrowseModel as well, removing duplicate code.

No functional changes.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[Model] Name column indexes

This makes it easier to change the model without breaking things outside
the model.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[Model] stop fetching if all results have been fetched already

This will skip one useless search/browse call in some cases.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[Model] Add "static rows" in the model

This allows inserting a static row into the model. It will be
inserted before the actual search/browse results. This is useful
for BrowseModel that wants to edd e.g. ".."-row for moving up a
directory

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[Browse] Use the GenericModel for Browse

This removes a lot of duplicate code and makes Browse perform as well
as Search.

Note that BrowseModels are discarded as soon as the view changes to
another "directory" (BrowseModel). Caching could be added later on.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[Model] auto-load items also when max_items is not known

This mostly removes special casing for the servers that do not support
max_items: the code already works quite well for them.

Add GenericModel.length_is_known() so we can still do the most
efficient thing with better servers.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[UPnP] Handle GetServers() asynchronously

The call won't take long normally, and the app isn't really useful
until it returns. Nevertheless, D-Bus calls should still be
asynchronous.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[UPnP] Call found_server callback on GetServers() results

This was not needed before as GetServers() results were always
handled in __init__() -- so no callbacks could yet exist. Now
with asynchronous GetServers() handling this is no longer true.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[GenericModel] Add abstract GenericModel._fetch_items()

This seems like a good practice and silences a pychecker warning.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[Gtk] Upgrade to Gtk+3, GStreamer 1.0 and python-gi

This includes:
* Player (manual) drawing changed to use Cairo
* GenericModel now directly inherits from TreeModel
* lots of syntax changes

Fixes #13.
Fixes #14.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[UPnP] Do not make duplicate found_server_callback() calls

Use the same code for GetServers() callback and the FoundServer
handler: GetServers() code path wasn't checking for existing servers,
so duplicates could appear with good timing.

Also mark signal handlers as 'private' methods.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
[MainWindow] Set "dLeyna-control" as the window title

Fixes #15.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>