1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dp_description.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #if !defined INCLUDED_DESKTOP_EXTENSION_DESCRIPTION_HXX
32 #define INCLUDED_DESKTOP_EXTENSION_DESCRIPTION_HXX
36 #include "com/sun/star/uno/Reference.hxx"
38 #include "com/sun/star/ucb/XCommandEnvironment.hpp"
39 #include "com/sun/star/uno/XComponentContext.hpp"
40 #include "com/sun/star/xml/dom/XNode.hpp"
41 #include "com/sun/star/task/XInteractionHandler.hpp"
42 #include "cppuhelper/implbase2.hxx"
45 namespace css
= ::com::sun::star
;
47 namespace dp_registry
{
51 /**The class uses the UCB to access the description.xml file in an
52 extension. The UCB must have been initialized already. It also
53 requires that the extension has already be unzipped to a particular
56 class ExtensionDescription
59 /**throws an exception if the description.xml is not
60 available, cannot be read, does not contain the expected data,
61 or any other error occured. Therefore it shoult only be used with
64 Throws com::sun::star::uno::RuntimeException,
65 com::sun::star::deployment::DeploymentException,
66 dp_registry::backend::bundle::NoDescriptionException.
69 const css::uno::Reference
<css::uno::XComponentContext
>& xContext
,
70 const ::rtl::OUString
& installDir
,
71 const css::uno::Reference
< css::ucb::XCommandEnvironment
>& xCmdEnv
);
73 ~ExtensionDescription();
75 css::uno::Reference
<css::xml::dom::XNode
> getRootElement() const
80 ::rtl::OUString
getExtensionRootUrl() const
82 return m_sExtensionRootUrl
;
87 css::uno::Reference
<css::xml::dom::XNode
> m_xRoot
;
88 ::rtl::OUString m_sExtensionRootUrl
;
91 class NoDescriptionException
95 class FileDoesNotExistFilter
96 : public ::cppu::WeakImplHelper2
< css::ucb::XCommandEnvironment
,
97 css::task::XInteractionHandler
>
100 //css::uno::Reference<css::task::XInteractionHandler> m_xHandler;
102 css::uno::Reference
< css::ucb::XCommandEnvironment
> m_xCommandEnv
;
105 virtual ~FileDoesNotExistFilter();
106 FileDoesNotExistFilter(
107 const css::uno::Reference
< css::ucb::XCommandEnvironment
>& xCmdEnv
);
110 // XCommandEnvironment
111 virtual css::uno::Reference
<css::task::XInteractionHandler
> SAL_CALL
112 getInteractionHandler() throw (css::uno::RuntimeException
);
113 virtual css::uno::Reference
<css::ucb::XProgressHandler
>
114 SAL_CALL
getProgressHandler() throw (css::uno::RuntimeException
);
116 // XInteractionHandler
117 virtual void SAL_CALL
handle(
118 css::uno::Reference
<css::task::XInteractionRequest
> const & xRequest
)
119 throw (css::uno::RuntimeException
);
123 } // namespace bundle
124 } // namespace backend
125 } // namespace dp_registry
128 #endif // INCLUDED_DESKTOP_LICENSE_INTERACT_HXX