Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef _FRAMEWORK_SCRIPT_PROTOCOLHANDLER_SCRIPTING_CONTEXT_HXX_
21 : #define _FRAMEWORK_SCRIPT_PROTOCOLHANDLER_SCRIPTING_CONTEXT_HXX_
22 :
23 :
24 : #include <osl/mutex.hxx>
25 : #include <rtl/ustring.hxx>
26 : #include <cppuhelper/implbase1.hxx>
27 : #include <comphelper/uno3.hxx>
28 : #include <comphelper/propertycontainer.hxx>
29 : #include <comphelper/proparrhlp.hxx>
30 :
31 : #include <cppuhelper/implbase1.hxx>
32 : #include <cppuhelper/weak.hxx>
33 : #include <com/sun/star/lang/XServiceInfo.hpp>
34 : #include <com/sun/star/uno/RuntimeException.hpp>
35 : #include <com/sun/star/uno/RuntimeException.hpp>
36 : #include <com/sun/star/beans/XPropertySet.hpp>
37 : #include <comphelper/broadcasthelper.hxx>
38 :
39 : namespace func_provider
40 : {
41 :
42 : //Typedefs
43 : //=============================================================================
44 : //typedef ::cppu::WeakImplHelper1< css::beans::XPropertySet > ScriptingContextImpl_BASE;
45 :
46 : class ScriptingContext : public ::comphelper::OMutexAndBroadcastHelper, public ::comphelper::OPropertyContainer,
47 : public ::comphelper::OPropertyArrayUsageHelper< ScriptingContext >, public css::lang::XTypeProvider, public ::cppu::OWeakObject
48 : {
49 :
50 : public:
51 : ScriptingContext( const css::uno::Reference< css::uno::XComponentContext > & xContext );
52 : ~ScriptingContext();
53 : // XInterface
54 :
55 0 : css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType )
56 : throw( css::uno::RuntimeException )
57 : {
58 0 : css::uno::Any aRet( OPropertySetHelper::queryInterface( rType ) );
59 0 : return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
60 : }
61 0 : void SAL_CALL acquire() throw() { ::cppu::OWeakObject::acquire(); }
62 0 : void SAL_CALL release() throw() { ::cppu::OWeakObject::release(); }
63 : // XPropertySet
64 : virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( )
65 : throw ( css::uno::RuntimeException );
66 : //XTypeProvider
67 : DECLARE_XTYPEPROVIDER( )
68 :
69 : protected:
70 :
71 : // OPropertySetHelper
72 : virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper( );
73 :
74 : // OPropertyArrayUsageHelper
75 : virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
76 : private:
77 : css::uno::Reference< css::uno::XComponentContext > m_xContext;
78 :
79 :
80 : };
81 : } // func_provider
82 : #endif //_FRAMEWORK_SCRIPT_PROVIDER_XFUNCTIONPROVIDER_HXX_
83 :
84 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|