| 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
| 2 | /* |
| 3 | * This file is part of the LibreOffice project. |
| 4 | * |
| 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/. |
| 8 | * |
| 9 | * This file incorporates work covered by the following license notice: |
| 10 | * |
| 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 . |
| 18 | */ |
| 19 | |
| 20 | #ifndef INCLUDED_UCBHELPER_SIMPLENAMECLASHRESOLVEREQUEST_HXX |
| 21 | #define INCLUDED_UCBHELPER_SIMPLENAMECLASHRESOLVEREQUEST_HXX |
| 22 | |
| 23 | #include <config_options.h> |
| 24 | #include <rtl/ref.hxx> |
| 25 | #include <ucbhelper/interactionrequest.hxx> |
| 26 | #include <ucbhelper/ucbhelperdllapi.h> |
| 27 | |
| 28 | namespace ucbhelper |
| 29 | { |
| 30 | class InteractionSupplyName; |
| 31 | |
| 32 | /** |
| 33 | * This class implements a simple name clash resolve interaction request. |
| 34 | * Instances can be passed directly to XInteractionHandler::handle(...). Each |
| 35 | * instance contains a NameClashResolveRequest and two interaction |
| 36 | * continuations: "Abort" and "SupplyName". Another continuation |
| 37 | * ("ReplaceExistingData") may be supplied optionally. |
| 38 | * |
| 39 | * @see css::ucb::NameClashResolveRequest |
| 40 | * @see InteractionAbort |
| 41 | * @see InteractioneplaceExistingData |
| 42 | */ |
| 43 | class UNLESS_MERGELIBS(UCBHELPER_DLLPUBLIC) SimpleNameClashResolveRequest final |
| 44 | : public ucbhelper::InteractionRequest |
| 45 | { |
| 46 | rtl::Reference<InteractionSupplyName> m_xNameSupplier; |
| 47 | |
| 48 | virtual ~SimpleNameClashResolveRequest() override; |
| 49 | |
| 50 | public: |
| 51 | /** |
| 52 | * Constructor. |
| 53 | * |
| 54 | * @param rTargetFolderURL contains the URL of the folder that contains |
| 55 | * the clashing resource. |
| 56 | * @param rClashingName contains the clashing name. |
| 57 | */ |
| 58 | SimpleNameClashResolveRequest(const OUString& rTargetFolderURL, const OUString& rClashingName); |
| 59 | /** |
| 60 | * This method returns the new name that was supplied by the interaction |
| 61 | * handler. |
| 62 | * |
| 63 | * @return the new name, if supplied. |
| 64 | */ |
| 65 | OUString const& getNewName() const; |
| 66 | }; |
| 67 | |
| 68 | } // namespace ucbhelper |
| 69 | |
| 70 | #endif /* ! INCLUDED_UCBHELPER_SIMPLENAMECLASHRESOLVEREQUEST_HXX */ |
| 71 | |
| 72 | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |