1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 
26 
27 #ifndef EXTENSIONS_OOOIMPROVEMENT_ONLOGROTATEJOB_HXX
28 #define EXTENSIONS_OOOIMPROVEMENT_ONLOGROTATEJOB_HXX
29 
30 #include <com/sun/star/task/XAsyncJob.hpp>
31 #include <com/sun/star/lang/XServiceInfo.hpp>
32 #include <com/sun/star/uno/XComponentContext.hpp>
33 #include <cppuhelper/implbase2.hxx>
34 
35 
36 namespace oooimprovement
37 {
38     #ifdef css
39         #error css defined globally
40     #endif
41     #define css ::com::sun::star
42     class OnLogRotateJob : public ::cppu::WeakImplHelper2<
43         ::com::sun::star::task::XAsyncJob,
44         ::com::sun::star::lang::XServiceInfo>
45     {
46         public:
47             // XServiceInfo - static version
48             static ::rtl::OUString SAL_CALL getImplementationName_static();
49             static ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames_static();
50             static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> SAL_CALL Create(
51                 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& context);
52 
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::lang::XMultiServiceFactory>& sf);
55 
56         protected:
57             OnLogRotateJob(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& context);
58             OnLogRotateJob(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& sm);
59             virtual ~OnLogRotateJob();
60 
61             // XAsyncJob
62             virtual void SAL_CALL executeAsync(
63                 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue>& args,
64                 const ::com::sun::star::uno::Reference< ::com::sun::star::task::XJobListener>& listener)
65                 throw(::com::sun::star::uno::RuntimeException);
66 
67             // XServiceInfo
68             virtual ::rtl::OUString SAL_CALL getImplementationName()
69                 throw(::com::sun::star::uno::RuntimeException);
70             virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& service_name)
71                 throw(::com::sun::star::uno::RuntimeException);
72             virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames()
73                 throw(::com::sun::star::uno::RuntimeException);
74 
75         private:
76             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_ServiceFactory;
77     };
78     #undef css
79 }
80 #endif
81