update dev300-m58
[ooovba.git] / ucb / source / ucp / webdav / webdavcontentcaps.cxx
blob34d50f73d6e60f48729ded9b828ed3338b6dd88d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: webdavcontentcaps.cxx,v $
10 * $Revision: 1.21.20.1 $
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 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_ucb.hxx"
33 /**************************************************************************
34 TODO
35 **************************************************************************
37 *************************************************************************/
39 #include <set>
40 #include <com/sun/star/beans/Property.hpp>
41 #include <com/sun/star/beans/PropertyAttribute.hpp>
42 #include <com/sun/star/beans/PropertyValue.hpp>
43 #include <com/sun/star/ucb/CommandInfo.hpp>
44 #include <com/sun/star/ucb/OpenCommandArgument2.hpp>
45 #include <com/sun/star/ucb/InsertCommandArgument.hpp>
46 #include <com/sun/star/ucb/PostCommandArgument2.hpp>
47 #include <com/sun/star/ucb/TransferInfo.hpp>
48 #include <com/sun/star/uno/Sequence.hxx>
49 #ifndef _COM_SUN_STAR_UTIL_DATETIME_HXX_
50 #include <com/sun/star/util/DateTime.hpp>
51 #endif
52 #include <com/sun/star/ucb/Link.hpp>
53 #include <com/sun/star/ucb/Lock.hpp>
54 #include <com/sun/star/ucb/LockEntry.hpp>
55 #include "webdavcontent.hxx"
56 #ifndef _WEBDAV_UCP_PROVIDFER_HXX
57 #include "webdavprovider.hxx"
58 #endif
59 #ifndef _WEBDAV_SESSION_HXX
60 #include "DAVSession.hxx"
61 #endif
62 #include "ContentProperties.hxx"
64 using namespace com::sun::star;
65 using namespace webdav_ucp;
67 //=========================================================================
69 // ContentProvider implementation.
71 //=========================================================================
73 bool ContentProvider::getProperty(
74 const rtl::OUString & rPropName, beans::Property & rProp, bool bStrict )
76 if ( !m_pProps )
78 osl::MutexGuard aGuard( m_aMutex );
79 if ( !m_pProps )
81 m_pProps = new PropertyMap;
83 //////////////////////////////////////////////////////////////
84 // Fill map of known properties...
85 //////////////////////////////////////////////////////////////
87 // Mandatory UCB properties.
88 m_pProps->insert(
89 beans::Property(
90 rtl::OUString(
91 RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ),
92 -1,
93 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
94 beans::PropertyAttribute::BOUND
95 | beans::PropertyAttribute::READONLY ) );
97 m_pProps->insert(
98 beans::Property(
99 rtl::OUString(
100 RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ),
102 getCppuBooleanType(),
103 beans::PropertyAttribute::BOUND
104 | beans::PropertyAttribute::READONLY ) );
106 m_pProps->insert(
107 beans::Property(
108 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ),
110 getCppuBooleanType(),
111 beans::PropertyAttribute::BOUND
112 | beans::PropertyAttribute::READONLY ) );
114 m_pProps->insert(
115 beans::Property(
116 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ),
118 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
119 beans::PropertyAttribute::BOUND ) );
121 // Optional UCB properties.
123 m_pProps->insert(
124 beans::Property(
125 rtl::OUString(
126 RTL_CONSTASCII_USTRINGPARAM( "DateCreated" ) ),
128 getCppuType( static_cast< const util::DateTime * >( 0 ) ),
129 beans::PropertyAttribute::BOUND
130 | beans::PropertyAttribute::READONLY ) );
132 m_pProps->insert(
133 beans::Property(
134 rtl::OUString(
135 RTL_CONSTASCII_USTRINGPARAM( "DateModified" ) ),
137 getCppuType( static_cast< const util::DateTime * >( 0 ) ),
138 beans::PropertyAttribute::BOUND
139 | beans::PropertyAttribute::READONLY ) );
141 m_pProps->insert(
142 beans::Property(
143 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ),
145 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
146 beans::PropertyAttribute::BOUND
147 | beans::PropertyAttribute::READONLY ) );
149 m_pProps->insert(
150 beans::Property(
151 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Size" ) ),
153 getCppuType( static_cast< const sal_Int64 * >( 0 ) ),
154 beans::PropertyAttribute::BOUND
155 | beans::PropertyAttribute::READONLY ) );
157 m_pProps->insert(
158 beans::Property(
159 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseURI" ) ),
161 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
162 beans::PropertyAttribute::BOUND
163 | beans::PropertyAttribute::READONLY ) );
165 // Standard DAV properties.
167 m_pProps->insert(
168 beans::Property(
169 DAVProperties::CREATIONDATE,
171 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
172 beans::PropertyAttribute::BOUND
173 | beans::PropertyAttribute::READONLY ) );
175 m_pProps->insert(
176 beans::Property(
177 DAVProperties::DISPLAYNAME,
179 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
180 beans::PropertyAttribute::BOUND ) );
182 m_pProps->insert(
183 beans::Property(
184 DAVProperties::GETCONTENTLANGUAGE,
186 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
187 beans::PropertyAttribute::BOUND
188 | beans::PropertyAttribute::READONLY ) );
190 m_pProps->insert(
191 beans::Property(
192 DAVProperties::GETCONTENTLENGTH,
194 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
195 beans::PropertyAttribute::BOUND
196 | beans::PropertyAttribute::READONLY ) );
198 m_pProps->insert(
199 beans::Property(
200 DAVProperties::GETCONTENTTYPE ,
202 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
203 beans::PropertyAttribute::BOUND
204 | beans::PropertyAttribute::READONLY ) );
206 m_pProps->insert(
207 beans::Property(
208 DAVProperties::GETETAG,
210 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
211 beans::PropertyAttribute::BOUND
212 | beans::PropertyAttribute::READONLY ) );
214 m_pProps->insert(
215 beans::Property(
216 DAVProperties::GETLASTMODIFIED,
218 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
219 beans::PropertyAttribute::BOUND
220 | beans::PropertyAttribute::READONLY ) );
222 m_pProps->insert(
223 beans::Property(
224 DAVProperties::LOCKDISCOVERY,
226 getCppuType( static_cast<
227 const uno::Sequence<
228 com::sun::star::ucb::Lock > * >( 0 ) ),
229 beans::PropertyAttribute::BOUND
230 | beans::PropertyAttribute::READONLY ) );
232 m_pProps->insert(
233 beans::Property(
234 DAVProperties::RESOURCETYPE,
236 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
237 beans::PropertyAttribute::BOUND
238 | beans::PropertyAttribute::READONLY ) );
240 m_pProps->insert(
241 beans::Property(
242 DAVProperties::SOURCE,
244 getCppuType( static_cast<
245 const uno::Sequence<
246 com::sun::star::ucb::Link > * >( 0 ) ),
247 beans::PropertyAttribute::BOUND ) );
249 m_pProps->insert(
250 beans::Property(
251 DAVProperties::SUPPORTEDLOCK,
253 getCppuType( static_cast<
254 const uno::Sequence<
255 com::sun::star::ucb::LockEntry > * >(
256 0 ) ),
257 beans::PropertyAttribute::BOUND
258 | beans::PropertyAttribute::READONLY ) );
260 m_pProps->insert(
261 beans::Property(
262 DAVProperties::EXECUTABLE,
264 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
265 beans::PropertyAttribute::BOUND ) );
267 m_pProps->insert(
268 beans::Property(
269 rtl::OUString(
270 RTL_CONSTASCII_USTRINGPARAM( "SupportsActiveStreaming" ) ),
272 getCppuBooleanType(),
273 beans::PropertyAttribute::BOUND
274 | beans::PropertyAttribute::READONLY ) );
276 m_pProps->insert(
277 beans::Property(
278 rtl::OUString(
279 RTL_CONSTASCII_USTRINGPARAM( "IsReadOnly" ) ),
281 getCppuBooleanType(),
282 beans::PropertyAttribute::BOUND
283 | beans::PropertyAttribute::READONLY ) );
287 //////////////////////////////////////////////////////////////
288 // Lookup property.
289 //////////////////////////////////////////////////////////////
291 beans::Property aProp;
292 aProp.Name = rPropName;
293 const PropertyMap::const_iterator it = m_pProps->find( aProp );
294 if ( it != m_pProps->end() )
296 rProp = (*it);
298 else
300 if ( bStrict )
301 return false;
303 // All unknown props are treated as:
304 rProp = beans::Property(
305 rPropName,
306 - 1,
307 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
308 beans::PropertyAttribute::BOUND );
311 return true;
314 //=========================================================================
316 // Content implementation.
318 //=========================================================================
320 // virtual
321 uno::Sequence< beans::Property > Content::getProperties(
322 const uno::Reference< com::sun::star::ucb::XCommandEnvironment > & xEnv )
324 sal_Bool bTransient;
325 std::auto_ptr< DAVResourceAccess > xResAccess;
326 std::auto_ptr< ContentProperties > xCachedProps;
327 rtl::Reference< ContentProvider > xProvider;
330 osl::Guard< osl::Mutex > aGuard( m_aMutex );
332 bTransient = m_bTransient;
333 xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) );
334 if ( m_xCachedProps.get() )
335 xCachedProps.reset( new ContentProperties( *m_xCachedProps.get() ) );
336 xProvider.set( m_pProvider );
339 typedef std::set< rtl::OUString > StringSet;
340 StringSet aPropSet;
342 // No server access for just created (not yet committed) objects.
343 // Only a minimal set of properties supported at this stage.
344 if ( !bTransient )
346 // Obtain all properties supported for this resource from server.
349 std::vector< DAVResourceInfo > props;
350 xResAccess->PROPFIND( DAVZERO, props, xEnv );
352 // Note: vector always contains exactly one resource info, because
353 // we used a depth of DAVZERO for PROPFIND.
354 aPropSet.insert( (*props.begin()).properties.begin(),
355 (*props.begin()).properties.end() );
357 catch ( DAVException const & )
362 // Add DAV properties, map DAV properties to UCB properties.
363 sal_Bool bHasCreationDate = sal_False; // creationdate <-> DateCreated
364 sal_Bool bHasGetLastModified = sal_False; // getlastmodified <-> DateModified
365 sal_Bool bHasGetContentType = sal_False; // getcontenttype <-> MediaType
366 sal_Bool bHasGetContentLength = sal_False; // getcontentlength <-> Size
368 sal_Bool bHasContentType = sal_False;
369 sal_Bool bHasIsDocument = sal_False;
370 sal_Bool bHasIsFolder = sal_False;
371 sal_Bool bHasTitle = sal_False;
372 sal_Bool bHasBaseURI = sal_False;
373 sal_Bool bHasDateCreated = sal_False;
374 sal_Bool bHasDateModified = sal_False;
375 sal_Bool bHasMediaType = sal_False;
376 sal_Bool bHasSize = sal_False;
379 std::set< rtl::OUString >::const_iterator it = aPropSet.begin();
380 std::set< rtl::OUString >::const_iterator end = aPropSet.end();
381 while ( it != end )
383 if ( !bHasCreationDate &&
384 ( (*it) == DAVProperties::CREATIONDATE ) )
386 bHasCreationDate = sal_True;
388 else if ( !bHasGetLastModified &&
389 ( (*it) == DAVProperties::GETLASTMODIFIED ) )
391 bHasGetLastModified = sal_True;
393 else if ( !bHasGetContentType &&
394 ( (*it) == DAVProperties::GETCONTENTTYPE ) )
396 bHasGetContentType = sal_True;
398 else if ( !bHasGetContentLength &&
399 ( (*it) == DAVProperties::GETCONTENTLENGTH ) )
401 bHasGetContentLength = sal_True;
403 else if ( !bHasContentType &&
404 (*it).equalsAsciiL(
405 RTL_CONSTASCII_STRINGPARAM( "ContentType" ) ) )
407 bHasContentType = sal_True;
409 else if ( !bHasIsDocument &&
410 (*it).equalsAsciiL(
411 RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) )
413 bHasIsDocument = sal_True;
415 else if ( !bHasIsFolder &&
416 (*it).equalsAsciiL(
417 RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) )
419 bHasIsFolder = sal_True;
421 else if ( !bHasTitle &&
422 (*it).equalsAsciiL(
423 RTL_CONSTASCII_STRINGPARAM( "Title" ) ) )
425 bHasTitle = sal_True;
427 else if ( !bHasBaseURI &&
428 (*it).equalsAsciiL(
429 RTL_CONSTASCII_STRINGPARAM( "BaseURI" ) ) )
431 bHasBaseURI = sal_True;
433 else if ( !bHasDateCreated &&
434 (*it).equalsAsciiL(
435 RTL_CONSTASCII_STRINGPARAM( "DateCreated" ) ) )
437 bHasDateCreated = sal_True;
439 else if ( !bHasDateModified &&
440 (*it).equalsAsciiL(
441 RTL_CONSTASCII_STRINGPARAM( "DateModified" ) ) )
443 bHasDateModified = sal_True;
445 else if ( !bHasMediaType &&
446 (*it).equalsAsciiL(
447 RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) )
449 bHasMediaType = sal_True;
451 else if ( !bHasSize &&
452 (*it).equalsAsciiL(
453 RTL_CONSTASCII_STRINGPARAM( "Size" ) ) )
455 bHasSize = sal_True;
458 it++;
462 // Add mandatory properties.
463 if ( !bHasContentType )
464 aPropSet.insert(
465 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ) );
467 if ( !bHasIsDocument )
468 aPropSet.insert(
469 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ) );
471 if ( !bHasIsFolder )
472 aPropSet.insert(
473 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ) );
475 if ( !bHasTitle )
477 // Always present since it can be calculated from content's URI.
478 aPropSet.insert(
479 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ) );
482 // Add optional properties.
484 if ( !bHasBaseURI )
486 // Always present since it can be calculated from content's URI.
487 aPropSet.insert(
488 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseURI" ) ) );
491 if ( !bHasDateCreated && bHasCreationDate )
492 aPropSet.insert(
493 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateCreated" ) ) );
495 if ( !bHasDateModified && bHasGetLastModified )
496 aPropSet.insert(
497 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateModified" ) ) );
499 if ( !bHasMediaType && bHasGetContentType )
500 aPropSet.insert(
501 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ) );
503 if ( !bHasSize && bHasGetContentLength )
504 aPropSet.insert(
505 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Size" ) ) );
507 // Add cached properties, if present and still missing.
508 if ( xCachedProps.get() )
510 const std::set< rtl::OUString >::const_iterator set_end
511 = aPropSet.end();
513 const std::auto_ptr< PropertyValueMap > & xProps
514 = xCachedProps->getProperties();
516 PropertyValueMap::const_iterator map_it = xProps->begin();
517 const PropertyValueMap::const_iterator map_end = xProps->end();
519 while ( map_it != map_end )
521 if ( aPropSet.find( (*map_it).first ) == set_end )
522 aPropSet.insert( (*map_it).first );
524 ++map_it;
528 // std::set -> uno::Sequence
529 sal_Int32 nCount = aPropSet.size();
530 uno::Sequence< beans::Property > aProperties( nCount );
532 std::set< rtl::OUString >::const_iterator it = aPropSet.begin();
533 beans::Property aProp;
535 for ( sal_Int32 n = 0; n < nCount; ++n, ++it )
537 xProvider->getProperty( (*it), aProp );
538 aProperties[ n ] = aProp;
541 return aProperties;
544 //=========================================================================
545 // virtual
546 uno::Sequence< com::sun::star::ucb::CommandInfo > Content::getCommands(
547 const uno::Reference< com::sun::star::ucb::XCommandEnvironment > & xEnv )
549 osl::Guard< osl::Mutex > aGuard( m_aMutex );
551 sal_Bool bFolder = sal_False;
555 bFolder = isFolder( xEnv );
557 catch ( uno::Exception const & )
559 static com::sun::star::ucb::CommandInfo aDefaultCommandInfoTable[] =
561 ///////////////////////////////////////////////////////////////
562 // Just mandatory commands avail.
563 ///////////////////////////////////////////////////////////////
565 com::sun::star::ucb::CommandInfo(
566 rtl::OUString(
567 RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
569 getCppuVoidType()
571 com::sun::star::ucb::CommandInfo(
572 rtl::OUString(
573 RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
575 getCppuVoidType()
577 com::sun::star::ucb::CommandInfo(
578 rtl::OUString(
579 RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
581 getCppuType( static_cast<
582 uno::Sequence< beans::Property > * >( 0 ) )
584 com::sun::star::ucb::CommandInfo(
585 rtl::OUString(
586 RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
588 getCppuType( static_cast<
589 uno::Sequence< beans::PropertyValue > * >( 0 ) )
592 return uno::Sequence< com::sun::star::ucb::CommandInfo >(
593 aDefaultCommandInfoTable, 4 );
596 if ( bFolder )
598 //=================================================================
600 // Folder: Supported commands
602 //=================================================================
604 static com::sun::star::ucb::CommandInfo aFolderCommandInfoTable[] =
606 ///////////////////////////////////////////////////////////////
607 // Required commands
608 ///////////////////////////////////////////////////////////////
610 com::sun::star::ucb::CommandInfo(
611 rtl::OUString(
612 RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
614 getCppuVoidType()
616 com::sun::star::ucb::CommandInfo(
617 rtl::OUString(
618 RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
620 getCppuVoidType()
622 com::sun::star::ucb::CommandInfo(
623 rtl::OUString(
624 RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
626 getCppuType( static_cast<
627 uno::Sequence< beans::Property > * >( 0 ) )
629 com::sun::star::ucb::CommandInfo(
630 rtl::OUString(
631 RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
633 getCppuType( static_cast<
634 uno::Sequence< beans::PropertyValue > * >( 0 ) )
637 ///////////////////////////////////////////////////////////////
638 // Optional standard commands
639 ///////////////////////////////////////////////////////////////
641 com::sun::star::ucb::CommandInfo(
642 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" ) ),
644 getCppuBooleanType()
646 com::sun::star::ucb::CommandInfo(
647 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "insert" ) ),
649 getCppuType( static_cast<
650 com::sun::star::ucb::InsertCommandArgument * >( 0 ) )
652 com::sun::star::ucb::CommandInfo(
653 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ),
655 getCppuType( static_cast<
656 com::sun::star::ucb::OpenCommandArgument2 * >( 0 ) )
658 com::sun::star::ucb::CommandInfo(
659 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ),
661 getCppuType( static_cast<
662 com::sun::star::ucb::TransferInfo * >( 0 ) )
665 ///////////////////////////////////////////////////////////////
666 // New commands
667 ///////////////////////////////////////////////////////////////
670 com::sun::star::ucb::CommandInfo(
671 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "COPY" ) ),
673 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
675 com::sun::star::ucb::CommandInfo(
676 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MOVE" ) ),
678 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
683 return uno::Sequence< com::sun::star::ucb::CommandInfo >(
684 aFolderCommandInfoTable, 8 );
686 else
688 //=================================================================
690 // Document: Supported commands
692 //=================================================================
694 static com::sun::star::ucb::CommandInfo aDocumentCommandInfoTable[] =
696 ///////////////////////////////////////////////////////////////
697 // Required commands
698 ///////////////////////////////////////////////////////////////
700 com::sun::star::ucb::CommandInfo(
701 rtl::OUString(
702 RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
704 getCppuVoidType()
706 com::sun::star::ucb::CommandInfo(
707 rtl::OUString(
708 RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
710 getCppuVoidType()
712 com::sun::star::ucb::CommandInfo(
713 rtl::OUString(
714 RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
716 getCppuType( static_cast<
717 uno::Sequence< beans::Property > * >( 0 ) )
719 com::sun::star::ucb::CommandInfo(
720 rtl::OUString(
721 RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
723 getCppuType( static_cast<
724 uno::Sequence< beans::PropertyValue > * >( 0 ) )
727 ///////////////////////////////////////////////////////////////
728 // Optional standard commands
729 ///////////////////////////////////////////////////////////////
731 com::sun::star::ucb::CommandInfo(
732 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" ) ),
734 getCppuBooleanType()
736 com::sun::star::ucb::CommandInfo(
737 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "insert" ) ),
739 getCppuType( static_cast<
740 com::sun::star::ucb::InsertCommandArgument * >( 0 ) )
742 com::sun::star::ucb::CommandInfo(
743 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ),
745 getCppuType( static_cast<
746 com::sun::star::ucb::OpenCommandArgument2 * >( 0 ) )
749 ///////////////////////////////////////////////////////////////
750 // New commands
751 ///////////////////////////////////////////////////////////////
753 com::sun::star::ucb::CommandInfo(
754 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "post" ) ),
756 getCppuType( static_cast<
757 com::sun::star::ucb::PostCommandArgument2 * >( 0 ) )
761 com::sun::star::ucb::CommandInfo(
762 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "COPY" ) ),
764 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
766 com::sun::star::ucb::CommandInfo(
767 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MOVE" ) ),
769 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
774 return uno::Sequence< com::sun::star::ucb::CommandInfo >(
775 aDocumentCommandInfoTable, 8 );