1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _XMLELEMENTWRAPPER_XMLSECIMPL_HXX 25 #define _XMLELEMENTWRAPPER_XMLSECIMPL_HXX 26 27 #include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp> 28 #include <com/sun/star/lang/XUnoTunnel.hpp> 29 #include <com/sun/star/lang/XInitialization.hpp> 30 #include <com/sun/star/lang/XServiceInfo.hpp> 31 #include <cppuhelper/implbase3.hxx> 32 33 #include <libxml/tree.h> 34 35 class XMLElementWrapper_XmlSecImpl : public cppu::WeakImplHelper3 36 < 37 com::sun::star::xml::wrapper::XXMLElementWrapper, 38 com::sun::star::lang::XUnoTunnel, 39 com::sun::star::lang::XServiceInfo 40 > 41 /****** XMLElementWrapper_XmlSecImpl.hxx/CLASS XMLElementWrapper_XmlSecImpl *** 42 * 43 * NAME 44 * XMLElementWrapper_XmlSecImpl -- Class to wrap a libxml2 node 45 * 46 * FUNCTION 47 * Used as a wrapper class to transfer a libxml2 node structure 48 * between different UNO components. 49 * 50 * HISTORY 51 * 05.01.2004 - Interface supported: XXMLElementWrapper, XUnoTunnel 52 * XServiceInfo 53 * 54 * AUTHOR 55 * Michael Mi 56 * Email: michael.mi@sun.com 57 ******************************************************************************/ 58 { 59 private: 60 /* the libxml2 node wrapped by this object */ 61 xmlNodePtr m_pElement; 62 63 public: 64 explicit XMLElementWrapper_XmlSecImpl(const xmlNodePtr pNode); ~XMLElementWrapper_XmlSecImpl()65 virtual ~XMLElementWrapper_XmlSecImpl() {}; 66 67 /* XXMLElementWrapper */ 68 69 /* com::sun::star::lang::XUnoTunnel */ 70 virtual sal_Int64 SAL_CALL getSomething( const com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ); 71 static com::sun::star::uno::Sequence < sal_Int8 > getUnoTunnelImplementationId( void ); 72 73 /* com::sun::star::lang::XServiceInfo */ 74 virtual rtl::OUString SAL_CALL getImplementationName( ); 75 virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& ServiceName ); 76 virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames( ); 77 78 public: 79 xmlNodePtr getNativeElement( ) const; 80 void setNativeElement(const xmlNodePtr pNode); 81 }; 82 83 rtl::OUString XMLElementWrapper_XmlSecImpl_getImplementationName(); 84 85 sal_Bool SAL_CALL XMLElementWrapper_XmlSecImpl_supportsService( const rtl::OUString& ServiceName ); 86 87 com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL XMLElementWrapper_XmlSecImpl_getSupportedServiceNames( ); 88 89 com::sun::star::uno::Reference< com::sun::star::uno::XInterface > 90 SAL_CALL XMLElementWrapper_XmlSecImpl_createInstance( 91 const com::sun::star::uno::Reference< 92 com::sun::star::lang::XMultiServiceFactory > & rSMgr); 93 94 #endif 95