Bump for 3.6-28
[LibreOffice.git] / ucb / source / ucp / package / pkgprovider.hxx
blobabc3660bd3ba5741ee8665b65e6648def6c9ae27
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 _PKGPROVIDER_HXX
30 #define _PKGPROVIDER_HXX
32 #include <ucbhelper/providerhelper.hxx>
33 #include "pkguri.hxx"
35 namespace com { namespace sun { namespace star { namespace container {
36 class XHierarchicalNameAccess;
37 } } } }
39 namespace package_ucp {
41 //=========================================================================
43 // UNO service name for the provider. This name will be used by the UCB to
44 // create instances of the provider.
45 #define PACKAGE_CONTENT_PROVIDER_SERVICE_NAME \
46 "com.sun.star.ucb.PackageContentProvider"
47 #define PACKAGE_CONTENT_PROVIDER_SERVICE_NAME_LENGTH 39
49 // UCB Content Type.
50 #define PACKAGE_FOLDER_CONTENT_TYPE \
51 "application/" PACKAGE_URL_SCHEME "-folder"
52 #define PACKAGE_STREAM_CONTENT_TYPE \
53 "application/" PACKAGE_URL_SCHEME "-stream"
54 #define PACKAGE_ZIP_FOLDER_CONTENT_TYPE \
55 "application/" PACKAGE_ZIP_URL_SCHEME "-folder"
56 #define PACKAGE_ZIP_STREAM_CONTENT_TYPE \
57 "application/" PACKAGE_ZIP_URL_SCHEME "-stream"
59 //=========================================================================
61 class Packages;
63 class ContentProvider : public ::ucbhelper::ContentProviderImplHelper
65 Packages* m_pPackages;
67 public:
68 ContentProvider( const ::com::sun::star::uno::Reference<
69 ::com::sun::star::lang::XMultiServiceFactory >& rSMgr );
70 virtual ~ContentProvider();
72 // XInterface
73 XINTERFACE_DECL()
75 // XTypeProvider
76 XTYPEPROVIDER_DECL()
78 // XServiceInfo
79 XSERVICEINFO_DECL()
81 // XContentProvider
82 virtual ::com::sun::star::uno::Reference<
83 ::com::sun::star::ucb::XContent > SAL_CALL
84 queryContent( const ::com::sun::star::uno::Reference<
85 ::com::sun::star::ucb::XContentIdentifier >& Identifier )
86 throw( ::com::sun::star::ucb::IllegalIdentifierException,
87 ::com::sun::star::uno::RuntimeException );
89 //////////////////////////////////////////////////////////////////////
90 // Additional interfaces
91 //////////////////////////////////////////////////////////////////////
93 //////////////////////////////////////////////////////////////////////
94 // Non-interface methods.
95 //////////////////////////////////////////////////////////////////////
97 ::com::sun::star::uno::Reference<
98 ::com::sun::star::container::XHierarchicalNameAccess >
99 createPackage( const rtl::OUString & rName, const rtl::OUString & rParam );
100 sal_Bool
101 removePackage( const rtl::OUString & rName );
106 #endif
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */