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

Generated by: LCOV version 1.10