added scheduler client to application
This commit is contained in:
parent
470d325ce4
commit
2ae50400d4
|
@ -21,7 +21,7 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Author : $Author: maroy $
|
# Author : $Author: maroy $
|
||||||
# Version : $Revision: 1.5 $
|
# Version : $Revision: 1.6 $
|
||||||
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/etc/Makefile.in,v $
|
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/etc/Makefile.in,v $
|
||||||
#
|
#
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
@ -84,6 +84,12 @@ STORAGE_LIB_DIR = ${STORAGE_DIR}/lib
|
||||||
STORAGE_LIB = livesupport_storage
|
STORAGE_LIB = livesupport_storage
|
||||||
STORAGE_LIB_FILE = ${STORAGE_LIB_DIR}/lib${STORAGE_LIB}.a
|
STORAGE_LIB_FILE = ${STORAGE_LIB_DIR}/lib${STORAGE_LIB}.a
|
||||||
|
|
||||||
|
SCHEDULER_CLIENT_DIR = ${MODULES_DIR}/schedulerClient
|
||||||
|
SCHEDULER_CLIENT_INCLUDE_DIR = ${SCHEDULER_CLIENT_DIR}/include
|
||||||
|
SCHEDULER_CLIENT_LIB_DIR = ${SCHEDULER_CLIENT_DIR}/lib
|
||||||
|
SCHEDULER_CLIENT_LIB = livesupport_scheduler_client
|
||||||
|
SCHEDULER_CLIENT_LIB_FILE = ${SCHEDULER_CLIENT_LIB_DIR}/lib${SCHEDULER_CLIENT_LIB}.a
|
||||||
|
|
||||||
GTKMM_CFLAGS=@GTKMM_CFLAGS@
|
GTKMM_CFLAGS=@GTKMM_CFLAGS@
|
||||||
GTKMM_LIBS=@GTKMM_LIBS@
|
GTKMM_LIBS=@GTKMM_LIBS@
|
||||||
|
|
||||||
|
@ -118,6 +124,7 @@ CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
|
||||||
-I${CORE_INCLUDE_DIR} \
|
-I${CORE_INCLUDE_DIR} \
|
||||||
-I${AUTHENTICATION_INCLUDE_DIR} \
|
-I${AUTHENTICATION_INCLUDE_DIR} \
|
||||||
-I${STORAGE_INCLUDE_DIR} \
|
-I${STORAGE_INCLUDE_DIR} \
|
||||||
|
-I${SCHEDULER_CLIENT_INCLUDE_DIR} \
|
||||||
-I${TMP_DIR}
|
-I${TMP_DIR}
|
||||||
LDFLAGS = @LDFLAGS@ -pthread \
|
LDFLAGS = @LDFLAGS@ -pthread \
|
||||||
${ICU_LIBS} \
|
${ICU_LIBS} \
|
||||||
|
@ -125,7 +132,8 @@ LDFLAGS = @LDFLAGS@ -pthread \
|
||||||
-L${USR_LIB_DIR} \
|
-L${USR_LIB_DIR} \
|
||||||
-L${CORE_LIB_DIR} \
|
-L${CORE_LIB_DIR} \
|
||||||
-L${AUTHENTICATION_LIB_DIR} \
|
-L${AUTHENTICATION_LIB_DIR} \
|
||||||
-L${STORAGE_LIB_DIR}
|
-L${STORAGE_LIB_DIR} \
|
||||||
|
-L${SCHEDULER_CLIENT_LIB_DIR}
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
@ -146,6 +154,7 @@ FSDF = ${G_LIVESUPPORT_OBJS} \
|
||||||
${TMP_DIR}/main.o
|
${TMP_DIR}/main.o
|
||||||
G_LIVESUPPORT_EXE_LIBS = -l${CORE_LIB} \
|
G_LIVESUPPORT_EXE_LIBS = -l${CORE_LIB} \
|
||||||
-l${AUTHENTICATION_LIB} \
|
-l${AUTHENTICATION_LIB} \
|
||||||
|
-l${SCHEDULER_CLIENT_LIB} \
|
||||||
-lboost_date_time-gcc \
|
-lboost_date_time-gcc \
|
||||||
-lxmlrpc++ -lssl -lxml++-1.0
|
-lxmlrpc++ -lssl -lxml++-1.0
|
||||||
|
|
||||||
|
@ -178,6 +187,7 @@ docclean:
|
||||||
${RM} ${TEST_RESULTS}
|
${RM} ${TEST_RESULTS}
|
||||||
|
|
||||||
depclean: clean
|
depclean: clean
|
||||||
|
${MAKE} -C ${SCHEDULER_CLIENT_DIR} clean
|
||||||
${MAKE} -C ${STORAGE_DIR} clean
|
${MAKE} -C ${STORAGE_DIR} clean
|
||||||
${MAKE} -C ${AUTHENTICATION_DIR} clean
|
${MAKE} -C ${AUTHENTICATION_DIR} clean
|
||||||
${MAKE} -C ${CORE_DIR} clean
|
${MAKE} -C ${CORE_DIR} clean
|
||||||
|
@ -200,6 +210,7 @@ run: all
|
||||||
${G_LIVESUPPORT_EXE}: ${CORE_LIB_FILE} \
|
${G_LIVESUPPORT_EXE}: ${CORE_LIB_FILE} \
|
||||||
${AUTHENTICATION_LIB_FILE} \
|
${AUTHENTICATION_LIB_FILE} \
|
||||||
${STORAGE_LIB_FILE} \
|
${STORAGE_LIB_FILE} \
|
||||||
|
${SCHEDULER_CLIENT_LIB_FILE} \
|
||||||
${G_LIVESUPPORT_OBJS} ${G_LIVESUPPORT_EXE_OBJS}
|
${G_LIVESUPPORT_OBJS} ${G_LIVESUPPORT_EXE_OBJS}
|
||||||
${CXX} ${LDFLAGS} -o $@ $^ ${G_LIVESUPPORT_EXE_LIBS}
|
${CXX} ${LDFLAGS} -o $@ $^ ${G_LIVESUPPORT_EXE_LIBS}
|
||||||
|
|
||||||
|
@ -212,6 +223,7 @@ ${DOXYGEN_DIR}:
|
||||||
${TEST_RUNNER}: ${CORE_LIB_FILE} \
|
${TEST_RUNNER}: ${CORE_LIB_FILE} \
|
||||||
${AUTHENTICATION_LIB_FILE} \
|
${AUTHENTICATION_LIB_FILE} \
|
||||||
${STORAGE_LIB_FILE} \
|
${STORAGE_LIB_FILE} \
|
||||||
|
${SCHEDULER_CLIENT_LIB_FILE} \
|
||||||
${TEST_RUNNER_OBJS}
|
${TEST_RUNNER_OBJS}
|
||||||
${CXX} ${LDFLAGS} -o $@ ${TEST_RUNNER_OBJS} ${TEST_RUNNER_LIBS}
|
${CXX} ${LDFLAGS} -o $@ ${TEST_RUNNER_OBJS} ${TEST_RUNNER_LIBS}
|
||||||
|
|
||||||
|
@ -224,6 +236,9 @@ ${AUTHENTICATION_LIB_FILE}:
|
||||||
${STORAGE_LIB_FILE}:
|
${STORAGE_LIB_FILE}:
|
||||||
${MAKE} -C ${STORAGE_DIR}
|
${MAKE} -C ${STORAGE_DIR}
|
||||||
|
|
||||||
|
${SCHEDULER_CLIENT_LIB_FILE}:
|
||||||
|
${MAKE} -C ${SCHEDULER_CLIENT_DIR}
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Pattern rules
|
# Pattern rules
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
<!DOCTYPE gLiveSupport [
|
<!DOCTYPE gLiveSupport [
|
||||||
|
|
||||||
<!ELEMENT gLiveSupport (resourceBundle,
|
<!ELEMENT gLiveSupport (resourceBundle,
|
||||||
authenticationClientFactory) >
|
authenticationClientFactory,
|
||||||
|
schedulerClientFactory) >
|
||||||
|
|
||||||
<!ELEMENT resourceBundle EMPTY >
|
<!ELEMENT resourceBundle EMPTY >
|
||||||
<!ATTLIST resourceBundle path CDATA #REQUIRED >
|
<!ATTLIST resourceBundle path CDATA #REQUIRED >
|
||||||
|
@ -17,14 +18,31 @@
|
||||||
<!ATTLIST user login CDATA #REQUIRED >
|
<!ATTLIST user login CDATA #REQUIRED >
|
||||||
<!ATTLIST user password CDATA #REQUIRED >
|
<!ATTLIST user password CDATA #REQUIRED >
|
||||||
|
|
||||||
|
<!ELEMENT schedulerClientFactory (schedulerDaemonXmlRpcClient) >
|
||||||
|
|
||||||
|
<!ELEMENT schedulerDaemonXmlRpcClient EMPTY >
|
||||||
|
<!ATTLIST schedulerDaemonXmlRpcClient xmlRpcHost CDATA #REQUIRED >
|
||||||
|
<!ATTLIST schedulerDaemonXmlRpcClient xmlRpcPort NMTOKEN #REQUIRED >
|
||||||
|
<!ATTLIST schedulerDaemonXmlRpcClient xmlRpcUri CDATA #REQUIRED >
|
||||||
|
|
||||||
]>
|
]>
|
||||||
<gLiveSupport>
|
<gLiveSupport>
|
||||||
<resourceBundle path = "./tmp/gLiveSupport"
|
<resourceBundle path = "./tmp/gLiveSupport"
|
||||||
locale = "en"
|
locale = "en"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<authenticationClientFactory>
|
<authenticationClientFactory>
|
||||||
<testAuthentication>
|
<testAuthentication>
|
||||||
<user login="root" password="q" />
|
<user login="root" password="q" />
|
||||||
</testAuthentication>
|
</testAuthentication>
|
||||||
</authenticationClientFactory>
|
</authenticationClientFactory>
|
||||||
|
|
||||||
|
<schedulerClientFactory>
|
||||||
|
<schedulerDaemonXmlRpcClient xmlRpcHost = "localhost"
|
||||||
|
xmlRpcPort = "3344"
|
||||||
|
xmlRpcUri = "/RC2"
|
||||||
|
/>
|
||||||
|
</schedulerClientFactory>
|
||||||
|
|
||||||
</gLiveSupport>
|
</gLiveSupport>
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: maroy $
|
||||||
Version : $Revision: 1.2 $
|
Version : $Revision: 1.3 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -37,6 +37,7 @@
|
||||||
#include <gtkmm/main.h>
|
#include <gtkmm/main.h>
|
||||||
|
|
||||||
#include "LiveSupport/Authentication/AuthenticationClientFactory.h"
|
#include "LiveSupport/Authentication/AuthenticationClientFactory.h"
|
||||||
|
#include "LiveSupport/SchedulerClient/SchedulerClientFactory.h"
|
||||||
|
|
||||||
#include "UiTestMainWindow.h"
|
#include "UiTestMainWindow.h"
|
||||||
#include "LoginWindow.h"
|
#include "LoginWindow.h"
|
||||||
|
@ -45,6 +46,7 @@
|
||||||
|
|
||||||
using namespace LiveSupport::Core;
|
using namespace LiveSupport::Core;
|
||||||
using namespace LiveSupport::Authentication;
|
using namespace LiveSupport::Authentication;
|
||||||
|
using namespace LiveSupport::SchedulerClient;
|
||||||
using namespace LiveSupport::GLiveSupport;
|
using namespace LiveSupport::GLiveSupport;
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,6 +103,18 @@ GLiveSupport :: configure(const xmlpp::Element & element)
|
||||||
acf->configure( *((const xmlpp::Element*) *(nodes.begin())) );
|
acf->configure( *((const xmlpp::Element*) *(nodes.begin())) );
|
||||||
|
|
||||||
authentication = acf->getAuthenticationClient();
|
authentication = acf->getAuthenticationClient();
|
||||||
|
|
||||||
|
// configure the SchedulerClientFactory
|
||||||
|
nodes = element.get_children(
|
||||||
|
SchedulerClientFactory::getConfigElementName());
|
||||||
|
if (nodes.size() < 1) {
|
||||||
|
throw std::invalid_argument("no schedulerClientFactory element");
|
||||||
|
}
|
||||||
|
Ptr<SchedulerClientFactory>::Ref scf
|
||||||
|
= SchedulerClientFactory::getInstance();
|
||||||
|
scf->configure( *((const xmlpp::Element*) *(nodes.begin())) );
|
||||||
|
|
||||||
|
schedulerClient = scf->getSchedulerClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: maroy $
|
||||||
Version : $Revision: 1.2 $
|
Version : $Revision: 1.3 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.h,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.h,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -47,11 +47,13 @@
|
||||||
#include "LiveSupport/Core/Ptr.h"
|
#include "LiveSupport/Core/Ptr.h"
|
||||||
#include "LiveSupport/Core/Configurable.h"
|
#include "LiveSupport/Core/Configurable.h"
|
||||||
#include "LiveSupport/Core/AuthenticationClientInterface.h"
|
#include "LiveSupport/Core/AuthenticationClientInterface.h"
|
||||||
|
#include "LiveSupport/SchedulerClient/SchedulerClientInterface.h"
|
||||||
|
|
||||||
namespace LiveSupport {
|
namespace LiveSupport {
|
||||||
namespace GLiveSupport {
|
namespace GLiveSupport {
|
||||||
|
|
||||||
using namespace LiveSupport::Core;
|
using namespace LiveSupport::Core;
|
||||||
|
using namespace LiveSupport::SchedulerClient;
|
||||||
|
|
||||||
/* ================================================================ constants */
|
/* ================================================================ constants */
|
||||||
|
|
||||||
|
@ -70,17 +72,20 @@ using namespace LiveSupport::Core;
|
||||||
*
|
*
|
||||||
* <pre><code>
|
* <pre><code>
|
||||||
* <!ELEMENT gLiveSupport (resourceBundle,
|
* <!ELEMENT gLiveSupport (resourceBundle,
|
||||||
* authenticationClientFactory) >
|
* authenticationClientFactory,
|
||||||
|
* schedulerClientFactory) >
|
||||||
* </code></pre>
|
* </code></pre>
|
||||||
*
|
*
|
||||||
* For a description of the <code>resourceBundle</code> and
|
* For a description of the <code>resourceBundle</code>,
|
||||||
* <code>authenticationClientFactory</code> elements see their
|
* <code>authenticationClientFactory</code> and
|
||||||
|
* <code>schedulerClientFactory</code> elements see their
|
||||||
* respective documentation.
|
* respective documentation.
|
||||||
*
|
*
|
||||||
* @author $Author: maroy $
|
* @author $Author: maroy $
|
||||||
* @version $Revision: 1.2 $
|
* @version $Revision: 1.3 $
|
||||||
* @see LocalizedObject#getBundle(const xmlpp::Element &)
|
* @see LocalizedObject#getBundle(const xmlpp::Element &)
|
||||||
* @see AuthenticationClientFactory
|
* @see AuthenticationClientFactory
|
||||||
|
* @see SchedulerClientFactory
|
||||||
*/
|
*/
|
||||||
class GLiveSupport : public Configurable,
|
class GLiveSupport : public Configurable,
|
||||||
public boost::enable_shared_from_this<GLiveSupport>
|
public boost::enable_shared_from_this<GLiveSupport>
|
||||||
|
@ -101,6 +106,11 @@ class GLiveSupport : public Configurable,
|
||||||
*/
|
*/
|
||||||
Ptr<AuthenticationClientInterface>::Ref authentication;
|
Ptr<AuthenticationClientInterface>::Ref authentication;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The scheduler client, used to access the scheduler daemon.
|
||||||
|
*/
|
||||||
|
Ptr<SchedulerClientInterface>::Ref schedulerClient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The session id for the user.
|
* The session id for the user.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue