LibreOffice Module uui (master) 1
passwordcontainer.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
23
24#include <com/sun/star/lang/XServiceInfo.hpp>
25#include <com/sun/star/task/XInteractionHandler2.hpp>
26#include <com/sun/star/task/XPasswordContainer2.hpp>
27#include <com/sun/star/uno/XComponentContext.hpp>
28
29namespace com {
30 namespace sun {
31 namespace star {
32 namespace ucb {
33 class AuthenticationRequest;
34 class XInteractionSupplyAuthentication;
35} } } }
36
37namespace uui {
38
39
43{
44public:
46 css::uno::Reference< css::uno::XComponentContext > const & xContext );
47
48
79 css::ucb::AuthenticationRequest const & rRequest,
80 css::uno::Reference< css::ucb::XInteractionSupplyAuthentication > const & xSupplyAuthentication,
81 OUString const & rURL,
82 css::uno::Reference< css::task::XInteractionHandler2 > const & xIH );
83
111 bool addRecord( OUString const & rURL,
112 OUString const & rUsername,
113 css::uno::Sequence< OUString > const & rPasswords,
114 css::uno::Reference< css::task::XInteractionHandler2 > const & xIH,
115 bool bPersist );
116
117
118private:
119 css::uno::Reference< css::task::XPasswordContainer2 > m_xPasswordContainer;
120};
121
122
124 public cppu::WeakImplHelper< css::lang::XServiceInfo,
125 css::task::XInteractionHandler2 >
126{
127public:
129 const css::uno::Reference< css::uno::XComponentContext >& xContext );
130 virtual ~PasswordContainerInteractionHandler() override;
131
132 // XServiceInfo
133 virtual OUString SAL_CALL getImplementationName() override;
134
135 virtual sal_Bool SAL_CALL
136 supportsService( const OUString& ServiceName ) override;
137
138 virtual css::uno::Sequence< OUString > SAL_CALL
139 getSupportedServiceNames() override;
140
141 // XInteractionHandler2
142 virtual void SAL_CALL
143 handle( const css::uno::Reference< css::task::XInteractionRequest >& Request ) override;
144
145 virtual sal_Bool SAL_CALL
146 handleInteractionRequest( const css::uno::Reference< css::task::XInteractionRequest >& Request ) override;
147
148private:
150};
151
152} // namespace uui
153
154/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Passwordcontainer UNO service (com.sun.star.task.PasswordContainer) helper.
PasswordContainerHelper(css::uno::Reference< css::uno::XComponentContext > const &xContext)
bool handleAuthenticationRequest(css::ucb::AuthenticationRequest const &rRequest, css::uno::Reference< css::ucb::XInteractionSupplyAuthentication > const &xSupplyAuthentication, OUString const &rURL, css::uno::Reference< css::task::XInteractionHandler2 > const &xIH)
This member function tries to handle an authentication interaction request by looking up credentials ...
css::uno::Reference< css::task::XPasswordContainer2 > m_xPasswordContainer
bool addRecord(OUString const &rURL, OUString const &rUsername, css::uno::Sequence< OUString > const &rPasswords, css::uno::Reference< css::task::XInteractionHandler2 > const &xIH, bool bPersist)
This member function adds credentials for the given URL to the password container.
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
PasswordContainerInteractionHandler(const css::uno::Reference< css::uno::XComponentContext > &xContext)
virtual void SAL_CALL handle(const css::uno::Reference< css::task::XInteractionRequest > &Request) override
virtual sal_Bool SAL_CALL handleInteractionRequest(const css::uno::Reference< css::task::XInteractionRequest > &Request) override
Definition: fltdlg.cxx:29
unsigned char sal_Bool