LibreOffice LibreOffice 4.1 SDK C/C++ API Reference

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
osl::Security Class Reference

capsulate security information for one user. More...

`#include <security_decl.hxx>`

## Public Member Functions
| Security ()
| constructor More...
| ~Security ()
| destructor More...
sal_Bool | logonUser (const rtl::OUString &strName, const rtl::OUString &strPasswd)
| get the security information for one user. More...
sal_Bool | logonUser (const rtl::OUString &strName, const rtl::OUString &strPasswd, const rtl::OUString &strFileServer)
| get the security information for one user. More...
sal_Bool | getUserIdent (rtl::OUString &strIdent) const
| get the ident of the logged in user. More...
sal_Bool | getUserName (rtl::OUString &strName) const
| get the name of the logged in user. More...
sal_Bool | getHomeDir (rtl::OUString &strDirectory) const
| get the home directory of the logged in user. More...
sal_Bool | getConfigDir (rtl::OUString &strDirectory) const
| get the directory for configuration data of the logged in user. More...
sal_Bool | isAdministrator () const
| Query if the user who is logged inhas administrator rigths. More...
oslSecurity | getHandle () const
| Returns the underlying oslSecurity handle. More...

## Protected Attributes
oslSecurity | m_handle

## Detailed Description

capsulate security information for one user.

A object of this class is used to execute a process with the rights an security options of a scecified user.

See Also
  Process::executeProcess

## Constructor & Destructor Documentation

osl::Security::Security | ( |  | ) |
| inline

constructor

osl::Security::~Security | ( |  | ) |
| inline

destructor

## Member Function Documentation

sal_Bool osl::Security::getConfigDir | ( | rtl::OUString & | strDirectory | ) | const
| inline

get the directory for configuration data of the logged in user.

Parameters

  [out] | strDirectory | is the OUString which returns the directory name

Returns
  True, if any user is successfully logged in, otherwise False

oslSecurity osl::Security::getHandle | ( |  | ) | const
| inline

Returns the underlying oslSecurity handle.

sal_Bool osl::Security::getHomeDir | ( | rtl::OUString & | strDirectory | ) | const
| inline

get the home directory of the logged in user.

Parameters

  [out] | strDirectory | is the OUString which returns the directory name

Returns
  True, if any user is successfully logged in, otherwise False

sal_Bool osl::Security::getUserIdent | ( | rtl::OUString & | strIdent | ) | const
| inline

get the ident of the logged in user.

Parameters

  [out] | strIdent | is the OUString which returns the name

Returns
  True, if any user is successfully logged in, otherwise False

sal_Bool osl::Security::getUserName | ( | rtl::OUString & | strName | ) | const
| inline

get the name of the logged in user.

Parameters

  [out] | strName | is the OUString which returns the name

Returns
  True, if any user is successfully logged in, otherwise False

sal_Bool osl::Security::isAdministrator | ( |  | ) | const
| inline

Query if the user who is logged inhas administrator rigths.

Returns
  True, if the user has administrator rights, otherwise false.

sal_Bool osl::Security::logonUser | ( | const rtl::OUString & | strName,
|  | const rtl::OUString & | strPasswd
| ) |  |
| inline

get the security information for one user.

The underlying operating system is asked for this information.

Parameters

  [in] | strName | denotes the name of the user
  [in] | strPasswd | denotes the password of this user

Returns
  True, if the specified user is known by the underlying operating system, otherwise False

sal_Bool osl::Security::logonUser | ( | const rtl::OUString & | strName,
|  | const rtl::OUString & | strPasswd,
|  | const rtl::OUString & | strFileServer
| ) |  |
| inline

get the security information for one user.

    This method will try to login the user at the denoted file server.
    If a network resource named \\server\username exists and this resource
    could be connected by this user, the methos will return true and getHomeDir
    will return \\server\username.

Parameters

  [in] | strName | denotes the name of the user
  [in] | strPasswd | denotes the password of this user
  [in] | strFileServer | denotes the file server to login to

Returns
  True, if the specified user is known by file server and the could be connected, otherwise False

## Member Data Documentation

oslSecurity osl::Security::m_handle
| protected

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

- osl/security_decl.hxx
- osl/security.hxx