Commit 0b0e5b0ee94f585653ccfa6cfb3cd4de6b2c5da0

Authored by perry.werneck@gmail.com
1 parent 5aa8fb79

Mudando o nome do módulo oxt para openoffice

@@ -570,7 +570,7 @@ AC_CONFIG_FILES([ @@ -570,7 +570,7 @@ AC_CONFIG_FILES([
570 src/lib3270/Makefile 570 src/lib3270/Makefile
571 src/lib3270/mkversion.sh 571 src/lib3270/mkversion.sh
572 src/pw3270/Makefile 572 src/pw3270/Makefile
573 - src/oxt/Makefile 573 + src/openoffice/Makefile
574 src/pw3270/uiparser/Makefile 574 src/pw3270/uiparser/Makefile
575 src/tools/Makefile 575 src/tools/Makefile
576 src/plugins/hllapi/Makefile 576 src/plugins/hllapi/Makefile
src/openoffice/Makefile.in 0 → 100644
@@ -0,0 +1,141 @@ @@ -0,0 +1,141 @@
  1 +#
  2 +# "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
  3 +# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
  4 +# aplicativos mainframe. Registro no INPI sob o nome G3270.
  5 +#
  6 +# Copyright (C) <2008> <Banco do Brasil S.A.>
  7 +#
  8 +# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
  9 +# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
  10 +# Free Software Foundation.
  11 +#
  12 +# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
  13 +# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
  14 +# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
  15 +# obter mais detalhes.
  16 +#
  17 +# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
  18 +# programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
  19 +# Place, Suite 330, Boston, MA, 02111-1307, USA
  20 +#
  21 +# Contatos:
  22 +#
  23 +# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
  24 +# erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça)
  25 +#
  26 +
  27 +SOURCES=info.cc get.cc service.cc init.cc
  28 +
  29 +UNO_CLASSES=XWeak RuntimeException
  30 +
  31 +#---[ LibreOffice SDK ]--------------------------------------------------------
  32 +
  33 +OO_SDK_HOME=@OO_SDK_HOME@
  34 +OO_SDK_URE_HOME=@OO_SDK_URE_HOME@
  35 +IDLC=@IDLC@
  36 +REGMERGE=@REGMERGE@
  37 +CPPUMAKER=@CPPUMAKER@
  38 +TYPES_RDB=@OO_SDK_URE_HOME@/share/misc/types.rdb
  39 +
  40 +#---[ Paths ]------------------------------------------------------------------
  41 +
  42 +prefix=@prefix@
  43 +exec_prefix=@exec_prefix@
  44 +bindir=@bindir@
  45 +sbindir=@sbindir@
  46 +libdir=@libdir@
  47 +includedir=@includedir@
  48 +
  49 +#---[ Tools ]------------------------------------------------------------------
  50 +
  51 +CXX=@CXX@
  52 +MKDIR=@MKDIR_P@
  53 +
  54 +#---[ lib3270 common class ]---------------------------------------------------
  55 +
  56 +CLASSLIBDIR=../classlib
  57 +include $(CLASSLIBDIR)/class.mak
  58 +
  59 +#---[ lib3270 common class ]---------------------------------------------------
  60 +
  61 +OBJDIR=.obj
  62 +BINDIR=.bin
  63 +
  64 +OBJDBG=$(OBJDIR)/Debug
  65 +BINDBG=$(BINDIR)/Debug
  66 +
  67 +OBJRLS=$(OBJDIR)/Release
  68 +BINRLS=$(BINDIR)/Release
  69 +
  70 +#---[ Build options ]----------------------------------------------------------
  71 +
  72 +CPPUENV="gcc3"
  73 +CXXFLAGS=@CXXFLAGS@ -fvisibility=hidden @DLL_CFLAGS@ -Wno-strict-aliasing -I./include -I$(includedir)/libreoffice -Wno-strict-aliasing -DCPPU_ENV=$(CPPUENV) -DLANGUAGE_BINDING_NAME=\"$(CPPUENV)\"
  74 +
  75 +OO_LDFLAGS=-L$(OO_SDK_HOME)/lib -L$(OO_SDK_URE_HOME)/lib \
  76 + -Wl,-rpath-link=$(OO_SDK_URE_HOME)/lib,-rpath=$(OO_SDK_URE_HOME)/lib \
  77 + -luno_cppu -luno_cppuhelpergcc3 -luno_salhelpergcc3
  78 +
  79 +#---[ Rules ]------------------------------------------------------------------
  80 +
  81 +%.urd: %.idl
  82 + @echo $@ ...
  83 + @$(MKDIR) `dirname $@`
  84 + @$(IDLC) -C -I$(OO_SDK_HOME)/idl -O`dirname $@` $<
  85 +
  86 +%.urd: /usr/share/idl/libreoffice/com/sun/star/uno/%.idl
  87 + @echo $@ ...
  88 + @$(MKDIR) `dirname $@`
  89 + @$(IDLC) -C -I$(OO_SDK_HOME)/idl -O`dirname $@` $<
  90 +
  91 +%.rdb: %.urd
  92 + @echo $@ ...
  93 + @$(MKDIR) `dirname $@`
  94 + @$(REGMERGE) $@ /UCR $<
  95 +
  96 +$(OBJDBG)/%.o: %.cc include/pw3270/lib3270.hpp \
  97 + $(foreach CLS, $(basename $(UNO_CLASSES)), include/com/sun/star/uno/$(CLS).hpp) \
  98 + *.hpp Makefile
  99 + @echo $< ...
  100 + @mkdir -p `dirname $@`
  101 + $(CXX) -DDEBUG=1 $(CXXFLAGS) -o $@ -c $<
  102 +# $(DBG_CFLAGS) $(CXXFLAGS) $(LIB3270_CFLAGS) -DLIBNAME=\"$(BINDBG)/$(PROGRAM_NAME).uno@DLLEXT@\" -o $@ -c $<
  103 +
  104 +
  105 +#---[ UNO targets ]------------------------------------------------------------
  106 +
  107 +include/pw3270/lib3270.hpp: pw3270.rdb
  108 + @echo $@ ...
  109 + @$(MKDIR) `dirname $@`
  110 + @$(CPPUMAKER) -O./include -Tpw3270.lib3270 $(TYPES_RDB) $<
  111 +
  112 +include/com/sun/star/uno/%.hpp: %.rdb
  113 + @echo $@ ...
  114 + @$(MKDIR) `dirname $@`
  115 + @$(CPPUMAKER) -O./include $(TYPES_RDB) $<
  116 +
  117 +
  118 +#---[ Debug targets ]----------------------------------------------------------
  119 +
  120 +Debug: $(BINDBG)/pw3270.uno@DLLEXT@
  121 +
  122 +cleanDebug: clean
  123 +
  124 +$(BINDBG)/pw3270.uno@DLLEXT@: $(foreach SRC, $(basename $(SOURCES)), $(OBJDBG)/$(SRC)@OBJEXT@)
  125 + @echo $@ ...
  126 + @$(MKDIR) `dirname $@`
  127 + $(CXX) -shared $(LDFLAGS) $(OO_LDFLAGS) -o $@ $^
  128 +
  129 +
  130 +#---[ Misc targets ]-----------------------------------------------------------
  131 +
  132 +all: include/pw3270/lib3270.hpp
  133 +
  134 +clean:
  135 + @rm -f *.urd
  136 + @rm -f *.rdb
  137 + @rm -fr include
  138 + @rm -fr $(OBJDIR)
  139 + @rm -fr $(BINDIR)
  140 +
  141 +
src/openoffice/get.cc 0 → 100644
@@ -0,0 +1,71 @@ @@ -0,0 +1,71 @@
  1 +/*
  2 + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
  3 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
  4 + * aplicativos mainframe. Registro no INPI sob o nome G3270.
  5 + *
  6 + * Copyright (C) <2008> <Banco do Brasil S.A.>
  7 + *
  8 + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
  9 + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
  10 + * Free Software Foundation.
  11 + *
  12 + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
  13 + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
  14 + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
  15 + * obter mais detalhes.
  16 + *
  17 + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
  18 + * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
  19 + * Place, Suite 330, Boston, MA, 02111-1307, USA
  20 + *
  21 + * Este programa está nomeado como get.cc e possui - linhas de código.
  22 + *
  23 + * Contatos:
  24 + *
  25 + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
  26 + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
  27 + *
  28 + /*
  29 + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
  30 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
  31 + * aplicativos mainframe. Registro no INPI sob o nome G3270.
  32 + *
  33 + * Copyright (C) <2008> <Banco do Brasil S.A.>
  34 + *
  35 + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
  36 + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
  37 + * Free Software Foundation.
  38 + *
  39 + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
  40 + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
  41 + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
  42 + * obter mais detalhes.
  43 + *
  44 + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
  45 + * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
  46 + * Place, Suite 330, Boston, MA, 02111-1307, USA
  47 + *
  48 + * Este programa está nomeado como info.cc e possui - linhas de código.
  49 + *
  50 + * Contatos:
  51 + *
  52 + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
  53 + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
  54 + *
  55 + * Referência:
  56 + *
  57 + * https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Class_Definition_with_Helper_Template_Classes
  58 + *
  59 + */
  60 +
  61 + #include "globals.hpp"
  62 + #include "pw3270/lib3270.hpp"
  63 +
  64 +/*---[ Implement ]-----------------------------------------------------------------------------------------*/
  65 +
  66 + using namespace pw3270_impl;
  67 +
  68 + ::rtl::OUString session_impl::getVersion() throw (RuntimeException)
  69 + {
  70 + return OUString( RTL_CONSTASCII_USTRINGPARAM("Testing") );
  71 + }
src/openoffice/globals.hpp 0 → 100644
@@ -0,0 +1,92 @@ @@ -0,0 +1,92 @@
  1 +/*
  2 + * "Software PW3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
  3 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
  4 + * aplicativos mainframe. Registro no INPI sob o nome G3270.
  5 + *
  6 + * Copyright (C) <2008> <Banco do Brasil S.A.>
  7 + *
  8 + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
  9 + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
  10 + * Free Software Foundation.
  11 + *
  12 + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
  13 + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
  14 + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
  15 + * obter mais detalhes.
  16 + *
  17 + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
  18 + * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
  19 + * Place, Suite 330, Boston, MA, 02111-1307, USA
  20 + *
  21 + * Este programa está nomeado como globals.hpp e possui - linhas de código.
  22 + *
  23 + * Contatos:
  24 + *
  25 + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
  26 + * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça)
  27 + *
  28 + * Referências:
  29 + *
  30 + * https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/C%2B%2B_Component
  31 + *
  32 + *
  33 + */
  34 +
  35 +#ifndef PW3270_OXT_GLOBALS_HPP_INCLUDED
  36 +
  37 + #define PW3270_OXT_GLOBALS_HPP_INCLUDED 1
  38 +
  39 + #define CPPUENV "gcc3"
  40 +
  41 + #ifdef _WIN32
  42 + #define SAL_W32
  43 + #else
  44 + #define UNX 1
  45 + #define GCC 1
  46 + #define LINUX 1
  47 + #endif
  48 +
  49 +
  50 + #include <cppuhelper/implbase3.hxx> // "3" implementing three interfaces
  51 + #include <cppuhelper/factory.hxx>
  52 + #include <com/sun/star/lang/XInitialization.hpp>
  53 +// #include <cppuhelper/implementationentry.hxx>
  54 + #include <com/sun/star/lang/XServiceInfo.hpp>
  55 + #include <com/sun/star/uno/RuntimeException.hpp>
  56 +
  57 + #include <pw3270/lib3270.hpp>
  58 +
  59 +
  60 + using namespace ::rtl; // for OUString
  61 + using namespace ::com::sun::star; // for sdk interfaces
  62 + using namespace ::com::sun::star::lang; // for sdk interfaces
  63 + using namespace ::com::sun::star::uno; // for basic types
  64 +
  65 +
  66 + namespace pw3270_impl
  67 + {
  68 + // https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Class_Definition_with_Helper_Template_Classes
  69 + class session_impl : public ::cppu::WeakImplHelper3< ::pw3270::lib3270, XServiceInfo, XInitialization >
  70 + {
  71 + public:
  72 + // XInitialization will be called upon createInstanceWithArguments[AndContext]()
  73 + virtual void SAL_CALL initialize( Sequence< Any > const & args ) throw (Exception);
  74 +
  75 + // XServiceInfo
  76 + virtual OUString SAL_CALL getImplementationName() throw (RuntimeException);
  77 + virtual sal_Bool SAL_CALL supportsService( OUString const & serviceName ) throw (RuntimeException);
  78 + virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (RuntimeException);
  79 +
  80 + // lib3270
  81 + virtual ::rtl::OUString SAL_CALL getVersion() throw (RuntimeException);
  82 +
  83 + };
  84 +
  85 + extern Sequence< OUString > SAL_CALL getSupportedServiceNames_session_impl();
  86 + extern OUString SAL_CALL getImplementationName_session_impl();
  87 + extern Reference< XInterface > SAL_CALL create_session_impl(Reference< XComponentContext > const & xContext ) SAL_THROW( () );
  88 +
  89 + };
  90 +
  91 +
  92 +#endif // PW3270_OXT_GLOBALS_HPP_INCLUDED
src/openoffice/info.cc 0 → 100644
@@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
  1 +/*
  2 + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
  3 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
  4 + * aplicativos mainframe. Registro no INPI sob o nome G3270.
  5 + *
  6 + * Copyright (C) <2008> <Banco do Brasil S.A.>
  7 + *
  8 + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
  9 + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
  10 + * Free Software Foundation.
  11 + *
  12 + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
  13 + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
  14 + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
  15 + * obter mais detalhes.
  16 + *
  17 + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
  18 + * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
  19 + * Place, Suite 330, Boston, MA, 02111-1307, USA
  20 + *
  21 + * Este programa está nomeado como info.cc e possui - linhas de código.
  22 + *
  23 + * Contatos:
  24 + *
  25 + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
  26 + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
  27 + *
  28 + * Referência:
  29 + *
  30 + * https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Class_Definition_with_Helper_Template_Classes
  31 + *
  32 + */
  33 +
  34 + #include "globals.hpp"
  35 + #include "pw3270/lib3270.hpp"
  36 +
  37 +/*---[ Implement ]-----------------------------------------------------------------------------------------*/
  38 +
  39 +using namespace pw3270_impl;
  40 +
  41 +// XServiceInfo implementation
  42 +OUString session_impl::getImplementationName() throw (RuntimeException)
  43 +{
  44 + // unique implementation name
  45 + return OUString( RTL_CONSTASCII_USTRINGPARAM("pw3270.pw3270_impl.session") );
  46 +}
  47 +
  48 +sal_Bool session_impl::supportsService( OUString const & serviceName ) throw (RuntimeException)
  49 +{
  50 + // this object only supports one service, so the test is simple
  51 + return serviceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("pw3270.session") );
  52 +}
  53 +
  54 +Sequence< OUString > session_impl::getSupportedServiceNames() throw (RuntimeException)
  55 +{
  56 + return getSupportedServiceNames_session_impl();
  57 +}
  58 +
src/openoffice/init.cc 0 → 100644
@@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
  1 +/*
  2 + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
  3 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
  4 + * aplicativos mainframe. Registro no INPI sob o nome G3270.
  5 + *
  6 + * Copyright (C) <2008> <Banco do Brasil S.A.>
  7 + *
  8 + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
  9 + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
  10 + * Free Software Foundation.
  11 + *
  12 + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
  13 + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
  14 + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
  15 + * obter mais detalhes.
  16 + *
  17 + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
  18 + * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
  19 + * Place, Suite 330, Boston, MA, 02111-1307, USA
  20 + *
  21 + * Este programa está nomeado como init.cc e possui - linhas de código.
  22 + *
  23 + * Contatos:
  24 + *
  25 + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
  26 + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
  27 + *
  28 + * Referência:
  29 + *
  30 + * https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Create_Instance_with_Arguments
  31 + *
  32 + */
  33 +
  34 + #include "globals.hpp"
  35 + #include <com/sun/star/lang/IllegalArgumentException.hpp>
  36 + #include "pw3270/lib3270.hpp"
  37 +
  38 +/*---[ Implement ]-----------------------------------------------------------------------------------------*/
  39 +
  40 +using namespace pw3270_impl;
  41 +
  42 +// XInitialization implementation
  43 +void session_impl::initialize( Sequence< Any > const & args ) throw (Exception)
  44 +{
  45 + if (1 != args.getLength())
  46 + {
  47 + throw lang::IllegalArgumentException(
  48 + OUString( RTL_CONSTASCII_USTRINGPARAM("give a string instanciating this component!") ),
  49 + (::cppu::OWeakObject *)this,
  50 + 0 );
  51 + }
  52 +
  53 + // Initialize
  54 +
  55 +}
src/openoffice/loffice3270.cbp 0 → 100644
@@ -0,0 +1,57 @@ @@ -0,0 +1,57 @@
  1 +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
  2 +<CodeBlocks_project_file>
  3 + <FileVersion major="1" minor="6" />
  4 + <Project>
  5 + <Option title="pw3270 LibreOffice" />
  6 + <Option makefile_is_custom="1" />
  7 + <Option pch_mode="2" />
  8 + <Option compiler="gcc" />
  9 + <Build>
  10 + <Target title="Debug">
  11 + <Option output=".bin/Debug/pw3270 LibreOffice" prefix_auto="1" extension_auto="1" />
  12 + <Option object_output=".obj/Debug/" />
  13 + <Option type="1" />
  14 + <Option compiler="gcc" />
  15 + <Compiler>
  16 + <Add option="-g" />
  17 + </Compiler>
  18 + </Target>
  19 + <Target title="Release">
  20 + <Option output=".bin/Release/pw3270 LibreOffice" prefix_auto="1" extension_auto="1" />
  21 + <Option object_output=".obj/Release/" />
  22 + <Option type="1" />
  23 + <Option compiler="gcc" />
  24 + <Compiler>
  25 + <Add option="-O2" />
  26 + </Compiler>
  27 + <Linker>
  28 + <Add option="-s" />
  29 + </Linker>
  30 + </Target>
  31 + </Build>
  32 + <Compiler>
  33 + <Add option="-Wall" />
  34 + </Compiler>
  35 + <Unit filename="../classlib/class.mak.in" />
  36 + <Unit filename="../classlib/exception.cc" />
  37 + <Unit filename="../classlib/local.cc" />
  38 + <Unit filename="../classlib/remote.cc" />
  39 + <Unit filename="../classlib/session.cc" />
  40 + <Unit filename="Makefile.in" />
  41 + <Unit filename="get.cc" />
  42 + <Unit filename="globals.hpp" />
  43 + <Unit filename="include/pw3270/lib3270.hdl" />
  44 + <Unit filename="include/pw3270/lib3270.hpp" />
  45 + <Unit filename="info.cc" />
  46 + <Unit filename="init.cc" />
  47 + <Unit filename="pw3270.idl" />
  48 + <Unit filename="service.cc" />
  49 + <Unit filename="testprogram.cc" />
  50 + <Extensions>
  51 + <code_completion />
  52 + <envvars />
  53 + <debugger />
  54 + <lib_finder disable_auto="1" />
  55 + </Extensions>
  56 + </Project>
  57 +</CodeBlocks_project_file>
src/openoffice/pw3270.idl 0 → 100644
@@ -0,0 +1,54 @@ @@ -0,0 +1,54 @@
  1 +/*
  2 + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
  3 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
  4 + * aplicativos mainframe. Registro no INPI sob o nome G3270.
  5 + *
  6 + * Copyright (C) <2008> <Banco do Brasil S.A.>
  7 + *
  8 + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
  9 + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
  10 + * Free Software Foundation.
  11 + *
  12 + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
  13 + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
  14 + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
  15 + * obter mais detalhes.
  16 + *
  17 + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
  18 + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
  19 + * St, Fifth Floor, Boston, MA 02110-1301 USA
  20 + *
  21 + * Este programa está nomeado como pw3270.idl e possui - linhas de código.
  22 + *
  23 + * Contatos:
  24 + *
  25 + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
  26 + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
  27 + *
  28 + *
  29 + * Referências:
  30 + *
  31 + * https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C++/C++_Component
  32 + *
  33 + */
  34 +
  35 +#include <com/sun/star/uno/XInterface.idl>
  36 +#include <com/sun/star/lang/XInitialization.idl>
  37 +
  38 +module pw3270
  39 +{
  40 + /*
  41 + * Interface to lib3270
  42 + */
  43 + interface lib3270 : com::sun::star::uno::XInterface
  44 + {
  45 + string getVersion();
  46 + };
  47 +
  48 + service session
  49 + {
  50 + interface lib3270;
  51 + interface com::sun::star::lang::XInitialization;
  52 + };
  53 +};
  54 +
src/openoffice/research.sh 0 → 100755
@@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
  1 +#!/bin/bash
  2 +
  3 +OO_SDK_HOME=/usr/lib64/libreoffice/sdk
  4 +IDLC=/usr/lib64/libreoffice/sdk/bin/idlc
  5 +CPPUMAKER=/usr/lib64/libreoffice/sdk/bin/cppumaker
  6 +TYPES_RDB=/usr/lib64/libreoffice/ure/share/misc/types.rdb
  7 +REGMERGE=/usr/lib64/libreoffice/ure/bin/regmerge
  8 +
  9 +$IDLC -C -I$OO_SDK_HOME/idl -O. pw3270.idl
  10 +if [ "$?" != "0" ]; then
  11 + exit -1
  12 +fi
  13 +
  14 +
  15 +$REGMERGE pw3270.rdb /UCR pw3270.urd
  16 +if [ "$?" != "0" ]; then
  17 + exit -1
  18 +fi
  19 +
  20 +
  21 +$CPPUMAKER -O./include -Tpw3270.lib3270 $TYPES_RDB pw3270.rdb
  22 +if [ "$?" != "0" ]; then
  23 + exit -1
  24 +fi
  25 +
  26 +# XWeak
  27 +$IDLC -C -I$OO_SDK_HOME/idl -O. /usr/share/idl/libreoffice/com/sun/star/uno/XWeak.idl
  28 +if [ "$?" != "0" ]; then
  29 + exit -1
  30 +fi
  31 +
  32 +$REGMERGE XWeak.rdb /UCR XWeak.urd
  33 +if [ "$?" != "0" ]; then
  34 + exit -1
  35 +fi
  36 +
  37 +$CPPUMAKER -O./include $TYPES_RDB XWeak.rdb
  38 +if [ "$?" != "0" ]; then
  39 + exit -1
  40 +fi
  41 +
  42 +
  43 +echo ok
  44 +
src/openoffice/service.cc 0 → 100644
@@ -0,0 +1,100 @@ @@ -0,0 +1,100 @@
  1 +/*
  2 + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
  3 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
  4 + * aplicativos mainframe. Registro no INPI sob o nome G3270.
  5 + *
  6 + * Copyright (C) <2008> <Banco do Brasil S.A.>
  7 + *
  8 + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
  9 + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
  10 + * Free Software Foundation.
  11 + *
  12 + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
  13 + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
  14 + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
  15 + * obter mais detalhes.
  16 + *
  17 + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
  18 + * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
  19 + * Place, Suite 330, Boston, MA, 02111-1307, USA
  20 + *
  21 + * Este programa está nomeado como info.cc e possui - linhas de código.
  22 + *
  23 + * Contatos:
  24 + *
  25 + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
  26 + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
  27 + *
  28 + * Referência:
  29 + *
  30 + * https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Providing_a_Single_Factory_Using_a_Helper_Method
  31 + *
  32 + */
  33 +
  34 + #include "globals.hpp"
  35 + #include <cppuhelper/implementationentry.hxx>
  36 + #include "pw3270/lib3270.hpp"
  37 +
  38 +/*---[ Implement ]-----------------------------------------------------------------------------------------*/
  39 +
  40 +using namespace pw3270_impl;
  41 +
  42 +Sequence< OUString > SAL_CALL getSupportedServiceNames_session_impl()
  43 +{
  44 + Sequence<OUString> names(1);
  45 + names[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("pw3270.session"));
  46 + return names;
  47 +}
  48 +
  49 +OUString SAL_CALL getImplementationName_session_impl()
  50 +{
  51 + return OUString( RTL_CONSTASCII_USTRINGPARAM("pw3270.lib3270.session") );
  52 +}
  53 +
  54 +Reference< XInterface > SAL_CALL create_session_impl(Reference< XComponentContext > const & xContext ) SAL_THROW( () )
  55 +{
  56 + return static_cast< lang::XTypeProvider * >( new session_impl() );
  57 +}
  58 +
  59 +namespace pw3270_impl
  60 +{
  61 + static struct ::cppu::ImplementationEntry s_component_entries [] =
  62 + {
  63 + {
  64 + create_session_impl,
  65 + getImplementationName_session_impl,
  66 + getSupportedServiceNames_session_impl,
  67 + ::cppu::createSingleComponentFactory,
  68 + 0,
  69 + 0
  70 + },
  71 + {
  72 + 0,
  73 + 0,
  74 + 0,
  75 + 0,
  76 + 0,
  77 + 0
  78 + }
  79 + };
  80 +
  81 +}
  82 +
  83 +extern "C"
  84 +{
  85 + __attribute__((visibility("default"))) void * SAL_CALL component_getFactory(sal_Char const * implName, lang::XMultiServiceFactory * xMgr,registry::XRegistryKey * xRegistry )
  86 + {
  87 + return ::cppu::component_getFactoryHelper(implName, xMgr, xRegistry, ::pw3270_impl::s_component_entries );
  88 + }
  89 +
  90 + __attribute__((visibility("default"))) sal_Bool SAL_CALL component_writeInfo(lang::XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry )
  91 + {
  92 + return ::cppu::component_writeInfoHelper(xMgr, xRegistry, ::pw3270_impl::s_component_entries );
  93 + }
  94 +
  95 + __attribute__((visibility("default"))) void SAL_CALL component_getImplementationEnvironment(sal_Char const ** ppEnvTypeName, uno_Environment ** ppEnv )
  96 + {
  97 + * ppEnvTypeName = LANGUAGE_BINDING_NAME;
  98 + }
  99 +
  100 +}
src/openoffice/testprogram.cc 0 → 100644
@@ -0,0 +1,133 @@ @@ -0,0 +1,133 @@
  1 +/*
  2 + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
  3 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
  4 + * aplicativos mainframe. Registro no INPI sob o nome G3270.
  5 + *
  6 + * Copyright (C) <2008> <Banco do Brasil S.A.>
  7 + *
  8 + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
  9 + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
  10 + * Free Software Foundation.
  11 + *
  12 + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
  13 + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
  14 + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
  15 + * obter mais detalhes.
  16 + *
  17 + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
  18 + * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
  19 + * Place, Suite 330, Boston, MA, 02111-1307, USA
  20 + *
  21 + * Este programa está nomeado como testprogram.cc e possui - linhas de código.
  22 + *
  23 + * Contatos:
  24 + *
  25 + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
  26 + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
  27 + *
  28 + */
  29 +
  30 + #include "globals.hpp"
  31 + #include "pw3270/lib3270.hpp"
  32 +
  33 +/*---[ Implement ]-----------------------------------------------------------------------------------------*/
  34 +
  35 +int SAL_CALL main(int argc, char **argv)
  36 +{
  37 +/*
  38 +
  39 + Reference< XSimpleRegistry > xReg = createSimpleRegistry();
  40 +
  41 + OSL_ENSURE( xReg.is(), "### cannot get service instance of \"SimpleRegistry\"!" );
  42 +
  43 + xReg->open(OUString::createFromAscii("pw3270.rdb"), sal_False, sal_False);
  44 +
  45 + OSL_ENSURE( xReg->isValid(), "### cannot open test registry \"pw3270.rdb\"!" );
  46 +
  47 +
  48 + TRACE("%s","Calling bootstrap_InitialComponentContext");
  49 + Reference< XComponentContext > xContext = bootstrap_InitialComponentContext(xReg);
  50 + OSL_ENSURE( xContext.is(), "### cannot creage intial component context!" );
  51 +
  52 + TRACE("%s","Calling getServiceManager\n");
  53 + Reference< XMultiComponentFactory > xMgr = xContext->getServiceManager();
  54 + OSL_ENSURE( xMgr.is(), "### cannot get initial service manager!" );
  55 +
  56 + // register my component
  57 + TRACE("%s","Calling createInstanceWithContext");
  58 +
  59 + Reference< XImplementationRegistration > xImplReg(
  60 + xMgr->createInstanceWithContext(OUString::createFromAscii("com.sun.star.registry.ImplementationRegistration"), xContext), UNO_QUERY);
  61 + OSL_ENSURE( xImplReg.is(), "### cannot get service instance of \"com.sun.star.registry.ImplementationRegistration\"!" );
  62 +
  63 + if (xImplReg.is())
  64 + {
  65 + const char *libname = LIBNAME;
  66 +
  67 + TRACE("Loading %s",libname);
  68 +
  69 + xImplReg->registerImplementation(
  70 + OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), // loader for component
  71 + OUString::createFromAscii(libname), // component location
  72 + Reference< XSimpleRegistry >() // registry omitted,
  73 + // defaulting to service manager registry used
  74 + );
  75 +
  76 + // get an object instance
  77 + printf("Calling createInstanceWithContext(%s)\n",IMPLNAME);
  78 +
  79 + Reference< XInterface > xx ;
  80 + xx = xMgr->createInstanceWithContext(OUString::createFromAscii(IMPLNAME), xContext);
  81 +
  82 + printf("Instance: %p\n",&xx);
  83 +
  84 + Reference< pw3270intf > srv( xx, UNO_QUERY );
  85 +
  86 + OSL_ENSURE( srv.is(), "### cannot get service instance!");
  87 +
  88 + printf("object.is(): %d\n",srv.is());
  89 +
  90 + if(srv.is())
  91 + {
  92 + // Wait for commands
  93 + OString str;
  94 + char buffer[80];
  95 + printf("getConnectionState: %d\n", srv->getConnectionState());
  96 +
  97 + str = OUStringToOString( srv->getVersion(),RTL_TEXTENCODING_UTF8);
  98 + printf("Version:\t%s\n",str.pData->buffer);
  99 +
  100 + str = OUStringToOString( srv->getRevision(),RTL_TEXTENCODING_UTF8);
  101 + printf("Revision:\t%s\n",str.pData->buffer);
  102 +
  103 + printf("Connect(): %d\n" , srv->Connect(OUString::createFromAscii("L:3270.df.bb:9023"),10));
  104 +
  105 + sleep(5);
  106 +
  107 + //str = OUStringToOString( srv->getScreenContentAt(20,39,5),RTL_TEXTENCODING_UTF8);
  108 + //Trace("ContentsAt(20,39): \"%s\"",str.pData->buffer);
  109 + printf("waitForStringAt(SISBB) returned %d\n",srv->waitForStringAt(20,39,OUString::createFromAscii("SISBB"),20));
  110 + printf("sendEnterKey() returned %d\n",srv->sendEnterKey());
  111 + printf("waitForStringAt(Senha) returned %d\n",srv->waitForStringAt(14,2,OUString::createFromAscii("Senha"),20));
  112 + printf("setStringAt returned %d\n",srv->setStringAt(13,21,OUString::createFromAscii("c1103788")));
  113 +
  114 + str = OUStringToOString( srv->getScreenContent(),RTL_TEXTENCODING_UTF8);
  115 + printf("Entire screen:\n%s\n",str.pData->buffer);
  116 +
  117 + printf("Enter to exit...\n");
  118 + fgets(buffer,80,stdin);
  119 +
  120 + printf("Disconnect(): %d\n" , srv->Disconnect());
  121 +
  122 + sleep(5);
  123 +
  124 + }
  125 + }
  126 +
  127 +
  128 + Reference< XComponent >::query( xContext )->dispose();
  129 +
  130 +*/
  131 +
  132 + return 0;
  133 +}
src/oxt/Makefile.in
@@ -1,141 +0,0 @@ @@ -1,141 +0,0 @@
1 -#  
2 -# "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
3 -# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
4 -# aplicativos mainframe. Registro no INPI sob o nome G3270.  
5 -#  
6 -# Copyright (C) <2008> <Banco do Brasil S.A.>  
7 -#  
8 -# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
9 -# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
10 -# Free Software Foundation.  
11 -#  
12 -# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
13 -# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
14 -# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
15 -# obter mais detalhes.  
16 -#  
17 -# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
18 -# programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple  
19 -# Place, Suite 330, Boston, MA, 02111-1307, USA  
20 -#  
21 -# Contatos:  
22 -#  
23 -# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
24 -# erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça)  
25 -#  
26 -  
27 -SOURCES=info.cc get.cc service.cc init.cc  
28 -  
29 -UNO_CLASSES=XWeak RuntimeException  
30 -  
31 -#---[ LibreOffice SDK ]--------------------------------------------------------  
32 -  
33 -OO_SDK_HOME=@OO_SDK_HOME@  
34 -OO_SDK_URE_HOME=@OO_SDK_URE_HOME@  
35 -IDLC=@IDLC@  
36 -REGMERGE=@REGMERGE@  
37 -CPPUMAKER=@CPPUMAKER@  
38 -TYPES_RDB=@OO_SDK_URE_HOME@/share/misc/types.rdb  
39 -  
40 -#---[ Paths ]------------------------------------------------------------------  
41 -  
42 -prefix=@prefix@  
43 -exec_prefix=@exec_prefix@  
44 -bindir=@bindir@  
45 -sbindir=@sbindir@  
46 -libdir=@libdir@  
47 -includedir=@includedir@  
48 -  
49 -#---[ Tools ]------------------------------------------------------------------  
50 -  
51 -CXX=@CXX@  
52 -MKDIR=@MKDIR_P@  
53 -  
54 -#---[ lib3270 common class ]---------------------------------------------------  
55 -  
56 -CLASSLIBDIR=../classlib  
57 -include $(CLASSLIBDIR)/class.mak  
58 -  
59 -#---[ lib3270 common class ]---------------------------------------------------  
60 -  
61 -OBJDIR=.obj  
62 -BINDIR=.bin  
63 -  
64 -OBJDBG=$(OBJDIR)/Debug  
65 -BINDBG=$(BINDIR)/Debug  
66 -  
67 -OBJRLS=$(OBJDIR)/Release  
68 -BINRLS=$(BINDIR)/Release  
69 -  
70 -#---[ Build options ]----------------------------------------------------------  
71 -  
72 -CPPUENV="gcc3"  
73 -CXXFLAGS=@CXXFLAGS@ -fvisibility=hidden @DLL_CFLAGS@ -Wno-strict-aliasing -I./include -I$(includedir)/libreoffice -Wno-strict-aliasing -DCPPU_ENV=$(CPPUENV) -DLANGUAGE_BINDING_NAME=\"$(CPPUENV)\"  
74 -  
75 -OO_LDFLAGS=-L$(OO_SDK_HOME)/lib -L$(OO_SDK_URE_HOME)/lib \  
76 - -Wl,-rpath-link=$(OO_SDK_URE_HOME)/lib,-rpath=$(OO_SDK_URE_HOME)/lib \  
77 - -luno_cppu -luno_cppuhelpergcc3 -luno_salhelpergcc3  
78 -  
79 -#---[ Rules ]------------------------------------------------------------------  
80 -  
81 -%.urd: %.idl  
82 - @echo $@ ...  
83 - @$(MKDIR) `dirname $@`  
84 - @$(IDLC) -C -I$(OO_SDK_HOME)/idl -O`dirname $@` $<  
85 -  
86 -%.urd: /usr/share/idl/libreoffice/com/sun/star/uno/%.idl  
87 - @echo $@ ...  
88 - @$(MKDIR) `dirname $@`  
89 - @$(IDLC) -C -I$(OO_SDK_HOME)/idl -O`dirname $@` $<  
90 -  
91 -%.rdb: %.urd  
92 - @echo $@ ...  
93 - @$(MKDIR) `dirname $@`  
94 - @$(REGMERGE) $@ /UCR $<  
95 -  
96 -$(OBJDBG)/%.o: %.cc include/pw3270/lib3270.hpp \  
97 - $(foreach CLS, $(basename $(UNO_CLASSES)), include/com/sun/star/uno/$(CLS).hpp) \  
98 - *.hpp Makefile  
99 - @echo $< ...  
100 - @mkdir -p `dirname $@`  
101 - $(CXX) -DDEBUG=1 $(CXXFLAGS) -o $@ -c $<  
102 -# $(DBG_CFLAGS) $(CXXFLAGS) $(LIB3270_CFLAGS) -DLIBNAME=\"$(BINDBG)/$(PROGRAM_NAME).uno@DLLEXT@\" -o $@ -c $<  
103 -  
104 -  
105 -#---[ UNO targets ]------------------------------------------------------------  
106 -  
107 -include/pw3270/lib3270.hpp: pw3270.rdb  
108 - @echo $@ ...  
109 - @$(MKDIR) `dirname $@`  
110 - @$(CPPUMAKER) -O./include -Tpw3270.lib3270 $(TYPES_RDB) $<  
111 -  
112 -include/com/sun/star/uno/%.hpp: %.rdb  
113 - @echo $@ ...  
114 - @$(MKDIR) `dirname $@`  
115 - @$(CPPUMAKER) -O./include $(TYPES_RDB) $<  
116 -  
117 -  
118 -#---[ Debug targets ]----------------------------------------------------------  
119 -  
120 -Debug: $(BINDBG)/pw3270.uno@DLLEXT@  
121 -  
122 -cleanDebug: clean  
123 -  
124 -$(BINDBG)/pw3270.uno@DLLEXT@: $(foreach SRC, $(basename $(SOURCES)), $(OBJDBG)/$(SRC)@OBJEXT@)  
125 - @echo $@ ...  
126 - @$(MKDIR) `dirname $@`  
127 - $(CXX) -shared $(LDFLAGS) $(OO_LDFLAGS) -o $@ $^  
128 -  
129 -  
130 -#---[ Misc targets ]-----------------------------------------------------------  
131 -  
132 -all: include/pw3270/lib3270.hpp  
133 -  
134 -clean:  
135 - @rm -f *.urd  
136 - @rm -f *.rdb  
137 - @rm -fr include  
138 - @rm -fr $(OBJDIR)  
139 - @rm -fr $(BINDIR)  
140 -  
141 -  
src/oxt/get.cc
@@ -1,71 +0,0 @@ @@ -1,71 +0,0 @@
1 -/*  
2 - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
3 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
4 - * aplicativos mainframe. Registro no INPI sob o nome G3270.  
5 - *  
6 - * Copyright (C) <2008> <Banco do Brasil S.A.>  
7 - *  
8 - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
9 - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
10 - * Free Software Foundation.  
11 - *  
12 - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
13 - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
14 - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
15 - * obter mais detalhes.  
16 - *  
17 - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
18 - * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple  
19 - * Place, Suite 330, Boston, MA, 02111-1307, USA  
20 - *  
21 - * Este programa está nomeado como get.cc e possui - linhas de código.  
22 - *  
23 - * Contatos:  
24 - *  
25 - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
26 - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)  
27 - *  
28 - /*  
29 - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
30 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
31 - * aplicativos mainframe. Registro no INPI sob o nome G3270.  
32 - *  
33 - * Copyright (C) <2008> <Banco do Brasil S.A.>  
34 - *  
35 - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
36 - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
37 - * Free Software Foundation.  
38 - *  
39 - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
40 - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
41 - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
42 - * obter mais detalhes.  
43 - *  
44 - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
45 - * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple  
46 - * Place, Suite 330, Boston, MA, 02111-1307, USA  
47 - *  
48 - * Este programa está nomeado como info.cc e possui - linhas de código.  
49 - *  
50 - * Contatos:  
51 - *  
52 - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
53 - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)  
54 - *  
55 - * Referência:  
56 - *  
57 - * https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Class_Definition_with_Helper_Template_Classes  
58 - *  
59 - */  
60 -  
61 - #include "globals.hpp"  
62 - #include "pw3270/lib3270.hpp"  
63 -  
64 -/*---[ Implement ]-----------------------------------------------------------------------------------------*/  
65 -  
66 - using namespace pw3270_impl;  
67 -  
68 - ::rtl::OUString session_impl::getVersion() throw (RuntimeException)  
69 - {  
70 - return OUString( RTL_CONSTASCII_USTRINGPARAM("Testing") );  
71 - }  
src/oxt/globals.hpp
@@ -1,92 +0,0 @@ @@ -1,92 +0,0 @@
1 -/*  
2 - * "Software PW3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
3 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
4 - * aplicativos mainframe. Registro no INPI sob o nome G3270.  
5 - *  
6 - * Copyright (C) <2008> <Banco do Brasil S.A.>  
7 - *  
8 - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
9 - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
10 - * Free Software Foundation.  
11 - *  
12 - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
13 - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
14 - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
15 - * obter mais detalhes.  
16 - *  
17 - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
18 - * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple  
19 - * Place, Suite 330, Boston, MA, 02111-1307, USA  
20 - *  
21 - * Este programa está nomeado como globals.hpp e possui - linhas de código.  
22 - *  
23 - * Contatos:  
24 - *  
25 - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
26 - * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça)  
27 - *  
28 - * Referências:  
29 - *  
30 - * https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/C%2B%2B_Component  
31 - *  
32 - *  
33 - */  
34 -  
35 -#ifndef PW3270_OXT_GLOBALS_HPP_INCLUDED  
36 -  
37 - #define PW3270_OXT_GLOBALS_HPP_INCLUDED 1  
38 -  
39 - #define CPPUENV "gcc3"  
40 -  
41 - #ifdef _WIN32  
42 - #define SAL_W32  
43 - #else  
44 - #define UNX 1  
45 - #define GCC 1  
46 - #define LINUX 1  
47 - #endif  
48 -  
49 -  
50 - #include <cppuhelper/implbase3.hxx> // "3" implementing three interfaces  
51 - #include <cppuhelper/factory.hxx>  
52 - #include <com/sun/star/lang/XInitialization.hpp>  
53 -// #include <cppuhelper/implementationentry.hxx>  
54 - #include <com/sun/star/lang/XServiceInfo.hpp>  
55 - #include <com/sun/star/uno/RuntimeException.hpp>  
56 -  
57 - #include <pw3270/lib3270.hpp>  
58 -  
59 -  
60 - using namespace ::rtl; // for OUString  
61 - using namespace ::com::sun::star; // for sdk interfaces  
62 - using namespace ::com::sun::star::lang; // for sdk interfaces  
63 - using namespace ::com::sun::star::uno; // for basic types  
64 -  
65 -  
66 - namespace pw3270_impl  
67 - {  
68 - // https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Class_Definition_with_Helper_Template_Classes  
69 - class session_impl : public ::cppu::WeakImplHelper3< ::pw3270::lib3270, XServiceInfo, XInitialization >  
70 - {  
71 - public:  
72 - // XInitialization will be called upon createInstanceWithArguments[AndContext]()  
73 - virtual void SAL_CALL initialize( Sequence< Any > const & args ) throw (Exception);  
74 -  
75 - // XServiceInfo  
76 - virtual OUString SAL_CALL getImplementationName() throw (RuntimeException);  
77 - virtual sal_Bool SAL_CALL supportsService( OUString const & serviceName ) throw (RuntimeException);  
78 - virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (RuntimeException);  
79 -  
80 - // lib3270  
81 - virtual ::rtl::OUString SAL_CALL getVersion() throw (RuntimeException);  
82 -  
83 - };  
84 -  
85 - extern Sequence< OUString > SAL_CALL getSupportedServiceNames_session_impl();  
86 - extern OUString SAL_CALL getImplementationName_session_impl();  
87 - extern Reference< XInterface > SAL_CALL create_session_impl(Reference< XComponentContext > const & xContext ) SAL_THROW( () );  
88 -  
89 - };  
90 -  
91 -  
92 -#endif // PW3270_OXT_GLOBALS_HPP_INCLUDED  
src/oxt/info.cc
@@ -1,58 +0,0 @@ @@ -1,58 +0,0 @@
1 -/*  
2 - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
3 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
4 - * aplicativos mainframe. Registro no INPI sob o nome G3270.  
5 - *  
6 - * Copyright (C) <2008> <Banco do Brasil S.A.>  
7 - *  
8 - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
9 - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
10 - * Free Software Foundation.  
11 - *  
12 - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
13 - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
14 - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
15 - * obter mais detalhes.  
16 - *  
17 - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
18 - * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple  
19 - * Place, Suite 330, Boston, MA, 02111-1307, USA  
20 - *  
21 - * Este programa está nomeado como info.cc e possui - linhas de código.  
22 - *  
23 - * Contatos:  
24 - *  
25 - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
26 - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)  
27 - *  
28 - * Referência:  
29 - *  
30 - * https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Class_Definition_with_Helper_Template_Classes  
31 - *  
32 - */  
33 -  
34 - #include "globals.hpp"  
35 - #include "pw3270/lib3270.hpp"  
36 -  
37 -/*---[ Implement ]-----------------------------------------------------------------------------------------*/  
38 -  
39 -using namespace pw3270_impl;  
40 -  
41 -// XServiceInfo implementation  
42 -OUString session_impl::getImplementationName() throw (RuntimeException)  
43 -{  
44 - // unique implementation name  
45 - return OUString( RTL_CONSTASCII_USTRINGPARAM("pw3270.pw3270_impl.session") );  
46 -}  
47 -  
48 -sal_Bool session_impl::supportsService( OUString const & serviceName ) throw (RuntimeException)  
49 -{  
50 - // this object only supports one service, so the test is simple  
51 - return serviceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("pw3270.session") );  
52 -}  
53 -  
54 -Sequence< OUString > session_impl::getSupportedServiceNames() throw (RuntimeException)  
55 -{  
56 - return getSupportedServiceNames_session_impl();  
57 -}  
58 -  
src/oxt/init.cc
@@ -1,55 +0,0 @@ @@ -1,55 +0,0 @@
1 -/*  
2 - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
3 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
4 - * aplicativos mainframe. Registro no INPI sob o nome G3270.  
5 - *  
6 - * Copyright (C) <2008> <Banco do Brasil S.A.>  
7 - *  
8 - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
9 - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
10 - * Free Software Foundation.  
11 - *  
12 - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
13 - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
14 - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
15 - * obter mais detalhes.  
16 - *  
17 - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
18 - * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple  
19 - * Place, Suite 330, Boston, MA, 02111-1307, USA  
20 - *  
21 - * Este programa está nomeado como init.cc e possui - linhas de código.  
22 - *  
23 - * Contatos:  
24 - *  
25 - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
26 - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)  
27 - *  
28 - * Referência:  
29 - *  
30 - * https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Create_Instance_with_Arguments  
31 - *  
32 - */  
33 -  
34 - #include "globals.hpp"  
35 - #include <com/sun/star/lang/IllegalArgumentException.hpp>  
36 - #include "pw3270/lib3270.hpp"  
37 -  
38 -/*---[ Implement ]-----------------------------------------------------------------------------------------*/  
39 -  
40 -using namespace pw3270_impl;  
41 -  
42 -// XInitialization implementation  
43 -void session_impl::initialize( Sequence< Any > const & args ) throw (Exception)  
44 -{  
45 - if (1 != args.getLength())  
46 - {  
47 - throw lang::IllegalArgumentException(  
48 - OUString( RTL_CONSTASCII_USTRINGPARAM("give a string instanciating this component!") ),  
49 - (::cppu::OWeakObject *)this,  
50 - 0 );  
51 - }  
52 -  
53 - // Initialize  
54 -  
55 -}  
src/oxt/loffice3270.cbp
@@ -1,57 +0,0 @@ @@ -1,57 +0,0 @@
1 -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>  
2 -<CodeBlocks_project_file>  
3 - <FileVersion major="1" minor="6" />  
4 - <Project>  
5 - <Option title="pw3270 LibreOffice" />  
6 - <Option makefile_is_custom="1" />  
7 - <Option pch_mode="2" />  
8 - <Option compiler="gcc" />  
9 - <Build>  
10 - <Target title="Debug">  
11 - <Option output=".bin/Debug/pw3270 LibreOffice" prefix_auto="1" extension_auto="1" />  
12 - <Option object_output=".obj/Debug/" />  
13 - <Option type="1" />  
14 - <Option compiler="gcc" />  
15 - <Compiler>  
16 - <Add option="-g" />  
17 - </Compiler>  
18 - </Target>  
19 - <Target title="Release">  
20 - <Option output=".bin/Release/pw3270 LibreOffice" prefix_auto="1" extension_auto="1" />  
21 - <Option object_output=".obj/Release/" />  
22 - <Option type="1" />  
23 - <Option compiler="gcc" />  
24 - <Compiler>  
25 - <Add option="-O2" />  
26 - </Compiler>  
27 - <Linker>  
28 - <Add option="-s" />  
29 - </Linker>  
30 - </Target>  
31 - </Build>  
32 - <Compiler>  
33 - <Add option="-Wall" />  
34 - </Compiler>  
35 - <Unit filename="../classlib/class.mak.in" />  
36 - <Unit filename="../classlib/exception.cc" />  
37 - <Unit filename="../classlib/local.cc" />  
38 - <Unit filename="../classlib/remote.cc" />  
39 - <Unit filename="../classlib/session.cc" />  
40 - <Unit filename="Makefile.in" />  
41 - <Unit filename="get.cc" />  
42 - <Unit filename="globals.hpp" />  
43 - <Unit filename="include/pw3270/lib3270.hdl" />  
44 - <Unit filename="include/pw3270/lib3270.hpp" />  
45 - <Unit filename="info.cc" />  
46 - <Unit filename="init.cc" />  
47 - <Unit filename="pw3270.idl" />  
48 - <Unit filename="service.cc" />  
49 - <Unit filename="testprogram.cc" />  
50 - <Extensions>  
51 - <code_completion />  
52 - <envvars />  
53 - <debugger />  
54 - <lib_finder disable_auto="1" />  
55 - </Extensions>  
56 - </Project>  
57 -</CodeBlocks_project_file>  
src/oxt/pw3270.idl
@@ -1,54 +0,0 @@ @@ -1,54 +0,0 @@
1 -/*  
2 - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
3 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
4 - * aplicativos mainframe. Registro no INPI sob o nome G3270.  
5 - *  
6 - * Copyright (C) <2008> <Banco do Brasil S.A.>  
7 - *  
8 - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
9 - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
10 - * Free Software Foundation.  
11 - *  
12 - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
13 - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
14 - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
15 - * obter mais detalhes.  
16 - *  
17 - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
18 - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin  
19 - * St, Fifth Floor, Boston, MA 02110-1301 USA  
20 - *  
21 - * Este programa está nomeado como pw3270.idl e possui - linhas de código.  
22 - *  
23 - * Contatos:  
24 - *  
25 - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
26 - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)  
27 - *  
28 - *  
29 - * Referências:  
30 - *  
31 - * https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C++/C++_Component  
32 - *  
33 - */  
34 -  
35 -#include <com/sun/star/uno/XInterface.idl>  
36 -#include <com/sun/star/lang/XInitialization.idl>  
37 -  
38 -module pw3270  
39 -{  
40 - /*  
41 - * Interface to lib3270  
42 - */  
43 - interface lib3270 : com::sun::star::uno::XInterface  
44 - {  
45 - string getVersion();  
46 - };  
47 -  
48 - service session  
49 - {  
50 - interface lib3270;  
51 - interface com::sun::star::lang::XInitialization;  
52 - };  
53 -};  
54 -  
src/oxt/research.sh
@@ -1,44 +0,0 @@ @@ -1,44 +0,0 @@
1 -#!/bin/bash  
2 -  
3 -OO_SDK_HOME=/usr/lib64/libreoffice/sdk  
4 -IDLC=/usr/lib64/libreoffice/sdk/bin/idlc  
5 -CPPUMAKER=/usr/lib64/libreoffice/sdk/bin/cppumaker  
6 -TYPES_RDB=/usr/lib64/libreoffice/ure/share/misc/types.rdb  
7 -REGMERGE=/usr/lib64/libreoffice/ure/bin/regmerge  
8 -  
9 -$IDLC -C -I$OO_SDK_HOME/idl -O. pw3270.idl  
10 -if [ "$?" != "0" ]; then  
11 - exit -1  
12 -fi  
13 -  
14 -  
15 -$REGMERGE pw3270.rdb /UCR pw3270.urd  
16 -if [ "$?" != "0" ]; then  
17 - exit -1  
18 -fi  
19 -  
20 -  
21 -$CPPUMAKER -O./include -Tpw3270.lib3270 $TYPES_RDB pw3270.rdb  
22 -if [ "$?" != "0" ]; then  
23 - exit -1  
24 -fi  
25 -  
26 -# XWeak  
27 -$IDLC -C -I$OO_SDK_HOME/idl -O. /usr/share/idl/libreoffice/com/sun/star/uno/XWeak.idl  
28 -if [ "$?" != "0" ]; then  
29 - exit -1  
30 -fi  
31 -  
32 -$REGMERGE XWeak.rdb /UCR XWeak.urd  
33 -if [ "$?" != "0" ]; then  
34 - exit -1  
35 -fi  
36 -  
37 -$CPPUMAKER -O./include $TYPES_RDB XWeak.rdb  
38 -if [ "$?" != "0" ]; then  
39 - exit -1  
40 -fi  
41 -  
42 -  
43 -echo ok  
44 -  
src/oxt/service.cc
@@ -1,100 +0,0 @@ @@ -1,100 +0,0 @@
1 -/*  
2 - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
3 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
4 - * aplicativos mainframe. Registro no INPI sob o nome G3270.  
5 - *  
6 - * Copyright (C) <2008> <Banco do Brasil S.A.>  
7 - *  
8 - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
9 - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
10 - * Free Software Foundation.  
11 - *  
12 - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
13 - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
14 - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
15 - * obter mais detalhes.  
16 - *  
17 - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
18 - * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple  
19 - * Place, Suite 330, Boston, MA, 02111-1307, USA  
20 - *  
21 - * Este programa está nomeado como info.cc e possui - linhas de código.  
22 - *  
23 - * Contatos:  
24 - *  
25 - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
26 - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)  
27 - *  
28 - * Referência:  
29 - *  
30 - * https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Providing_a_Single_Factory_Using_a_Helper_Method  
31 - *  
32 - */  
33 -  
34 - #include "globals.hpp"  
35 - #include <cppuhelper/implementationentry.hxx>  
36 - #include "pw3270/lib3270.hpp"  
37 -  
38 -/*---[ Implement ]-----------------------------------------------------------------------------------------*/  
39 -  
40 -using namespace pw3270_impl;  
41 -  
42 -Sequence< OUString > SAL_CALL getSupportedServiceNames_session_impl()  
43 -{  
44 - Sequence<OUString> names(1);  
45 - names[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("pw3270.session"));  
46 - return names;  
47 -}  
48 -  
49 -OUString SAL_CALL getImplementationName_session_impl()  
50 -{  
51 - return OUString( RTL_CONSTASCII_USTRINGPARAM("pw3270.lib3270.session") );  
52 -}  
53 -  
54 -Reference< XInterface > SAL_CALL create_session_impl(Reference< XComponentContext > const & xContext ) SAL_THROW( () )  
55 -{  
56 - return static_cast< lang::XTypeProvider * >( new session_impl() );  
57 -}  
58 -  
59 -namespace pw3270_impl  
60 -{  
61 - static struct ::cppu::ImplementationEntry s_component_entries [] =  
62 - {  
63 - {  
64 - create_session_impl,  
65 - getImplementationName_session_impl,  
66 - getSupportedServiceNames_session_impl,  
67 - ::cppu::createSingleComponentFactory,  
68 - 0,  
69 - 0  
70 - },  
71 - {  
72 - 0,  
73 - 0,  
74 - 0,  
75 - 0,  
76 - 0,  
77 - 0  
78 - }  
79 - };  
80 -  
81 -}  
82 -  
83 -extern "C"  
84 -{  
85 - __attribute__((visibility("default"))) void * SAL_CALL component_getFactory(sal_Char const * implName, lang::XMultiServiceFactory * xMgr,registry::XRegistryKey * xRegistry )  
86 - {  
87 - return ::cppu::component_getFactoryHelper(implName, xMgr, xRegistry, ::pw3270_impl::s_component_entries );  
88 - }  
89 -  
90 - __attribute__((visibility("default"))) sal_Bool SAL_CALL component_writeInfo(lang::XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry )  
91 - {  
92 - return ::cppu::component_writeInfoHelper(xMgr, xRegistry, ::pw3270_impl::s_component_entries );  
93 - }  
94 -  
95 - __attribute__((visibility("default"))) void SAL_CALL component_getImplementationEnvironment(sal_Char const ** ppEnvTypeName, uno_Environment ** ppEnv )  
96 - {  
97 - * ppEnvTypeName = LANGUAGE_BINDING_NAME;  
98 - }  
99 -  
100 -}  
src/oxt/testprogram.cc
@@ -1,133 +0,0 @@ @@ -1,133 +0,0 @@
1 -/*  
2 - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
3 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
4 - * aplicativos mainframe. Registro no INPI sob o nome G3270.  
5 - *  
6 - * Copyright (C) <2008> <Banco do Brasil S.A.>  
7 - *  
8 - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
9 - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
10 - * Free Software Foundation.  
11 - *  
12 - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
13 - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
14 - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
15 - * obter mais detalhes.  
16 - *  
17 - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
18 - * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple  
19 - * Place, Suite 330, Boston, MA, 02111-1307, USA  
20 - *  
21 - * Este programa está nomeado como testprogram.cc e possui - linhas de código.  
22 - *  
23 - * Contatos:  
24 - *  
25 - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
26 - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)  
27 - *  
28 - */  
29 -  
30 - #include "globals.hpp"  
31 - #include "pw3270/lib3270.hpp"  
32 -  
33 -/*---[ Implement ]-----------------------------------------------------------------------------------------*/  
34 -  
35 -int SAL_CALL main(int argc, char **argv)  
36 -{  
37 -/*  
38 -  
39 - Reference< XSimpleRegistry > xReg = createSimpleRegistry();  
40 -  
41 - OSL_ENSURE( xReg.is(), "### cannot get service instance of \"SimpleRegistry\"!" );  
42 -  
43 - xReg->open(OUString::createFromAscii("pw3270.rdb"), sal_False, sal_False);  
44 -  
45 - OSL_ENSURE( xReg->isValid(), "### cannot open test registry \"pw3270.rdb\"!" );  
46 -  
47 -  
48 - TRACE("%s","Calling bootstrap_InitialComponentContext");  
49 - Reference< XComponentContext > xContext = bootstrap_InitialComponentContext(xReg);  
50 - OSL_ENSURE( xContext.is(), "### cannot creage intial component context!" );  
51 -  
52 - TRACE("%s","Calling getServiceManager\n");  
53 - Reference< XMultiComponentFactory > xMgr = xContext->getServiceManager();  
54 - OSL_ENSURE( xMgr.is(), "### cannot get initial service manager!" );  
55 -  
56 - // register my component  
57 - TRACE("%s","Calling createInstanceWithContext");  
58 -  
59 - Reference< XImplementationRegistration > xImplReg(  
60 - xMgr->createInstanceWithContext(OUString::createFromAscii("com.sun.star.registry.ImplementationRegistration"), xContext), UNO_QUERY);  
61 - OSL_ENSURE( xImplReg.is(), "### cannot get service instance of \"com.sun.star.registry.ImplementationRegistration\"!" );  
62 -  
63 - if (xImplReg.is())  
64 - {  
65 - const char *libname = LIBNAME;  
66 -  
67 - TRACE("Loading %s",libname);  
68 -  
69 - xImplReg->registerImplementation(  
70 - OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), // loader for component  
71 - OUString::createFromAscii(libname), // component location  
72 - Reference< XSimpleRegistry >() // registry omitted,  
73 - // defaulting to service manager registry used  
74 - );  
75 -  
76 - // get an object instance  
77 - printf("Calling createInstanceWithContext(%s)\n",IMPLNAME);  
78 -  
79 - Reference< XInterface > xx ;  
80 - xx = xMgr->createInstanceWithContext(OUString::createFromAscii(IMPLNAME), xContext);  
81 -  
82 - printf("Instance: %p\n",&xx);  
83 -  
84 - Reference< pw3270intf > srv( xx, UNO_QUERY );  
85 -  
86 - OSL_ENSURE( srv.is(), "### cannot get service instance!");  
87 -  
88 - printf("object.is(): %d\n",srv.is());  
89 -  
90 - if(srv.is())  
91 - {  
92 - // Wait for commands  
93 - OString str;  
94 - char buffer[80];  
95 - printf("getConnectionState: %d\n", srv->getConnectionState());  
96 -  
97 - str = OUStringToOString( srv->getVersion(),RTL_TEXTENCODING_UTF8);  
98 - printf("Version:\t%s\n",str.pData->buffer);  
99 -  
100 - str = OUStringToOString( srv->getRevision(),RTL_TEXTENCODING_UTF8);  
101 - printf("Revision:\t%s\n",str.pData->buffer);  
102 -  
103 - printf("Connect(): %d\n" , srv->Connect(OUString::createFromAscii("L:3270.df.bb:9023"),10));  
104 -  
105 - sleep(5);  
106 -  
107 - //str = OUStringToOString( srv->getScreenContentAt(20,39,5),RTL_TEXTENCODING_UTF8);  
108 - //Trace("ContentsAt(20,39): \"%s\"",str.pData->buffer);  
109 - printf("waitForStringAt(SISBB) returned %d\n",srv->waitForStringAt(20,39,OUString::createFromAscii("SISBB"),20));  
110 - printf("sendEnterKey() returned %d\n",srv->sendEnterKey());  
111 - printf("waitForStringAt(Senha) returned %d\n",srv->waitForStringAt(14,2,OUString::createFromAscii("Senha"),20));  
112 - printf("setStringAt returned %d\n",srv->setStringAt(13,21,OUString::createFromAscii("c1103788")));  
113 -  
114 - str = OUStringToOString( srv->getScreenContent(),RTL_TEXTENCODING_UTF8);  
115 - printf("Entire screen:\n%s\n",str.pData->buffer);  
116 -  
117 - printf("Enter to exit...\n");  
118 - fgets(buffer,80,stdin);  
119 -  
120 - printf("Disconnect(): %d\n" , srv->Disconnect());  
121 -  
122 - sleep(5);  
123 -  
124 - }  
125 - }  
126 -  
127 -  
128 - Reference< XComponent >::query( xContext )->dispose();  
129 -  
130 -*/  
131 -  
132 - return 0;  
133 -}