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#ifndef __com_sun_star_lang_ServiceManager_idl__
24#define __com_sun_star_lang_ServiceManager_idl__
25
26#ifndef __com_sun_star_lang_MultiServiceFactory_idl__
27#include <com/sun/star/lang/MultiServiceFactory.idl>
28#endif
29
30#ifndef __com_sun_star_lang_XComponent_idl__
31#include <com/sun/star/lang/XComponent.idl>
32#endif
33
34#ifndef __com_sun_star_container_XSet_idl__
35#include <com/sun/star/container/XSet.idl>
36#endif
37
38#ifndef __com_sun_star_container_XContentEnumerationAccess_idl__
39#include <com/sun/star/container/XContentEnumerationAccess.idl>
40#endif
41
42#ifndef __com_sun_star_lang_XMultiServiceFactory_idl__
43#include <com/sun/star/lang/XMultiServiceFactory.idl>
44#endif
45
46#ifndef __com_sun_star_lang_XMultiComponentFactory_idl__
47#include <com/sun/star/lang/XMultiComponentFactory.idl>
48#endif
49
50#ifndef __com_sun_star_lang_XServiceInfo_idl__
51#include <com/sun/star/lang/XServiceInfo.idl>
52#endif
53
54#ifndef __com_sun_star_beans_XPropertySet_idl__
55#include <com/sun/star/beans/XPropertySet.idl>
56#endif
57
58//=============================================================================
59
60module com {  module sun {  module star {  module lang {
61
62//=============================================================================
63
64/** Provides a collection of implementations for services.  This is a singleton
65    you commonly find in your component context under key
66    <code>/singletons/com.sun.star.lang.theServiceManager</code>.
67
68	<p>
69    The factories are accessed with a service name. It is possible to
70	access the factories with their implementation names, but you should
71	avoid this.
72    </p>
73
74	<p>Service factories added via <type scope="com::sun::star::container">XSet</type>
75	should support the following interfaces: </p>
76
77	<dl>
78    <dt><type>XServiceInfo</type></dt>
79    <dd>supported interfaces/ implementation name</dd>
80
81    <dt><type>XSingleComponentFactory</type>(optional)</dt>
82    <dd>is used to create instances of the implementation.</dd>
83
84    <dt><type>XComponent</type> (optional)</dt>
85    <dd>The service manager calls the method
86    <member scope="com::sun::star::lang">XComponent::dispose</member>
87    on the factory when going down (i.e. it is commonly disposed by the component context).</dd>
88	</dl>
89
90    @see com::sun::star::uno::XComponentContext
91*/
92published service ServiceManager
93{
94    /** This is a derived MultiServiceFactory service.
95    */
96	service com::sun::star::lang::MultiServiceFactory;
97
98	/** Disposing of service manager.
99        <p>
100        The component context disposes its service manager singleton when going down
101        (i.e. when the component context is disposed).
102		</p>
103    */
104	interface com::sun::star::lang::XComponent;
105
106	/** Management of service factories.
107    */
108	interface com::sun::star::container::XSet;
109
110	/** Enumeration of all service factories.
111        <p>
112        It is possible to enumerate all implementations that support the
113		service specified with the argument of the
114		<member scope="com::sun::star::container">XContentEnumerationAccess::createContentEnumeration</member> method.
115		The enumerator commonly returns <type>XSingleComponentFactory</type>
116        interfaces.
117        </p>
118    */
119	interface com::sun::star::container::XContentEnumerationAccess;
120
121	/** Property access.
122	*/
123	[optional] interface com::sun::star::beans::XPropertySet;
124	/** specifies the default component context to be used, if instanciating services
125        via <type>XMultiServiceFactory</type>
126    */
127	[optional, property] com::sun::star::uno::XComponentContext DefaultContext;
128};
129
130//=============================================================================
131
132}; }; }; };
133
134/*=============================================================================
135
136=============================================================================*/
137#endif
138