LibreOffice
LibreOffice 24.2 SDK C/C++ API Reference
security.h
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 /*
21  * This file is part of LibreOffice published API.
22  */
23 
24 #ifndef INCLUDED_OSL_SECURITY_H
25 #define INCLUDED_OSL_SECURITY_H
26 
27 #include "sal/config.h"
28 
29 #include "rtl/ustring.h"
30 #include "sal/saldllapi.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 typedef enum {
43 
49 typedef void* oslSecurity;
50 
58 
71  rtl_uString *strUserName,
72  rtl_uString *strPasswd,
73  oslSecurity *pSecurity
74  );
75 
89  rtl_uString *strUserName,
90  rtl_uString *strPasswd,
91  rtl_uString *strFileServer,
92  oslSecurity *pSecurity
93  );
94 
100  oslSecurity Security);
101 
107  oslSecurity Security);
108 
115  oslSecurity Security, rtl_uString **strIdent);
116 
123  oslSecurity Security, rtl_uString **strName);
124 
133  oslSecurity Security, rtl_uString **strName);
134 
141  oslSecurity Security, rtl_uString **strDirectory);
142 
149  oslSecurity Security, rtl_uString **strDirectory);
150 
151 
159  oslSecurity Security);
160 
161 
168  oslSecurity Security);
169 
170 #ifdef __cplusplus
171 }
172 #endif
173 
174 #endif // INCLUDED_OSL_SECURITY_H
175 
176 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DLLPUBLIC sal_Bool osl_getUserIdent(oslSecurity Security, rtl_uString **strIdent)
Get the login ident for the user of this security handle.
Definition: security.h:40
SAL_DLLPUBLIC sal_Bool osl_isAdministrator(oslSecurity Security)
Query if the user who is denotes by this security has administrator rights.
Definition: security.h:38
SAL_DLLPUBLIC oslSecurityError osl_loginUserOnFileServer(rtl_uString *strUserName, rtl_uString *strPasswd, rtl_uString *strFileServer, oslSecurity *pSecurity)
Create a security handle for the denoted user.
SAL_DLLPUBLIC oslSecurity osl_getCurrentSecurity(void)
Create a security handle for the current user.
#define SAL_DLLPUBLIC
Definition: saldllapi.h:34
SAL_DLLPUBLIC sal_Bool osl_loadUserProfile(oslSecurity Security)
Load Profile of the User Implemented just for Windows.
SAL_DLLPUBLIC oslSecurityError osl_loginUser(rtl_uString *strUserName, rtl_uString *strPasswd, oslSecurity *pSecurity)
Deprecated API Create a security handle for the denoted user.
SAL_DLLPUBLIC void osl_freeSecurityHandle(oslSecurity Security)
Free the security handle, created by osl_loginUser or osl_getCurrentSecurity.
Definition: security.h:37
unsigned char sal_Bool
Definition: types.h:38
SAL_DLLPUBLIC sal_Bool osl_getHomeDir(oslSecurity Security, rtl_uString **strDirectory)
Get the home directory of the user of this security handle.
SAL_DLLPUBLIC void osl_unloadUserProfile(oslSecurity Security)
Unload a User Profile Implemented just for Windows.
oslSecurityError
Definition: security.h:36
Definition: security.h:39
void * oslSecurity
Process handle.
Definition: security.h:49
Definition: security.h:41
SAL_DLLPUBLIC sal_Bool osl_getConfigDir(oslSecurity Security, rtl_uString **strDirectory)
Get the directory for configuration data of the user of this security handle.
#define SAL_MAX_ENUM
Definition: types.h:205
SAL_DLLPUBLIC sal_Bool osl_getShortUserName(oslSecurity Security, rtl_uString **strName)
Get the login name for the user of this security handle, excluding the domain name on Windows...
SAL_DLLPUBLIC sal_Bool osl_getUserName(oslSecurity Security, rtl_uString **strName)
Get the login name for the user of this security handle.