Line data Source code
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 : #ifndef _DBACCESS_OAUTHENTICATIONCONTINUATION_HXX_
21 : #define _DBACCESS_OAUTHENTICATIONCONTINUATION_HXX_
22 :
23 : #include "dbadllapi.hxx"
24 :
25 : #include <com/sun/star/ucb/XInteractionSupplyAuthentication.hpp>
26 : #include <com/sun/star/ucb/RememberAuthentication.hpp>
27 : #include <com/sun/star/uno/Sequence.hxx>
28 :
29 : #include <rtl/ustring.hxx>
30 : #include <comphelper/interaction.hxx>
31 :
32 :
33 : //........................................................................
34 : namespace dbaccess
35 : {
36 : //........................................................................
37 :
38 0 : class OOO_DLLPUBLIC_DBA OAuthenticationContinuation :
39 : public comphelper::OInteraction< com::sun::star::ucb::XInteractionSupplyAuthentication >
40 : {
41 : sal_Bool m_bRemberPassword : 1; // remember the password for this session ?
42 :
43 : sal_Bool m_bCanSetUserName;
44 : ::rtl::OUString m_sUser; // the user
45 : ::rtl::OUString m_sPassword; // the user's password
46 :
47 : public:
48 : OAuthenticationContinuation();
49 :
50 : sal_Bool SAL_CALL canSetRealm( ) throw(com::sun::star::uno::RuntimeException);
51 : void SAL_CALL setRealm( const ::rtl::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 ::rtl::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 ::rtl::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 ::rtl::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);
62 :
63 0 : void setCanChangeUserName( sal_Bool bVal ) { m_bCanSetUserName = bVal; }
64 0 : ::rtl::OUString getUser() const { return m_sUser; }
65 0 : ::rtl::OUString getPassword() const { return m_sPassword; }
66 0 : sal_Bool getRememberPassword() const { return m_bRemberPassword; }
67 : };
68 :
69 : //........................................................................
70 : } // namespace dbaccess
71 : //........................................................................
72 :
73 : #endif // _DBACCESS_OAUTHENTICATIONCONTINUATION_HXX_
74 :
75 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|