1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #ifndef INCLUDED_DBACCESS_SOURCE_INC_OAUTHENTICATIONCONTINUATION_HXX
21 #define INCLUDED_DBACCESS_SOURCE_INC_OAUTHENTICATIONCONTINUATION_HXX
23 #include "dbadllapi.hxx"
25 #include <com/sun/star/ucb/XInteractionSupplyAuthentication.hpp>
26 #include <com/sun/star/ucb/RememberAuthentication.hpp>
27 #include <com/sun/star/uno/Sequence.hxx>
29 #include <rtl/ustring.hxx>
30 #include <comphelper/interaction.hxx>
35 class OOO_DLLPUBLIC_DBA OAuthenticationContinuation
:
36 public comphelper::OInteraction
< com::sun::star::ucb::XInteractionSupplyAuthentication
>
38 bool m_bRemberPassword
: 1; // remember the password for this session ?
40 bool m_bCanSetUserName
;
41 OUString m_sUser
; // the user
42 OUString m_sPassword
; // the user's password
45 OAuthenticationContinuation();
47 sal_Bool SAL_CALL
canSetRealm( ) throw(com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
48 void SAL_CALL
setRealm( const OUString
& Realm
) throw(com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
49 sal_Bool SAL_CALL
canSetUserName( ) throw(com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
50 void SAL_CALL
setUserName( const OUString
& UserName
) throw(com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
51 sal_Bool SAL_CALL
canSetPassword( ) throw(com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
52 void SAL_CALL
setPassword( const OUString
& Password
) throw(com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
53 com::sun::star::uno::Sequence
< com::sun::star::ucb::RememberAuthentication
> SAL_CALL
getRememberPasswordModes( com::sun::star::ucb::RememberAuthentication
& Default
) throw(com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
54 void SAL_CALL
setRememberPassword( com::sun::star::ucb::RememberAuthentication Remember
) throw(com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
55 sal_Bool SAL_CALL
canSetAccount( ) throw(com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
56 void SAL_CALL
setAccount( const OUString
& Account
) throw(com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
57 com::sun::star::uno::Sequence
< com::sun::star::ucb::RememberAuthentication
> SAL_CALL
getRememberAccountModes( com::sun::star::ucb::RememberAuthentication
& Default
) throw(com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
58 void SAL_CALL
setRememberAccount( com::sun::star::ucb::RememberAuthentication Remember
) throw(com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
60 void setCanChangeUserName( bool bVal
) { m_bCanSetUserName
= bVal
; }
61 OUString
getUser() const { return m_sUser
; }
62 OUString
getPassword() const { return m_sPassword
; }
63 bool getRememberPassword() const { return m_bRemberPassword
; }
66 } // namespace dbaccess
68 #endif // INCLUDED_DBACCESS_SOURCE_INC_OAUTHENTICATIONCONTINUATION_HXX
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */