00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 00002 /* 00003 * This file is part of the LibreOffice project. 00004 * 00005 * This Source Code Form is subject to the terms of the Mozilla Public 00006 * License, v. 2.0. If a copy of the MPL was not distributed with this 00007 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 00008 * 00009 * This file incorporates work covered by the following license notice: 00010 * 00011 * Licensed to the Apache Software Foundation (ASF) under one or more 00012 * contributor license agreements. See the NOTICE file distributed 00013 * with this work for additional information regarding copyright 00014 * ownership. The ASF licenses this file to you under the Apache 00015 * License, Version 2.0 (the "License"); you may not use this file 00016 * except in compliance with the License. You may obtain a copy of 00017 * the License at http://www.apache.org/licenses/LICENSE-2.0 . 00018 */ 00019 #ifndef _CPPUHELPER_COMPONENT_CONTEXT_HXX_ 00020 #define _CPPUHELPER_COMPONENT_CONTEXT_HXX_ 00021 00022 #include <com/sun/star/uno/XComponentContext.hpp> 00023 #include <com/sun/star/lang/XSingleComponentFactory.hpp> 00024 #include "cppuhelperdllapi.h" 00025 00026 00027 namespace cppu 00028 { 00029 00032 struct ContextEntry_Init 00033 { 00040 bool bLateInitService; 00043 ::rtl::OUString name; 00046 ::com::sun::star::uno::Any value; 00047 00050 inline ContextEntry_Init() SAL_THROW(()) 00051 : bLateInitService( false ) 00052 {} 00063 inline ContextEntry_Init( 00064 ::rtl::OUString const & name_, 00065 ::com::sun::star::uno::Any const & value_, 00066 bool bLateInitService_ = false ) SAL_THROW(()) 00067 : bLateInitService( bLateInitService_ ), 00068 name( name_ ), 00069 value( value_ ) 00070 {} 00071 }; 00072 00080 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > 00081 SAL_CALL createComponentContext( 00082 ContextEntry_Init const * pEntries, sal_Int32 nEntries, 00083 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xDelegate = 00084 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >() ) 00085 SAL_THROW(()); 00086 00087 } 00088 00089 #endif 00090 00091 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */