LibreOffice Module dbaccess (master) 1
OAuthenticationContinuation.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 <dbadllapi.hxx>
23
24#include <com/sun/star/ucb/XInteractionSupplyAuthentication.hpp>
25#include <com/sun/star/ucb/RememberAuthentication.hpp>
26#include <com/sun/star/uno/Sequence.hxx>
27
28#include <rtl/ustring.hxx>
30
31namespace dbaccess
32{
33
35 public comphelper::OInteraction< css::ucb::XInteractionSupplyAuthentication >
36{
37 bool m_bRememberPassword : 1; // remember the password for this session ?
38
40 OUString m_sUser; // the user
41 OUString m_sPassword; // the user's password
42
43public:
45
46 sal_Bool SAL_CALL canSetRealm( ) override;
47 void SAL_CALL setRealm( const OUString& Realm ) override;
48 sal_Bool SAL_CALL canSetUserName( ) override;
49 void SAL_CALL setUserName( const OUString& UserName ) override;
50 sal_Bool SAL_CALL canSetPassword( ) override;
51 void SAL_CALL setPassword( const OUString& Password ) override;
52 css::uno::Sequence< css::ucb::RememberAuthentication > SAL_CALL getRememberPasswordModes( css::ucb::RememberAuthentication& Default ) override;
53 void SAL_CALL setRememberPassword( css::ucb::RememberAuthentication Remember ) override;
54 sal_Bool SAL_CALL canSetAccount( ) override;
55 void SAL_CALL setAccount( const OUString& Account ) override;
56 css::uno::Sequence< css::ucb::RememberAuthentication > SAL_CALL getRememberAccountModes( css::ucb::RememberAuthentication& Default ) override;
57 void SAL_CALL setRememberAccount( css::ucb::RememberAuthentication Remember ) override;
58
59 void setCanChangeUserName( bool bVal ) { m_bCanSetUserName = bVal; }
60 const OUString& getUser() const { return m_sUser; }
61 const OUString& getPassword() const { return m_sPassword; }
62 bool getRememberPassword() const { return m_bRememberPassword; }
63};
64
65} // namespace dbaccess
66
67/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_DLLPUBLIC_DBA
Definition: dbadllapi.hxx:29
unsigned char sal_Bool