Update ooo320-m1
[ooovba.git] / xmlsecurity / source / framework / xmlencryptiontemplateimpl.hxx
blobe770c87963e1be31356758be1da6f8f8553a8a1f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xmlencryptiontemplateimpl.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _XMLENCRYPTIONTEMPLATEIMPL_HXX_
32 #define _XMLENCRYPTIONTEMPLATEIMPL_HXX_
34 #include <sal/config.h>
35 #include <rtl/ustring.hxx>
36 #include <cppuhelper/factory.hxx>
37 #include <cppuhelper/implbase3.hxx>
38 #include <com/sun/star/uno/Exception.hpp>
40 #ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
41 #include <com/sun/star/uno/Reference.hxx>
42 #endif
43 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
45 #ifndef _COM_SUN_STAR_LANG_XSECVICEINFO_HPP_
46 #include <com/sun/star/lang/XServiceInfo.hpp>
47 #endif
48 #include <com/sun/star/lang/XInitialization.hpp>
49 #include <com/sun/star/lang/XUnoTunnel.hpp>
50 #include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
51 #include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
53 class XMLEncryptionTemplateImpl : public ::cppu::WeakImplHelper3<
54 ::com::sun::star::xml::crypto::XXMLEncryptionTemplate ,
55 ::com::sun::star::lang::XInitialization ,
56 ::com::sun::star::lang::XServiceInfo >
58 private :
59 ::com::sun::star::uno::Reference< ::com::sun::star::xml::wrapper::XXMLElementWrapper > m_xTemplate ;
60 ::com::sun::star::uno::Reference< ::com::sun::star::xml::wrapper::XXMLElementWrapper > m_xTarget ;
61 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager ;
62 ::com::sun::star::xml::crypto::SecurityOperationStatus m_nStatus;
64 public :
65 XMLEncryptionTemplateImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aFactory ) ;
66 virtual ~XMLEncryptionTemplateImpl() ;
68 //Methods from XXMLEncryptionTemplate
69 virtual void SAL_CALL setTemplate(
70 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::wrapper::XXMLElementWrapper >& aXmlElement
72 throw (com::sun::star::uno::RuntimeException, com::sun::star::lang::IllegalArgumentException);
74 virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::wrapper::XXMLElementWrapper > SAL_CALL getTemplate(
75 ) throw (com::sun::star::uno::RuntimeException);
77 virtual void SAL_CALL setTarget(
78 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::wrapper::XXMLElementWrapper >& aXmlElement
79 ) throw( com::sun::star::lang::IllegalArgumentException);
81 virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::wrapper::XXMLElementWrapper > SAL_CALL getTarget(
82 ) throw (com::sun::star::uno::RuntimeException) ;
84 virtual void SAL_CALL setStatus(
85 ::com::sun::star::xml::crypto::SecurityOperationStatus status )
86 throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
87 virtual ::com::sun::star::xml::crypto::SecurityOperationStatus
88 SAL_CALL getStatus( )
89 throw (::com::sun::star::uno::RuntimeException);
91 //Methods from XInitialization
92 virtual void SAL_CALL initialize(
93 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments
94 ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
96 //Methods from XServiceInfo
97 virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ) ;
99 virtual sal_Bool SAL_CALL supportsService(
100 const ::rtl::OUString& ServiceName
101 ) throw( ::com::sun::star::uno::RuntimeException ) ;
103 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ) ;
105 //Helper for XServiceInfo
106 static ::com::sun::star::uno::Sequence< ::rtl::OUString > impl_getSupportedServiceNames() ;
108 static ::rtl::OUString impl_getImplementationName() throw( ::com::sun::star::uno::RuntimeException ) ;
110 //Helper for registry
111 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL impl_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager ) throw( ::com::sun::star::uno::RuntimeException ) ;
113 static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > impl_createFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager ) ;
116 #endif // _XMLENCRYPTIONTEMPLATE_XMLSECIMPL_HXX_