bump product version to 4.2.0.1
[LibreOffice.git] / include / comphelper / processfactory.hxx
blobc795757ec3dcf099a0e73ff7d07582668a59612b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_COMPHELPER_PROCESSFACTORY_HXX
21 #define INCLUDED_COMPHELPER_PROCESSFACTORY_HXX
23 #include <com/sun/star/uno/XComponentContext.hpp>
24 #include <com/sun/star/uno/Sequence.hxx>
25 #include <comphelper/comphelperdllapi.h>
27 namespace com { namespace sun { namespace star { namespace lang {
28 class XMultiServiceFactory;
29 } } } }
31 namespace comphelper
34 /**
35 * This function set the process service factory.
37 * @author Juergen Schmidt
39 COMPHELPER_DLLPUBLIC void setProcessServiceFactory(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xSMgr);
41 /**
42 * This function gets the process service factory.
44 * If no service factory is set the function throws a RuntimeException.
46 * @author Juergen Schmidt
48 COMPHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getProcessServiceFactory();
50 /** Obtains a component context from a service factory.
52 Throws a RuntimeException if no component context can be obtained.
54 @param factory may be null
55 @return may be null
57 COMPHELPER_DLLPUBLIC
58 com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
59 getComponentContext(
60 com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
61 const & factory);
63 /**
64 * This function gets the process service factory's default component context.
66 * Throws a RuntimeException if no component context can be obtained.
68 COMPHELPER_DLLPUBLIC
69 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
70 getProcessComponentContext();
74 #endif // INCLUDED_COMPHELPER_PROCESSFACTORY_HXX
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */