1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef CONNECTIVITY_MYSQL_CATALOG_HXX 28 #define CONNECTIVITY_MYSQL_CATALOG_HXX 29 30 #include "connectivity/sdbcx/VCatalog.hxx" 31 #include "connectivity/StdTypeDefs.hxx" 32 33 namespace connectivity 34 { 35 namespace mysql 36 { 37 // please don't name the class the same name as in an other namespaces 38 // some compilers have problems with this task as I noticed on windows 39 class OAdabasConnection; 40 class OMySQLCatalog : public connectivity::sdbcx::OCatalog 41 { 42 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection; 43 44 /** calls XDatabaseMetaData::getTables. 45 @param _sKindOfObject 46 The type of tables to be fetched. 47 @param _rNames 48 The container for the names to be filled. <OUT/> 49 */ 50 void refreshObjects(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _sKindOfObject,TStringVector& _rNames); 51 52 public: 53 // implementation of the pure virtual methods 54 virtual void refreshTables(); 55 virtual void refreshViews() ; 56 virtual void refreshGroups(); 57 virtual void refreshUsers() ; 58 59 public: 60 OMySQLCatalog(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection); 61 62 inline sdbcx::OCollection* getPrivateTables() const { return m_pTables;} 63 inline sdbcx::OCollection* getPrivateViews() const { return m_pViews; } 64 inline ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection() const { return m_xConnection; } 65 66 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); 67 // ::cppu::OComponentHelper 68 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); 69 }; 70 } 71 } 72 #endif // CONNECTIVITY_MYSQL_CATALOG_HXX 73 74