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 #ifndef _GVFS_UCP_RESULTSET_HXX 24 #define _GVFS_UCP_RESULTSET_HXX 25 26 #include <rtl/ref.hxx> 27 #include <ucbhelper/resultset.hxx> 28 #include <ucbhelper/resultsethelper.hxx> 29 #include "gvfs_content.hxx" 30 31 namespace gvfs { 32 33 class DynamicResultSet : public ::ucbhelper::ResultSetImplHelper 34 { 35 rtl::Reference< Content > m_xContent; 36 com::sun::star::uno::Reference< 37 com::sun::star::ucb::XCommandEnvironment > m_xEnv; 38 39 private: 40 virtual void initStatic(); 41 virtual void initDynamic(); 42 43 public: 44 DynamicResultSet( const com::sun::star::uno::Reference< 45 com::sun::star::lang::XMultiServiceFactory >& rxSMgr, 46 const rtl::Reference< Content >& rxContent, 47 const com::sun::star::ucb::OpenCommandArgument2& rCommand, 48 const com::sun::star::uno::Reference< 49 com::sun::star::ucb::XCommandEnvironment >& rxEnv ); 50 }; 51 52 53 struct DataSupplier_Impl; 54 class DataSupplier : public ucbhelper::ResultSetDataSupplier 55 { 56 private: 57 gvfs::DataSupplier_Impl *m_pImpl; 58 sal_Bool getData(); 59 60 public: 61 DataSupplier( const com::sun::star::uno::Reference< 62 com::sun::star::lang::XMultiServiceFactory >& rxSMgr, 63 const rtl::Reference< Content >& rContent, 64 sal_Int32 nOpenMode); 65 66 virtual ~DataSupplier(); 67 68 virtual rtl::OUString queryContentIdentifierString( sal_uInt32 nIndex ); 69 virtual com::sun::star::uno::Reference< 70 com::sun::star::ucb::XContentIdentifier > 71 queryContentIdentifier( sal_uInt32 nIndex ); 72 virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContent > 73 queryContent( sal_uInt32 nIndex ); 74 75 virtual sal_Bool getResult( sal_uInt32 nIndex ); 76 77 virtual sal_uInt32 totalCount(); 78 virtual sal_uInt32 currentCount(); 79 virtual sal_Bool isCountFinal(); 80 81 virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRow > 82 queryPropertyValues( sal_uInt32 nIndex ); 83 virtual void releasePropertyValues( sal_uInt32 nIndex ); 84 virtual void close(); 85 virtual void validate() 86 throw( com::sun::star::ucb::ResultSetException ); 87 }; 88 89 } 90 91 #endif 92