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