bump product version to 6.4.0.3
[LibreOffice.git] / vcl / source / uitest / uno / uiobject_uno.hxx
blob2f98ab7c04a61af0f8dceac56bfa2c803f5a3ec3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #ifndef INCLUDED_VCL_SOURCE_UITEST_UNO_UIOBJECT_UNO_HXX
11 #define INCLUDED_VCL_SOURCE_UITEST_UNO_UIOBJECT_UNO_HXX
13 #include <cppuhelper/compbase.hxx>
14 #include <cppuhelper/basemutex.hxx>
15 #include <com/sun/star/lang/XServiceInfo.hpp>
16 #include <com/sun/star/ui/test/XUIObject.hpp>
18 #include <memory>
19 #include <condition_variable>
20 #include <mutex>
22 #include <vcl/uitest/uiobject.hxx>
24 class Timer;
26 typedef ::cppu::WeakComponentImplHelper <
27 css::ui::test::XUIObject, css::lang::XServiceInfo
28 > UIObjectBase;
30 class UIObjectUnoObj : public cppu::BaseMutex,
31 public UIObjectBase
33 private:
34 std::unique_ptr<UIObject> mpObj;
36 public:
38 explicit UIObjectUnoObj(std::unique_ptr<UIObject> pObj);
39 virtual ~UIObjectUnoObj() override;
41 css::uno::Reference<css::ui::test::XUIObject> SAL_CALL getChild(const OUString& rID) override;
43 void SAL_CALL executeAction(const OUString& rAction, const css::uno::Sequence<css::beans::PropertyValue>& xPropValues) override;
45 css::uno::Sequence<css::beans::PropertyValue> SAL_CALL getState() override;
47 css::uno::Sequence<OUString> SAL_CALL getChildren() override;
49 OUString SAL_CALL getType() override;
51 OUString SAL_CALL getImplementationName() override;
53 sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
55 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
57 OUString SAL_CALL getHierarchy() override;
59 private:
61 DECL_LINK( NotifyHdl, Timer*, void );
63 std::condition_variable cv;
64 std::mutex mMutex;
65 bool mReady;
67 OUString mAction;
68 css::uno::Sequence<css::beans::PropertyValue> mPropValues;
71 #endif
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */