bump product version to 5.0.4.1
[LibreOffice.git] / extensions / source / scanner / scanner.cxx
blob1e99fd651b0768012a4185a47f9c5eaaca8d878e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <scanner.hxx>
22 #include <cppuhelper/supportsservice.hxx>
24 // - ScannerManager -
27 Reference< XInterface > SAL_CALL ScannerManager_CreateInstance( const Reference< com::sun::star::lang::XMultiServiceFactory >& /*rxFactory*/ ) throw ( Exception )
29 return *( new ScannerManager() );
34 ScannerManager::ScannerManager() :
35 mpData( NULL )
37 AcquireData();
42 ScannerManager::~ScannerManager()
44 ReleaseData();
47 Sequence< sal_Int8 > SAL_CALL ScannerManager::getMaskDIB() throw(std::exception)
49 return Sequence< sal_Int8 >();
52 OUString ScannerManager::getImplementationName()
53 throw (css::uno::RuntimeException, std::exception)
55 return getImplementationName_Static();
58 sal_Bool ScannerManager::supportsService(OUString const & ServiceName)
59 throw (css::uno::RuntimeException, std::exception)
61 return cppu::supportsService(this, ServiceName);
64 css::uno::Sequence<OUString> ScannerManager::getSupportedServiceNames()
65 throw (css::uno::RuntimeException, std::exception)
67 return getSupportedServiceNames_Static();
70 OUString ScannerManager::getImplementationName_Static() throw()
72 return OUString( "com.sun.star.scanner.ScannerManager" );
77 Sequence< OUString > ScannerManager::getSupportedServiceNames_Static() throw ()
79 Sequence< OUString > aSNS( 1 );
81 aSNS.getArray()[0] = "com.sun.star.scanner.ScannerManager";
83 return aSNS;
86 sal_Bool SAL_CALL ScannerManager::configureScanner( ScannerContext& rContext )
87 throw( ScannerException, std::exception )
89 return configureScannerAndScan( rContext, NULL );
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */