fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / ucb / source / ucp / webdav-neon / webdavprovider.hxx
blob5da542d445e4fd366fadd0eba4514834a1e6f8d2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef INCLUDED_UCB_SOURCE_UCP_WEBDAV_NEON_WEBDAVPROVIDER_HXX
30 #define INCLUDED_UCB_SOURCE_UCP_WEBDAV_NEON_WEBDAVPROVIDER_HXX
32 #include <config_lgpl.h>
33 #include <rtl/ref.hxx>
34 #include <com/sun/star/beans/Property.hpp>
35 #include "DAVSessionFactory.hxx"
36 #include <ucbhelper/providerhelper.hxx>
37 #include "PropertyMap.hxx"
39 namespace webdav_ucp {
43 // UNO service name for the provider. This name will be used by the UCB to
44 // create instances of the provider.
45 #define WEBDAV_CONTENT_PROVIDER_SERVICE_NAME \
46 "com.sun.star.ucb.WebDAVContentProvider"
47 #define WEBDAV_CONTENT_PROVIDER_SERVICE_NAME_LENGTH 38
49 // URL scheme. This is the scheme the provider will be able to create
50 // contents for. The UCB will select the provider ( i.e. in order to create
51 // contents ) according to this scheme.
52 #define WEBDAV_URL_SCHEME \
53 "vnd.sun.star.webdav"
54 #define WEBDAV_URL_SCHEME_LENGTH 19
56 #define HTTP_URL_SCHEME "http"
57 #define HTTP_URL_SCHEME_LENGTH 4
59 #define HTTPS_URL_SCHEME "https"
60 #define HTTPS_URL_SCHEME_LENGTH 5
62 #define DAV_URL_SCHEME "dav"
63 #define DAV_URL_SCHEME_LENGTH 3
65 #define DAVS_URL_SCHEME "davs"
66 #define DAVS_URL_SCHEME_LENGTH 4
70 #define FTP_URL_SCHEME "ftp"
72 #define HTTP_CONTENT_TYPE \
73 "application/" HTTP_URL_SCHEME "-content"
75 #define WEBDAV_CONTENT_TYPE HTTP_CONTENT_TYPE
76 #define WEBDAV_COLLECTION_TYPE \
77 "application/" WEBDAV_URL_SCHEME "-collection"
81 class ContentProvider : public ::ucbhelper::ContentProviderImplHelper
83 rtl::Reference< DAVSessionFactory > m_xDAVSessionFactory;
84 PropertyMap * m_pProps;
86 public:
87 ContentProvider( const ::com::sun::star::uno::Reference<
88 ::com::sun::star::uno::XComponentContext >& rxContext );
89 virtual ~ContentProvider();
91 // XInterface
92 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
93 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
94 virtual void SAL_CALL acquire()
95 throw() SAL_OVERRIDE;
96 virtual void SAL_CALL release()
97 throw() SAL_OVERRIDE;
99 // XTypeProvider
100 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
101 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
102 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
103 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
105 // XServiceInfo
106 virtual OUString SAL_CALL getImplementationName()
107 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
108 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
109 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
110 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
111 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
113 static OUString getImplementationName_Static();
114 static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
116 static css::uno::Reference< css::lang::XSingleServiceFactory >
117 createServiceFactory( const css::uno::Reference<
118 css::lang::XMultiServiceFactory >& rxServiceMgr );
120 // XContentProvider
121 virtual ::com::sun::star::uno::Reference<
122 ::com::sun::star::ucb::XContent > SAL_CALL
123 queryContent( const ::com::sun::star::uno::Reference<
124 ::com::sun::star::ucb::XContentIdentifier >& Identifier )
125 throw( ::com::sun::star::ucb::IllegalIdentifierException,
126 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
129 // Additional interfaces
133 // Non-interface methods.
136 rtl::Reference< DAVSessionFactory > getDAVSessionFactory()
137 { return m_xDAVSessionFactory; }
139 bool getProperty( const OUString & rPropName,
140 ::com::sun::star::beans::Property & rProp,
141 bool bStrict = false );
146 #endif
148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */