Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / connectivity / source / inc / ado / AUser.hxx
blob8d0c0f7321b6d54ab40146c9d3c893ca75509c09
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 #pragma once
22 #include <sdbcx/VUser.hxx>
23 #include <ado/Awrapadox.hxx>
25 namespace connectivity::ado
27 class OCatalog;
28 typedef connectivity::sdbcx::OUser OUser_TYPEDEF;
29 typedef connectivity::sdbcx::OUser_BASE OUser_BASE_TYPEDEF;
31 class OAdoUser : public OUser_TYPEDEF
33 protected:
34 WpADOUser m_aUser;
35 OCatalog* m_pCatalog;
37 virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
38 sal_Int32 nHandle,
39 const css::uno::Any& rValue
40 ) override;
41 virtual void SAL_CALL getFastPropertyValue(
42 css::uno::Any& rValue,
43 sal_Int32 nHandle
44 ) const override;
45 public:
46 virtual void refreshGroups() override;
47 public:
48 OAdoUser(OCatalog* _pParent,bool _bCase, ADOUser* _pUser=nullptr);
49 OAdoUser(OCatalog* _pParent,bool _bCase, const OUString& Name);
51 // XUser
52 virtual void SAL_CALL changePassword( const OUString& objPassword, const OUString& newPassword ) override;
53 // XAuthorizable
54 virtual sal_Int32 SAL_CALL getPrivileges( const OUString& objName, sal_Int32 objType ) override;
55 virtual sal_Int32 SAL_CALL getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) override;
56 virtual void SAL_CALL grantPrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) override;
57 virtual void SAL_CALL revokePrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) override;
59 WpADOUser getImpl() const { return m_aUser;}
62 class OUserExtend;
63 typedef ::comphelper::OPropertyArrayUsageHelper<OUserExtend> OUserExtend_PROP;
65 class OUserExtend : public OAdoUser,
66 public OUserExtend_PROP
68 protected:
69 OUString m_Password;
70 // OPropertyArrayUsageHelper
71 virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const override;
72 // OPropertySetHelper
73 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
74 public:
75 OUserExtend(OCatalog* _pParent,bool _bCase,ADOUser* _pUser=nullptr);
76 OUserExtend(OCatalog* _pParent,bool _bCase,const OUString& Name);
78 virtual void construct() override;
79 OUString getPassword() const { return m_Password;}
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */