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 _FTP_FTPCONTENTPROVIDER_HXX_
21 #define _FTP_FTPCONTENTPROVIDER_HXX_
24 #include <osl/mutex.hxx>
25 #include <ucbhelper/macros.hxx>
26 #include <ucbhelper/proxydecider.hxx>
27 #include <ucbhelper/providerhelper.hxx>
28 #include <com/sun/star/ucb/XContentProviderManager.hpp>
29 #include "ftphandleprovider.hxx"
32 // UNO service name for the provider. This name will be used by the UCB to
33 // create instances of the provider.
35 #define FTP_CONTENT_PROVIDER_SERVICE_NAME "com.sun.star.ucb.FTPContentProvider"
36 #define FTP_CONTENT_TYPE "application/ftp-content"
40 * Definition of ftpcontentprovider
48 class FTPLoaderThread
;
51 class FTPContentProvider
:
52 public ::ucbhelper::ContentProviderImplHelper
,
53 public FTPHandleProvider
58 const com::sun::star::uno::Reference
< com::sun::star::uno::XComponentContext
>& rxContext
);
60 ~FTPContentProvider();
72 virtual com::sun::star::uno::Reference
< com::sun::star::ucb::XContent
> SAL_CALL
74 const com::sun::star::uno::Reference
< com::sun::star::ucb::XContentIdentifier
>& Identifier
)
75 throw( com::sun::star::ucb::IllegalIdentifierException
,
76 com::sun::star::uno::RuntimeException
);
80 virtual CURL
* handle();
82 virtual bool forHost(const OUString
& host
,
84 const OUString
& username
,
88 virtual bool setHost(const OUString
& host
,
90 const OUString
& username
,
91 const OUString
& password
,
92 const OUString
& account
);
106 FTPLoaderThread
*m_ftpLoaderThread
;
107 ucbhelper::InternetProxyDecider
*m_pProxyDecider
;
108 std::vector
<ServerInfo
> m_ServerInfo
;
112 com::sun::star::uno::Reference
<com::sun::star::ucb::XContentProvider
>
114 throw(com::sun::star::uno::RuntimeException
);
116 }; // end class FTPContentProvider
118 } // end namespace ftp
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */