xref: /AOO41X/main/offapi/com/sun/star/sdbcx/XAuthorizable.idl (revision d1766043198e81d0bcfc626e12893e7b4d7e31ca)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_sdbcx_XAuthorizable_idl__
24#define __com_sun_star_sdbcx_XAuthorizable_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_sdbc_SQLException_idl__
31#include <com/sun/star/sdbc/SQLException.idl>
32#endif
33
34 module com {  module sun {  module star {  module sdbcx {
35
36/** is used for accessing and setting the permissions of a user for a database
37    object.
38    @see com::sun::star::sdbcx::PrivilegeObject
39 */
40published interface XAuthorizable: com::sun::star::uno::XInterface
41{
42
43    /** retrieves the permissions for a specific object.
44        @param objName
45            the name of the object
46        @param objType
47            a value of
48            <type scope="com::sun::star::sdbcx">PrivilegeObject</Type>
49        @returns
50            the privileges
51        @throws com::sun::star::sdbc::SQLException
52                if a database access error occurs.
53     */
54    long getPrivileges([in]string objName, [in]long objType) raises
55                        (com::sun::star::sdbc::SQLException);
56    //-------------------------------------------------------------------------
57
58    /** retrieves the permissions for a specific object, which could be granted
59        to other users and groups.
60        @param objName
61            the name of the object
62        @param objType
63            a value of
64            <type scope="com::sun::star::sdbcx">PrivilegeObject</Type>
65        @returns
66            the grant privileges
67        @throws com::sun::star::sdbc::SQLException
68            if a database access error occurs.
69     */
70    long getGrantablePrivileges([in]string objName, [in]long objType) raises
71                        (com::sun::star::sdbc::SQLException);
72    //-------------------------------------------------------------------------
73
74    /** adds additional permissions for a specific object.
75        @param objName
76            the name of the object
77        @param objType
78            a value from the <type scope="com::sun::star::sdbcx">PrivilegeObject</type> constants group
79        @throws com::sun::star::sdbc::SQLException
80            if a database access error occurs.
81     */
82    void grantPrivileges([in]string objName, [in]long objType,
83                         [in]long objPrivileges) raises
84        (com::sun::star::sdbc::SQLException);
85    //-------------------------------------------------------------------------
86
87    /** removes permissions for a specific object from a group or user.
88        @param objName
89            the name of the object
90        @param objType
91            a value from the <type scope="com::sun::star::sdbcx">PrivilegeObject</type> constants group
92        @throws com::sun::star::sdbc::SQLException
93            if a database access error occurs.
94     */
95    void revokePrivileges([in]string objName, [in]long objType,
96                          [in]long objPrivileges) raises
97        (com::sun::star::sdbc::SQLException);
98};
99
100//=============================================================================
101
102}; }; }; };
103
104/*===========================================================================
105===========================================================================*/
106#endif
107