diff --git a/Makefile.in b/Makefile.in index 5bd064d..70bedba 100644 --- a/Makefile.in +++ b/Makefile.in @@ -78,7 +78,7 @@ MAKENSIS=@MAKENSIS@ PLUGIN_RELEASE_ARGS=BINDIR="../../../$(BINDIR)" LIB3270_MODE=Release PLUGIN_DEBUG_ARGS=BINDIR="../../../$(BINDIR)" LIB3270_MODE=Debug - + #---[ Rules ]------------------------------------------------------------------ %.tar.bz2: %.tar @@ -329,6 +329,7 @@ clean: @make -C src/plugins/remotectl clean @make -C src/plugins/rx3270 clean @make -C src/plugins/dbus3270 clean + @make -C src/oxt clean @rm -f $(PACKAGE_NAME).png @rm -f $(PACKAGE_NAME)-logo.png @rm -f *.log diff --git a/configure.ac b/configure.ac index 88b00de..55f0e28 100644 --- a/configure.ac +++ b/configure.ac @@ -430,6 +430,7 @@ AC_CONFIG_FILES([ src/lib3270/Makefile src/lib3270/mkversion.sh src/pw3270/Makefile + src/oxt/Makefile src/pw3270/uiparser/Makefile src/tools/Makefile src/plugins/remotectl/Makefile diff --git a/src/oxt/Makefile.in b/src/oxt/Makefile.in new file mode 100644 index 0000000..3653b79 --- /dev/null +++ b/src/oxt/Makefile.in @@ -0,0 +1,113 @@ + +PACKAGE=@PACKAGE_NAME@ + +SOURCES=main.cxx + +prefix=/usr +exec_prefix=@exec_prefix@ +libdir=@libdir@ + +#---[ Paths ]------------------------------------------------------------------------------------------ +ROOTDIR ?= . +OBJDIR ?= $(ROOTDIR)/.obj +BINDIR ?= $(ROOTDIR)/.bin + +BINDBG ?= $(BINDIR)/Debug +BINRLS ?= $(BINDIR)/Release +LIBDBG ?= $(BINDIR)/Debug/lib + +OBJDBG = $(OBJDIR)/Debug +OBJRLS = $(OBJDIR)/Release + +#---[ Tools ]------------------------------------------------------------------------------------------ +MKDIR=@MKDIR_P@ +CXX=@CXX@ + +DBG_CFLAGS=-g -DDEBUG=1 +RLS_CFLAGS=-DNDEBUG=1 + +#---[ LibreOffice SDK ]-------------------------------------------------------------------------------- +COMID=gcc3 +OO_SDK_NAME=openoffice.org3.5_sdk +OFFICE_HOME=${libdir}/libreoffice +OO_SDK_HOME=${OFFICE_HOME}/sdk +OO_SDK_URE_HOME=${OFFICE_HOME}/ure +OO_SDK_URE_BIN_DIR=${OO_SDK_URE_HOME}/bin +OO_SDK_URE_LIB_DIR=${OO_SDK_URE_HOME}/lib + +TYPES_RDB=${OO_SDK_URE_HOME}/share/misc/types.rdb + +SALLIB=-luno_sal +CPPULIB=-luno_cppu +CPPUHELPERLIB=-luno_cppuhelper$(COMID) +SALHELPERLIB=-luno_salhelper$(COMID) +REGLIB=-lreg +STORELIB=-lstore + +# Libre office tools +IDLC=${OO_SDK_HOME}/bin/idlc +REGMERGE=${OO_SDK_URE_BIN_DIR}/regmerge +CPPUMAKER=${OO_SDK_HOME}/bin/cppumaker + +#---[ Rules ]------------------------------------------------------------------------------------------ + +DLL_CFLAGS=@DLL_CFLAGS@ +DLL_FLAGS=-shared + +CXXFLAGS=-Wno-strict-aliasing -I$(OBJDIR)/uno/include -I$(OO_SDK_HOME)/include -I$(OBJDIR)/uno/include/br/com/bb +LDFLAGS=-L${OO_SDK_HOME}/lib -L${OO_SDK_URE_HOME}/lib -Wl,-rpath-link=${OO_SDK_URE_HOME}/lib,-rpath=${OO_SDK_URE_HOME}/lib \ + $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) + +# CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE + + +$(OBJDBG)/%.o: %.cxx $(OBJDIR)/uno/include/br/com/bb/$(PACKAGE).hpp Makefile + @echo $< ... + @$(MKDIR) `dirname $@` + @$(CXX) $(DBG_CFLAGS) $(CXXFLAGS) $(DLL_CFLAGS) -o $@ -c $< + +%.urd: %.idl + @echo $< ... + @$(MKDIR) `dirname $@` + @$(IDLC) -C -I$(OO_SDK_HOME)/idl -O`dirname $@` $< + +%.uno.rdb: %.urd $(TYPES_RDB) + @echo $< ... + @mkdir -p `dirname $@` + @rm -f $@ + $(REGMERGE) -v $@ / $(TYPES_RDB) + $(REGMERGE) -v $@ /UCR $< + $(REGMERGE) -v $@ / $< + +#---[ Targets ]---------------------------------------------------------------------------------------- + +Debug: $(BINDBG)/testprogram + +run: $(BINDBG)/testprogram + @$(BINDBG)/testprogram + +$(BINDBG)/$(PACKAGE).uno@DLLEXT@: $(foreach SRC, $(basename $(SOURCES)), $(OBJDBG)/$(SRC).o) + @echo $@ ... + @$(MKDIR) -p `dirname $@` + @$(CXX) $(DLL_FLAGS) $(LDFLAGS) -o $@ $^ + +$(BINDBG)/testprogram: $(BINDBG)/$(PACKAGE).uno@DLLEXT@ $(OBJDBG)/testprogram.o + @echo $@ ... + @$(MKDIR) -p `dirname $@` + @$(CXX) $(LDFLAGS) -o $@ $(OBJDBG)/testprogram.o + +$(OBJDIR)/uno/include/br/com/bb/$(PACKAGE).hpp: $(PACKAGE).uno.rdb + @echo $< ... + @rm -fr $(OBJDIR)/uno/include + @$(MKDIR) $(OBJDIR)/uno/include + @$(CPPUMAKER) -O$(OBJDIR)/uno/include -L -BUCR $< + @touch $@ + +cleanDebug: clean + +clean: + @rm -f *.urd + @rm -f *.uno.rdb + @rm -fr $(OBJDIR) + @rm -fr $(BINDIR) + diff --git a/src/oxt/globals.hpp b/src/oxt/globals.hpp new file mode 100644 index 0000000..ccab70f --- /dev/null +++ b/src/oxt/globals.hpp @@ -0,0 +1,77 @@ + + +#ifndef GLOBALS_HPP_INCLUDED + + #define GLOBALS_HPP_INCLUDED 1 + #define UNX 1 + #define GCC 1 + #define LINUX 1 + #define CPPU_ENV gcc3 + #define HAVE_GCC_VISIBILITY_FEATURE 1 + #define LANGUAGE_BINDING_NAME "gcc3" + + #include + + #include + #include + + #include // "3" implementing three interfaces + #include + #include + + #include + #include + #include + + #include + + /*---[ Debug macros ]--------------------------------------------------------------------------------------*/ + + #ifdef DEBUG + #define trace(fmt, ... ) fprintf(stderr, "%s(%d) " fmt "\n", __FILE__, __LINE__, __VA_ARGS__ ); fflush(stderr); + #else + #define trace( fmt, ... ) /* fmt __VA_ARGS__ */ + #endif + + /*---[ Object implementation ]-----------------------------------------------------------------------------*/ + + #define IMPLNAME "br.com.bb.pw3270intf" + #define SERVICENAME "br.com.bb.pw3270" + + using namespace br::com::bb; + using namespace ::rtl; // for OUString + using namespace ::com::sun::star; // for sdk interfaces + using namespace ::com::sun::star::uno; // for basic types + + namespace pw3270 + { + + class uno_impl : public ::cppu::WeakImplHelper3< br::com::bb::pw3270intf, com::sun::star::lang::XServiceInfo, com::sun::star::lang::XInitialization > + { + public: + + uno_impl( const com::sun::star::uno::Reference< XComponentContext > & xContext ); + virtual ~uno_impl(); + + // XInitialization will be called upon createInstanceWithArguments[AndContext]() + virtual void SAL_CALL initialize( Sequence< Any > const & args ) throw (Exception); + + // XServiceInfo implementation + virtual OUString SAL_CALL getImplementationName( ) throw(RuntimeException); + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(RuntimeException); + virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(RuntimeException); + + // pw3270 implementation - Main + virtual sal_Int16 SAL_CALL getRevision() throw (RuntimeException); + + private: + + // H3270 *hSession; + + }; + + }; + + +#endif // GLOBALS_HPP_INCLUDED + diff --git a/src/oxt/main.cxx b/src/oxt/main.cxx new file mode 100644 index 0000000..b8d504b --- /dev/null +++ b/src/oxt/main.cxx @@ -0,0 +1,228 @@ +/* + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a + * aplicativos mainframe. Registro no INPI sob o nome G3270. + * + * Copyright (C) <2008> + * + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela + * Free Software Foundation. + * + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para + * obter mais detalhes. + * + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este + * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA, 02111-1307, USA + * + * Este programa está nomeado como main.cxx e possui - linhas de código. + * + * Contatos: + * + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) + * licinio@bb.com.br (Licínio Luis Branco) + * kraucer@bb.com.br (Kraucer Fernandes Mazuco) + * + */ + +#include "globals.hpp" + +#include +#include + +using namespace com::sun::star::registry; // for XRegistryKey +using namespace com::sun::star::lang; // for XSingleComponentFactory + +/*---[ Statics ]-------------------------------------------------------------------------------------------*/ + + + +/*---[ Implement ]-----------------------------------------------------------------------------------------*/ + +static Sequence< OUString > getSupportedServiceNames() +{ + Sequence names(1); + + trace("%s returns: %s",__FUNCTION__, SERVICENAME); + names[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME ) ); + + return names; +} + +static Reference< XInterface > SAL_CALL CreateInstance( const Reference< XComponentContext > & xContext ) +{ + return static_cast< XTypeProvider * >( new pw3270::uno_impl( xContext ) ); +} + +/*---[ Implement exported calls ]--------------------------------------------------------------------------*/ + +/************************************************************** + * Function to determine the environment of the implementation. + * + * If the environment is NOT session specific + * (needs no additional context), then this function + * should return the environment type name and leave ppEnv (0). + * + * @param ppEnvTypeName environment type name; + * string must be constant + * @param ppEnv function returns its environment + * if the environment is session specific, + * i.e. has special context + */ +extern "C" void SAL_CALL component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv) +{ +#ifdef LANGUAGE_BINDING_NAME + trace("%s set envtype to %s\n",__FUNCTION__,LANGUAGE_BINDING_NAME); + *ppEnvTypeName = LANGUAGE_BINDING_NAME; +#else + trace("%s set envtype to %s\n",__FUNCTION__,"msci"); + *ppEnvTypeName = "msci"; +#endif +} + +/************************************************************ + * Optional function to retrieve a component description. + * + * @return an XML formatted string containing a short + * component description + */ +// typedef const sal_Char * (SAL_CALL * component_getDescriptionFunc)(void); + +/********************************************************** + * Writes component registry info, at least writing the + * supported service names. + * + * @param pServiceManager a service manager + * (the type is XMultiServiceFactory + * to be used by the environment + * returned by + * component_getImplementationEnvironment) + * + * @param pRegistryKey a registry key + * (the type is XRegistryKey to be used + * by the environment returned by + * component_getImplementationEnvironment) + * + * @return true if everything went fine + */ +extern "C" sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void * pRegistryKey) +{ + sal_Bool result = sal_False; + + trace("%s",__FUNCTION__); + + if (pRegistryKey) + { + try + { + Reference< XRegistryKey > xNewKey( + reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( + OUString( RTL_CONSTASCII_USTRINGPARAM("/" IMPLNAME "/UNO/SERVICES") ) ) ); + + const Sequence< OUString > & rSNL = getSupportedServiceNames(); + const OUString * pArray = rSNL.getConstArray(); + + for ( sal_Int32 nPos = rSNL.getLength(); nPos--; ) + xNewKey->createKey( pArray[nPos] ); + + return sal_True; + } + catch (InvalidRegistryException &) + { + // we should not ignore exceptions + } + } + + return result; +} + +/********************************************************* + * Retrieves a factory to create component instances. + * + * @param pImplName desired implementation name + * + * @param pServiceManager a service manager + * (the type is XMultiServiceFactory + * to be used by the environment + * returned by + * component_getImplementationEnvironment) + * + * @param pRegistryKey a registry key + * (the type is XRegistryKey to be used + * by the environment returned by + * component_getImplementationEnvironment) + * + * @return acquired component factory + * (the type is XInterface to be used by the + * environment returned by + * component_getImplementationEnvironment) + */ +extern "C" void * SAL_CALL component_getFactory(const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey) +{ + void * pRet = 0; + + trace("%s",__FUNCTION__); + + if(pServiceManager && rtl_str_compare( pImplName, IMPLNAME ) == 0) + { + Reference< XSingleComponentFactory > xFactory( ::cppu::createSingleComponentFactory( + CreateInstance, OUString::createFromAscii( IMPLNAME ), getSupportedServiceNames() )); + + + if (xFactory.is()) + { + xFactory->acquire(); + pRet = xFactory.get(); + } + } + + return pRet; +} + +/*---[ Implement XInitialization ]-------------------------------------------------------------------------*/ + +void SAL_CALL pw3270::uno_impl::initialize( Sequence< Any > const & args ) throw (Exception) +{ + trace("%s",__FUNCTION__); +} + +/*---[ Implement XServiceInfo ]----------------------------------------------------------------------------*/ + +OUString SAL_CALL pw3270::uno_impl::getImplementationName( ) throw(RuntimeException) +{ + trace("%s",__FUNCTION__); + return OUString( RTL_CONSTASCII_USTRINGPARAM(IMPLNAME) ); +} + +sal_Bool SAL_CALL pw3270::uno_impl::supportsService( const OUString& ServiceName ) throw(RuntimeException) +{ + trace("%s",__FUNCTION__); + return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("IMPLNAME") ); +} + +Sequence< OUString > pw3270::uno_impl::getSupportedServiceNames() throw (RuntimeException) +{ + return getSupportedServiceNames(); +} + +/*---[ Implement pw3270 ]----------------------------------------------------------------------------------*/ + +pw3270::uno_impl::uno_impl( const Reference< XComponentContext > & xContext ) +{ + +} + +pw3270::uno_impl::~uno_impl() +{ + trace("%s: Object deleted",__FUNCTION__); +} + +sal_Int16 SAL_CALL pw3270::uno_impl::getRevision() throw (RuntimeException) +{ + return 0; +} + diff --git a/src/oxt/pw3270.idl b/src/oxt/pw3270.idl new file mode 100644 index 0000000..8f16610 --- /dev/null +++ b/src/oxt/pw3270.idl @@ -0,0 +1,71 @@ +/* + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a + * aplicativos mainframe. Registro no INPI sob o nome G3270. + * + * Copyright (C) <2008> + * + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela + * Free Software Foundation. + * + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para + * obter mais detalhes. + * + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin + * St, Fifth Floor, Boston, MA 02110-1301 USA + * + * Este programa está nomeado como pw3270.idl e possui - linhas de código. + * + * Contatos: + * + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) + * licinio@bb.com.br (Licínio Luis Branco) + * kraucer@bb.com.br (Kraucer Fernandes Mazuco) + * + */ + +#include +#include + +/* + + Referências: + + http://wiki.services.openoffice.org/wiki/IDL_Files_and_Cpp + http://wiki.services.openoffice.org/wiki/IDL_Files_and_Cpp#Specifying_an_interface + + */ + +module br +{ + module com + { + module bb + { + + /** + * Interface to pw3270. + * + * http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Bridge/Default_Mappings + * + */ + interface pw3270intf : com::sun::star::uno::XInterface + { + short getRevision(); + }; + + service pw3270 + { + // exported interfaces: + interface pw3270intf; + }; + + }; + }; +}; + diff --git a/src/oxt/pw3270OXT.cbp b/src/oxt/pw3270OXT.cbp new file mode 100644 index 0000000..dd64161 --- /dev/null +++ b/src/oxt/pw3270OXT.cbp @@ -0,0 +1,45 @@ + + + + + + diff --git a/src/oxt/testprogram.cxx b/src/oxt/testprogram.cxx new file mode 100644 index 0000000..061ac75 --- /dev/null +++ b/src/oxt/testprogram.cxx @@ -0,0 +1,148 @@ +/* + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a + * aplicativos mainframe. Registro no INPI sob o nome G3270. + * + * Copyright (C) <2008> + * + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela + * Free Software Foundation. + * + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para + * obter mais detalhes. + * + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este + * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA, 02111-1307, USA + * + * Este programa está nomeado como testprogram.cxx e possui - linhas de código. + * + * Contatos: + * + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) + * licinio@bb.com.br (Licínio Luis Branco) + * kraucer@bb.com.br (Kraucer Fernandes Mazuco) + * + */ + +#include +#ifdef WIN32 + #include + #define sleep(x) Sleep(x) +#endif + +#define trace( fmt, ... ) fprintf(stderr, "%s(%d) " fmt "\n", __FILE__, __LINE__, __VA_ARGS__ ); fflush(stderr); + +#include "globals.hpp" +#include +#include +#include +#include + +using namespace com::sun::star::registry; +using namespace com::sun::star::lang; +using namespace cppu; + +/*---[ Implement ]-----------------------------------------------------------------------------------------*/ + +int SAL_CALL main(int argc, char **argv) +{ + Reference< XSimpleRegistry > xReg = createSimpleRegistry(); + + OSL_ENSURE( xReg.is(), "### cannot get service instance of \"com.sun.star.regiystry.SimpleRegistry\"!" ); + + xReg->open(OUString::createFromAscii("pw3270.uno.rdb"), sal_False, sal_False); + + OSL_ENSURE( xReg->isValid(), "### cannot open test registry \"pw3270.uno.rdb\"!" ); + + trace("%s","Calling bootstrap_InitialComponentContext"); + Reference< XComponentContext > xContext = bootstrap_InitialComponentContext(xReg); + OSL_ENSURE( xContext.is(), "### cannot creage intial component context!" ); + + trace("%s","Calling getServiceManager\n"); + Reference< XMultiComponentFactory > xMgr = xContext->getServiceManager(); + OSL_ENSURE( xMgr.is(), "### cannot get initial service manager!" ); + + // register my component + trace("%s","Calling createInstanceWithContext"); + + Reference< XImplementationRegistration > xImplReg( + xMgr->createInstanceWithContext(OUString::createFromAscii("com.sun.star.registry.ImplementationRegistration"), xContext), UNO_QUERY); + OSL_ENSURE( xImplReg.is(), "### cannot get service instance of \"com.sun.star.registry.ImplementationRegistration\"!" ); + + if (xImplReg.is()) + { + const char *libname = ".bin/Debug/pw3270.uno.so"; + + trace("Loading %s",libname); + + xImplReg->registerImplementation( + OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), // loader for component + OUString::createFromAscii(libname), // component location + Reference< XSimpleRegistry >() // registry omitted, + // defaulting to service manager registry used + ); + + // get an object instance + printf("Calling createInstanceWithContext(%s)\n",IMPLNAME); + + Reference< XInterface > xx ; + xx = xMgr->createInstanceWithContext(OUString::createFromAscii(IMPLNAME), xContext); + + printf("Instance: %p\n",&xx); + + Reference< pw3270intf > srv( xx, UNO_QUERY ); + + OSL_ENSURE( srv.is(), "### cannot get service instance!"); + + printf("object.is(): %d\n",srv.is()); + + if(srv.is()) + { + // Wait for commands +// OString str; +// char buffer[80]; +// printf("getConnectionState: %d\n", srv->getConnectionState()); + +// str = OUStringToOString( srv->getVersion(),RTL_TEXTENCODING_UTF8); +// printf("Version:\t%s\n",str.pData->buffer); + + printf("Revision:\t%d\n",srv->getRevision()); + + // printf("Connect(): %d\n" , srv->Connect(OUString::createFromAscii("L:3270.df.bb:9023"),10)); + + // sleep(5); + + //str = OUStringToOString( srv->getScreenContentAt(20,39,5),RTL_TEXTENCODING_UTF8); + //Trace("ContentsAt(20,39): \"%s\"",str.pData->buffer); + + /* + printf("waitForStringAt(SISBB) returned %d\n",srv->waitForStringAt(20,39,OUString::createFromAscii("SISBB"),20)); + printf("sendEnterKey() returned %d\n",srv->sendEnterKey()); + printf("waitForStringAt(Senha) returned %d\n",srv->waitForStringAt(14,2,OUString::createFromAscii("Senha"),20)); + printf("setStringAt returned %d\n",srv->setStringAt(13,21,OUString::createFromAscii("c1103788"))); + + str = OUStringToOString( srv->getScreenContent(),RTL_TEXTENCODING_UTF8); + printf("Entire screen:\n%s\n",str.pData->buffer); + + printf("Enter to exit...\n"); + fgets(buffer,80,stdin); + + printf("Disconnect(): %d\n" , srv->Disconnect()); + + sleep(5); + + */ + + } + } + + + Reference< XComponent >::query( xContext )->dispose(); + + return 0; +} -- libgit2 0.21.2