1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
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.
39 the name of the object
41 a value of com::sun::star::sdbcx::PrivilegeObject
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.
56 the name of the object
58 a value of com::sun::star::sdbcx::PrivilegeObject
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.
72 the name of the object
74 a value from the com::sun::star::sdbcx::PrivilegeObject constants group
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.
88 the name of the object
90 a value from the com::sun::star::sdbcx::PrivilegeObject constants group
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
);
106 /*===========================================================================
107 ===========================================================================*/
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */