fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / ucb / source / ucp / webdav / webdavprovider.hxx
blob78cfa6cbd0e9a3c1f8cd5ab07cacbf166aded8c7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
22 #ifndef INCLUDED_UCB_SOURCE_UCP_WEBDAV_WEBDAVPROVIDER_HXX
23 #define INCLUDED_UCB_SOURCE_UCP_WEBDAV_WEBDAVPROVIDER_HXX
25 #include <rtl/ref.hxx>
26 #include <com/sun/star/beans/Property.hpp>
27 #include "DAVSessionFactory.hxx"
28 #include <ucbhelper/providerhelper.hxx>
29 #include "PropertyMap.hxx"
31 namespace http_dav_ucp {
35 // UNO service name for the provider. This name will be used by the UCB to
36 // create instances of the provider.
37 #define WEBDAV_CONTENT_PROVIDER_SERVICE_NAME \
38 "com.sun.star.ucb.WebDAVContentProvider"
39 #define WEBDAV_CONTENT_PROVIDER_SERVICE_NAME_LENGTH 38
41 // URL scheme. This is the scheme the provider will be able to create
42 // contents for. The UCB will select the provider ( i.e. in order to create
43 // contents ) according to this scheme.
44 #define WEBDAV_URL_SCHEME \
45 "vnd.sun.star.webdav"
46 #define WEBDAV_URL_SCHEME_LENGTH 19
48 #define HTTP_URL_SCHEME "http"
49 #define HTTP_URL_SCHEME_LENGTH 4
51 #define HTTPS_URL_SCHEME "https"
52 #define HTTPS_URL_SCHEME_LENGTH 5
54 #define DAV_URL_SCHEME "dav"
55 #define DAV_URL_SCHEME_LENGTH 3
57 #define DAVS_URL_SCHEME "davs"
58 #define DAVS_URL_SCHEME_LENGTH 4
60 #define HTTP_CONTENT_TYPE \
61 "application/" HTTP_URL_SCHEME "-content"
63 #define WEBDAV_CONTENT_TYPE HTTP_CONTENT_TYPE
64 #define WEBDAV_COLLECTION_TYPE \
65 "application/" WEBDAV_URL_SCHEME "-collection"
69 class ContentProvider : public ::ucbhelper::ContentProviderImplHelper
71 rtl::Reference< DAVSessionFactory > m_xDAVSessionFactory;
72 PropertyMap * m_pProps;
74 public:
75 ContentProvider( const ::com::sun::star::uno::Reference<
76 ::com::sun::star::uno::XComponentContext >& rContext );
77 virtual ~ContentProvider();
79 // XInterface
80 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
81 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
82 virtual void SAL_CALL acquire()
83 throw() SAL_OVERRIDE;
84 virtual void SAL_CALL release()
85 throw() SAL_OVERRIDE;
87 // XTypeProvider
88 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
89 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
90 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
91 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
93 // XServiceInfo
94 virtual OUString SAL_CALL getImplementationName()
95 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
96 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
97 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
98 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
99 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
101 static OUString getImplementationName_Static();
102 static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
104 static css::uno::Reference< css::lang::XSingleServiceFactory >
105 createServiceFactory( const css::uno::Reference<
106 css::lang::XMultiServiceFactory >& rxServiceMgr );
108 // XContentProvider
109 virtual ::com::sun::star::uno::Reference<
110 ::com::sun::star::ucb::XContent > SAL_CALL
111 queryContent( const ::com::sun::star::uno::Reference<
112 ::com::sun::star::ucb::XContentIdentifier >& Identifier )
113 throw( ::com::sun::star::ucb::IllegalIdentifierException,
114 ::com::sun::star::uno::RuntimeException ) SAL_OVERRIDE;
117 // Additional interfaces
121 // Non-interface methods.
124 bool getProperty( const OUString & rPropName,
125 ::com::sun::star::beans::Property & rProp,
126 bool bStrict = false );
131 #endif
133 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */