1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_extensions.hxx"
26 #include <scanner.hxx>
27 
28 // ------------------
29 // - ScannerManager -
30 // ------------------
31 
REF(XInterface)32 REF( XInterface ) SAL_CALL ScannerManager_CreateInstance( const REF( com::sun::star::lang::XMultiServiceFactory )& /*rxFactory*/ ) throw ( Exception )
33 {
34 	return *( new ScannerManager() );
35 }
36 
37 // -----------------------------------------------------------------------------
38 
ScannerManager()39 ScannerManager::ScannerManager() :
40 	mpData( NULL )
41 {
42 	AcquireData();
43 }
44 
45 // -----------------------------------------------------------------------------
46 
~ScannerManager()47 ScannerManager::~ScannerManager()
48 {
49 	ReleaseData();
50 }
51 
52 // -----------------------------------------------------------------------------
53 
queryInterface(const Type & rType)54 ANY SAL_CALL ScannerManager::queryInterface( const Type& rType ) throw( RuntimeException )
55 {
56 	const ANY aRet( cppu::queryInterface( rType,
57 										  static_cast< XScannerManager* >( this ),
58 										  static_cast< AWT::XBitmap* >( this ) ) );
59 
60 	return( aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ) );
61 }
62 
63 // -----------------------------------------------------------------------------
64 
acquire()65 void SAL_CALL ScannerManager::acquire() throw()
66 {
67 	OWeakObject::acquire();
68 }
69 
70 // -----------------------------------------------------------------------------
71 
release()72 void SAL_CALL ScannerManager::release() throw()
73 {
74 	OWeakObject::release();
75 }
76 
77 // -----------------------------------------------------------------------------
78 
SEQ(sal_Int8)79 SEQ( sal_Int8 ) SAL_CALL ScannerManager::getMaskDIB() throw()
80 {
81 	return SEQ( sal_Int8 )();
82 }
83 
84 // -----------------------------------------------------------------------------
85 
getImplementationName_Static()86 OUString ScannerManager::getImplementationName_Static() throw()
87 {
88 	return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.scanner.ScannerManager" ) );
89 }
90 
91 // -----------------------------------------------------------------------------
92 
SEQ(OUString)93 SEQ( OUString ) ScannerManager::getSupportedServiceNames_Static() throw ()
94 {
95 	SEQ( OUString ) aSNS( 1 );
96 
97 	aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.scanner.ScannerManager" ) );
98 
99 	return aSNS;
100 }
101