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