added PlayLogFactory install/uninstall to the Scheduler daemon
modified the local storage specification
This commit is contained in:
parent
e7c5fe3756
commit
44c38ddaf9
|
@ -14,7 +14,7 @@ Development Loan Fund</a>, under the GNU <a
|
|||
href="http://www.gnu.org/licenses/gpl.html">GPL</a>.<br>
|
||||
<ul>
|
||||
<li>Author: $Author: fgerlits $</li>
|
||||
<li>Version: $Revision: 1.3 $</li>
|
||||
<li>Version: $Revision: 1.4 $</li>
|
||||
<li>Location: $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/doc/model/LocalStorage/index.html,v $</li>
|
||||
</ul>
|
||||
<h1>Scope</h1>
|
||||
|
@ -2779,7 +2779,7 @@ associated with the token returned<br>
|
|||
<td colspan="2" rowspan="1" valign="top">savePlaylist<br>
|
||||
(sessionId : SessionId, <br>
|
||||
playlistToken : Token, <br>
|
||||
newPlaylistURL : URL)<br>
|
||||
newPlaylist : Playlist)<br>
|
||||
: void<br>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -2805,7 +2805,8 @@ metafile in place of the old one.<br>
|
|||
<tr>
|
||||
<td valign="top"><b>Notes</b><br>
|
||||
</td>
|
||||
<td colspan="2" rowspan="1" valign="top">none<br>
|
||||
<td colspan="2" rowspan="1" valign="top">TODO: decide exactly what
|
||||
the newPlaylist argument looks like<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE scheduler [
|
||||
|
||||
<!ELEMENT scheduler (connectionManagerFactory,storageClientFactory,
|
||||
scheduleFactory,audioPlayer,xmlRpcDaemon) >
|
||||
scheduleFactory,playLogFactory,audioPlayer,xmlRpcDaemon) >
|
||||
|
||||
<!ELEMENT connectionManagerFactory (simpleConnectionManager) >
|
||||
|
||||
|
@ -21,9 +21,11 @@
|
|||
<!ATTLIST playlist playlength NMTOKEN #REQUIRED >
|
||||
|
||||
<!ELEMENT scheduleFactory (postgresqlSchedule) >
|
||||
|
||||
<!ELEMENT postgresqlSchedule EMPTY >
|
||||
|
||||
<!ELEMENT playLogFactory (postgresqlPlayLog) >
|
||||
<!ELEMENT postgresqlPlayLog EMPTY >
|
||||
|
||||
<!ELEMENT audioPlayer (helixPlayer) >
|
||||
|
||||
<!ELEMENT helixPlayer EMPTY >
|
||||
|
@ -54,6 +56,10 @@
|
|||
<postgresqlSchedule/>
|
||||
</scheduleFactory>
|
||||
|
||||
<playLogFactory>
|
||||
<postgresqlPlayLog/>
|
||||
</playLogFactory>
|
||||
|
||||
<audioPlayer>
|
||||
<helixPlayer dllPath = "../../usr/lib/helix"/>
|
||||
</audioPlayer>
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.11 $
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.12 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/SchedulerDaemon.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -57,6 +57,7 @@
|
|||
#include "LiveSupport/Storage/StorageClientFactory.h"
|
||||
#include "LiveSupport/PlaylistExecutor/AudioPlayerFactory.h"
|
||||
#include "ScheduleFactory.h"
|
||||
#include "PlayLogFactory.h"
|
||||
#include "SchedulerDaemon.h"
|
||||
#include "PlaylistEventContainer.h"
|
||||
|
||||
|
@ -176,6 +177,14 @@ SchedulerDaemon :: configure(const xmlpp::Element & element)
|
|||
Ptr<ScheduleFactory>::Ref sf = ScheduleFactory::getInstance();
|
||||
sf->configure( *((const xmlpp::Element*) *(nodes.begin())) );
|
||||
|
||||
// configure the PlayLogFactory
|
||||
nodes = element.get_children(PlayLogFactory::getConfigElementName());
|
||||
if (nodes.size() < 1) {
|
||||
throw std::invalid_argument("no playLogFactory element");
|
||||
}
|
||||
Ptr<PlayLogFactory>::Ref plf = PlayLogFactory::getInstance();
|
||||
plf->configure( *((const xmlpp::Element*) *(nodes.begin())) );
|
||||
|
||||
// configure the XmlRpcDaemon
|
||||
nodes = element.get_children(XmlRpcDaemon::getConfigElementName());
|
||||
if (nodes.size() < 1) {
|
||||
|
@ -229,6 +238,9 @@ SchedulerDaemon :: install(void) throw (std::exception)
|
|||
// TODO: check if we have already been configured
|
||||
Ptr<ScheduleFactory>::Ref sf = ScheduleFactory::getInstance();
|
||||
sf->install();
|
||||
|
||||
Ptr<PlayLogFactory>::Ref plf = PlayLogFactory::getInstance();
|
||||
plf->install();
|
||||
}
|
||||
|
||||
|
||||
|
@ -239,6 +251,14 @@ void
|
|||
SchedulerDaemon :: uninstall(void) throw (std::exception)
|
||||
{
|
||||
// TODO: check if we have already been configured
|
||||
try {
|
||||
Ptr<PlayLogFactory>::Ref plf = PlayLogFactory::getInstance();
|
||||
plf->uninstall();
|
||||
}
|
||||
catch (std::exception &e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
}
|
||||
|
||||
Ptr<ScheduleFactory>::Ref sf = ScheduleFactory::getInstance();
|
||||
sf->uninstall();
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.10 $
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.11 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/SchedulerDaemon.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -109,6 +109,9 @@ using namespace LiveSupport::PlaylistExecutor;
|
|||
* <scheduleFactory>
|
||||
* ...
|
||||
* </scheduleFactory>
|
||||
* <playLogFactory>
|
||||
* ...
|
||||
* </playLogFactory>
|
||||
* <xmlRpcDaemon>
|
||||
* ...
|
||||
* </xmlRpcDaemon>
|
||||
|
@ -123,11 +126,11 @@ using namespace LiveSupport::PlaylistExecutor;
|
|||
*
|
||||
* <pre><code>
|
||||
* <!ELEMENT scheduler (connectionManagerFactory,storageClientFactory,
|
||||
* scheduleFactory,xmlRpcDaemon) >
|
||||
* scheduleFactory,playLogFactory,xmlRpcDaemon) >
|
||||
* </code></pre>
|
||||
*
|
||||
* @author $Author: maroy $
|
||||
* @version $Revision: 1.10 $
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.11 $
|
||||
* @see ConnectionManagerFactory
|
||||
* @see StorageClientFactory
|
||||
* @see ScheduleFactory
|
||||
|
|
Loading…
Reference in New Issue