LibreOffice Module ucb (master) 1
ucb.cxx
Go to the documentation of this file.
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
21/**************************************************************************
22 TODO
23 **************************************************************************
24
25 *************************************************************************/
26
27#include <sal/config.h>
28
29#include <string_view>
30
31#include <osl/diagnose.h>
32#include <sal/log.hxx>
33#include <rtl/ustrbuf.hxx>
36#include <com/sun/star/lang/IllegalArgumentException.hpp>
37#include <com/sun/star/ucb/DuplicateProviderException.hpp>
38#include <com/sun/star/ucb/GlobalTransferCommandArgument2.hpp>
39#include <com/sun/star/ucb/UnsupportedCommandException.hpp>
40#include <com/sun/star/ucb/XCommandInfo.hpp>
41#include <com/sun/star/ucb/XContentProviderSupplier.hpp>
42#include <com/sun/star/configuration/theDefaultProvider.hpp>
43#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
44#include <com/sun/star/container/XNameAccess.hpp>
45#include <com/sun/star/uno/Any.hxx>
47#include <cppuhelper/weak.hxx>
50#include "identify.hxx"
51#include "ucbcmds.hxx"
52
53#include "ucb.hxx"
54
55using namespace comphelper;
56using namespace com::sun::star::uno;
57using namespace com::sun::star::lang;
58using namespace com::sun::star::ucb;
59using namespace ucb_impl;
60using namespace com::sun::star;
61using namespace ucbhelper;
62
63namespace {
64
65bool fillPlaceholders(OUString const & rInput,
66 uno::Sequence< uno::Any > const & rReplacements,
67 OUString * pOutput)
68{
69 sal_Unicode const * p = rInput.getStr();
70 sal_Unicode const * pEnd = p + rInput.getLength();
71 sal_Unicode const * pCopy = p;
72 OUStringBuffer aBuffer;
73 while (p != pEnd)
74 switch (*p++)
75 {
76 case '&':
77 if (pEnd - p >= 4
78 && p[0] == 'a' && p[1] == 'm' && p[2] == 'p'
79 && p[3] == ';')
80 {
81 aBuffer.append(OUString::Concat(std::u16string_view(pCopy, p - 1 - pCopy)) + "&");
82 p += 4;
83 pCopy = p;
84 }
85 else if (pEnd - p >= 3
86 && p[0] == 'l' && p[1] == 't' && p[2] == ';')
87 {
88 aBuffer.append(OUString::Concat(std::u16string_view(pCopy, p - 1 - pCopy)) + "<");
89 p += 3;
90 pCopy = p;
91 }
92 else if (pEnd - p >= 3
93 && p[0] == 'g' && p[1] == 't' && p[2] == ';')
94 {
95 aBuffer.append(OUString::Concat(std::u16string_view(pCopy, p - 1 - pCopy)) + ">");
96 p += 3;
97 pCopy = p;
98 }
99 break;
100
101 case '<':
102 sal_Unicode const * q = p;
103 while (q != pEnd && *q != '>')
104 ++q;
105 if (q == pEnd)
106 break;
107 OUString aKey(p, q - p);
108 OUString aValue;
109 bool bFound = false;
110 for (sal_Int32 i = 2; i + 1 < rReplacements.getLength();
111 i += 2)
112 {
113 OUString aReplaceKey;
114 if ((rReplacements[i] >>= aReplaceKey)
115 && aReplaceKey == aKey
116 && (rReplacements[i + 1] >>= aValue))
117 {
118 bFound = true;
119 break;
120 }
121 }
122 if (!bFound)
123 return false;
124 aBuffer.append(std::u16string_view(pCopy, p - 1 - pCopy) + aValue);
125 p = q + 1;
126 pCopy = p;
127 break;
128 }
129 aBuffer.append(pCopy, pEnd - pCopy);
130 *pOutput = aBuffer.makeStringAndClear();
131 return true;
132}
133
134void makeAndAppendXMLName(
135 OUStringBuffer & rBuffer, std::u16string_view rIn )
136{
137 size_t nCount = rIn.size();
138 for ( size_t n = 0; n < nCount; ++n )
139 {
140 const sal_Unicode c = rIn[ n ];
141 switch ( c )
142 {
143 case '&':
144 rBuffer.append( "&amp;" );
145 break;
146
147 case '"':
148 rBuffer.append( "&quot;" );
149 break;
150
151 case '\'':
152 rBuffer.append( "&apos;" );
153 break;
154
155 case '<':
156 rBuffer.append( "&lt;" );
157 break;
158
159 case '>':
160 rBuffer.append( "&gt;" );
161 break;
162
163 default:
164 rBuffer.append( c );
165 break;
166 }
167 }
168}
169
170bool createContentProviderData(
171 std::u16string_view rProvider,
172 const uno::Reference< container::XHierarchicalNameAccess >& rxHierNameAccess,
173 ContentProviderData & rInfo)
174{
175 // Obtain service name.
176
177 OUString aValue;
178 try
179 {
180 if ( !( rxHierNameAccess->getByHierarchicalName(
181 OUString::Concat(rProvider) + "/ServiceName" ) >>= aValue ) )
182 {
183 OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
184 "Error getting item value!" );
185 }
186 }
187 catch (const container::NoSuchElementException&)
188 {
189 return false;
190 }
191
192 rInfo.ServiceName = aValue;
193
194 // Obtain URL Template.
195
196 if ( !( rxHierNameAccess->getByHierarchicalName(
197 OUString::Concat(rProvider) + "/URLTemplate" ) >>= aValue ) )
198 {
199 OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
200 "Error getting item value!" );
201 }
202
203 rInfo.URLTemplate = aValue;
204
205 // Obtain Arguments.
206
207 if ( !( rxHierNameAccess->getByHierarchicalName(
208 OUString::Concat(rProvider) + "/Arguments" ) >>= aValue ) )
209 {
210 OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
211 "Error getting item value!" );
212 }
213
214 rInfo.Arguments = aValue;
215 return true;
216}
217
218}
219
220
221// UniversalContentBroker Implementation.
222
223
226: m_xContext( xContext ),
227 m_nCommandId( 0 )
228{
229 OSL_ENSURE( m_xContext.is(),
230 "UniversalContentBroker ctor: No service manager" );
231}
232
233
234// virtual
236{
237}
238
239
240// XComponent methods.
241
242
243// virtual
245{
247 {
248 EventObject aEvt;
249 aEvt.Source = static_cast< XComponent* >(this);
250 m_pDisposeEventListeners->disposeAndClear( aEvt );
251 }
252
253 if ( m_xNotifier.is() )
254 m_xNotifier->removeChangesListener( this );
255}
256
257
258// virtual
260 const Reference< XEventListener >& Listener )
261{
264
265 m_pDisposeEventListeners->addInterface( Listener );
266}
267
268
269// virtual
271 const Reference< XEventListener >& Listener )
272{
274 m_pDisposeEventListeners->removeInterface( Listener );
275
276 // Note: Don't want to delete empty container here -> performance.
277}
278
279
280// XServiceInfo methods.
281
283{
284 return "com.sun.star.comp.ucb.UniversalContentBroker";
285}
286sal_Bool SAL_CALL UniversalContentBroker::supportsService( const OUString& ServiceName )
287{
288 return cppu::supportsService( this, ServiceName );
289}
290css::uno::Sequence< OUString > SAL_CALL UniversalContentBroker::getSupportedServiceNames()
291{
292 return { "com.sun.star.ucb.UniversalContentBroker" };
293}
294
295
296extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
298 css::uno::XComponentContext* context , css::uno::Sequence<css::uno::Any> const&)
299{
300 return cppu::acquire(new UniversalContentBroker(context));
301}
302
303
304// XInitialization methods.
305
306
307// virtual
308void SAL_CALL UniversalContentBroker::initialize( const css::uno::Sequence< Any >& aArguments )
309{
310 {
311 osl::MutexGuard aGuard(m_aMutex);
312 if (m_aArguments.hasElements())
313 {
314 if (aArguments.hasElements()
315 && !(m_aArguments.getLength() == 2
316 && aArguments.getLength() == 2
317 && m_aArguments[0] == aArguments[0]
318 && m_aArguments[1] == aArguments[1]))
319 {
320 throw IllegalArgumentException(
321 "UCB reinitialized with different arguments",
322 getXWeak(), 0);
323 }
324 return;
325 }
326 if (!aArguments.hasElements())
327 {
328 m_aArguments = { Any(OUString("Local")), Any(OUString("Office")) };
329 }
330 else
331 {
333 }
334 }
335 configureUcb();
336}
337
338
339// XContentProviderManager methods.
340
341
342// virtual
345 const Reference< XContentProvider >& Provider,
346 const OUString& Scheme,
347 sal_Bool ReplaceExisting )
348{
349 osl::MutexGuard aGuard(m_aMutex);
350
352 try
353 {
354 aIt = m_aProviders.find(Scheme);
355 }
356 catch (const IllegalArgumentException&)
357 {
358 return nullptr; //@@@
359 }
360
362 if (aIt == m_aProviders.end())
363 {
364 ProviderList_Impl aList;
365 aList.push_front( ProviderListEntry_Impl(Provider) );
366 try
367 {
368 m_aProviders.add(Scheme, aList);
369 }
370 catch (const IllegalArgumentException&)
371 {
372 return nullptr; //@@@
373 }
374 }
375 else
376 {
377 if (!ReplaceExisting)
378 throw DuplicateProviderException();
379
380 ProviderList_Impl & rList = aIt->getValue();
381 xPrevious = rList.front().getProvider();
382 rList.push_front( ProviderListEntry_Impl(Provider) );
383 }
384
385 return xPrevious;
386}
387
388
389// virtual
391 const Reference< XContentProvider >& Provider,
392 const OUString& Scheme )
393{
394 osl::MutexGuard aGuard(m_aMutex);
395
397 try
398 {
399 aMapIt = m_aProviders.find(Scheme);
400 }
401 catch (const IllegalArgumentException&)
402 {
403 return; //@@@
404 }
405
406 if (aMapIt != m_aProviders.end())
407 {
408 ProviderList_Impl & rList = aMapIt->getValue();
409
410 auto aListIt = std::find_if(rList.begin(), rList.end(),
411 [&Provider](const ProviderListEntry_Impl& rEntry) { return rEntry.getProvider() == Provider; });
412 if (aListIt != rList.end())
413 rList.erase(aListIt);
414
415 if (rList.empty())
416 m_aProviders.erase(aMapIt);
417 }
418}
419
420
421// virtual
422css::uno::Sequence< ContentProviderInfo > SAL_CALL
424{
425 // Return a list with information about active(!) content providers.
426
427 osl::MutexGuard aGuard(m_aMutex);
428
429 css::uno::Sequence< ContentProviderInfo > aSeq( m_aProviders.size() );
430 ContentProviderInfo* pInfo = aSeq.getArray();
431
434 ++it)
435 {
436 // Note: Active provider is always the first list element.
437 pInfo->ContentProvider = it->getValue().front().getProvider();
438 pInfo->Scheme = it->getRegexp();
439 ++pInfo;
440 }
441
442 return aSeq;
443}
444
445
446// virtual
449 Identifier )
450{
451 return queryContentProvider( Identifier, false );
452}
453
454
455// XContentProvider methods.
456
457
458// virtual
460 const Reference< XContentIdentifier >& Identifier )
461{
462
463 // Let the content provider for the scheme given with the content
464 // identifier create the XContent instance.
465
466
467 if ( !Identifier.is() )
468 return Reference< XContent >();
469
471 queryContentProvider( Identifier->getContentIdentifier(), true );
472 if ( xProv.is() )
473 return xProv->queryContent( Identifier );
474
475 return Reference< XContent >();
476}
477
478
479// virtual
483{
484 OUString aURI1( Id1->getContentIdentifier() );
485 OUString aURI2( Id2->getContentIdentifier() );
486
488 = queryContentProvider( aURI1, true );
490 = queryContentProvider( aURI2, true );
491
492 // When both identifiers belong to the same provider, let that provider
493 // compare them; otherwise, simply compare the URI strings (which must
494 // be different):
495 if ( xProv1.is() && ( xProv1 == xProv2 ) )
496 return xProv1->compareContentIds( Id1, Id2 );
497 else
498 return aURI1.compareTo( aURI2 );
499}
500
501
502// XContentIdentifierFactory methods.
503
504
505// virtual
508 const OUString& ContentId )
509{
510
511 // Let the content provider for the scheme given with content
512 // identifier create the XContentIdentifier instance, if he supports
513 // the XContentIdentifierFactory interface. Otherwise create standard
514 // implementation object for XContentIdentifier.
515
516
518
520 = queryContentProvider( ContentId, true );
521 if ( xProv.is() )
522 {
523 Reference< XContentIdentifierFactory > xFac( xProv, UNO_QUERY );
524 if ( xFac.is() )
525 xIdentifier = xFac->createContentIdentifier( ContentId );
526 }
527
528 if ( !xIdentifier.is() )
529 xIdentifier = new ContentIdentifier( ContentId );
530
531 return xIdentifier;
532}
533
534
535// XCommandProcessor methods.
536
537
538// virtual
540{
541 osl::MutexGuard aGuard( m_aMutex );
542
543 // Just increase counter on every call to generate an identifier.
544 return ++m_nCommandId;
545}
546
547
548// virtual
550 const Command& aCommand,
551 sal_Int32,
552 const Reference< XCommandEnvironment >& Environment )
553{
554 Any aRet;
555
556
557 // Note: Don't forget to adapt ucb_commands::CommandProcessorInfo
558 // ctor in ucbcmds.cxx when adding new commands!
559
560
561 if ( ( aCommand.Handle == GETCOMMANDINFO_HANDLE ) || aCommand.Name == GETCOMMANDINFO_NAME )
562 {
563
564 // getCommandInfo
565
566
567 aRet <<= getCommandInfo();
568 }
569 else if ( ( aCommand.Handle == GLOBALTRANSFER_HANDLE ) || aCommand.Name == GLOBALTRANSFER_NAME )
570 {
571
572 // globalTransfer
573
574
575 GlobalTransferCommandArgument2 aTransferArg;
576 if ( !( aCommand.Argument >>= aTransferArg ) )
577 {
578 GlobalTransferCommandArgument aArg;
579 if ( !( aCommand.Argument >>= aArg ) )
580 {
582 Any( IllegalArgumentException(
583 "Wrong argument type!",
584 getXWeak(),
585 -1 ) ),
586 Environment );
587 // Unreachable
588 }
589
590 // Copy infos into the new structure
591 aTransferArg.Operation = aArg.Operation;
592 aTransferArg.SourceURL = aArg.SourceURL;
593 aTransferArg.TargetURL = aArg.TargetURL;
594 aTransferArg.NewTitle = aArg.NewTitle;
595 aTransferArg.NameClash = aArg.NameClash;
596 }
597
598 globalTransfer( aTransferArg, Environment );
599 }
600 else if ( ( aCommand.Handle == CHECKIN_HANDLE ) || aCommand.Name == CHECKIN_NAME )
601 {
602 ucb::CheckinArgument aCheckinArg;
603 if ( !( aCommand.Argument >>= aCheckinArg ) )
604 {
606 Any( IllegalArgumentException(
607 "Wrong argument type!",
608 getXWeak(),
609 -1 ) ),
610 Environment );
611 // Unreachable
612 }
613 aRet = checkIn( aCheckinArg, Environment );
614 }
615 else
616 {
617
618 // Unknown command
619
620
622 Any( UnsupportedCommandException(
623 OUString(),
624 getXWeak() ) ),
625 Environment );
626 // Unreachable
627 }
628
629 return aRet;
630}
631
632
633// XCommandProcessor2 methods.
634
635
636// virtual
637void SAL_CALL UniversalContentBroker::releaseCommandIdentifier(sal_Int32 /*aCommandId*/)
638{
639 // @@@ Not implemented ( yet).
640}
641
642
643// virtual
644void SAL_CALL UniversalContentBroker::abort( sal_Int32 )
645{
646 // @@@ Not implemented ( yet).
647}
648
649
650// XChangesListener methods
651
652
653// virtual
654void SAL_CALL UniversalContentBroker::changesOccurred( const util::ChangesEvent& Event )
655{
656 if ( !Event.Changes.hasElements() )
657 return;
658
659 uno::Reference< container::XHierarchicalNameAccess > xHierNameAccess;
660 Event.Base >>= xHierNameAccess;
661
662 OSL_ASSERT( xHierNameAccess.is() );
663
665 for ( const util::ElementChange& rElem : Event.Changes )
666 {
667 OUString aKey;
668 rElem.Accessor >>= aKey;
669
671
672 // Removal of UCPs from the configuration leads to changesOccurred
673 // notifications, too, but it is hard to tell for a given
674 // ElementChange whether it is an addition or a removal, so as a
675 // heuristic consider as removals those that cause a
676 // NoSuchElementException in createContentProviderData.
677
678 // For now, removal of UCPs from the configuration is simply ignored
679 // (and not reflected in the UCB's data structures):
680 if (createContentProviderData(aKey, xHierNameAccess, aInfo))
681 {
682 aData.push_back(aInfo);
683 }
684 }
685
687}
688
689
690// XEventListener methods
691
692
693// virtual
694void SAL_CALL UniversalContentBroker::disposing(const lang::EventObject&)
695{
696 if ( m_xNotifier.is() )
697 {
698 osl::Guard< osl::Mutex > aGuard( m_aMutex );
699
700 if ( m_xNotifier.is() )
701 m_xNotifier.clear();
702 }
703}
704
705
706// Non-interface methods
707
708
710 const OUString& Identifier,
711 bool bResolved )
712{
713 osl::MutexGuard aGuard( m_aMutex );
714
715 ProviderList_Impl const * pList = m_aProviders.map( Identifier );
716 return pList ? bResolved ? pList->front().getResolvedProvider()
717 : pList->front().getProvider()
719}
720
722{
723 OUString aKey1;
724 OUString aKey2;
725 if (m_aArguments.getLength() < 2
726 || !(m_aArguments[0] >>= aKey1) || !(m_aArguments[1] >>= aKey2))
727 {
728 OSL_FAIL("UniversalContentBroker::configureUcb(): Bad arguments");
729 return;
730 }
731
733 if (!getContentProviderData(aKey1, aKey2, aData))
734 {
735 SAL_WARN( "ucb", "No configuration");
736 return;
737 }
738
740}
741
743 const ContentProviderDataList& rData)
744{
745 for (const auto& rContentProviderData : rData)
746 {
747 OUString aProviderArguments;
748 if (fillPlaceholders(rContentProviderData.Arguments,
750 &aProviderArguments))
751 {
752 registerAtUcb(this,
754 rContentProviderData.ServiceName,
755 aProviderArguments,
756 rContentProviderData.URLTemplate);
757
758 }
759 else
760 OSL_FAIL("UniversalContentBroker::prepareAndRegister(): Bad argument placeholders");
761 }
762}
763
764
766 std::u16string_view rKey1,
767 std::u16string_view rKey2,
768 ContentProviderDataList & rListToFill )
769{
770 if ( !m_xContext.is() || rKey1.empty() || rKey2.empty() )
771 {
772 OSL_FAIL( "UniversalContentBroker::getContentProviderData - Invalid argument!" );
773 return false;
774 }
775
776 try
777 {
778 uno::Reference< lang::XMultiServiceFactory > xConfigProv =
779 configuration::theDefaultProvider::get( m_xContext );
780
781 OUStringBuffer aFullPath(128);
782 aFullPath.append(
783 "/org.openoffice.ucb.Configuration/ContentProviders"
784 "/['" );
785 makeAndAppendXMLName( aFullPath, rKey1 );
786 aFullPath.append( "']/SecondaryKeys/['" );
787 makeAndAppendXMLName( aFullPath, rKey2 );
788 aFullPath.append( "']/ProviderData" );
789
790 uno::Sequence<uno::Any> aArguments(comphelper::InitAnyPropertySequence(
791 {
792 {"nodepath", uno::Any(aFullPath.makeStringAndClear())}
793 }));
794
795 uno::Reference< uno::XInterface > xInterface(
796 xConfigProv->createInstanceWithArguments(
797 "com.sun.star.configuration.ConfigurationAccess",
798 aArguments ) );
799
800 if ( !m_xNotifier.is() )
801 {
802 m_xNotifier.set( xInterface, uno::UNO_QUERY_THROW );
803
804 m_xNotifier->addChangesListener( this );
805 }
806
807 uno::Reference< container::XNameAccess > xNameAccess(
808 xInterface, uno::UNO_QUERY_THROW );
809
810 const uno::Sequence< OUString > aElems = xNameAccess->getElementNames();
811
812 if ( aElems.hasElements() )
813 {
814 uno::Reference< container::XHierarchicalNameAccess >
815 xHierNameAccess( xInterface, uno::UNO_QUERY_THROW );
816
817 // Iterate over children.
818 for ( const auto& rElem : aElems )
819 {
820
821 try
822 {
823
825
826 OUStringBuffer aElemBuffer( "['" );
827 makeAndAppendXMLName( aElemBuffer, rElem );
828 aElemBuffer.append( "']" );
829
830 OSL_VERIFY(
831 createContentProviderData(
832 aElemBuffer, xHierNameAccess,
833 aInfo));
834
835 rListToFill.push_back( aInfo );
836 }
837 catch (const container::NoSuchElementException&)
838 {
839 // getByHierarchicalName
840 OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
841 "caught NoSuchElementException!" );
842 }
843 }
844 }
845 }
846 catch (const uno::RuntimeException&)
847 {
848 TOOLS_WARN_EXCEPTION( "ucb", "" );
849 return false;
850 }
851 catch (const uno::Exception&)
852 {
853 // createInstance, createInstanceWithArguments
854
855 TOOLS_WARN_EXCEPTION( "ucb", "" );
856 return false;
857 }
858
859 return true;
860}
861
862
863// ProviderListEntry_Impl implementation.
864
865
867{
868 if ( !m_xResolvedProvider.is() )
869 {
871 m_xProvider, UNO_QUERY );
872 if ( xSupplier.is() )
873 m_xResolvedProvider = xSupplier->getContentProvider();
874
875 if ( !m_xResolvedProvider.is() )
877 }
878
879 return m_xResolvedProvider;
880}
881
882/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XComponentContext > m_xContext
css::uno::Reference< css::ucb::XContentProvider > const & resolveProvider() const
Definition: ucb.cxx:866
css::uno::Reference< css::ucb::XContentProvider > m_xResolvedProvider
Definition: providermap.hxx:36
css::uno::Reference< css::ucb::XContentProvider > m_xProvider
Definition: providermap.hxx:34
virtual void SAL_CALL deregisterContentProvider(const css::uno::Reference< css::ucb::XContentProvider > &Provider, const OUString &Scheme) override
Definition: ucb.cxx:390
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &Listener) override
Definition: ucb.cxx:270
UniversalContentBroker(const css::uno::Reference< css::uno::XComponentContext > &xContext)
Definition: ucb.cxx:224
virtual ~UniversalContentBroker() override
Definition: ucb.cxx:235
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &Listener) override
Definition: ucb.cxx:259
static css::uno::Reference< css::ucb::XCommandInfo > getCommandInfo()
Definition: ucbcmds.cxx:1526
css::uno::Reference< css::util::XChangesNotifier > m_xNotifier
Definition: ucb.hxx:149
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: ucb.hxx:146
sal_Int32 m_nCommandId
Definition: ucb.hxx:155
virtual void SAL_CALL releaseCommandIdentifier(sal_Int32 aCommandId) override
Definition: ucb.cxx:637
virtual OUString SAL_CALL getImplementationName() override
Definition: ucb.cxx:282
void globalTransfer(const css::ucb::GlobalTransferCommandArgument2 &rArg, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
Definition: ucbcmds.cxx:1532
virtual sal_Int32 SAL_CALL createCommandIdentifier() override
Definition: ucb.cxx:539
virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL registerContentProvider(const css::uno::Reference< css::ucb::XContentProvider > &Provider, const OUString &Scheme, sal_Bool ReplaceExisting) override
Definition: ucb.cxx:344
ProviderMap_Impl m_aProviders
Definition: ucb.hxx:152
virtual void SAL_CALL abort(sal_Int32 CommandId) override
Definition: ucb.cxx:644
virtual void SAL_CALL dispose() override
Definition: ucb.cxx:244
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: ucb.cxx:290
virtual void SAL_CALL changesOccurred(const css::util::ChangesEvent &Event) override
Definition: ucb.cxx:654
std::unique_ptr< comphelper::OInterfaceContainerHelper3< css::lang::XEventListener > > m_pDisposeEventListeners
Definition: ucb.hxx:154
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
Definition: ucb.cxx:308
bool getContentProviderData(std::u16string_view rKey1, std::u16string_view rKey2, ucbhelper::ContentProviderDataList &rListToFill)
Definition: ucb.cxx:765
void prepareAndRegister(const ucbhelper::ContentProviderDataList &rData)
Definition: ucb.cxx:742
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL queryContent(const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier) override
Definition: ucb.cxx:459
virtual css::uno::Sequence< css::ucb::ContentProviderInfo > SAL_CALL queryContentProviders() override
Definition: ucb.cxx:423
css::uno::Any checkIn(const css::ucb::CheckinArgument &rArg, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
Definition: ucbcmds.cxx:1846
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
Definition: ucb.cxx:694
osl::Mutex m_aMutex
Definition: ucb.hxx:153
virtual sal_Int32 SAL_CALL compareContentIds(const css::uno::Reference< css::ucb::XContentIdentifier > &Id1, const css::uno::Reference< css::ucb::XContentIdentifier > &Id2) override
Definition: ucb.cxx:480
virtual css::uno::Reference< css::ucb::XContentIdentifier > SAL_CALL createContentIdentifier(const OUString &ContentId) override
Definition: ucb.cxx:507
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: ucb.cxx:286
virtual css::uno::Any SAL_CALL execute(const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override
Definition: ucb.cxx:549
css::uno::Sequence< css::uno::Any > m_aArguments
Definition: ucb.hxx:151
virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL queryContentProvider(const OUString &Identifier) override
Definition: ucb.cxx:448
Val const * map(OUString const &rString) const
Definition: regexpmap.hxx:401
size_type size() const
Definition: regexpmap.hxx:392
void add(OUString const &rKey, Val const &rValue)
Definition: regexpmap.hxx:301
iterator find(OUString const &rKey)
Definition: regexpmap.hxx:330
void erase(iterator const &rPos)
Definition: regexpmap.hxx:353
int nCount
#define TOOLS_WARN_EXCEPTION(area, stream)
Sequence< PropertyValue > aArguments
void * p
sal_Int64 n
Sequence< sal_Int8 > aSeq
#define SAL_WARN(area, stream)
constexpr OUStringLiteral aData
css::uno::Sequence< css::uno::Any > InitAnyPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
int i
end
void cancelCommandExecution(const uno::Any &rException, const uno::Reference< ucb::XCommandEnvironment > &xEnv)
UCBHELPER_DLLPUBLIC bool registerAtUcb(css::uno::Reference< css::ucb::XContentProviderManager > const &rManager, css::uno::Reference< css::uno::XComponentContext > const &rxContext, OUString const &rName, OUString const &rArguments, OUString const &rTemplate)
std::vector< ContentProviderData > ContentProviderDataList
std::deque< ProviderListEntry_Impl > ProviderList_Impl
Definition: providermap.hxx:58
OUString aCommand
unsigned char sal_Bool
sal_uInt16 sal_Unicode
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * ucb_UniversalContentBroker_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
Definition: ucb.cxx:297
constexpr OUStringLiteral GLOBALTRANSFER_NAME
Definition: ucbcmds.hxx:30
constexpr OUStringLiteral CHECKIN_NAME
Definition: ucbcmds.hxx:33
#define GLOBALTRANSFER_HANDLE
Definition: ucbcmds.hxx:31
#define CHECKIN_HANDLE
Definition: ucbcmds.hxx:34
constexpr OUStringLiteral GETCOMMANDINFO_NAME
Definition: ucbcmds.hxx:27
#define GETCOMMANDINFO_HANDLE
Definition: ucbcmds.hxx:28
std::unique_ptr< char[]> aBuffer