Branch libreoffice-5-0-4
[LibreOffice.git] / include / connectivity / sdbcx / VUser.hxx
blob3b8287323a552292ee1914945ac9e9424e5f7c6b
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_SDBCX_VUSER_HXX
21 #define INCLUDED_CONNECTIVITY_SDBCX_VUSER_HXX
23 #include <osl/diagnose.h>
24 #include <com/sun/star/sdbcx/XUser.hpp>
25 #include <com/sun/star/sdbcx/XGroupsSupplier.hpp>
26 #include <comphelper/proparrhlp.hxx>
27 #include <cppuhelper/compbase4.hxx>
28 #include <connectivity/CommonTools.hxx>
29 #include <comphelper/broadcasthelper.hxx>
30 #include <connectivity/sdbcx/VCollection.hxx>
31 #include <com/sun/star/container/XNamed.hpp>
32 #include <connectivity/sdbcx/IRefreshable.hxx>
33 #include <connectivity/sdbcx/VDescriptor.hxx>
34 #include <connectivity/dbtoolsdllapi.hxx>
36 namespace connectivity
38 namespace sdbcx
40 typedef OCollection OGroups;
42 typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::sdbcx::XUser,
43 ::com::sun::star::sdbcx::XGroupsSupplier,
44 ::com::sun::star::container::XNamed,
45 ::com::sun::star::lang::XServiceInfo> OUser_BASE;
47 class OOO_DLLPUBLIC_DBTOOLS OUser :
48 public comphelper::OBaseMutex,
49 public OUser_BASE,
50 public IRefreshableGroups,
51 public ::comphelper::OPropertyArrayUsageHelper<OUser>,
52 public ODescriptor
54 protected:
55 OGroups* m_pGroups;
57 using OUser_BASE::rBHelper;
59 // OPropertyArrayUsageHelper
60 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE;
61 // OPropertySetHelper
62 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE;
63 public:
64 OUser(bool _bCase);
65 OUser(const OUString& _Name,bool _bCase);
67 virtual ~OUser( );
69 DECLARE_SERVICE_INFO();
71 // ::cppu::OComponentHelper
72 virtual void SAL_CALL disposing() SAL_OVERRIDE;
73 //XInterface
74 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
75 virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
76 virtual void SAL_CALL release() throw() SAL_OVERRIDE;
77 //XTypeProvider
78 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
79 // XPropertySet
80 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
81 // XUser
82 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;
83 // XAuthorizable
84 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;
85 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;
86 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;
87 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;
88 // XGroupsSupplier
89 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getGroups( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
91 // XNamed
92 virtual OUString SAL_CALL getName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
93 virtual void SAL_CALL setName( const OUString& aName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
98 #endif // INCLUDED_CONNECTIVITY_SDBCX_VUSER_HXX
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */