LibreOffice Module connectivity (master) 1
AUser.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <sdbcx/VUser.hxx>
23#include <ado/Awrapadox.hxx>
24
25namespace connectivity::ado
26{
27 class OCatalog;
30
31 class OAdoUser : public OUser_TYPEDEF
32 {
33 protected:
36
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);
50
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;
58
59 WpADOUser getImpl() const { return m_aUser;}
60 };
61
62 class OUserExtend;
63 typedef ::comphelper::OPropertyArrayUsageHelper<OUserExtend> OUserExtend_PROP;
64
65 class OUserExtend : public OAdoUser,
66 public OUserExtend_PROP
67 {
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);
77
78 virtual void construct() override;
79 OUString getPassword() const { return m_Password;}
80 };
81}
82
83/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL grantPrivileges(const OUString &objName, sal_Int32 objType, sal_Int32 objPrivileges) override
Definition: AUser.cxx:149
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
Definition: AUser.cxx:68
OAdoUser(OCatalog *_pParent, bool _bCase, ADOUser *_pUser=nullptr)
Definition: AUser.cxx:36
virtual sal_Int32 SAL_CALL getGrantablePrivileges(const OUString &objName, sal_Int32 objType) override
Definition: AUser.cxx:136
WpADOUser getImpl() const
Definition: AUser.hxx:59
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
Definition: AUser.cxx:86
virtual void SAL_CALL revokePrivileges(const OUString &objName, sal_Int32 objType, sal_Int32 objPrivileges) override
Definition: AUser.cxx:157
virtual void SAL_CALL changePassword(const OUString &objPassword, const OUString &newPassword) override
Definition: AUser.cxx:166
virtual void refreshGroups() override
Definition: AUser.cxx:57
virtual sal_Int32 SAL_CALL getPrivileges(const OUString &objName, sal_Int32 objType) override
Definition: AUser.cxx:128
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
Definition: AUser.cxx:116
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
Definition: AUser.cxx:123
OUString getPassword() const
Definition: AUser.hxx:79
OUserExtend(OCatalog *_pParent, bool _bCase, ADOUser *_pUser=nullptr)
Definition: AUser.cxx:99
virtual void construct() override
Definition: AUser.cxx:110
::comphelper::OPropertyArrayUsageHelper< OUserExtend > OUserExtend_PROP
Definition: AUser.hxx:62
connectivity::sdbcx::OUser OUser_TYPEDEF
Definition: AUser.hxx:27
connectivity::sdbcx::OUser_BASE OUser_BASE_TYPEDEF
Definition: AUser.hxx:29
::cppu::WeakComponentImplHelper< css::sdbcx::XUser, css::sdbcx::XGroupsSupplier, css::container::XNamed, css::lang::XServiceInfo > OUser_BASE
Definition: VUser.hxx:41