Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / sdbcx / XAuthorizable.idl
blobfae08415857a12c815f4572fb20e744eec04861a
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 __com_sun_star_sdbcx_XAuthorizable_idl__
20 #define __com_sun_star_sdbcx_XAuthorizable_idl__
22 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/sdbc/SQLException.idl>
26 module com { module sun { module star { module sdbcx {
28 /** is used for accessing and setting the permissions of a user for a database
29 object.
30 @see com::sun::star::sdbcx::PrivilegeObject
31 @see com::sun::star::sdbcx::Privilege
33 published interface XAuthorizable: com::sun::star::uno::XInterface
36 /** retrieves the permissions for a specific object.
38 @param objName
39 the name of the object
40 @param objType
41 a value of com::sun::star::sdbcx::PrivilegeObject
43 @returns
44 the privileges
46 @throws com::sun::star::sdbc::SQLException
47 if a database access error occurs.
49 long getPrivileges([in]string objName, [in]long objType) raises
50 (com::sun::star::sdbc::SQLException);
52 /** retrieves the permissions for a specific object, which could be granted
53 to other users and groups.
55 @param objName
56 the name of the object
57 @param objType
58 a value of com::sun::star::sdbcx::PrivilegeObject
60 @returns
61 the grant privileges
63 @throws com::sun::star::sdbc::SQLException
64 if a database access error occurs.
66 long getGrantablePrivileges([in]string objName, [in]long objType) raises
67 (com::sun::star::sdbc::SQLException);
69 /** adds additional permissions for a specific object.
71 @param objName
72 the name of the object
73 @param objType
74 a value from the com::sun::star::sdbcx::PrivilegeObject constants group
75 @param objPrivileges
76 a value from the com::sun::star::sdbcx::Privilege constants group
78 @throws com::sun::star::sdbc::SQLException
79 if a database access error occurs.
81 void grantPrivileges([in]string objName, [in]long objType,
82 [in]long objPrivileges) raises
83 (com::sun::star::sdbc::SQLException);
85 /** removes permissions for a specific object from a group or user.
87 @param objName
88 the name of the object
89 @param objType
90 a value from the com::sun::star::sdbcx::PrivilegeObject constants group
91 @param objPrivileges
92 a value from the com::sun::star::sdbcx::Privilege constants group
95 @throws com::sun::star::sdbc::SQLException
96 if a database access error occurs.
98 void revokePrivileges([in]string objName, [in]long objType,
99 [in]long objPrivileges) raises
100 (com::sun::star::sdbc::SQLException);
104 }; }; }; };
106 /*===========================================================================
107 ===========================================================================*/
108 #endif
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */