Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/svtools/source/dialogs/   (Office von Apache Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 4 kB image not shown  

Quelle  ServerDetailsControls.hxx   Sprache: C

 
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#ifndef INCLUDED_SVTOOLS_SERVERDETAILSCONTROLS_HXX
#define INCLUDED_SVTOOLS_SERVERDETAILSCONTROLS_HXX

#include <vector>

#include <com/sun/star/uno/Reference.hxx>
#include <ucbhelper/commandenvironment.hxx>
#include <tools/link.hxx>
#include <tools/urlobj.hxx>
#include <vcl/weld.hxx>

namespace com :: sun :: star :: awt { class XWindow; }

namespace weld {
    class Button;
    class ComboBox;
    class Entry;
    class SpinButton;
}

class PlaceEditDialog;

class DetailsContainer
{
    protected:
        PlaceEditDialog* m_pDialog;
        Link<DetailsContainer*,void> m_aChangeHdl;

    public:
        DetailsContainer(PlaceEditDialog* pDialog);
        virtual ~DetailsContainer( );

        void setChangeHdl( const Link<DetailsContainer*,void>& rLink ) { m_aChangeHdl = rLink; }

        virtual void set_visible( bool bShow );
        virtual INetURLObject getUrl( );

        /** Try to split the URL in the controls of that container.

            \param sUrl the URL to split
            \return true if the split worked, false otherwise.
         */

        virtual bool setUrl( const INetURLObject& rUrl );

        virtual void setUsername( const OUString& /*rUsername*/ ) { };
        virtual void setPassword( const OUString& ) { };

        virtual bool enableUserCredentials( ) { return true; };

    protected:
        void notifyChange( );
        DECL_LINK(ValueChangeHdl, weld::Entry&, void);
        DECL_STATIC_LINK(DetailsContainer, FormatPortHdl, sal_Int64, OUString);
};

class HostDetailsContainer : public DetailsContainer
{
    private:
        sal_uInt16 m_nDefaultPort;
        OUString m_sScheme;
        OUString m_sHost;

    public:
        HostDetailsContainer(PlaceEditDialog* pDialog, sal_uInt16 nPort, OUString sScheme);

        virtual void set_visible( bool bShow ) override;
        virtual INetURLObject getUrl( ) override;
        virtual bool setUrl( const INetURLObject& rUrl ) override;

    protected:
        void setScheme( const OUString& sScheme ) { m_sScheme = sScheme; }

        /** Verifies that the scheme split from the URL can be handled by
            the container and set the proper controls accordingly if needed.
          */

        virtual bool verifyScheme( const OUString& rScheme );
};

class DavDetailsContainer final : public HostDetailsContainer
{
    public:
        DavDetailsContainer(PlaceEditDialog* pDialog);

        virtual void set_visible( bool bShow ) override;
        virtual bool enableUserCredentials( ) override { return false; };

    private:
        virtual bool verifyScheme( const OUString& rScheme ) override;

        DECL_LINK(ToggledDavsHdl, weld::Toggleable&, void);
};

class SmbDetailsContainer final : public DetailsContainer
{
    private:
        OUString m_sHost;

    public:
        SmbDetailsContainer(PlaceEditDialog* pDialog);

        virtual INetURLObject getUrl( ) override;
        virtual bool setUrl( const INetURLObject& rUrl ) override;
        virtual void set_visible( bool bShow ) override;
};

class CmisDetailsContainer final : public DetailsContainer
{
    private:
        OUString m_sUsername;
        OUString m_sPassword;
        rtl::Reference< ucbhelper::CommandEnvironment > m_xCmdEnv;
        std::vector< OUString > m_aRepoIds;
        OUString m_sRepoId;
        OUString m_sBinding;
        css::uno::Reference< css::awt::XWindow > m_xParentDialog;

    public:
        CmisDetailsContainer(PlaceEditDialog* pDialog, OUString sBinding);

        virtual void set_visible( bool bShow ) override;
        virtual INetURLObject getUrl( ) override;
        virtual bool setUrl( const INetURLObject& rUrl ) override;
        virtual void setUsername( const OUString& rUsername ) override;
        virtual void setPassword( const OUString& rPass ) override;

    private:
        void selectRepository( );
        DECL_LINK ( RefreshReposHdl, weld::Button&, void );
        DECL_LINK ( SelectRepoHdl, weld::ComboBox&, void );
};

#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Messung V0.5
C=94 H=96 G=94

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.