bump product version to 4.2.0.1
[LibreOffice.git] / include / ucbhelper / simplenameclashresolverequest.hxx
blobe5ced512c5f69244c4fb606448e3889112634a4a
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_SIMPLENAMECLASHRESOLVEREQUEST_HXX
21 #define INCLUDED_UCBHELPER_SIMPLENAMECLASHRESOLVEREQUEST_HXX
23 #include <rtl/ref.hxx>
24 #include <ucbhelper/interactionrequest.hxx>
25 #include <ucbhelper/ucbhelperdllapi.h>
27 namespace ucbhelper {
29 /**
30 * This class implements a simple name clash resolve interaction request.
31 * Instances can be passed directly to XInteractionHandler::handle(...). Each
32 * instance contains a NameClashResolveRequest and two interaction
33 * continuations: "Abort" and "SupplyName". Another continuation
34 * ("ReplaceExistingData") may be supplied optionally.
36 * @see com::sun::star::ucb::NameClashResolveRequest
37 * @see InteractionAbort
38 * @see InteractioneplaceExistingData
39 * @see InteractionSupplyName
41 class UCBHELPER_DLLPUBLIC SimpleNameClashResolveRequest : public ucbhelper::InteractionRequest
43 rtl::Reference< InteractionSupplyName > m_xNameSupplier;
45 public:
46 /**
47 * Constructor.
49 * @param rTargetFolderURL contains the URL of the folder that contains
50 * the clashing resource.
51 * @param rClashingName contains the clashing name.
52 * @param rProposedNewName contains a proposal for the new name or is
53 * empty.
54 * @param bSupportsOverwriteData indicates whether an
55 * InteractionReplaceExistingData continuation shall be supplied
56 * with the interaction request.
58 SimpleNameClashResolveRequest( const OUString & rTargetFolderURL,
59 const OUString & rClashingName,
60 const OUString & rProposedNewName,
61 sal_Bool bSupportsOverwriteData = sal_True );
62 /**
63 * This method returns the new name that was supplied by the interaction
64 * handler.
66 * @return the new name, if supplied.
68 const OUString getNewName() const
69 { return m_xNameSupplier->getName(); }
73 } // namespace ucbhelper
75 #endif /* ! INCLUDED_UCBHELPER_SIMPLENAMECLASHRESOLVEREQUEST_HXX */
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */