LibreOffice Module vcl (master)  1
uiobject_uno.hxx
Go to the documentation of this file.
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 
10 #ifndef INCLUDED_VCL_SOURCE_UITEST_UNO_UIOBJECT_UNO_HXX
11 #define INCLUDED_VCL_SOURCE_UITEST_UNO_UIOBJECT_UNO_HXX
12 
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>
17 
18 #include <memory>
19 #include <condition_variable>
20 #include <mutex>
21 
22 #include <vcl/uitest/uiobject.hxx>
23 
24 class Timer;
25 
26 typedef ::cppu::WeakComponentImplHelper <
27  css::ui::test::XUIObject, css::lang::XServiceInfo
28  > UIObjectBase;
29 
31  public UIObjectBase
32 {
33 private:
34  std::unique_ptr<UIObject> mpObj;
35 
36 public:
37 
38  explicit UIObjectUnoObj(std::unique_ptr<UIObject> pObj);
39  virtual ~UIObjectUnoObj() override;
40 
41  css::uno::Reference<css::ui::test::XUIObject> SAL_CALL getChild(const OUString& rID) override;
42 
43  void SAL_CALL executeAction(const OUString& rAction, const css::uno::Sequence<css::beans::PropertyValue>& xPropValues) override;
44 
45  css::uno::Sequence<css::beans::PropertyValue> SAL_CALL getState() override;
46 
47  css::uno::Sequence<OUString> SAL_CALL getChildren() override;
48 
49  OUString SAL_CALL getType() override;
50 
51  OUString SAL_CALL getImplementationName() override;
52 
53  sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
54 
55  css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
56 
57  OUString SAL_CALL getHierarchy() override;
58 
59 private:
60 
61  DECL_LINK( NotifyHdl, Timer*, void );
62 
63  std::condition_variable cv;
64  std::mutex mMutex;
65  bool mReady;
66 
67  OUString mAction;
68  css::uno::Sequence<css::beans::PropertyValue> mPropValues;
69 };
70 
71 #endif
72 
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString SAL_CALL getHierarchy() override
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
std::condition_variable cv
css::uno::Reference< css::ui::test::XUIObject > SAL_CALL getChild(const OUString &rID) override
sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
OUString mAction
std::mutex mMutex
unsigned char sal_Bool
css::uno::Sequence< css::beans::PropertyValue > mPropValues
UIObjectUnoObj(std::unique_ptr< UIObject > pObj)
OUString SAL_CALL getType() override
DECL_LINK(NotifyHdl, Timer *, void)
virtual ~UIObjectUnoObj() override
void SAL_CALL executeAction(const OUString &rAction, const css::uno::Sequence< css::beans::PropertyValue > &xPropValues) override
css::uno::Sequence< OUString > SAL_CALL getChildren() override
std::unique_ptr< UIObject > mpObj
css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getState() override
Definition: timer.hxx:26
OUString SAL_CALL getImplementationName() override
::cppu::WeakComponentImplHelper< css::ui::test::XUIObject, css::lang::XServiceInfo > UIObjectBase