summaryrefslogtreecommitdiff
path: root/io/source/stm
diff options
context:
space:
mode:
authorJörg Budischewski <jbu@openoffice.org>2001-03-20 08:04:37 +0000
committerJörg Budischewski <jbu@openoffice.org>2001-03-20 08:04:37 +0000
commit1d778719557d2931fb507f4b6f03af68a641388c (patch)
tree9b86921e826c0d11578e985afd43a58631f25ff5 /io/source/stm
parente0352f699a8fa75c95364427997d403020ece10f (diff)
#85084# XServiceInfo added
Diffstat (limited to 'io/source/stm')
-rw-r--r--io/source/stm/opump.cxx44
1 files changed, 39 insertions, 5 deletions
diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx
index a948879c3346..f7524cd771b3 100644
--- a/io/source/stm/opump.cxx
+++ b/io/source/stm/opump.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: opump.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: jl $ $Date: 2001-03-12 15:51:38 $
+ * last change: $Author: jbu $ $Date: 2001-03-20 09:04:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -69,16 +69,18 @@
#include <com/sun/star/io/XConnectable.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <uno/dispatcher.h>
#include <uno/mapping.hxx>
-#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase5.hxx>
#include <cppuhelper/factory.hxx>
#include <osl/mutex.hxx>
#include <osl/thread.h>
#include <list>
+
using namespace osl;
using namespace std;
using namespace rtl;
@@ -88,10 +90,12 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::registry;
using namespace com::sun::star::io;
+#include "factreg.hxx"
+
namespace io_stm {
- class Pump : public WeakImplHelper4<
- XActiveDataSource, XActiveDataSink, XActiveDataControl, XConnectable >
+ class Pump : public WeakImplHelper5<
+ XActiveDataSource, XActiveDataSink, XActiveDataControl, XConnectable, XServiceInfo >
{
Mutex m_aMutex;
oslThread m_aThread;
@@ -132,6 +136,10 @@ namespace io_stm {
virtual void SAL_CALL setSuccessor( const Reference< ::com::sun::star::io::XConnectable >& xSucc ) throw();
virtual Reference< ::com::sun::star::io::XConnectable > SAL_CALL getSuccessor() throw();
+ public: // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() throw( );
+ virtual Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( );
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( );
};
Pump::Pump()
@@ -441,6 +449,32 @@ Reference< XOutputStream > Pump::getOutputStream() throw()
}
+// XServiceInfo
+OUString Pump::getImplementationName() throw( )
+{
+ return OPumpImpl_getImplementationName();
+}
+
+// XServiceInfo
+sal_Bool Pump::supportsService(const OUString& ServiceName) throw( )
+{
+ Sequence< OUString > aSNL = getSupportedServiceNames();
+ const OUString * pArray = aSNL.getConstArray();
+
+ for( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return sal_True;
+
+ return sal_False;
+}
+
+// XServiceInfo
+Sequence< OUString > Pump::getSupportedServiceNames(void) throw( )
+{
+ return OPumpImpl_getSupportedServiceNames();
+}
+
+
Reference< XInterface > SAL_CALL OPumpImpl_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw (Exception)
{
return Reference< XInterface >( *new Pump );