LCOV - code coverage report
Current view: top level - ucb/source/ucp/ftp - ftpcontentcaps.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 22 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 4 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             : #include <com/sun/star/beans/Property.hpp>
      22             : #include <com/sun/star/beans/PropertyAttribute.hpp>
      23             : #include <com/sun/star/beans/PropertyValue.hpp>
      24             : #include <com/sun/star/ucb/CommandInfo.hpp>
      25             : #include <com/sun/star/ucb/OpenCommandArgument2.hpp>
      26             : #include <com/sun/star/ucb/InsertCommandArgument.hpp>
      27             : #include <com/sun/star/util/DateTime.hpp>
      28             : #include <com/sun/star/uno/Sequence.hxx>
      29             : 
      30             : #include "ftpcontent.hxx"
      31             : 
      32             : using namespace com::sun::star;
      33             : using namespace ftp;
      34             : 
      35             : // virtual
      36           0 : uno::Sequence< beans::Property > FTPContent::getProperties(
      37             :     const uno::Reference< ucb::XCommandEnvironment > & /*xEnv*/)
      38             : {
      39             :     #define PROPS_COUNT 8
      40             : 
      41             :     static const beans::Property aPropsInfoTable[] =
      42             :     {
      43             :         beans::Property(
      44             :             OUString( "ContentType" ),
      45             :             -1,
      46           0 :             cppu::UnoType<OUString>::get(),
      47             :             beans::PropertyAttribute::BOUND
      48             :             | beans::PropertyAttribute::READONLY
      49             :         ),
      50             :         beans::Property(
      51             :             OUString( "IsDocument" ),
      52             :             -1,
      53           0 :             cppu::UnoType<bool>::get(),
      54             :             beans::PropertyAttribute::BOUND
      55             :             | beans::PropertyAttribute::READONLY
      56             :         ),
      57             :         beans::Property(
      58             :             OUString( "IsFolder" ),
      59             :             -1,
      60           0 :             cppu::UnoType<bool>::get(),
      61             :             beans::PropertyAttribute::BOUND
      62             :             | beans::PropertyAttribute::READONLY
      63             :         ),
      64             :         beans::Property(
      65             :             OUString( "Title" ),
      66             :             -1,
      67           0 :             cppu::UnoType<OUString>::get(),
      68             :             beans::PropertyAttribute::BOUND
      69             :             //  | beans::PropertyAttribute::READONLY
      70             :         ),
      71             :         beans::Property(
      72             :             OUString( "Size" ),
      73             :             -1,
      74           0 :             cppu::UnoType<sal_Int64>::get(),
      75             :             beans::PropertyAttribute::BOUND
      76             :             | beans::PropertyAttribute::READONLY
      77             :         ),
      78             :         beans::Property(
      79             :             OUString( "DateCreated" ),
      80             :             -1,
      81           0 :             cppu::UnoType<util::DateTime>::get(),
      82             :             beans::PropertyAttribute::BOUND
      83             :             | beans::PropertyAttribute::READONLY
      84             :         ),
      85             :         beans::Property(
      86             :             OUString( "IsReadOnly" ),
      87             :             -1,
      88           0 :             cppu::UnoType<bool>::get(),
      89             :             beans::PropertyAttribute::BOUND
      90             :             | beans::PropertyAttribute::READONLY
      91             :         ),
      92             :         beans::Property(
      93             :             OUString(
      94             :                 "CreatableContentsInfo" ),
      95             :             -1,
      96           0 :             cppu::UnoType<uno::Sequence< ucb::ContentInfo >>::get(),
      97             :             beans::PropertyAttribute::BOUND
      98             :             | beans::PropertyAttribute::READONLY
      99             :         )
     100           0 :     };
     101             : 
     102           0 :     return uno::Sequence< beans::Property >( aPropsInfoTable, PROPS_COUNT );
     103             : }
     104             : 
     105             : 
     106             : // virtual
     107           0 : uno::Sequence< ucb::CommandInfo > FTPContent::getCommands(
     108             :     const uno::Reference< ucb::XCommandEnvironment > & /*xEnv*/ )
     109             : {
     110             : // osl::MutexGuard aGuard( m_aMutex );
     111             : 
     112             : 
     113             : 
     114             :     // Supported commands
     115             : 
     116             : 
     117             : 
     118             :     #define COMMAND_COUNT 8
     119             : 
     120             :     static const ucb::CommandInfo aCommandInfoTable[] =
     121             :     {
     122             : 
     123             :         // Required commands
     124             : 
     125             :         ucb::CommandInfo(
     126             :             OUString( "getCommandInfo" ),
     127             :             -1,
     128           0 :             cppu::UnoType<void>::get()
     129             :         ),
     130             :         ucb::CommandInfo(
     131             :             OUString( "getPropertySetInfo" ),
     132             :             -1,
     133           0 :             cppu::UnoType<void>::get()
     134             :         ),
     135             :         ucb::CommandInfo(
     136             :             OUString( "getPropertyValues" ),
     137             :             -1,
     138           0 :             cppu::UnoType<uno::Sequence< beans::Property >>::get()
     139             :         ),
     140             :         ucb::CommandInfo(
     141             :             OUString( "setPropertyValues" ),
     142             :             -1,
     143           0 :             cppu::UnoType<uno::Sequence< beans::PropertyValue >>::get()
     144             :         ),
     145             :         ucb::CommandInfo(
     146             :             OUString( "open" ),
     147             :             -1,
     148           0 :             cppu::UnoType<ucb::OpenCommandArgument2>::get()
     149             :         ),
     150             :         ucb::CommandInfo(
     151             :             OUString( "insert" ),
     152             :             -1,
     153           0 :             cppu::UnoType<ucb::InsertCommandArgument>::get()
     154             :         ),
     155             :         ucb::CommandInfo(
     156             :             OUString( "delete" ),
     157             :             -1,
     158           0 :             cppu::UnoType<bool>::get()
     159             :         ),
     160             :         ucb::CommandInfo(
     161             :             OUString( "createNewContent" ),
     162             :             -1,
     163           0 :             cppu::UnoType<ucb::ContentInfo>::get()
     164             :         )
     165           0 :     };
     166             : 
     167           0 :     return uno::Sequence< ucb::CommandInfo >( aCommandInfoTable, COMMAND_COUNT );
     168             : }
     169             : 
     170             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11