1 /************************************************************************* 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * 4 * Copyright 2000, 2010 Oracle and/or its affiliates. 5 * 6 * OpenOffice.org - a multi-platform office productivity suite 7 * 8 * This file is part of OpenOffice.org. 9 * 10 * OpenOffice.org is free software: you can redistribute it and/or modify 11 * it under the terms of the GNU Lesser General Public License version 3 12 * only, as published by the Free Software Foundation. 13 * 14 * OpenOffice.org is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU Lesser General Public License version 3 for more details 18 * (a copy is included in the LICENSE file that accompanied this code). 19 * 20 * You should have received a copy of the GNU Lesser General Public License 21 * version 3 along with OpenOffice.org. If not, see 22 * <http://www.openoffice.org/license.html> 23 * for a copy of the LGPLv3 License. 24 * 25 ************************************************************************/ 26 27 // MARKER(update_precomp.py): autogen include statement, do not remove 28 29 30 #ifndef EXTENSIONS_OOOIMPROVEMENT_ONLOGROTATEJOB_HXX 31 #define EXTENSIONS_OOOIMPROVEMENT_ONLOGROTATEJOB_HXX 32 33 #include <com/sun/star/task/XAsyncJob.hpp> 34 #include <com/sun/star/lang/XServiceInfo.hpp> 35 #include <com/sun/star/uno/XComponentContext.hpp> 36 #include <cppuhelper/implbase2.hxx> 37 38 39 namespace oooimprovement 40 { 41 #ifdef css 42 #error css defined globally 43 #endif 44 #define css ::com::sun::star 45 class OnLogRotateJob : public ::cppu::WeakImplHelper2< 46 ::com::sun::star::task::XAsyncJob, 47 ::com::sun::star::lang::XServiceInfo> 48 { 49 public: 50 // XServiceInfo - static version 51 static ::rtl::OUString SAL_CALL getImplementationName_static(); 52 static ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames_static(); 53 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> SAL_CALL Create( 54 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& context); 55 56 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> SAL_CALL Create( 57 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& sf); 58 59 protected: 60 OnLogRotateJob(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& context); 61 OnLogRotateJob(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& sm); 62 virtual ~OnLogRotateJob(); 63 64 // XAsyncJob 65 virtual void SAL_CALL executeAsync( 66 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue>& args, 67 const ::com::sun::star::uno::Reference< ::com::sun::star::task::XJobListener>& listener) 68 throw(::com::sun::star::uno::RuntimeException); 69 70 // XServiceInfo 71 virtual ::rtl::OUString SAL_CALL getImplementationName() 72 throw(::com::sun::star::uno::RuntimeException); 73 virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& service_name) 74 throw(::com::sun::star::uno::RuntimeException); 75 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() 76 throw(::com::sun::star::uno::RuntimeException); 77 78 private: 79 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_ServiceFactory; 80 }; 81 #undef css 82 } 83 #endif 84