LCOV - code coverage report
Current view: top level - xmlhelp/source/cxxhelp/provider - content.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 2 3 66.7 %
Date: 2015-06-13 12:38:46 Functions: 2 3 66.7 %
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             : #ifndef INCLUDED_XMLHELP_SOURCE_CXXHELP_PROVIDER_CONTENT_HXX
      21             : #define INCLUDED_XMLHELP_SOURCE_CXXHELP_PROVIDER_CONTENT_HXX
      22             : 
      23             : #include <ucbhelper/contenthelper.hxx>
      24             : #include <com/sun/star/io/XInputStream.hpp>
      25             : 
      26             : #include "urlparameter.hxx"
      27             : 
      28             : namespace com { namespace sun { namespace star { namespace beans {
      29             :     struct Property;
      30             :     struct PropertyValue;
      31             : } } } }
      32             : 
      33             : namespace com { namespace sun { namespace star { namespace sdbc {
      34             :     class XRow;
      35             : } } } }
      36             : 
      37             : namespace chelp
      38             : {
      39             : 
      40             : // UNO service name for the content.
      41             : #define MYUCP_CONTENT_SERVICE_NAME \
      42             :                             "com.sun.star.ucb.CHelpContent"
      43             : 
      44             :     class Databases;
      45             : 
      46        2939 :     struct ContentProperties
      47             :     {
      48             :         OUString aTitle;         // Title
      49             :         OUString aContentType;   // ContentType
      50             : 
      51        2939 :         ContentProperties() {}
      52             :     };
      53             : 
      54             :     class Content : public ::ucbhelper::ContentImplHelper
      55             :     {
      56             :     public:
      57             : 
      58             :         Content( const ::com::sun::star::uno::Reference<
      59             :                  ::com::sun::star::uno::XComponentContext >& rxContext,
      60             :                  ::ucbhelper::ContentProviderImplHelper* pProvider,
      61             :                  const ::com::sun::star::uno::Reference<
      62             :                  ::com::sun::star::ucb::XContentIdentifier >& Identifier,
      63             :                  Databases* pDatabases );
      64             : 
      65             :         virtual ~Content();
      66             : 
      67             :         // XInterface
      68             :         virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
      69             :             throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      70             :         virtual void SAL_CALL acquire()
      71             :             throw() SAL_OVERRIDE;
      72             :         virtual void SAL_CALL release()
      73             :             throw() SAL_OVERRIDE;
      74             : 
      75             :         // XTypeProvider
      76             :         virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
      77             :             throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      78             :         virtual css::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes()
      79             :             throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      80             : 
      81             :         // XServiceInfo
      82             :         virtual OUString SAL_CALL
      83             :         getImplementationName()
      84             :             throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      85             : 
      86             :         virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
      87             :         getSupportedServiceNames()
      88             :             throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      89             : 
      90             :         // XContent
      91             :         virtual OUString SAL_CALL
      92             :         getContentType()
      93             :             throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      94             : 
      95             :         // XCommandProcessor
      96             :         virtual com::sun::star::uno::Any SAL_CALL
      97             :         execute( const com::sun::star::ucb::Command& aCommand,
      98             :                  sal_Int32 CommandId,
      99             :                  const com::sun::star::uno::Reference<
     100             :                  com::sun::star::ucb::XCommandEnvironment >& Environment )
     101             :             throw( com::sun::star::uno::Exception,
     102             :                    com::sun::star::ucb::CommandAbortedException,
     103             :                    com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     104             : 
     105             :         virtual void SAL_CALL
     106             :         abort( sal_Int32 CommandId )
     107             :             throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     108             : 
     109             :     private:
     110             : 
     111             :         // private members;
     112             : 
     113             :         ContentProperties m_aProps;
     114             :         URLParameter      m_aURLParameter;
     115             :         Databases*        m_pDatabases;
     116             : 
     117             :         // private methods
     118             : 
     119             :         virtual com::sun::star::uno::Sequence< com::sun::star::beans::Property >
     120             :         getProperties( const com::sun::star::uno::Reference<
     121             :                        com::sun::star::ucb::XCommandEnvironment > & xEnv ) SAL_OVERRIDE;
     122             :         virtual com::sun::star::uno::Sequence< com::sun::star::ucb::CommandInfo >
     123             :         getCommands( const com::sun::star::uno::Reference<
     124             :                      com::sun::star::ucb::XCommandEnvironment > & xEnv ) SAL_OVERRIDE;
     125             : 
     126           0 :         virtual OUString getParentURL() SAL_OVERRIDE { return OUString(); }
     127             : 
     128             :         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
     129             :         getPropertyValues( const ::com::sun::star::uno::Sequence<
     130             :                            ::com::sun::star::beans::Property >& rProperties );
     131             :         void setPropertyValues(
     132             :             const ::com::sun::star::uno::Sequence<
     133             :             ::com::sun::star::beans::PropertyValue >& rValues );
     134             : 
     135             :     };
     136             : 
     137             : }
     138             : 
     139             : #endif
     140             : 
     141             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11