android: Update app-specific/MIME type icons
[LibreOffice.git] / include / dbaccess / IController.hxx
blobc7374eb80a14cceaf90e84948865fbf99c73edf1
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_DBACCESS_ICONTROLLER_HXX
21 #define INCLUDED_DBACCESS_ICONTROLLER_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <com/sun/star/uno/Sequence.hxx>
25 #include <dbaccess/dbaccessdllapi.h>
26 #include <rtl/ustring.hxx>
27 #include <sal/types.h>
29 namespace com::sun::star {
30 namespace beans {
31 struct PropertyValue;
33 namespace util {
34 struct URL;
36 namespace frame {
37 class XController;
41 class NotifyEvent;
43 namespace dbaui
45 // interface for controller depended calls like commands
46 class DBACCESS_DLLPUBLIC IController
48 public:
49 /** executes the given command without checking if it is allowed
50 @param _rCommand the URL of the command
52 virtual void executeUnChecked(const css::util::URL& _rCommand, const css::uno::Sequence< css::beans::PropertyValue>& aArgs) = 0;
54 /** executes the given command only when it is allowed
55 @param _rCommand
56 the URL of the command
58 virtual void executeChecked(const css::util::URL& _rCommand, const css::uno::Sequence< css::beans::PropertyValue>& aArgs) = 0;
60 /** executes the given command without checking if it is allowed
61 @param _nCommandId
62 the id of the command URL
64 virtual void executeUnChecked(sal_uInt16 _nCommandId, const css::uno::Sequence< css::beans::PropertyValue>& aArgs) = 0;
66 /** executes the given command only when it is allowed
67 @param _nCommandId
68 the id of the command URL
70 virtual void executeChecked(sal_uInt16 _nCommandId, const css::uno::Sequence< css::beans::PropertyValue>& aArgs) = 0;
73 /** checks if the given Command is enabled
74 @param _nCommandId
75 the id of the command URL
77 @return
78 <TRUE/> if the command is allowed, otherwise <FALSE/>.
80 virtual bool isCommandEnabled(sal_uInt16 _nCommandId) const = 0;
82 /** checks if the given Command is enabled
83 @param _rCompleteCommandURL
84 the URL of the command
86 @return
87 <TRUE/> if the command is allowed, otherwise <FALSE/>.
89 virtual bool isCommandEnabled( const OUString& _rCompleteCommandURL ) const = 0;
91 /** checks if the selected data source is read only
92 @return
93 <TRUE/> if read only, otherwise <FALSE/>
95 virtual bool isDataSourceReadOnly() const = 0;
97 /** provides access to the model of the controller
99 This must be the same model as returned by XController::getModel, and might be <NULL/> when
100 the controller does not have an own model.
102 @throws css::uno::RuntimeException
104 virtual css::uno::Reference< css::frame::XController >
105 getXController() = 0;
107 /** allows interception of user input, aka mouse clicks and key events
109 virtual bool interceptUserInput( const NotifyEvent& _rEvent ) = 0;
111 virtual void SAL_CALL acquire( ) noexcept = 0;
112 virtual void SAL_CALL release( ) noexcept = 0;
114 protected:
115 ~IController() {}
118 #endif // INCLUDED_DBACCESS_ICONTROLLER_HXX
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */