1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 29 #ifndef _FRAMEWORK_SCRIPT_STORAGEBRIDGE_HXX_ 30 #define _FRAMEWORK_SCRIPT_STORAGEBRIDGE_HXX_ 31 32 #include <cppuhelper/implbase1.hxx> 33 #include <com/sun/star/uno/XComponentContext.hpp> 34 35 #include <drafts/com/sun/star/script/framework/storage/XScriptInfoAccess.hpp> 36 #include "StorageBridgeFactory.hxx" 37 38 namespace scripting_runtimemgr 39 { 40 // for simplification 41 #define css ::com::sun::star 42 #define dcsssf ::drafts::com::sun::star::script::framework 43 44 class StorageBridge : public ::cppu::WeakImplHelper1< dcsssf::storage::XScriptInfoAccess > 45 { 46 friend class StorageBridgeFactory; 47 public: 48 //XScriptInfoAccess 49 //========================================================================= 50 /** 51 * Get the implementations for a given URI 52 * 53 * @param queryURI 54 * The URI to get the implementations for 55 * 56 * @return XScriptURI 57 * The URIs of the implementations 58 */ 59 virtual css::uno::Sequence< css::uno::Reference< dcsssf::storage::XScriptInfo > > 60 SAL_CALL getImplementations( 61 const ::rtl::OUString& queryURI ) 62 throw ( css::lang::IllegalArgumentException, 63 css::uno::RuntimeException ); 64 //========================================================================= 65 /** 66 * Get the all logical names stored in this storage 67 * 68 * @return sequence < ::rtl::OUString > 69 * The logical names 70 */ 71 virtual css::uno::Sequence< ::rtl::OUString > 72 SAL_CALL getScriptLogicalNames() 73 throw ( css::lang::IllegalArgumentException, css::uno::RuntimeException ); 74 private: 75 StorageBridge( const css::uno::Reference< css::uno::XComponentContext >& xContext, 76 sal_Int32 sid ); 77 78 void initStorage() throw ( css::uno::RuntimeException ); 79 css::uno::Reference< css::uno::XComponentContext > m_xContext; 80 css::uno::Reference< dcsssf::storage::XScriptInfoAccess > m_xScriptInfoAccess; 81 sal_Int32 m_sid; 82 }; 83 } 84 85 #endif //_COM_SUN_STAR_SCRIPTING_STORAGEBRIDGE_HXX_ 86