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 INCLUDED_TOOLKIT_AWT_VCLXPOINTER_HXX
21 : #define INCLUDED_TOOLKIT_AWT_VCLXPOINTER_HXX
22 :
23 :
24 : #include <com/sun/star/awt/XPointer.hpp>
25 : #include <com/sun/star/lang/XServiceInfo.hpp>
26 : #include <com/sun/star/lang/XUnoTunnel.hpp>
27 : #include <cppuhelper/implbase.hxx>
28 : #include <osl/mutex.hxx>
29 :
30 : #include <vcl/pointr.hxx>
31 :
32 :
33 : // class VCLXPointer
34 :
35 :
36 : class VCLXPointer: public cppu::WeakImplHelper<
37 : css::awt::XPointer, css::lang::XUnoTunnel, css::lang::XServiceInfo>
38 : {
39 : private:
40 : ::osl::Mutex maMutex;
41 : Pointer maPointer;
42 :
43 : protected:
44 0 : ::osl::Mutex& GetMutex() { return maMutex; }
45 :
46 : public:
47 : VCLXPointer();
48 : virtual ~VCLXPointer();
49 :
50 0 : const Pointer& GetPointer() const { return maPointer; }
51 :
52 : // ::com::sun::star::lang::XUnoTunnel
53 : static const ::com::sun::star::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw();
54 : static VCLXPointer* GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace );
55 : sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
56 :
57 : // ::com::sun::star::awt::XPointer
58 : void SAL_CALL setType( sal_Int32 nType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
59 : sal_Int32 SAL_CALL getType( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
60 :
61 : OUString SAL_CALL getImplementationName()
62 : throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
63 :
64 : sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
65 : throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
66 :
67 : css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
68 : throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
69 : };
70 :
71 :
72 :
73 :
74 : #endif // INCLUDED_TOOLKIT_AWT_VCLXPOINTER_HXX
75 :
76 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|