lok: calc - send other views our selection in their co-ordinates.
[LibreOffice.git] / include / cppuhelper / access_control.hxx
blob35b6282522b09f1bac9721bd7fa61c4d114c9a22
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 .
19 #ifndef INCLUDED_CPPUHELPER_ACCESS_CONTROL_HXX
20 #define INCLUDED_CPPUHELPER_ACCESS_CONTROL_HXX
22 #include "cppuhelper/cppuhelperdllapi.h"
23 #include "com/sun/star/uno/Reference.hxx"
25 namespace com { namespace sun { namespace star { namespace security { class XAccessController; } } } }
26 namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
28 namespace cppu
31 /** Helper class for retrieving access controller singleton from component context.
33 class SAL_WARN_UNUSED CPPUHELPER_DLLPUBLIC AccessControl
35 css::uno::Reference< css::security::XAccessController > m_xController;
37 public:
38 /** Ctor.
40 @param xContext component context to retrieve access controller singleton
42 AccessControl(
43 css::uno::Reference< css::uno::XComponentContext > const & xContext );
44 /** Ctor.
46 @param xController access controller
48 AccessControl(
49 css::uno::Reference< css::security::XAccessController > const & xController );
50 /** Copy ctor.
52 @param ac another object
54 AccessControl( ::cppu::AccessControl const & ac );
56 /** Clears the access controller reference being used.
58 void SAL_CALL clear()
59 { m_xController.clear(); }
61 /** Returns access to the access controller reference being used.
63 @return access controller
65 css::uno::Reference< css::security::XAccessController > const & SAL_CALL get() const
66 { return m_xController; }
68 /** Returns access to the access controller reference being used.
70 @return access controller
72 css::security::XAccessController * SAL_CALL operator -> () const
73 { return m_xController.get(); }
76 /** A com.sun.star.security.RuntimePermission is for runtime permissions.
77 A RuntimePermission contains a name (also referred to as a "target name") but no
78 actions list; you either have the named permission or you don't.
80 @param name name of permission
82 void SAL_CALL checkRuntimePermission(
83 ::rtl::OUString const & name );
85 /** A com.sun.star.io.FilePermission represents access to a file or directory.
86 A FilePermission consists of a file url and a set of actions valid for that pathname.
88 @param url file url
89 @param actions actions list
91 void SAL_CALL checkFilePermission(
92 ::rtl::OUString const & url,
93 ::rtl::OUString const & actions );
95 /** A com.sun.star.connection.SocketPermission represents access to a network via sockets.
96 A SocketPermission consists of a host specification and a set of "actions"
97 specifying ways to connect to that host.
99 @param host host and optional portrange
100 @param actions actions list
102 void SAL_CALL checkSocketPermission(
103 ::rtl::OUString const & host,
104 ::rtl::OUString const & actions );
109 #endif
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */