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