LibreOffice Module ucb (master)  1
certvalidation_handler.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  */
12 #pragma once
13 
14 #if defined __GNUC__ && !defined __clang__
15 #pragma GCC diagnostic push
16 #pragma GCC diagnostic ignored "-Wdeprecated"
17 #pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
18 #endif
19 #include <libcmis/libcmis.hxx>
20 #if defined __GNUC__ && !defined __clang__
21 #pragma GCC diagnostic pop
22 #endif
23 
24 #include <com/sun/star/ucb/XCommandEnvironment.hpp>
25 
26 namespace cmis
27 {
28  class CertValidationHandler : public libcmis::CertValidationHandler
29  {
30  const css::uno::Reference< css::ucb::XCommandEnvironment>& m_xEnv;
31  const css::uno::Reference< css::uno::XComponentContext >& m_xContext;
32  OUString m_sHostname;
33 
34  public:
36  const css::uno::Reference< css::ucb::XCommandEnvironment>& xEnv,
37  const css::uno::Reference< css::uno::XComponentContext>& xContext,
38  const OUString& sHostname ):
39  m_xEnv( xEnv ), m_xContext( xContext ), m_sHostname( sHostname ) { }
40 
41  bool validateCertificate( std::vector< std::string > certificates ) override;
42  };
43 }
44 
45 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const css::uno::Reference< css::ucb::XCommandEnvironment > & m_xEnv
CertValidationHandler(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, const css::uno::Reference< css::uno::XComponentContext > &xContext, const OUString &sHostname)
const css::uno::Reference< css::uno::XComponentContext > & m_xContext
bool validateCertificate(std::vector< std::string > certificates) override