1*e357d40eSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*e357d40eSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*e357d40eSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*e357d40eSAndrew Rist * distributed with this work for additional information 6*e357d40eSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*e357d40eSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*e357d40eSAndrew Rist * "License"); you may not use this file except in compliance 9*e357d40eSAndrew Rist * with the License. You may obtain a copy of the License at 10*e357d40eSAndrew Rist * 11*e357d40eSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*e357d40eSAndrew Rist * 13*e357d40eSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*e357d40eSAndrew Rist * software distributed under the License is distributed on an 15*e357d40eSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*e357d40eSAndrew Rist * KIND, either express or implied. See the License for the 17*e357d40eSAndrew Rist * specific language governing permissions and limitations 18*e357d40eSAndrew Rist * under the License. 19*e357d40eSAndrew Rist * 20*e357d40eSAndrew Rist *************************************************************/ 21*e357d40eSAndrew Rist 22*e357d40eSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // UNO 25cdf0e10cSrcweir import com.sun.star.uno.UnoRuntime; 26cdf0e10cSrcweir import com.sun.star.uno.XComponentContext; 27cdf0e10cSrcweir import com.sun.star.uno.AnyConverter; 28cdf0e10cSrcweir import com.sun.star.uno.IQueryInterface; 29cdf0e10cSrcweir import com.sun.star.lang.XInitialization; 30cdf0e10cSrcweir 31cdf0e10cSrcweir public class MediaUno 32cdf0e10cSrcweir { 33cdf0e10cSrcweir private static final String s_implName = "com.sun.star.comp.media.Manager_Java"; 34cdf0e10cSrcweir private static final String s_serviceName = "com.sun.star.media.Manager_Java"; 35cdf0e10cSrcweir 36cdf0e10cSrcweir // ------------------------------------------------------------------------- 37cdf0e10cSrcweir MediaUno()38cdf0e10cSrcweir public MediaUno() 39cdf0e10cSrcweir { 40cdf0e10cSrcweir } 41cdf0e10cSrcweir 42cdf0e10cSrcweir // ------------------------------------------------------------------------- 43cdf0e10cSrcweir __getServiceFactory( String implName, com.sun.star.lang.XMultiServiceFactory multiFactory, com.sun.star.registry.XRegistryKey regKey )44cdf0e10cSrcweir public static com.sun.star.lang.XSingleServiceFactory __getServiceFactory( 45cdf0e10cSrcweir String implName, 46cdf0e10cSrcweir com.sun.star.lang.XMultiServiceFactory multiFactory, 47cdf0e10cSrcweir com.sun.star.registry.XRegistryKey regKey ) 48cdf0e10cSrcweir { 49cdf0e10cSrcweir if (implName.equals( s_implName )) 50cdf0e10cSrcweir { 51cdf0e10cSrcweir try 52cdf0e10cSrcweir { 53cdf0e10cSrcweir return com.sun.star.comp.loader.FactoryHelper.getServiceFactory( 54cdf0e10cSrcweir Class.forName( "Manager" ), s_serviceName, multiFactory, regKey ); 55cdf0e10cSrcweir } 56cdf0e10cSrcweir catch( java.lang.ClassNotFoundException exception ) 57cdf0e10cSrcweir { 58cdf0e10cSrcweir } 59cdf0e10cSrcweir } 60cdf0e10cSrcweir 61cdf0e10cSrcweir return null; 62cdf0e10cSrcweir } 63cdf0e10cSrcweir } 64