LCOV - code coverage report
Current view: top level - libreoffice/ucb/source/ucp/hierarchy - hierarchycontentcaps.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 100 0.0 %
Date: 2012-12-17 Functions: 0 13 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             :     Props/Commands:
      28             : 
      29             :                            root    folder  folder  link    link
      30             :                                    (new)           (new)
      31             :     ----------------------------------------------------------------
      32             :     ContentType            x       x       x       x       x
      33             :     IsDocument             x       x       x       x       x
      34             :     IsFolder               x       x       x       x       x
      35             :     Title                  x       x       x       x       x
      36             :     TargetURL                                      x       x
      37             :     CreatableContentsInfo  x       x       x       x       x
      38             : 
      39             :     getCommandInfo         x       x       x       x       x
      40             :     getPropertySetInfo     x       x       x       x       x
      41             :     getPropertyValues      x       x       x       x       x
      42             :     setPropertyValues      x       x       x       x       x
      43             :     createNewContent       x               x
      44             :     insert                                 x               x
      45             :     delete                         x               x
      46             :     open                   x       x
      47             :     transfer               x       x
      48             : 
      49             :  *************************************************************************/
      50             : 
      51             : #include <com/sun/star/beans/Property.hpp>
      52             : #include <com/sun/star/beans/PropertyAttribute.hpp>
      53             : #include <com/sun/star/beans/PropertyValue.hpp>
      54             : #include <com/sun/star/ucb/CommandInfo.hpp>
      55             : #include <com/sun/star/ucb/OpenCommandArgument2.hpp>
      56             : #include <com/sun/star/ucb/TransferInfo.hpp>
      57             : #include <com/sun/star/uno/Sequence.hxx>
      58             : #include <sal/macros.h>
      59             : #include "hierarchycontent.hxx"
      60             : 
      61             : using namespace com::sun::star;
      62             : using namespace hierarchy_ucp;
      63             : 
      64             : //=========================================================================
      65             : //
      66             : // HierarchyContent implementation.
      67             : //
      68             : //=========================================================================
      69             : 
      70             : #define MAKEPROPSEQUENCE( a ) \
      71             :     uno::Sequence< beans::Property >( a, sizeof( a )  / sizeof( a[ 0 ] ) )
      72             : 
      73             : #define MAKECMDSEQUENCE( a ) \
      74             :     uno::Sequence< ucb::CommandInfo >( a, sizeof( a )  / sizeof( a[ 0 ] ) )
      75             : 
      76             : //=========================================================================
      77             : //
      78             : // IMPORTENT: If any property data ( name / type / ... ) are changed, then
      79             : //            HierarchyContent::getPropertyValues(...) must be adapted too!
      80             : //
      81             : //=========================================================================
      82             : 
      83             : // virtual
      84           0 : uno::Sequence< beans::Property > HierarchyContent::getProperties(
      85             :             const uno::Reference< ucb::XCommandEnvironment > & /*xEnv*/ )
      86             : {
      87           0 :     osl::Guard< osl::Mutex > aGuard( m_aMutex );
      88             : 
      89           0 :     if ( m_eKind == LINK )
      90             :     {
      91             :         //=================================================================
      92             :         //
      93             :         // Link: Supported properties
      94             :         //
      95             :         //=================================================================
      96             : 
      97           0 :         if ( isReadOnly() )
      98             :         {
      99             :             static beans::Property aLinkPropertyInfoTable[] =
     100             :             {
     101             :                 ///////////////////////////////////////////////////////////
     102             :                 // Required properties
     103             :                 ///////////////////////////////////////////////////////////
     104             :                 beans::Property(
     105             :                     rtl::OUString(
     106             :                         RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ),
     107             :                     -1,
     108           0 :                     getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     109             :                     beans::PropertyAttribute::BOUND
     110             :                         | beans::PropertyAttribute::READONLY
     111             :                 ),
     112             :                 beans::Property(
     113             :                     rtl::OUString(
     114             :                         RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ),
     115             :                     -1,
     116           0 :                     getCppuBooleanType(),
     117             :                     beans::PropertyAttribute::BOUND
     118             :                         | beans::PropertyAttribute::READONLY
     119             :                 ),
     120             :                 beans::Property(
     121             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ),
     122             :                     -1,
     123           0 :                     getCppuBooleanType(),
     124             :                     beans::PropertyAttribute::BOUND
     125             :                         | beans::PropertyAttribute::READONLY
     126             :                 ),
     127             :                 beans::Property(
     128             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ),
     129             :                     -1,
     130           0 :                     getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     131             :                     beans::PropertyAttribute::BOUND
     132             :                         | beans::PropertyAttribute::READONLY
     133             :                 ),
     134             :                 ///////////////////////////////////////////////////////////
     135             :                 // Optional standard properties
     136             :                 ///////////////////////////////////////////////////////////
     137             :                 beans::Property(
     138             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TargetURL" ) ),
     139             :                     -1,
     140           0 :                     getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     141             :                     beans::PropertyAttribute::BOUND
     142             :                         | beans::PropertyAttribute::READONLY
     143             :                 ),
     144             :                 beans::Property(
     145             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
     146             :                         "CreatableContentsInfo" ) ),
     147             :                     -1,
     148             :                     getCppuType( static_cast<
     149           0 :                         const uno::Sequence< ucb::ContentInfo > * >( 0 ) ),
     150             :                     beans::PropertyAttribute::BOUND
     151             :                         | beans::PropertyAttribute::READONLY )
     152             :                 ///////////////////////////////////////////////////////////
     153             :                 // New properties
     154             :                 ///////////////////////////////////////////////////////////
     155           0 :             };
     156           0 :             return MAKEPROPSEQUENCE( aLinkPropertyInfoTable );
     157             :         }
     158             :         else
     159             :         {
     160             :             static beans::Property aLinkPropertyInfoTable[] =
     161             :             {
     162             :                 ///////////////////////////////////////////////////////////
     163             :                 // Required properties
     164             :                 ///////////////////////////////////////////////////////////
     165             :                 beans::Property(
     166             :                     rtl::OUString(
     167             :                         RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ),
     168             :                     -1,
     169           0 :                     getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     170             :                     beans::PropertyAttribute::BOUND
     171             :                         | beans::PropertyAttribute::READONLY
     172             :                 ),
     173             :                 beans::Property(
     174             :                     rtl::OUString(
     175             :                         RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ),
     176             :                     -1,
     177           0 :                     getCppuBooleanType(),
     178             :                     beans::PropertyAttribute::BOUND
     179             :                         | beans::PropertyAttribute::READONLY
     180             :                 ),
     181             :                 beans::Property(
     182             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ),
     183             :                     -1,
     184           0 :                     getCppuBooleanType(),
     185             :                     beans::PropertyAttribute::BOUND
     186             :                         | beans::PropertyAttribute::READONLY
     187             :                 ),
     188             :                 beans::Property(
     189             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ),
     190             :                     -1,
     191           0 :                     getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     192             :                     beans::PropertyAttribute::BOUND
     193             :                 ),
     194             :                 ///////////////////////////////////////////////////////////
     195             :                 // Optional standard properties
     196             :                 ///////////////////////////////////////////////////////////
     197             :                 beans::Property(
     198             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TargetURL" ) ),
     199             :                     -1,
     200           0 :                     getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     201             :                     beans::PropertyAttribute::BOUND
     202             :                 ),
     203             :                 beans::Property(
     204             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
     205             :                         "CreatableContentsInfo" ) ),
     206             :                     -1,
     207             :                     getCppuType( static_cast<
     208           0 :                         const uno::Sequence< ucb::ContentInfo > * >( 0 ) ),
     209             :                     beans::PropertyAttribute::BOUND
     210             :                         | beans::PropertyAttribute::READONLY )
     211             :                 ///////////////////////////////////////////////////////////
     212             :                 // New properties
     213             :                 ///////////////////////////////////////////////////////////
     214           0 :             };
     215           0 :             return MAKEPROPSEQUENCE( aLinkPropertyInfoTable );
     216             :         }
     217             :     }
     218           0 :     else if ( m_eKind == FOLDER )
     219             :     {
     220             :         //=================================================================
     221             :         //
     222             :         // Folder: Supported properties
     223             :         //
     224             :         //=================================================================
     225             : 
     226           0 :         if ( isReadOnly() )
     227             :         {
     228             :             static beans::Property aFolderPropertyInfoTable[] =
     229             :             {
     230             :                 ///////////////////////////////////////////////////////////
     231             :                 // Required properties
     232             :                 ///////////////////////////////////////////////////////////
     233             :                 beans::Property(
     234             :                     rtl::OUString(
     235             :                         RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ),
     236             :                     -1,
     237           0 :                     getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     238             :                     beans::PropertyAttribute::BOUND
     239             :                         | beans::PropertyAttribute::READONLY
     240             :                 ),
     241             :                 beans::Property(
     242             :                     rtl::OUString(
     243             :                         RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ),
     244             :                     -1,
     245           0 :                     getCppuBooleanType(),
     246             :                     beans::PropertyAttribute::BOUND
     247             :                         | beans::PropertyAttribute::READONLY
     248             :                 ),
     249             :                 beans::Property(
     250             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ),
     251             :                     -1,
     252           0 :                     getCppuBooleanType(),
     253             :                     beans::PropertyAttribute::BOUND
     254             :                         | beans::PropertyAttribute::READONLY
     255             :                 ),
     256             :                 beans::Property(
     257             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ),
     258             :                     -1,
     259           0 :                     getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     260             :                     beans::PropertyAttribute::BOUND
     261             :                         | beans::PropertyAttribute::READONLY
     262             :                 ),
     263             :                 ///////////////////////////////////////////////////////////
     264             :                 // Optional standard properties
     265             :                 ///////////////////////////////////////////////////////////
     266             :                 beans::Property(
     267             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
     268             :                         "CreatableContentsInfo" ) ),
     269             :                     -1,
     270             :                     getCppuType( static_cast<
     271           0 :                         const uno::Sequence< ucb::ContentInfo > * >( 0 ) ),
     272             :                     beans::PropertyAttribute::BOUND
     273             :                         | beans::PropertyAttribute::READONLY )
     274             :                 ///////////////////////////////////////////////////////////
     275             :                 // New properties
     276             :                 ///////////////////////////////////////////////////////////
     277           0 :             };
     278           0 :             return MAKEPROPSEQUENCE( aFolderPropertyInfoTable );
     279             :         }
     280             :         else
     281             :         {
     282             :             static beans::Property aFolderPropertyInfoTable[] =
     283             :             {
     284             :                 ///////////////////////////////////////////////////////////
     285             :                 // Required properties
     286             :                 ///////////////////////////////////////////////////////////
     287             :                 beans::Property(
     288             :                     rtl::OUString(
     289             :                         RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ),
     290             :                     -1,
     291           0 :                     getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     292             :                     beans::PropertyAttribute::BOUND
     293             :                         | beans::PropertyAttribute::READONLY
     294             :                 ),
     295             :                 beans::Property(
     296             :                     rtl::OUString(
     297             :                         RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ),
     298             :                     -1,
     299           0 :                     getCppuBooleanType(),
     300             :                     beans::PropertyAttribute::BOUND
     301             :                         | beans::PropertyAttribute::READONLY
     302             :                 ),
     303             :                 beans::Property(
     304             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ),
     305             :                     -1,
     306           0 :                     getCppuBooleanType(),
     307             :                     beans::PropertyAttribute::BOUND
     308             :                         | beans::PropertyAttribute::READONLY
     309             :                 ),
     310             :                 beans::Property(
     311             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ),
     312             :                     -1,
     313           0 :                     getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     314             :                     beans::PropertyAttribute::BOUND
     315             :                 ),
     316             :                 ///////////////////////////////////////////////////////////
     317             :                 // Optional standard properties
     318             :                 ///////////////////////////////////////////////////////////
     319             :                 beans::Property(
     320             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
     321             :                         "CreatableContentsInfo" ) ),
     322             :                     -1,
     323             :                     getCppuType( static_cast<
     324           0 :                         const uno::Sequence< ucb::ContentInfo > * >( 0 ) ),
     325             :                     beans::PropertyAttribute::BOUND
     326             :                         | beans::PropertyAttribute::READONLY )
     327             :                 ///////////////////////////////////////////////////////////
     328             :                 // New properties
     329             :                 ///////////////////////////////////////////////////////////
     330           0 :             };
     331           0 :             return MAKEPROPSEQUENCE( aFolderPropertyInfoTable );
     332             :         }
     333             :     }
     334             :     else
     335             :     {
     336             :         //=================================================================
     337             :         //
     338             :         // Root Folder: Supported properties
     339             :         //
     340             :         //=================================================================
     341             : 
     342             :         // Currently no difference between reonly /read-write
     343             :         // -> all props ar read-only
     344             : 
     345             :         static beans::Property aRootFolderPropertyInfoTable[] =
     346             :         {
     347             :             ///////////////////////////////////////////////////////////////
     348             :             // Required properties
     349             :             ///////////////////////////////////////////////////////////////
     350             :             beans::Property(
     351             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ),
     352             :                 -1,
     353           0 :                 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     354             :                 beans::PropertyAttribute::BOUND
     355             :                     | beans::PropertyAttribute::READONLY
     356             :             ),
     357             :             beans::Property(
     358             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ),
     359             :                 -1,
     360           0 :                 getCppuBooleanType(),
     361             :                 beans::PropertyAttribute::BOUND
     362             :                     | beans::PropertyAttribute::READONLY
     363             :             ),
     364             :             beans::Property(
     365             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ),
     366             :                 -1,
     367           0 :                 getCppuBooleanType(),
     368             :                 beans::PropertyAttribute::BOUND
     369             :                     | beans::PropertyAttribute::READONLY
     370             :             ),
     371             :             beans::Property(
     372             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ),
     373             :                 -1,
     374           0 :                 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     375             :                 beans::PropertyAttribute::BOUND
     376             :                     | beans::PropertyAttribute::READONLY
     377             :             ),
     378             :             ///////////////////////////////////////////////////////////////
     379             :             // Optional standard properties
     380             :             ///////////////////////////////////////////////////////////////
     381             :             beans::Property(
     382             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
     383             :                         "CreatableContentsInfo" ) ),
     384             :                     -1,
     385             :                     getCppuType( static_cast<
     386           0 :                         const uno::Sequence< ucb::ContentInfo > * >( 0 ) ),
     387             :                     beans::PropertyAttribute::BOUND
     388             :                         | beans::PropertyAttribute::READONLY )
     389             :             ///////////////////////////////////////////////////////////////
     390             :             // New properties
     391             :             ///////////////////////////////////////////////////////////////
     392           0 :         };
     393           0 :         return MAKEPROPSEQUENCE( aRootFolderPropertyInfoTable );
     394           0 :     }
     395             : }
     396             : 
     397             : //=========================================================================
     398             : // virtual
     399           0 : uno::Sequence< ucb::CommandInfo > HierarchyContent::getCommands(
     400             :             const uno::Reference< ucb::XCommandEnvironment > & /*xEnv*/ )
     401             : {
     402           0 :     osl::Guard< osl::Mutex > aGuard( m_aMutex );
     403             : 
     404           0 :     if ( m_eKind == LINK )
     405             :     {
     406             :         //=================================================================
     407             :         //
     408             :         // Link: Supported commands
     409             :         //
     410             :         //=================================================================
     411             : 
     412           0 :         if ( isReadOnly() )
     413             :         {
     414             :             static const ucb::CommandInfo aLinkCommandInfoTable[] =
     415             :             {
     416             :                 ///////////////////////////////////////////////////////////
     417             :                 // Required commands
     418             :                 ///////////////////////////////////////////////////////////
     419             :                 ucb::CommandInfo(
     420             :                     rtl::OUString(
     421             :                         RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
     422             :                     -1,
     423           0 :                     getCppuVoidType()
     424             :                 ),
     425             :                 ucb::CommandInfo(
     426             :                     rtl::OUString(
     427             :                         RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
     428             :                     -1,
     429           0 :                     getCppuVoidType()
     430             :                 ),
     431             :                 ucb::CommandInfo(
     432             :                     rtl::OUString(
     433             :                         RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
     434             :                     -1,
     435             :                     getCppuType(
     436           0 :                         static_cast< uno::Sequence< beans::Property > * >( 0 ) )
     437             :                 ),
     438             :                 ucb::CommandInfo(
     439             :                     rtl::OUString(
     440             :                         RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
     441             :                     -1,
     442             :                     getCppuType(
     443             :                         static_cast<
     444           0 :                             uno::Sequence< beans::PropertyValue > * >( 0 ) )
     445             :                 )
     446             :                 ///////////////////////////////////////////////////////////
     447             :                 // Optional standard commands
     448             :                 ///////////////////////////////////////////////////////////
     449             : 
     450             :                 ///////////////////////////////////////////////////////////
     451             :                 // New commands
     452             :                 ///////////////////////////////////////////////////////////
     453           0 :             };
     454           0 :             return MAKECMDSEQUENCE( aLinkCommandInfoTable );
     455             :         }
     456             :         else
     457             :         {
     458             :             static const ucb::CommandInfo aLinkCommandInfoTable[] =
     459             :             {
     460             :                 ///////////////////////////////////////////////////////////
     461             :                 // Required commands
     462             :                 ///////////////////////////////////////////////////////////
     463             :                 ucb::CommandInfo(
     464             :                     rtl::OUString(
     465             :                         RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
     466             :                     -1,
     467           0 :                     getCppuVoidType()
     468             :                 ),
     469             :                 ucb::CommandInfo(
     470             :                     rtl::OUString(
     471             :                         RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
     472             :                     -1,
     473           0 :                     getCppuVoidType()
     474             :                 ),
     475             :                 ucb::CommandInfo(
     476             :                     rtl::OUString(
     477             :                         RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
     478             :                     -1,
     479             :                     getCppuType(
     480           0 :                         static_cast< uno::Sequence< beans::Property > * >( 0 ) )
     481             :                 ),
     482             :                 ucb::CommandInfo(
     483             :                     rtl::OUString(
     484             :                         RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
     485             :                     -1,
     486             :                     getCppuType(
     487             :                         static_cast<
     488           0 :                             uno::Sequence< beans::PropertyValue > * >( 0 ) )
     489             :                 ),
     490             :                 ///////////////////////////////////////////////////////////
     491             :                 // Optional standard commands
     492             :                 ///////////////////////////////////////////////////////////
     493             :                 ucb::CommandInfo(
     494             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" ) ),
     495             :                     -1,
     496           0 :                     getCppuBooleanType()
     497             :                 ),
     498             :                 ucb::CommandInfo(
     499             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "insert" ) ),
     500             :                     -1,
     501           0 :                     getCppuVoidType()
     502             :                 )
     503             :                 ///////////////////////////////////////////////////////////
     504             :                 // New commands
     505             :                 ///////////////////////////////////////////////////////////
     506           0 :             };
     507           0 :             return MAKECMDSEQUENCE( aLinkCommandInfoTable );
     508             :         }
     509             :     }
     510           0 :     else if ( m_eKind == FOLDER )
     511             :     {
     512             :         //=================================================================
     513             :         //
     514             :         // Folder: Supported commands
     515             :         //
     516             :         //=================================================================
     517             : 
     518           0 :         if ( isReadOnly() )
     519             :         {
     520             :             static const ucb::CommandInfo aFolderCommandInfoTable[] =
     521             :             {
     522             :                 ///////////////////////////////////////////////////////////
     523             :                 // Required commands
     524             :                 ///////////////////////////////////////////////////////////
     525             :                 ucb::CommandInfo(
     526             :                     rtl::OUString(
     527             :                         RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
     528             :                     -1,
     529           0 :                     getCppuVoidType()
     530             :                 ),
     531             :                 ucb::CommandInfo(
     532             :                     rtl::OUString(
     533             :                         RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
     534             :                     -1,
     535           0 :                     getCppuVoidType()
     536             :                 ),
     537             :                 ucb::CommandInfo(
     538             :                     rtl::OUString(
     539             :                         RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
     540             :                     -1,
     541             :                     getCppuType(
     542           0 :                         static_cast< uno::Sequence< beans::Property > * >( 0 ) )
     543             :                 ),
     544             :                 ucb::CommandInfo(
     545             :                     rtl::OUString(
     546             :                         RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
     547             :                     -1,
     548             :                     getCppuType(
     549             :                         static_cast<
     550           0 :                             uno::Sequence< beans::PropertyValue > * >( 0 ) )
     551             :                 ),
     552             :                 ///////////////////////////////////////////////////////////
     553             :                 // Optional standard commands
     554             :                 ///////////////////////////////////////////////////////////
     555             :                 ucb::CommandInfo(
     556             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ),
     557             :                     -1,
     558             :                     getCppuType(
     559           0 :                         static_cast< ucb::OpenCommandArgument2 * >( 0 ) )
     560             :                 )
     561             :                 ///////////////////////////////////////////////////////////
     562             :                 // New commands
     563             :                 ///////////////////////////////////////////////////////////
     564           0 :             };
     565           0 :             return MAKECMDSEQUENCE( aFolderCommandInfoTable );
     566             :         }
     567             :         else
     568             :         {
     569             :             static const ucb::CommandInfo aFolderCommandInfoTable[] =
     570             :             {
     571             :                 ///////////////////////////////////////////////////////////
     572             :                 // Required commands
     573             :                 ///////////////////////////////////////////////////////////
     574             :                 ucb::CommandInfo(
     575             :                     rtl::OUString(
     576             :                         RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
     577             :                     -1,
     578           0 :                     getCppuVoidType()
     579             :                 ),
     580             :                 ucb::CommandInfo(
     581             :                     rtl::OUString(
     582             :                         RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
     583             :                     -1,
     584           0 :                     getCppuVoidType()
     585             :                 ),
     586             :                 ucb::CommandInfo(
     587             :                     rtl::OUString(
     588             :                         RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
     589             :                     -1,
     590             :                     getCppuType(
     591           0 :                         static_cast< uno::Sequence< beans::Property > * >( 0 ) )
     592             :                 ),
     593             :                 ucb::CommandInfo(
     594             :                     rtl::OUString(
     595             :                         RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
     596             :                     -1,
     597             :                     getCppuType(
     598             :                         static_cast<
     599           0 :                             uno::Sequence< beans::PropertyValue > * >( 0 ) )
     600             :                 ),
     601             :                 ///////////////////////////////////////////////////////////
     602             :                 // Optional standard commands
     603             :                 ///////////////////////////////////////////////////////////
     604             :                 ucb::CommandInfo(
     605             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" ) ),
     606             :                     -1,
     607           0 :                     getCppuBooleanType()
     608             :                 ),
     609             :                 ucb::CommandInfo(
     610             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "insert" ) ),
     611             :                     -1,
     612           0 :                     getCppuVoidType()
     613             :                 ),
     614             :                 ucb::CommandInfo(
     615             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ),
     616             :                     -1,
     617             :                     getCppuType(
     618           0 :                         static_cast< ucb::OpenCommandArgument2 * >( 0 ) )
     619             :                 ),
     620             :                 ucb::CommandInfo(
     621             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ),
     622             :                     -1,
     623           0 :                     getCppuType( static_cast< ucb::TransferInfo * >( 0 ) )
     624             :                 ),
     625             :                 ucb::CommandInfo(
     626             :                     rtl::OUString(
     627             :                         RTL_CONSTASCII_USTRINGPARAM( "createNewContent" ) ),
     628             :                     -1,
     629           0 :                     getCppuType( static_cast< ucb::ContentInfo * >( 0 ) )
     630             :                 )
     631             :                 ///////////////////////////////////////////////////////////
     632             :                 // New commands
     633             :                 ///////////////////////////////////////////////////////////
     634           0 :             };
     635           0 :             return MAKECMDSEQUENCE( aFolderCommandInfoTable );
     636             :         }
     637             :     }
     638             :     else
     639             :     {
     640             :         //=================================================================
     641             :         //
     642             :         // Root Folder: Supported commands
     643             :         //
     644             :         //=================================================================
     645             : 
     646           0 :         if ( isReadOnly() )
     647             :         {
     648             :             static const ucb::CommandInfo aRootFolderCommandInfoTable[] =
     649             :             {
     650             :                 ///////////////////////////////////////////////////////////
     651             :                 // Required commands
     652             :                 ///////////////////////////////////////////////////////////
     653             :                 ucb::CommandInfo(
     654             :                     rtl::OUString(
     655             :                         RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
     656             :                     -1,
     657           0 :                     getCppuVoidType()
     658             :                 ),
     659             :                 ucb::CommandInfo(
     660             :                     rtl::OUString(
     661             :                         RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
     662             :                     -1,
     663           0 :                     getCppuVoidType()
     664             :                 ),
     665             :                 ucb::CommandInfo(
     666             :                     rtl::OUString(
     667             :                         RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
     668             :                     -1,
     669             :                     getCppuType(
     670           0 :                         static_cast< uno::Sequence< beans::Property > * >( 0 ) )
     671             :                 ),
     672             :                 ucb::CommandInfo(
     673             :                     rtl::OUString(
     674             :                         RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
     675             :                     -1,
     676             :                     getCppuType(
     677             :                         static_cast<
     678           0 :                             uno::Sequence< beans::PropertyValue > * >( 0 ) )
     679             :                 ),
     680             :                 ///////////////////////////////////////////////////////////
     681             :                 // Optional standard commands
     682             :                 ///////////////////////////////////////////////////////////
     683             :                 ucb::CommandInfo(
     684             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ),
     685             :                     -1,
     686             :                     getCppuType(
     687           0 :                         static_cast< ucb::OpenCommandArgument2 * >( 0 ) )
     688             :                 )
     689             :                 ///////////////////////////////////////////////////////////
     690             :                 // New commands
     691             :                 ///////////////////////////////////////////////////////////
     692           0 :             };
     693           0 :             return MAKECMDSEQUENCE( aRootFolderCommandInfoTable );
     694             :         }
     695             :         else
     696             :         {
     697             :             static const ucb::CommandInfo aRootFolderCommandInfoTable[] =
     698             :             {
     699             :                 ///////////////////////////////////////////////////////////
     700             :                 // Required commands
     701             :                 ///////////////////////////////////////////////////////////
     702             :                 ucb::CommandInfo(
     703             :                     rtl::OUString(
     704             :                         RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
     705             :                     -1,
     706           0 :                     getCppuVoidType()
     707             :                 ),
     708             :                 ucb::CommandInfo(
     709             :                     rtl::OUString(
     710             :                         RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
     711             :                     -1,
     712           0 :                     getCppuVoidType()
     713             :                 ),
     714             :                 ucb::CommandInfo(
     715             :                     rtl::OUString(
     716             :                         RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
     717             :                     -1,
     718             :                     getCppuType(
     719           0 :                         static_cast< uno::Sequence< beans::Property > * >( 0 ) )
     720             :                 ),
     721             :                 ucb::CommandInfo(
     722             :                     rtl::OUString(
     723             :                         RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
     724             :                     -1,
     725             :                     getCppuType(
     726             :                         static_cast<
     727           0 :                             uno::Sequence< beans::PropertyValue > * >( 0 ) )
     728             :                 ),
     729             :                 ///////////////////////////////////////////////////////////
     730             :                 // Optional standard commands
     731             :                 ///////////////////////////////////////////////////////////
     732             :                 ucb::CommandInfo(
     733             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ),
     734             :                     -1,
     735             :                     getCppuType(
     736           0 :                         static_cast< ucb::OpenCommandArgument2 * >( 0 ) )
     737             :                 ),
     738             :                 ucb::CommandInfo(
     739             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ),
     740             :                     -1,
     741           0 :                     getCppuType( static_cast< ucb::TransferInfo * >( 0 ) )
     742             :                 ),
     743             :                 ucb::CommandInfo(
     744             :                     rtl::OUString(
     745             :                         RTL_CONSTASCII_USTRINGPARAM( "createNewContent" ) ),
     746             :                     -1,
     747           0 :                     getCppuType( static_cast< ucb::ContentInfo * >( 0 ) )
     748             :                 )
     749             :                 ///////////////////////////////////////////////////////////
     750             :                 // New commands
     751             :                 ///////////////////////////////////////////////////////////
     752           0 :             };
     753           0 :             return MAKECMDSEQUENCE( aRootFolderCommandInfoTable );
     754             :         }
     755           0 :     }
     756             : }
     757             : 
     758             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10