merge the formfield patch from ooo-build
[ooovba.git] / connectivity / source / inc / adabas / BUser.hxx
blobee768786af3d7ba4686283f8858dcec09c1b94a7
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: BUser.hxx,v $
10 * $Revision: 1.11 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _CONNECTIVITY_ADABAS_USER_HXX_
32 #define _CONNECTIVITY_ADABAS_USER_HXX_
34 #include "connectivity/sdbcx/VUser.hxx"
36 namespace connectivity
38 namespace adabas
40 class OAdabasConnection;
41 typedef connectivity::sdbcx::OUser OUser_TYPEDEF;
43 class OAdabasUser : public OUser_TYPEDEF
45 OAdabasConnection* m_pConnection;
47 ::rtl::OUString getPrivilegeString(sal_Int32 nRights) const;
48 // return the privileges and additional the grant rights
49 void getAnyTablePrivileges(const ::rtl::OUString& objName, sal_Int32& nRights,sal_Int32& nRightsWithGrant) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
50 public:
51 virtual void refreshGroups();
52 public:
53 OAdabasUser( OAdabasConnection* _pConnection);
54 OAdabasUser( OAdabasConnection* _pConnection,const ::rtl::OUString& _Name);
56 // XUser
57 virtual void SAL_CALL changePassword( const ::rtl::OUString& objPassword, const ::rtl::OUString& newPassword ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
58 // XAuthorizable
59 virtual sal_Int32 SAL_CALL getPrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
60 virtual sal_Int32 SAL_CALL getGrantablePrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
61 virtual void SAL_CALL grantPrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
62 virtual void SAL_CALL revokePrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
65 class OUserExtend;
66 typedef ::comphelper::OPropertyArrayUsageHelper<OUserExtend> OUserExtend_PROP;
68 class OUserExtend : public OAdabasUser,
69 public OUserExtend_PROP
71 protected:
72 ::rtl::OUString m_Password;
73 // OPropertyArrayUsageHelper
74 virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const;
75 // OPropertySetHelper
76 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
77 public:
78 OUserExtend(OAdabasConnection* _pConnection);
80 virtual void construct();
84 #endif // _CONNECTIVITY_ADABAS_USER_HXX_