LCOV - code coverage report
Current view: top level - libreoffice/ucb/source/ucp/ftp - ftpintreq.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 61 0.0 %
Date: 2012-12-27 Functions: 0 24 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/ucb/UnsupportedNameClashException.hpp>
      22             : #include <com/sun/star/ucb/NameClash.hpp>
      23             : #include "ftpintreq.hxx"
      24             : 
      25             : using namespace cppu;
      26             : using namespace com::sun::star;
      27             : using namespace com::sun::star::uno;
      28             : using namespace com::sun::star::lang;
      29             : using namespace com::sun::star::ucb;
      30             : using namespace com::sun::star::task;
      31             : using namespace ftp;
      32             : 
      33             : 
      34           0 : XInteractionApproveImpl::XInteractionApproveImpl()
      35           0 :     : m_bSelected(false)
      36             : {
      37           0 : }
      38             : 
      39             : 
      40             : void SAL_CALL
      41           0 : XInteractionApproveImpl::acquire( void )
      42             :     throw()
      43             : {
      44           0 :     OWeakObject::acquire();
      45           0 : }
      46             : 
      47             : 
      48             : void SAL_CALL
      49           0 : XInteractionApproveImpl::release( void )
      50             :     throw()
      51             : {
      52           0 :     OWeakObject::release();
      53           0 : }
      54             : 
      55             : 
      56             : 
      57             : Any SAL_CALL
      58           0 : XInteractionApproveImpl::queryInterface( const Type& rType )
      59             :     throw( RuntimeException )
      60             : {
      61             :     Any aRet = cppu::queryInterface(
      62             :         rType,
      63             :         (static_cast< lang::XTypeProvider* >(this)),
      64           0 :         (static_cast< XInteractionApprove* >(this)) );
      65           0 :     return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
      66             : }
      67             : 
      68             : 
      69             : //////////////////////////////////////////////////////////////////////////////
      70             : //  XTypeProvider
      71             : //////////////////////////////////////////////////////////////////////////////
      72             : 
      73           0 : XTYPEPROVIDER_IMPL_2( XInteractionApproveImpl,
      74             :                       XTypeProvider,
      75             :                       XInteractionApprove )
      76             : 
      77             : 
      78           0 : void SAL_CALL XInteractionApproveImpl::select()
      79             :     throw (RuntimeException)
      80             : {
      81           0 :     m_bSelected = true;
      82           0 : }
      83             : 
      84             : 
      85           0 : bool XInteractionApproveImpl::isSelected() const
      86             : {
      87           0 :     return m_bSelected;
      88             : }
      89             : 
      90             : 
      91             : // XInteractionDisapproveImpl
      92             : 
      93           0 : XInteractionDisapproveImpl::XInteractionDisapproveImpl()
      94           0 :     : m_bSelected(false)
      95             : {
      96           0 : }
      97             : 
      98             : 
      99             : void SAL_CALL
     100           0 : XInteractionDisapproveImpl::acquire( void )
     101             :     throw()
     102             : {
     103           0 :     OWeakObject::acquire();
     104           0 : }
     105             : 
     106             : 
     107             : void SAL_CALL
     108           0 : XInteractionDisapproveImpl::release( void )
     109             :     throw()
     110             : {
     111           0 :     OWeakObject::release();
     112           0 : }
     113             : 
     114             : 
     115             : 
     116             : Any SAL_CALL
     117           0 : XInteractionDisapproveImpl::queryInterface( const Type& rType )
     118             :     throw( RuntimeException )
     119             : {
     120             :     Any aRet = cppu::queryInterface(
     121             :         rType,
     122             :         (static_cast< lang::XTypeProvider* >(this)),
     123           0 :         (static_cast< XInteractionDisapprove* >(this)) );
     124           0 :     return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
     125             : }
     126             : 
     127             : 
     128             : //////////////////////////////////////////////////////////////////////////////
     129             : //  XTypeProvider
     130             : //////////////////////////////////////////////////////////////////////////////
     131             : 
     132           0 : XTYPEPROVIDER_IMPL_2( XInteractionDisapproveImpl,
     133             :                       XTypeProvider,
     134             :                       XInteractionDisapprove )
     135             : 
     136             : 
     137           0 : void SAL_CALL XInteractionDisapproveImpl::select()
     138             :     throw (RuntimeException)
     139             : 
     140             : {
     141           0 :     m_bSelected = true;
     142           0 : }
     143             : 
     144             : 
     145             : // XInteractionRequestImpl
     146             : 
     147           0 : XInteractionRequestImpl::XInteractionRequestImpl(const rtl::OUString& aName)
     148           0 :     : p1( new XInteractionApproveImpl ),
     149           0 :       p2( new XInteractionDisapproveImpl ),
     150             :       m_aName(aName),
     151           0 :       m_aSeq( 2 )
     152             : {
     153           0 :     m_aSeq[0] = Reference<XInteractionContinuation>(p1);
     154           0 :     m_aSeq[1] = Reference<XInteractionContinuation>(p2);
     155           0 : }
     156             : 
     157             : 
     158             : void SAL_CALL
     159           0 : XInteractionRequestImpl::acquire( void )
     160             :     throw()
     161             : {
     162           0 :     OWeakObject::acquire();
     163           0 : }
     164             : 
     165             : 
     166             : 
     167             : void SAL_CALL
     168           0 : XInteractionRequestImpl::release( void )
     169             :     throw()
     170             : {
     171           0 :     OWeakObject::release();
     172           0 : }
     173             : 
     174             : 
     175             : 
     176             : Any SAL_CALL
     177           0 : XInteractionRequestImpl::queryInterface( const Type& rType )
     178             :     throw( RuntimeException )
     179             : {
     180             :     Any aRet = cppu::queryInterface(
     181             :         rType,
     182             :         (static_cast< lang::XTypeProvider* >(this)),
     183           0 :         (static_cast< XInteractionRequest* >(this)) );
     184           0 :     return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
     185             : }
     186             : 
     187             : 
     188             : //////////////////////////////////////////////////////////////////////////////
     189             : //  XTypeProvider
     190             : /////////////////////////////////////////////////////////////////////////////
     191             : 
     192           0 : XTYPEPROVIDER_IMPL_2( XInteractionRequestImpl,
     193             :                       XTypeProvider,
     194             :                       XInteractionRequest )
     195             : 
     196             : 
     197           0 : Any SAL_CALL XInteractionRequestImpl::getRequest(  )
     198             :     throw (RuntimeException)
     199             : {
     200           0 :     Any aAny;
     201           0 :     UnsupportedNameClashException excep;
     202           0 :     excep.NameClash = NameClash::ERROR;
     203           0 :     aAny <<= excep;
     204           0 :     return aAny;
     205             : }
     206             : 
     207             : 
     208             : Sequence<Reference<XInteractionContinuation > > SAL_CALL
     209           0 : XInteractionRequestImpl::getContinuations(  )
     210             :     throw (RuntimeException)
     211             : {
     212           0 :     return m_aSeq;
     213             : }
     214             : 
     215             : 
     216           0 : bool XInteractionRequestImpl::approved() const
     217             : {
     218           0 :     return p1->isSelected();
     219             : }
     220             : 
     221             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10