LibreOffice Module connectivity (master) 1
User.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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
10#include "User.hxx"
11
12using namespace ::connectivity;
13using namespace ::connectivity::firebird;
14using namespace ::connectivity::sdbcx;
15
16using namespace ::com::sun::star;
17using namespace ::com::sun::star::sdbc;
18
19User::User(const css::uno::Reference< css::sdbc::XConnection >& rConnection):
20 OUser(true) // Case Sensitive
21 , m_xConnection(rConnection)
22{}
23
24User::User(const css::uno::Reference< css::sdbc::XConnection >& rConnection, const OUString& rName):
25 OUser(rName,
26 true) // Case Sensitive
27 , m_xConnection(rConnection)
28{}
29
30void User::changePassword(const OUString&, const OUString& newPassword)
31{
32 m_xConnection->createStatement()->execute("ALTER USER " + m_Name + " PASSWORD '" + newPassword + "'");
33}
34
35sal_Int32 User::getPrivileges(const OUString& , sal_Int32 )
36{
37 // TODO: implement.
38 return 0;
39}
40
41sal_Int32 User::getGrantablePrivileges(const OUString& , sal_Int32 )
42{
43 // TODO: implement.
44 return 0;
45}
46
47//----- IRefreshableGroups ----------------------------------------------------
49{
50 // TODO: implement.
51}
52
53/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
struct _ADOUser User
Definition: Awrapadox.hxx:30
virtual sal_Int32 SAL_CALL getPrivileges(const OUString &, sal_Int32) override
css::uno::Reference< css::sdbc::XConnection > m_xConnection
Definition: User.hxx:23
virtual void SAL_CALL changePassword(const OUString &, const OUString &newPassword) override
virtual void refreshGroups() override
User(const css::uno::Reference< css::sdbc::XConnection > &rConnection)
Create a "new" descriptor, which isn't yet in the database.
Definition: User.cxx:19
virtual sal_Int32 SAL_CALL getGrantablePrivileges(const OUString &, sal_Int32) override
Reference< XConnection > m_xConnection