﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
655	Refactoring of addListener/dispatch code	eskil <myth@…>	Isaac Richards	"While working on shoutcast/musictree code, I had to add another class that implemented the addListener/removeListener/dispatch API. This API was implemented by
 * !OutputListeners (inherited by !AudioOutput)
 * !MythContext
 * !Decoder (mythmusic)

instead to cut'n'pasting all that code again, I donned the refactoring hat and moved this into a !MythObservable class, and changed the above classes to inherit from this. Submitting this as a separate patch to keep it reviewable.  

The changes are
 * add !MythObservable in mythobservable.h/.cpp, implements add/removeListener, dispatch and dispatchNow.
 * move !MythEvent from mythcontext.h into mythevent.h
 * make !OutputEvent and !DecoderEvent inherit from !MythEvent (so I'm ensured that the event passed to !MythObservable::dispatch implemnets a clone method).
 * make !MythContext, !OutputListeners and Decoder inherit !MythObservable, remove their implementations of add/remove/dispatch.
 *  doxygen comments for !MythObservable...
 * Additionally, moved mythmusic/genres.c into a .h and .cpp file, since that makes the genre list accessible from other metadata editors."	patch	closed	minor	unknown	mythtv		medium	fixed			0
