xref: /trunk/main/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _XMLELEMENTWRAPPER_XMLSECIMPL_HXX
29 #define _XMLELEMENTWRAPPER_XMLSECIMPL_HXX
30 
31 #include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
32 #include <com/sun/star/lang/XUnoTunnel.hpp>
33 #include <com/sun/star/lang/XInitialization.hpp>
34 #include <com/sun/star/lang/XServiceInfo.hpp>
35 #include <cppuhelper/implbase3.hxx>
36 
37 #include <libxml/tree.h>
38 
39 class XMLElementWrapper_XmlSecImpl : public cppu::WeakImplHelper3
40 <
41     com::sun::star::xml::wrapper::XXMLElementWrapper,
42     com::sun::star::lang::XUnoTunnel,
43     com::sun::star::lang::XServiceInfo
44 >
45 /****** XMLElementWrapper_XmlSecImpl.hxx/CLASS XMLElementWrapper_XmlSecImpl ***
46  *
47  *   NAME
48  *  XMLElementWrapper_XmlSecImpl -- Class to wrap a libxml2 node
49  *
50  *   FUNCTION
51  *  Used as a wrapper class to transfer a libxml2 node structure
52  *  between different UNO components.
53  *
54  *   HISTORY
55  *  05.01.2004 -    Interface supported: XXMLElementWrapper, XUnoTunnel
56  *          XServiceInfo
57  *
58  *   AUTHOR
59  *  Michael Mi
60  *  Email: michael.mi@sun.com
61  ******************************************************************************/
62 {
63 private:
64     /* the libxml2 node wrapped by this object */
65     xmlNodePtr m_pElement;
66 
67 public:
68     explicit XMLElementWrapper_XmlSecImpl(const xmlNodePtr pNode);
69     virtual ~XMLElementWrapper_XmlSecImpl() {};
70 
71     /* XXMLElementWrapper */
72 
73     /* com::sun::star::lang::XUnoTunnel */
74     virtual sal_Int64 SAL_CALL getSomething( const com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier )
75         throw (com::sun::star::uno::RuntimeException);
76     static com::sun::star::uno::Sequence < sal_Int8 > getUnoTunnelImplementationId( void )
77         throw(com::sun::star::uno::RuntimeException);
78 
79     /* com::sun::star::lang::XServiceInfo */
80     virtual rtl::OUString SAL_CALL getImplementationName(  )
81         throw (com::sun::star::uno::RuntimeException);
82     virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& ServiceName )
83         throw (com::sun::star::uno::RuntimeException);
84     virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(  )
85         throw (com::sun::star::uno::RuntimeException);
86 
87 public:
88     xmlNodePtr getNativeElement( ) const;
89     void setNativeElement(const xmlNodePtr pNode);
90 };
91 
92 rtl::OUString XMLElementWrapper_XmlSecImpl_getImplementationName()
93     throw ( com::sun::star::uno::RuntimeException );
94 
95 sal_Bool SAL_CALL XMLElementWrapper_XmlSecImpl_supportsService( const rtl::OUString& ServiceName )
96     throw ( com::sun::star::uno::RuntimeException );
97 
98 com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL XMLElementWrapper_XmlSecImpl_getSupportedServiceNames(  )
99     throw ( com::sun::star::uno::RuntimeException );
100 
101 com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
102 SAL_CALL XMLElementWrapper_XmlSecImpl_createInstance(
103     const com::sun::star::uno::Reference<
104         com::sun::star::lang::XMultiServiceFactory > & rSMgr)
105     throw ( com::sun::star::uno::Exception );
106 
107 #endif
108 
109