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 #include "precompiled_ext.hxx"
25 
26 #include "ucpext_provider.hxx"
27 
28 /** === begin UNO includes === **/
29 /** === end UNO includes === **/
30 
31 #include <cppuhelper/implementationentry.hxx>
32 
33 //......................................................................................................................
34 namespace ucb { namespace ucp { namespace ext
35 {
36 //......................................................................................................................
37 
38 	/** === begin UNO using === **/
39 	using ::com::sun::star::uno::Reference;
40 	using ::com::sun::star::uno::XInterface;
41 	using ::com::sun::star::uno::UNO_QUERY;
42 	using ::com::sun::star::uno::UNO_QUERY_THROW;
43 	using ::com::sun::star::uno::UNO_SET_THROW;
44 	using ::com::sun::star::uno::Exception;
45 	using ::com::sun::star::uno::RuntimeException;
46 	using ::com::sun::star::uno::Any;
47 	using ::com::sun::star::uno::makeAny;
48 	using ::com::sun::star::uno::Sequence;
49 	using ::com::sun::star::uno::Type;
50     using ::com::sun::star::lang::XSingleComponentFactory;
51 	/** === end UNO using === **/
52 
53 	//==================================================================================================================
54     //= descriptors for the services implemented in this component
55     //==================================================================================================================
56     static struct ::cppu::ImplementationEntry s_aServiceEntries[] =
57     {
58         {
59             ContentProvider::Create,
60             ContentProvider::getImplementationName_static,
61             ContentProvider::getSupportedServiceNames_static,
62             ::cppu::createOneInstanceComponentFactory, NULL, 0
63         },
64         { 0, 0, 0, 0, 0, 0 }
65     };
66 
67 //......................................................................................................................
68 } } }   // namespace ucb::ucp::ext
69 //......................................................................................................................
70 
71 extern "C"
72 {
73     //------------------------------------------------------------------------------------------------------------------
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)74     SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** )
75     {
76         *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
77     }
78 
79     //------------------------------------------------------------------------------------------------------------------
component_getFactory(const sal_Char * pImplName,void * pServiceManager,void * pRegistryKey)80     SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
81     {
82         return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , ::ucb::ucp::ext::s_aServiceEntries );
83     }
84 }
85