diff --git a/src/oxt/Makefile.in b/src/oxt/Makefile.in index c2513d0..f33175a 100644 --- a/src/oxt/Makefile.in +++ b/src/oxt/Makefile.in @@ -24,9 +24,12 @@ # erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) # +SOURCES=info.cc + #---[ LibreOffice SDK ]-------------------------------------------------------- OO_SDK_HOME=@OO_SDK_HOME@ +OO_SDK_URE_HOME=@OO_SDK_URE_HOME@ IDLC=@IDLC@ REGMERGE=@REGMERGE@ CPPUMAKER=@CPPUMAKER@ @@ -67,6 +70,10 @@ BINRLS=$(BINDIR)/Release CPPUENV="gcc3" CXXFLAGS=@CXXFLAGS@ -Wno-strict-aliasing -I./include -I$(includedir)/libreoffice -Wno-strict-aliasing -DCPPU_ENV=$(CPPUENV) -DLANGUAGE_BINDING_NAME=\"$(CPPUENV)\" +OO_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 \ + -luno_cppu -luno_cppuhelpergcc3 -luno_salhelpergcc3 + #---[ Rules ]------------------------------------------------------------------ %.urd: %.idl @@ -87,7 +94,7 @@ CXXFLAGS=@CXXFLAGS@ -Wno-strict-aliasing -I./include -I$(includedir)/libreoffice $(OBJDBG)/%.o: %.cc include/pw3270/lib3270.hpp include/com/sun/star/uno/XWeak.hpp *.hpp Makefile @echo $< ... @mkdir -p `dirname $@` - $(CXX) -DDEBUG=1 $(CXXFLAGS) -o $@ $< + $(CXX) -DDEBUG=1 $(CXXFLAGS) -o $@ -c $< # $(DBG_CFLAGS) $(CXXFLAGS) $(LIB3270_CFLAGS) -DLIBNAME=\"$(BINDBG)/$(PROGRAM_NAME).uno@DLLEXT@\" -o $@ -c $< @@ -106,10 +113,15 @@ include/com/sun/star/uno/%.hpp: %.rdb #---[ Debug targets ]---------------------------------------------------------- -Debug: $(OBJDBG)/testprogram.o +Debug: $(BINDBG)/pw3270.uno@DLLEXT@ cleanDebug: clean +$(BINDBG)/pw3270.uno@DLLEXT@: $(foreach SRC, $(basename $(SOURCES)), $(OBJDBG)/$(SRC)@OBJEXT@) + @echo $@ ... + @$(MKDIR) `dirname $@` + $(CXX) -shared $(LDFLAGS) $(OO_LDFLAGS) -o $@ $^ + #---[ Misc targets ]----------------------------------------------------------- diff --git a/src/oxt/globals.hpp b/src/oxt/globals.hpp index b0c8dd2..dbcd7bd 100644 --- a/src/oxt/globals.hpp +++ b/src/oxt/globals.hpp @@ -68,6 +68,22 @@ { }; + /* + // https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Implementing_without_Helpers + class session_impl : public ::pw3270::lib3270, lang::XServiceInfo + { + private: + oslInterlockedCount m_refcount; + public: + + inline session_impl() throw () : m_refcount( 0 ) { } + + // XInterface + virtual Any SAL_CALL queryInterface( Type const & type ) throw (RuntimeException); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + }; + */ }; diff --git a/src/oxt/info.cc b/src/oxt/info.cc new file mode 100644 index 0000000..de31a60 --- /dev/null +++ b/src/oxt/info.cc @@ -0,0 +1,60 @@ +/* + * "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 info.cc e possui - linhas de código. + * + * Contatos: + * + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) + * + * Referência: + * + * https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Class_Definition_with_Helper_Template_Classes + * + */ + + #include "globals.hpp" + #include "pw3270/lib3270.hpp" + +/*---[ Implement ]-----------------------------------------------------------------------------------------*/ + +using namespace pw3270_impl; + +/* +// XServiceInfo implementation +OUString session_impl::getImplementationName() throw (RuntimeException) +{ + // unique implementation name + return OUString( RTL_CONSTASCII_USTRINGPARAM("pw3270.pw3270_impl.session") ); +} + + +sal_Bool session_impl::supportsService( OUString const & serviceName ) throw (RuntimeException) +{ + // this object only supports one service, so the test is simple + return serviceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("pw3270.session") ); +} + +Sequence< OUString > session_impl::getSupportedServiceNames() throw (RuntimeException) +{ + return getSupportedServiceNames_pw3270_impl(); +} +*/ diff --git a/src/oxt/loffice3270.cbp b/src/oxt/loffice3270.cbp index f497258..57753e8 100644 --- a/src/oxt/loffice3270.cbp +++ b/src/oxt/loffice3270.cbp @@ -39,6 +39,7 @@ + -- libgit2 0.21.2