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 #ifndef _DTRANS_X11_TRANSFERABLE_HXX_ 23 #define _DTRANS_X11_TRANSFERABLE_HXX_ 24 25 #include <X11_selection.hxx> 26 #include <com/sun/star/datatransfer/XTransferable.hpp> 27 28 #ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HDL_ 29 #include <com/sun/star/lang/XEventListener.hpp> 30 #endif 31 #include <cppuhelper/implbase1.hxx> 32 33 namespace x11 { 34 35 class X11Transferable : public ::cppu::WeakImplHelper1 < 36 ::com::sun::star::datatransfer::XTransferable > 37 { 38 ::osl::Mutex m_aMutex; 39 40 SelectionManager& m_rManager; 41 com::sun::star::uno::Reference< XInterface > m_xCreator; 42 Atom m_aSelection; 43 public: 44 X11Transferable( SelectionManager& rManager, const com::sun::star::uno::Reference< XInterface >& xCreator, Atom selection = None ); 45 virtual ~X11Transferable(); 46 47 /* 48 * XTransferable 49 */ 50 51 virtual ::com::sun::star::uno::Any SAL_CALL getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) 52 throw(::com::sun::star::datatransfer::UnsupportedFlavorException, 53 ::com::sun::star::io::IOException, 54 ::com::sun::star::uno::RuntimeException 55 ); 56 57 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( ) 58 throw(::com::sun::star::uno::RuntimeException); 59 60 virtual sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) 61 throw(::com::sun::star::uno::RuntimeException); 62 }; 63 64 } // namespace 65 66 #endif 67 68 /* vim: set noet sw=4 ts=4: */ 69