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 _DBACCESS_OAUTHENTICATIONCONTINUATION_HXX_
21 #define _DBACCESS_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>
33 //........................................................................
36 //........................................................................
38 class OOO_DLLPUBLIC_DBA OAuthenticationContinuation
:
39 public comphelper::OInteraction
< com::sun::star::ucb::XInteractionSupplyAuthentication
>
41 sal_Bool m_bRemberPassword
: 1; // remember the password for this session ?
43 sal_Bool m_bCanSetUserName
;
44 OUString m_sUser
; // the user
45 OUString m_sPassword
; // the user's password
48 OAuthenticationContinuation();
50 sal_Bool SAL_CALL
canSetRealm( ) throw(com::sun::star::uno::RuntimeException
);
51 void SAL_CALL
setRealm( const OUString
& Realm
) throw(com::sun::star::uno::RuntimeException
);
52 sal_Bool SAL_CALL
canSetUserName( ) throw(com::sun::star::uno::RuntimeException
);
53 void SAL_CALL
setUserName( const OUString
& UserName
) throw(com::sun::star::uno::RuntimeException
);
54 sal_Bool SAL_CALL
canSetPassword( ) throw(com::sun::star::uno::RuntimeException
);
55 void SAL_CALL
setPassword( const OUString
& Password
) throw(com::sun::star::uno::RuntimeException
);
56 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
);
57 void SAL_CALL
setRememberPassword( com::sun::star::ucb::RememberAuthentication Remember
) throw(com::sun::star::uno::RuntimeException
);
58 sal_Bool SAL_CALL
canSetAccount( ) throw(com::sun::star::uno::RuntimeException
);
59 void SAL_CALL
setAccount( const OUString
& Account
) throw(com::sun::star::uno::RuntimeException
);
60 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
);
61 void SAL_CALL
setRememberAccount( com::sun::star::ucb::RememberAuthentication Remember
) throw(com::sun::star::uno::RuntimeException
);
63 void setCanChangeUserName( sal_Bool bVal
) { m_bCanSetUserName
= bVal
; }
64 OUString
getUser() const { return m_sUser
; }
65 OUString
getPassword() const { return m_sPassword
; }
66 sal_Bool
getRememberPassword() const { return m_bRemberPassword
; }
69 //........................................................................
70 } // namespace dbaccess
71 //........................................................................
73 #endif // _DBACCESS_OAUTHENTICATIONCONTINUATION_HXX_
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */