From dfbb545e6ec0942e36a3b3aef197c3306c74491b Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Fri, 22 Mar 2013 10:53:10 +0000 Subject: [PATCH] Incluindo metodo para obter a versao da extensão --- src/oxt/get.cxx | 6 ++++++ src/oxt/globals.hpp | 1 + src/oxt/pw3270.idl | 1 + 3 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/oxt/get.cxx b/src/oxt/get.cxx index 249d77d..875323e 100644 --- a/src/oxt/get.cxx +++ b/src/oxt/get.cxx @@ -39,6 +39,12 @@ sal_Int16 SAL_CALL pw3270::uno_impl::getRevision() throw (RuntimeException) return hSession->get_revision(); } +::rtl::OUString SAL_CALL pw3270::uno_impl::getVersion() throw (RuntimeException) +{ + const char *version = PACKAGE_VERSION; + return OUString(version, strlen(version), hSession->get_encoding(), RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE); +} + sal_Int16 SAL_CALL pw3270::uno_impl::getConnectionState( ) throw (::com::sun::star::uno::RuntimeException) { return hSession->get_state(); diff --git a/src/oxt/globals.hpp b/src/oxt/globals.hpp index eee83ba..49d77b5 100644 --- a/src/oxt/globals.hpp +++ b/src/oxt/globals.hpp @@ -145,6 +145,7 @@ // pw3270 implementation - Main virtual ::sal_Int16 SAL_CALL getRevision() throw (RuntimeException); + virtual ::rtl::OUString SAL_CALL getVersion( ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int16 SAL_CALL Connect( const ::rtl::OUString& hostinfo ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int16 SAL_CALL Disconnect( ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int16 SAL_CALL getConnectionState( ) throw (::com::sun::star::uno::RuntimeException); diff --git a/src/oxt/pw3270.idl b/src/oxt/pw3270.idl index 79a5363..78b5b84 100644 --- a/src/oxt/pw3270.idl +++ b/src/oxt/pw3270.idl @@ -75,6 +75,7 @@ module br /* Misc */ short getRevision(); + string getVersion(); short log([in] string msg); short sleep([in] short seconds); boolean isReady(); -- libgit2 0.21.2