/src/libreoffice/dbaccess/source/inc/OAuthenticationContinuation.hxx
Line | Count | Source |
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 <config_options.h> |
23 | | |
24 | | #include <dbadllapi.hxx> |
25 | | |
26 | | #include <com/sun/star/ucb/XInteractionSupplyAuthentication.hpp> |
27 | | |
28 | | #include <rtl/ustring.hxx> |
29 | | #include <comphelper/interaction.hxx> |
30 | | |
31 | | namespace dbaccess |
32 | | { |
33 | | |
34 | | class UNLESS_MERGELIBS_MORE(OOO_DLLPUBLIC_DBA) OAuthenticationContinuation : |
35 | | public comphelper::OInteraction< css::ucb::XInteractionSupplyAuthentication > |
36 | | { |
37 | | bool m_bRememberPassword : 1; // remember the password for this session ? |
38 | | |
39 | | bool m_bCanSetUserName; |
40 | | OUString m_sUser; // the user |
41 | | OUString m_sPassword; // the user's password |
42 | | |
43 | | public: |
44 | | OAuthenticationContinuation(); |
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 | 0 | void setCanChangeUserName( bool bVal ) { m_bCanSetUserName = bVal; } |
60 | 0 | const OUString& getUser() const { return m_sUser; } |
61 | 0 | const OUString& getPassword() const { return m_sPassword; } |
62 | 0 | bool getRememberPassword() const { return m_bRememberPassword; } |
63 | | }; |
64 | | |
65 | | } // namespace dbaccess |
66 | | |
67 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |