LibreOffice
LibreOffice 5.3 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
security_decl.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  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_OSL_SECURITY_DECL_HXX
21 #define INCLUDED_OSL_SECURITY_DECL_HXX
22 
23 #include <rtl/ustring.hxx>
24 # include <osl/security.h>
25 
26 namespace osl
27 {
28 
34 class Security
35 {
36 protected:
38 
39 public:
41  inline Security();
43  inline ~Security();
51  inline bool SAL_CALL logonUser(const rtl::OUString& strName,
52  const rtl::OUString& strPasswd);
67  inline bool SAL_CALL logonUser(const rtl::OUString & strName,
68  const rtl::OUString & strPasswd,
69  const rtl::OUString & strFileServer);
70 
75  inline bool SAL_CALL getUserIdent( rtl::OUString& strIdent) const;
76 
83  inline bool SAL_CALL getUserName( rtl::OUString& strName, bool bIncludeDomain=true ) const;
84 
89  inline bool SAL_CALL getHomeDir( rtl::OUString& strDirectory) const;
90 
95  inline bool SAL_CALL getConfigDir( rtl::OUString & strDirectory) const;
96 
100  inline bool SAL_CALL isAdministrator() const;
101 
104  inline oslSecurity getHandle() const;
105 
106 };
107 
108 }
109 
110 #endif // INCLUDED_OSL_SECURITY_DECL_HXX
111 
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool logonUser(const rtl::OUString &strName, const rtl::OUString &strPasswd)
get the security information for one user.
Definition: security.hxx:43
Security()
constructor
Definition: security.hxx:33
bool getHomeDir(rtl::OUString &strDirectory) const
get the home directory of the logged in user.
Definition: security.hxx:80
bool getUserName(rtl::OUString &strName, bool bIncludeDomain=true) const
get the name of the logged in user.
Definition: security.hxx:72
bool isAdministrator() const
Query if the user who is logged in has administrator rights.
Definition: security.hxx:91
oslSecurity getHandle() const
Returns the underlying oslSecurity handle.
Definition: security.hxx:96
bool getUserIdent(rtl::OUString &strIdent) const
get the ident of the logged in user.
Definition: security.hxx:66
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:106
bool getConfigDir(rtl::OUString &strDirectory) const
get the directory for configuration data of the logged in user.
Definition: security.hxx:86
void * oslSecurity
Process handle.
Definition: security.h:45
oslSecurity m_handle
Definition: security_decl.hxx:37
capsulate security information for one user.
Definition: security_decl.hxx:34
~Security()
destructor
Definition: security.hxx:38