diff --git a/livesupport/products/gLiveSupport/etc/Makefile.in b/livesupport/products/gLiveSupport/etc/Makefile.in index 89a5dde49..adde7e488 100644 --- a/livesupport/products/gLiveSupport/etc/Makefile.in +++ b/livesupport/products/gLiveSupport/etc/Makefile.in @@ -21,7 +21,7 @@ # # # 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 $ # # @configure_input@ @@ -84,6 +84,12 @@ STORAGE_LIB_DIR = ${STORAGE_DIR}/lib STORAGE_LIB = livesupport_storage 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_LIBS=@GTKMM_LIBS@ @@ -118,6 +124,7 @@ CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \ -I${CORE_INCLUDE_DIR} \ -I${AUTHENTICATION_INCLUDE_DIR} \ -I${STORAGE_INCLUDE_DIR} \ + -I${SCHEDULER_CLIENT_INCLUDE_DIR} \ -I${TMP_DIR} LDFLAGS = @LDFLAGS@ -pthread \ ${ICU_LIBS} \ @@ -125,7 +132,8 @@ LDFLAGS = @LDFLAGS@ -pthread \ -L${USR_LIB_DIR} \ -L${CORE_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 G_LIVESUPPORT_EXE_LIBS = -l${CORE_LIB} \ -l${AUTHENTICATION_LIB} \ + -l${SCHEDULER_CLIENT_LIB} \ -lboost_date_time-gcc \ -lxmlrpc++ -lssl -lxml++-1.0 @@ -178,6 +187,7 @@ docclean: ${RM} ${TEST_RESULTS} depclean: clean + ${MAKE} -C ${SCHEDULER_CLIENT_DIR} clean ${MAKE} -C ${STORAGE_DIR} clean ${MAKE} -C ${AUTHENTICATION_DIR} clean ${MAKE} -C ${CORE_DIR} clean @@ -200,6 +210,7 @@ run: all ${G_LIVESUPPORT_EXE}: ${CORE_LIB_FILE} \ ${AUTHENTICATION_LIB_FILE} \ ${STORAGE_LIB_FILE} \ + ${SCHEDULER_CLIENT_LIB_FILE} \ ${G_LIVESUPPORT_OBJS} ${G_LIVESUPPORT_EXE_OBJS} ${CXX} ${LDFLAGS} -o $@ $^ ${G_LIVESUPPORT_EXE_LIBS} @@ -212,6 +223,7 @@ ${DOXYGEN_DIR}: ${TEST_RUNNER}: ${CORE_LIB_FILE} \ ${AUTHENTICATION_LIB_FILE} \ ${STORAGE_LIB_FILE} \ + ${SCHEDULER_CLIENT_LIB_FILE} \ ${TEST_RUNNER_OBJS} ${CXX} ${LDFLAGS} -o $@ ${TEST_RUNNER_OBJS} ${TEST_RUNNER_LIBS} @@ -224,6 +236,9 @@ ${AUTHENTICATION_LIB_FILE}: ${STORAGE_LIB_FILE}: ${MAKE} -C ${STORAGE_DIR} +${SCHEDULER_CLIENT_LIB_FILE}: + ${MAKE} -C ${SCHEDULER_CLIENT_DIR} + #------------------------------------------------------------------------------- # Pattern rules diff --git a/livesupport/products/gLiveSupport/etc/gLiveSupport.xml b/livesupport/products/gLiveSupport/etc/gLiveSupport.xml index 9c267296d..d01a3256f 100644 --- a/livesupport/products/gLiveSupport/etc/gLiveSupport.xml +++ b/livesupport/products/gLiveSupport/etc/gLiveSupport.xml @@ -2,7 +2,8 @@ + authenticationClientFactory, + schedulerClientFactory) > @@ -17,14 +18,31 @@ + + + + + + + ]> + + + + + + + diff --git a/livesupport/products/gLiveSupport/src/GLiveSupport.cxx b/livesupport/products/gLiveSupport/src/GLiveSupport.cxx index dec99011d..a0587abf3 100644 --- a/livesupport/products/gLiveSupport/src/GLiveSupport.cxx +++ b/livesupport/products/gLiveSupport/src/GLiveSupport.cxx @@ -22,7 +22,7 @@ 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 $ ------------------------------------------------------------------------------*/ @@ -37,6 +37,7 @@ #include #include "LiveSupport/Authentication/AuthenticationClientFactory.h" +#include "LiveSupport/SchedulerClient/SchedulerClientFactory.h" #include "UiTestMainWindow.h" #include "LoginWindow.h" @@ -45,6 +46,7 @@ using namespace LiveSupport::Core; using namespace LiveSupport::Authentication; +using namespace LiveSupport::SchedulerClient; using namespace LiveSupport::GLiveSupport; @@ -101,6 +103,18 @@ GLiveSupport :: configure(const xmlpp::Element & element) acf->configure( *((const xmlpp::Element*) *(nodes.begin())) ); authentication = acf->getAuthenticationClient(); + + // configure the SchedulerClientFactory + nodes = element.get_children( + SchedulerClientFactory::getConfigElementName()); + if (nodes.size() < 1) { + throw std::invalid_argument("no schedulerClientFactory element"); + } + Ptr::Ref scf + = SchedulerClientFactory::getInstance(); + scf->configure( *((const xmlpp::Element*) *(nodes.begin())) ); + + schedulerClient = scf->getSchedulerClient(); } diff --git a/livesupport/products/gLiveSupport/src/GLiveSupport.h b/livesupport/products/gLiveSupport/src/GLiveSupport.h index b3911cd23..f673c3e16 100644 --- a/livesupport/products/gLiveSupport/src/GLiveSupport.h +++ b/livesupport/products/gLiveSupport/src/GLiveSupport.h @@ -22,7 +22,7 @@ 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 $ ------------------------------------------------------------------------------*/ @@ -47,11 +47,13 @@ #include "LiveSupport/Core/Ptr.h" #include "LiveSupport/Core/Configurable.h" #include "LiveSupport/Core/AuthenticationClientInterface.h" +#include "LiveSupport/SchedulerClient/SchedulerClientInterface.h" namespace LiveSupport { namespace GLiveSupport { using namespace LiveSupport::Core; +using namespace LiveSupport::SchedulerClient; /* ================================================================ constants */ @@ -70,17 +72,20 @@ using namespace LiveSupport::Core; * *

  *  
+ *                                         authenticationClientFactory,
+ *                                         schedulerClientFactory) >
  *  
* - * For a description of the resourceBundle and - * authenticationClientFactory elements see their + * For a description of the resourceBundle, + * authenticationClientFactory and + * schedulerClientFactory elements see their * respective documentation. * * @author $Author: maroy $ - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ * @see LocalizedObject#getBundle(const xmlpp::Element &) * @see AuthenticationClientFactory + * @see SchedulerClientFactory */ class GLiveSupport : public Configurable, public boost::enable_shared_from_this @@ -101,6 +106,11 @@ class GLiveSupport : public Configurable, */ Ptr::Ref authentication; + /** + * The scheduler client, used to access the scheduler daemon. + */ + Ptr::Ref schedulerClient; + /** * The session id for the user. */