LibreOffice Module ucb (master)  1
ucbserv.cxx
Go to the documentation of this file.
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  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
21 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
22 #include <cppuhelper/factory.hxx>
23 #include "ucb.hxx"
24 #include "ucbstore.hxx"
25 #include "ucbprops.hxx"
26 #include "provprox.hxx"
27 #include "cmdenv.hxx"
28 #include "FileAccess.hxx"
29 
30 using namespace com::sun::star::uno;
31 using namespace com::sun::star::lang;
32 
33 
34 extern "C" SAL_DLLPUBLIC_EXPORT void * ucb_component_getFactory(
35  const sal_Char * pImplName, void * pServiceManager, void * )
36 {
37  void * pRet = nullptr;
38 
40  static_cast< XMultiServiceFactory * >( pServiceManager ) );
42 
43 
44  // Universal Content Broker.
45 
46 
48  equalsAscii( pImplName ) )
49  {
51  }
52 
53 
54  // UCB Store.
55 
56 
58  equalsAscii( pImplName ) )
59  {
60  xFactory = UcbStore::createServiceFactory( xSMgr );
61  }
62 
63 
64  // UCB PropertiesManager.
65 
66 
68  equalsAscii( pImplName ) )
69  {
71  }
72 
73 
74  // UCP Proxy Factory.
75 
76 
78  equalsAscii( pImplName ) )
79  {
81  }
82 
83 
84  // Command Environment.
85 
86 
88  equalsAscii( pImplName ) )
89  {
91  }
92 
93  // FilePicker
94  else if (pServiceManager && rtl_str_compare( pImplName, IMPLEMENTATION_NAME ) == 0)
95  {
96  xFactory = cppu::createSingleFactory(xSMgr,
97  OUString::createFromAscii( pImplName ),
100  }
101 
102  if ( xFactory.is() )
103  {
104  xFactory->acquire();
105  pRet = xFactory.get();
106  }
107 
108  return pRet;
109 }
110 
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Sequence< OUString > FileAccess_getSupportedServiceNames()
Definition: FileAccess.cxx:704
static OUString getImplementationName_Static()
Reference< XInterface > FileAccess_CreateInstance(const Reference< XMultiServiceFactory > &xSMgr)
Definition: FileAccess.cxx:699
static css::uno::Reference< css::lang::XSingleServiceFactory > createServiceFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rxServiceMgr)
char sal_Char
static css::uno::Reference< css::lang::XSingleServiceFactory > createServiceFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rxServiceMgr)
static css::uno::Reference< css::lang::XSingleServiceFactory > createServiceFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rxServiceMgr)
Definition: cmdenv.cxx:139
static OUString getImplementationName_Static()
static OUString getImplementationName_Static()
Definition: cmdenv.cxx:91
css::uno::Reference< css::uno::XInterface >(SAL_CALL *ComponentInstantiation)(const css CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL createSingleFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rServiceManager, const ::rtl::OUString &rImplementationName, ComponentInstantiation pCreateFunction, const css::uno::Sequence< ::rtl::OUString > &rServiceNames, rtl_ModuleCount *pModCount=NULL)
static css::uno::Reference< css::lang::XSingleServiceFactory > createServiceFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rxServiceMgr)
static css::uno::Reference< css::lang::XSingleServiceFactory > createServiceFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rxServiceMgr)
static OUString getImplementationName_Static()
static OUString getImplementationName_Static()
#define IMPLEMENTATION_NAME
Definition: FileAccess.hxx:34
SAL_DLLPUBLIC_EXPORT void * ucb_component_getFactory(const sal_Char *pImplName, void *pServiceManager, void *)
Definition: ucbserv.cxx:34