LibreOffice: cppu::AccessControl Class Reference

LibreOffice LibreOffice 26.8 SDK C/C++ API Reference

Loading...
Searching...
No Matches
cppu::AccessControl Class Reference

Helper class for retrieving access controller singleton from component context. More...

`#include <access_control.hxx>`

## Public Member Functions
| AccessControl (css::uno::Reference< css::uno::XComponentContext > const &xContext)
| Ctor.
| AccessControl (css::uno::Reference< css::security::XAccessController > const &xController)
| Ctor.
| AccessControl (::cppu::AccessControl const &ac)
| Copy ctor.
void | clear ()
| Clears the access controller reference being used.
css::uno::Reference< css::security::XAccessController > const & | get () const
| Returns access to the access controller reference being used.
css::security::XAccessController * | operator-> () const
| Returns access to the access controller reference being used.
void | checkRuntimePermission (::rtl::OUString const &name)
| A com.sun.star.security.RuntimePermission is for runtime permissions.
void | checkFilePermission (::rtl::OUString const &url, ::rtl::OUString const &actions)
| A com.sun.star.io.FilePermission represents access to a file or directory.
void | checkSocketPermission (::rtl::OUString const &host, ::rtl::OUString const &actions)
| A com.sun.star.connection.SocketPermission represents access to a network via sockets.

## Detailed Description

Helper class for retrieving access controller singleton from component context.

## Constructor & Destructor Documentation

## ◆ AccessControl() [1/3]

cppu::AccessControl::AccessControl | ( | css::uno::Reference< css::uno::XComponentContext > const & | xContext | ) |

Ctor.

Parameters

  xContext | component context to retrieve access controller singleton

## ◆ AccessControl() [2/3]

cppu::AccessControl::AccessControl | ( | css::uno::Reference< css::security::XAccessController > const & | xController | ) |

Ctor.

Parameters

  xController | access controller

## ◆ AccessControl() [3/3]

cppu::AccessControl::AccessControl | ( | ::cppu::AccessControl const & | ac | ) |

Copy ctor.

Parameters

  ac | another object

## Member Function Documentation

## ◆ checkFilePermission()

void cppu::AccessControl::checkFilePermission | ( | ::rtl::OUString const & | url,
|  | ::rtl::OUString const & | actions )

A com.sun.star.io.FilePermission represents access to a file or directory.

A FilePermission consists of a file url and a set of actions valid for that pathname.

Parameters

  url | file url
  actions | actions list

## ◆ checkRuntimePermission()

void cppu::AccessControl::checkRuntimePermission | ( | ::rtl::OUString const & | name | ) |

A com.sun.star.security.RuntimePermission is for runtime permissions.

A RuntimePermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

Parameters

  name | name of permission

## ◆ checkSocketPermission()

void cppu::AccessControl::checkSocketPermission | ( | ::rtl::OUString const & | host,
|  | ::rtl::OUString const & | actions )

A com.sun.star.connection.SocketPermission represents access to a network via sockets.

A SocketPermission consists of a host specification and a set of "actions" specifying ways to connect to that host.

Parameters

  host | host and optional portrange
  actions | actions list

## ◆ clear()

void cppu::AccessControl::clear | ( |  | ) |
| inline

Clears the access controller reference being used.

## ◆ get()

css::uno::Reference< css::security::XAccessController > const & cppu::AccessControl::get | ( |  | ) | const
| inline

Returns access to the access controller reference being used.

Returns
  access controller

## ◆ operator->()

css::security::XAccessController * cppu::AccessControl::operator-> | ( |  | ) | const
| inline

Returns access to the access controller reference being used.

Returns
  access controller

The documentation for this class was generated from the following file:

- cppuhelper/access_control.hxx