bump product version to 5.0.4.1
[LibreOffice.git] / connectivity / source / inc / hsqldb / HUser.hxx
blob2e626f79ee52f6c080fef5bae4215b2fb9316220
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 .
20 #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HUSER_HXX
21 #define INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HUSER_HXX
23 #include <connectivity/sdbcx/VUser.hxx>
24 #include <com/sun/star/sdbc/XConnection.hpp>
26 namespace connectivity
28 namespace hsqldb
30 typedef connectivity::sdbcx::OUser OUser_TYPEDEF;
32 class OHSQLUser : public OUser_TYPEDEF
34 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
36 static OUString getPrivilegeString(sal_Int32 nRights);
37 // return the privileges and additional the grant rights
38 void findPrivilegesAndGrantPrivileges(const OUString& objName, sal_Int32 objType,sal_Int32& nRights,sal_Int32& nRightsWithGrant) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
39 public:
40 virtual void refreshGroups() SAL_OVERRIDE;
41 public:
42 OHSQLUser( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection);
43 OHSQLUser( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,const OUString& _Name);
45 // XUser
46 virtual void SAL_CALL changePassword( const OUString& objPassword, const OUString& newPassword ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
47 // XAuthorizable
48 virtual sal_Int32 SAL_CALL getPrivileges( const OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
49 virtual sal_Int32 SAL_CALL getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
50 virtual void SAL_CALL grantPrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
51 virtual void SAL_CALL revokePrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
54 class OUserExtend;
55 typedef ::comphelper::OPropertyArrayUsageHelper<OUserExtend> OUserExtend_PROP;
57 class OUserExtend : public OHSQLUser,
58 public OUserExtend_PROP
60 protected:
61 OUString m_Password;
62 // OPropertyArrayUsageHelper
63 virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const SAL_OVERRIDE;
64 // OPropertySetHelper
65 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE;
66 public:
67 OUserExtend(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection);
69 virtual void construct() SAL_OVERRIDE;
73 #endif // INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HUSER_HXX
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */