xref: /aoo4110/main/avmedia/source/java/MediaUno.java (revision b1cdbd2c)
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 // UNO
25 import com.sun.star.uno.UnoRuntime;
26 import com.sun.star.uno.XComponentContext;
27 import com.sun.star.uno.AnyConverter;
28 import com.sun.star.uno.IQueryInterface;
29 import com.sun.star.lang.XInitialization;
30 
31 public class MediaUno
32 {
33     private static final String s_implName = "com.sun.star.comp.media.Manager_Java";
34     private static final String s_serviceName = "com.sun.star.media.Manager_Java";
35 
36     // -------------------------------------------------------------------------
37 
MediaUno()38 	public MediaUno()
39     {
40     }
41 
42     // -------------------------------------------------------------------------
43 
__getServiceFactory( String implName, com.sun.star.lang.XMultiServiceFactory multiFactory, com.sun.star.registry.XRegistryKey regKey )44     public static com.sun.star.lang.XSingleServiceFactory __getServiceFactory(
45         String implName,
46         com.sun.star.lang.XMultiServiceFactory multiFactory,
47         com.sun.star.registry.XRegistryKey regKey )
48     {
49         if (implName.equals( s_implName ))
50         {
51 			try
52 			{
53 	            return com.sun.star.comp.loader.FactoryHelper.getServiceFactory(
54     	            Class.forName( "Manager" ), s_serviceName, multiFactory, regKey );
55 			}
56 			catch( java.lang.ClassNotFoundException exception )
57 			{
58 			}
59         }
60 
61         return null;
62     }
63 }
64