1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 */
9
10#ifndef INCLUDED_CPPUHELPER_SUPPORTSSERVICE_HXX
11#define INCLUDED_CPPUHELPER_SUPPORTSSERVICE_HXX
12
13#include <sal/config.h>
14
15#include <cppuhelper/cppuhelperdllapi.h>
16
17namespace com { namespace sun { namespace star { namespace lang {
18 class XServiceInfo;
19} } } }
20namespace rtl { class OUString; }
21
22namespace cppu {
23
24/** A helper for implementations of com.sun.star.lang.XServiceInfo.
25
26 This function is supposed to be called from implementations of
27 com::sun::star::lang::XServiceInfo::supportsService (and therefore, for
28 easier coding takes the caller's this pointer by pointer rather than by
29 com::sun::star::uno::Reference).
30
31 @param implementation points to the service implementation whose
32 getSupportedServices method is consulted; must be non-null
33
34 @param name the service name to test
35
36 @return true iff the sequence returned by the given implementation's
37 getSupportedServices method contains the given name
38
39 @since LibreOffice 4.0
40*/
41bool CPPUHELPER_DLLPUBLIC supportsService(
42 com::sun::star::lang::XServiceInfo * implementation,
43 rtl::OUString const & name);
44
45}
46
47#endif
48
49/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
50