bump product version to 4.2.0.1
[LibreOffice.git] / include / ucbhelper / commandenvironment.hxx
blob97ba46e094d6c1d8101c466d633dc2b3baeaadc1
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 .
20 #ifndef INCLUDED_UCBHELPER_COMMANDENVIRONMENT_HXX
21 #define INCLUDED_UCBHELPER_COMMANDENVIRONMENT_HXX
23 #include <com/sun/star/lang/XTypeProvider.hpp>
24 #include <com/sun/star/ucb/XCommandEnvironment.hpp>
25 #include <cppuhelper/weak.hxx>
26 #include <ucbhelper/macros.hxx>
27 #include <ucbhelper/ucbhelperdllapi.h>
29 namespace ucbhelper
32 struct CommandEnvironment_Impl;
34 //=========================================================================
36 /**
37 * This class implements the interface
38 * com::sun::star::ucb::XCommandEnvironement. Instances of this class can
39 * be used to supply environments to commands executed by UCB contents.
41 class UCBHELPER_DLLPUBLIC CommandEnvironment : public cppu::OWeakObject,
42 public com::sun::star::lang::XTypeProvider,
43 public com::sun::star::ucb::XCommandEnvironment
45 CommandEnvironment_Impl* m_pImpl;
47 private:
48 UCBHELPER_DLLPRIVATE CommandEnvironment( const CommandEnvironment& ); // n.i.
49 UCBHELPER_DLLPRIVATE CommandEnvironment& operator=( const CommandEnvironment& ); // n.i.
51 public:
52 /**
53 * Constructor.
55 * @param rxInteractionHandler is the implementation of an Interaction
56 * Handler or an empty reference.
57 * @param rxProgressHandler is the implementation of a Progress
58 * Handler or an empty reference.
60 CommandEnvironment(
61 const com::sun::star::uno::Reference<
62 com::sun::star::task::XInteractionHandler >&
63 rxInteractionHandler,
64 const com::sun::star::uno::Reference<
65 com::sun::star::ucb::XProgressHandler >&
66 rxProgressHandler );
67 /**
68 * Destructor.
70 virtual ~CommandEnvironment();
72 // XInterface
73 XINTERFACE_DECL()
75 // XTypeProvider
76 XTYPEPROVIDER_DECL()
78 // XCommandEnvironemnt
79 virtual com::sun::star::uno::Reference<
80 com::sun::star::task::XInteractionHandler > SAL_CALL
81 getInteractionHandler()
82 throw ( com::sun::star::uno::RuntimeException );
84 virtual com::sun::star::uno::Reference<
85 com::sun::star::ucb::XProgressHandler > SAL_CALL
86 getProgressHandler()
87 throw ( com::sun::star::uno::RuntimeException );
90 } /* namespace ucbhelper */
92 #endif /* ! INCLUDED_UCBHELPER_COMMANDENVIRONMENT_HXX */
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */