LCOV - code coverage report
Current view: top level - libreoffice/ucb/source/ucp/file - filnot.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 4 75.0 %
Date: 2012-12-27 Functions: 3 4 75.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             : #ifndef _FILNOT_HXX_
      20             : #define _FILNOT_HXX_
      21             : 
      22             : #include <boost/unordered_map.hpp>
      23             : #include <com/sun/star/uno/Sequence.hxx>
      24             : #include <com/sun/star/uno/XInterface.hpp>
      25             : #include <com/sun/star/beans/PropertyChangeEvent.hpp>
      26             : #include <com/sun/star/ucb/XContentIdentifier.hpp>
      27             : #include "filglob.hxx"
      28             : 
      29             : 
      30             : namespace fileaccess {
      31             : 
      32             :     class shell;
      33             : 
      34         431 :     class ContentEventNotifier
      35             :     {
      36             :     private:
      37             :         shell* m_pMyShell;
      38             :         com::sun::star::uno::Reference< com::sun::star::ucb::XContent > m_xCreatorContent;
      39             :         com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier > m_xCreatorId;
      40             :         com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier > m_xOldId;
      41             :         com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::uno::XInterface > > m_sListeners;
      42             :     public:
      43             : 
      44             :         ContentEventNotifier(
      45             :             shell* pMyShell,
      46             :             const com::sun::star::uno::Reference< com::sun::star::ucb::XContent >& xCreatorContent,
      47             :             const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& xCreatorId,
      48             :             const com::sun::star::uno::Sequence<
      49             :             com::sun::star::uno::Reference< com::sun::star::uno::XInterface > >& sListeners );
      50             : 
      51             :         ContentEventNotifier(
      52             :             shell* pMyShell,
      53             :             const com::sun::star::uno::Reference< com::sun::star::ucb::XContent >& xCreatorContent,
      54             :             const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& xCreatorId,
      55             :             const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& xOldId,
      56             :             const com::sun::star::uno::Sequence<
      57             :             com::sun::star::uno::Reference< com::sun::star::uno::XInterface > >& sListeners );
      58             : 
      59             :         void notifyChildInserted( const rtl::OUString& aChildName );
      60             :         void notifyDeleted( void );
      61             :         void notifyRemoved( const rtl::OUString& aChildName );
      62             :         void notifyExchanged( );
      63             :     };
      64             : 
      65             : 
      66           0 :     class PropertySetInfoChangeNotifier
      67             :     {
      68             :     private:
      69             :         com::sun::star::uno::Reference< com::sun::star::ucb::XContent > m_xCreatorContent;
      70             :         com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier > m_xCreatorId;
      71             :         com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::uno::XInterface > > m_sListeners;
      72             :     public:
      73             :         PropertySetInfoChangeNotifier(
      74             :             const com::sun::star::uno::Reference< com::sun::star::ucb::XContent >& xCreatorContent,
      75             :             const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& xCreatorId,
      76             :             const com::sun::star::uno::Sequence<
      77             :             com::sun::star::uno::Reference< com::sun::star::uno::XInterface > >& sListeners );
      78             : 
      79             :         void SAL_CALL notifyPropertyAdded( const rtl::OUString & aPropertyName );
      80             :         void SAL_CALL notifyPropertyRemoved( const rtl::OUString & aPropertyName );
      81             :     };
      82             : 
      83             : 
      84             :     typedef boost::unordered_map< rtl::OUString,
      85             :                            com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::uno::XInterface > >,
      86             :                            hashOUString,
      87             :                            equalOUString >      ListenerMap;
      88             : 
      89             :     class PropertyChangeNotifier
      90             :     {
      91             :     private:
      92             :         com::sun::star::uno::Reference< com::sun::star::ucb::XContent > m_xCreatorContent;
      93             :         com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier > m_xCreatorId;
      94             :         ListenerMap* m_pListeners;
      95             :     public:
      96             :         PropertyChangeNotifier(
      97             :             const com::sun::star::uno::Reference< com::sun::star::ucb::XContent >& xCreatorContent,
      98             :             const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& xCreatorId,
      99             :             ListenerMap* pListeners );
     100             : 
     101             :         ~PropertyChangeNotifier();
     102             : 
     103             :         void notifyPropertyChanged(
     104             :             com::sun::star::uno::Sequence< com::sun::star::beans::PropertyChangeEvent > seqChanged );
     105             :     };
     106             : 
     107             : 
     108       12398 :     class Notifier
     109             :     {
     110             :     public:
     111             :         // Side effect of this function is the change of the name
     112             :         virtual ContentEventNotifier*          cEXC( const rtl::OUString aNewName ) = 0;
     113             :         // Side effect is the change of the state of the object to "deleted".
     114             :         virtual ContentEventNotifier*          cDEL( void ) = 0;
     115             :         virtual ContentEventNotifier*          cCEL( void ) = 0;
     116             :         virtual PropertySetInfoChangeNotifier* cPSL( void ) = 0;
     117             :         virtual PropertyChangeNotifier*        cPCL( void ) = 0;
     118             :         virtual rtl::OUString                  getKey( void ) = 0;
     119             : 
     120             :     protected:
     121       12132 :         ~Notifier() {}
     122             :     };
     123             : 
     124             : 
     125             : }   // end namespace fileaccess
     126             : 
     127             : #endif
     128             : 
     129             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10