Commit dfbb545e6ec0942e36a3b3aef197c3306c74491b

Authored by perry.werneck@gmail.com
1 parent deca6d67

Incluindo metodo para obter a versao da extensão

src/oxt/get.cxx
@@ -39,6 +39,12 @@ sal_Int16 SAL_CALL pw3270::uno_impl::getRevision() throw (RuntimeException) @@ -39,6 +39,12 @@ sal_Int16 SAL_CALL pw3270::uno_impl::getRevision() throw (RuntimeException)
39 return hSession->get_revision(); 39 return hSession->get_revision();
40 } 40 }
41 41
  42 +::rtl::OUString SAL_CALL pw3270::uno_impl::getVersion() throw (RuntimeException)
  43 +{
  44 + const char *version = PACKAGE_VERSION;
  45 + return OUString(version, strlen(version), hSession->get_encoding(), RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE);
  46 +}
  47 +
42 sal_Int16 SAL_CALL pw3270::uno_impl::getConnectionState( ) throw (::com::sun::star::uno::RuntimeException) 48 sal_Int16 SAL_CALL pw3270::uno_impl::getConnectionState( ) throw (::com::sun::star::uno::RuntimeException)
43 { 49 {
44 return hSession->get_state(); 50 return hSession->get_state();
src/oxt/globals.hpp
@@ -145,6 +145,7 @@ @@ -145,6 +145,7 @@
145 145
146 // pw3270 implementation - Main 146 // pw3270 implementation - Main
147 virtual ::sal_Int16 SAL_CALL getRevision() throw (RuntimeException); 147 virtual ::sal_Int16 SAL_CALL getRevision() throw (RuntimeException);
  148 + virtual ::rtl::OUString SAL_CALL getVersion( ) throw (::com::sun::star::uno::RuntimeException);
148 virtual ::sal_Int16 SAL_CALL Connect( const ::rtl::OUString& hostinfo ) throw (::com::sun::star::uno::RuntimeException); 149 virtual ::sal_Int16 SAL_CALL Connect( const ::rtl::OUString& hostinfo ) throw (::com::sun::star::uno::RuntimeException);
149 virtual ::sal_Int16 SAL_CALL Disconnect( ) throw (::com::sun::star::uno::RuntimeException); 150 virtual ::sal_Int16 SAL_CALL Disconnect( ) throw (::com::sun::star::uno::RuntimeException);
150 virtual ::sal_Int16 SAL_CALL getConnectionState( ) throw (::com::sun::star::uno::RuntimeException); 151 virtual ::sal_Int16 SAL_CALL getConnectionState( ) throw (::com::sun::star::uno::RuntimeException);
src/oxt/pw3270.idl
@@ -75,6 +75,7 @@ module br @@ -75,6 +75,7 @@ module br
75 75
76 /* Misc */ 76 /* Misc */
77 short getRevision(); 77 short getRevision();
  78 + string getVersion();
78 short log([in] string msg); 79 short log([in] string msg);
79 short sleep([in] short seconds); 80 short sleep([in] short seconds);
80 boolean isReady(); 81 boolean isReady();