merge the formfield patch from ooo-build
[ooovba.git] / svtools / source / productregistration / productregistration.hxx
blobde31b489fbb22b2637d74a44f235bb5b23028850
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: productregistration.hxx,v $
10 * $Revision: 1.5 $
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 SVTOOLS_PRODUCTREGISTRATION_HXX
32 #define SVTOOLS_PRODUCTREGISTRATION_HXX
34 #include <com/sun/star/lang/XServiceInfo.hpp>
35 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
36 #include <com/sun/star/task/XJobExecutor.hpp>
37 #include <com/sun/star/task/XJob.hpp>
38 #include <cppuhelper/implbase3.hxx>
40 //........................................................................
41 namespace svt
43 //........................................................................
45 //====================================================================
46 //= OProductRegistration
47 //====================================================================
48 typedef ::cppu::WeakImplHelper3 < ::com::sun::star::lang::XServiceInfo
49 , ::com::sun::star::task::XJobExecutor
50 , ::com::sun::star::task::XJob
51 > OProductRegistration_Base;
53 class OProductRegistration : public OProductRegistration_Base
55 private:
56 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
57 m_xORB;
59 protected:
60 OProductRegistration( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB );
62 public:
63 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
64 Create( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB );
66 // XServiceInfo - static version
67 static ::rtl::OUString SAL_CALL getImplementationName_Static( );
68 static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_Static( ) throw (::com::sun::star::uno::RuntimeException);
70 protected:
71 // XServiceInfo
72 virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
73 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
74 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
76 // XJobExecutor
77 virtual void SAL_CALL trigger( const ::rtl::OUString& sEvent ) throw (::com::sun::star::uno::RuntimeException);
79 // XJob
80 virtual ::com::sun::star::uno::Any SAL_CALL execute( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _rArgs ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
82 private:
83 // types of events which can be handled by this component
84 enum EventType
86 etRegistrationRequired,
88 etUnknown
91 // classifies a event
92 EventType classify( const ::rtl::OUString& _rEventDesc );
94 // do the online registration
95 void doOnlineRegistration( );
98 //........................................................................
99 } // namespace svt
100 //........................................................................
102 #endif // SVTOOLS_PRODUCTREGISTRATION_HXX