summaryrefslogtreecommitdiff
path: root/connectivity/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-02-07 16:10:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-02-10 07:11:58 +0100
commita2a8ad842fccbf214e2e25414fc715246408aa27 (patch)
tree47c537b65af711838afe7bb682ab995f8582c009 /connectivity/inc
parenta570a6b122125e88629fde990306f525c561284c (diff)
move some headers inside connectivity
Change-Id: I9a72a9d59db4f198c2261d41143e3b8344845285 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/inc')
-rw-r--r--connectivity/inc/ParameterCont.hxx49
-rw-r--r--connectivity/inc/SQLStatementHelper.hxx43
-rw-r--r--connectivity/inc/TIndex.hxx46
-rw-r--r--connectivity/inc/TIndexColumns.hxx41
-rw-r--r--connectivity/inc/TKey.hxx44
-rw-r--r--connectivity/inc/TKeyColumns.hxx41
-rw-r--r--connectivity/inc/pch/precompiled_dbase.hxx2
-rw-r--r--connectivity/inc/pch/precompiled_flat.hxx2
-rw-r--r--connectivity/inc/sdbcx/VCatalog.hxx118
-rw-r--r--connectivity/inc/sdbcx/VGroup.hxx97
-rw-r--r--connectivity/inc/sdbcx/VIndex.hxx100
-rw-r--r--connectivity/inc/sdbcx/VIndexColumn.hxx60
-rw-r--r--connectivity/inc/sdbcx/VKey.hxx111
-rw-r--r--connectivity/inc/sdbcx/VKeyColumn.hxx62
-rw-r--r--connectivity/inc/sdbcx/VTypeDef.hxx37
-rw-r--r--connectivity/inc/sdbcx/VUser.hxx98
16 files changed, 949 insertions, 2 deletions
diff --git a/connectivity/inc/ParameterCont.hxx b/connectivity/inc/ParameterCont.hxx
new file mode 100644
index 000000000000..848cec78e4e0
--- /dev/null
+++ b/connectivity/inc/ParameterCont.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#pragma once
+
+#include <com/sun/star/sdb/XInteractionSupplyParameters.hpp>
+#include <comphelper/interaction.hxx>
+#include <connectivity/dbtoolsdllapi.hxx>
+
+namespace dbtools
+{
+
+ //= OParameterContinuation
+
+ class OParameterContinuation final : public comphelper::OInteraction< css::sdb::XInteractionSupplyParameters >
+ {
+ css::uno::Sequence< css::beans::PropertyValue > m_aValues;
+
+ public:
+ OParameterContinuation() { }
+
+ const css::uno::Sequence< css::beans::PropertyValue >& getValues() const { return m_aValues; }
+
+ // XInteractionSupplyParameters
+ virtual void SAL_CALL setParameters( const css::uno::Sequence< css::beans::PropertyValue >& _rValues ) override;
+
+ private:
+ virtual ~OParameterContinuation() override { }
+ OParameterContinuation(const OParameterContinuation&) = delete;
+ void operator =(const OParameterContinuation&) = delete;
+ };
+} // dbtools
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/inc/SQLStatementHelper.hxx b/connectivity/inc/SQLStatementHelper.hxx
new file mode 100644
index 000000000000..0b5ddecf09db
--- /dev/null
+++ b/connectivity/inc/SQLStatementHelper.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <connectivity/dbtoolsdllapi.hxx>
+#include <rtl/ustrbuf.hxx>
+
+namespace com::sun::star::beans { class XPropertySet; }
+namespace com::sun::star::uno { template <typename > class Reference; }
+
+namespace dbtools
+{
+ class OOO_DLLPUBLIC_DBTOOLS ISQLStatementHelper
+ {
+ public:
+ virtual void addComment(const css::uno::Reference< css::beans::XPropertySet >& descriptor,OUStringBuffer& _rOut) = 0;
+
+ protected:
+ ~ISQLStatementHelper() {}
+ };
+
+
+} // namespace dbtools
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/inc/TIndex.hxx b/connectivity/inc/TIndex.hxx
new file mode 100644
index 000000000000..1ac2f5c4f9f2
--- /dev/null
+++ b/connectivity/inc/TIndex.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <connectivity/dbtoolsdllapi.hxx>
+#include "sdbcx/VIndex.hxx"
+
+namespace connectivity
+{
+ class OTableHelper;
+ class OIndexHelper final : public connectivity::sdbcx::OIndex
+ {
+ OTableHelper* m_pTable;
+ public:
+ virtual void refreshColumns() override;
+ public:
+ OIndexHelper( OTableHelper* _pTable);
+ OIndexHelper( OTableHelper* _pTable,
+ const OUString& Name,
+ const OUString& Catalog,
+ bool _isUnique,
+ bool _isPrimaryKeyIndex,
+ bool _isClustered
+ );
+ OTableHelper* getTable() const { return m_pTable; }
+ };
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/inc/TIndexColumns.hxx b/connectivity/inc/TIndexColumns.hxx
new file mode 100644
index 000000000000..aa5687afc212
--- /dev/null
+++ b/connectivity/inc/TIndexColumns.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <connectivity/sdbcx/VCollection.hxx>
+#include <connectivity/dbtoolsdllapi.hxx>
+
+namespace connectivity
+{
+ class OIndexHelper;
+ class OIndexColumns final : public sdbcx::OCollection
+ {
+ OIndexHelper* m_pIndex;
+ virtual sdbcx::ObjectType createObject(const OUString& _rName) override;
+ virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override;
+ virtual void impl_refresh() override;
+ public:
+ OIndexColumns( OIndexHelper* _pIndex,
+ ::osl::Mutex& _rMutex,
+ const ::std::vector< OUString> &_rVector);
+ };
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/inc/TKey.hxx b/connectivity/inc/TKey.hxx
new file mode 100644
index 000000000000..a4d1d92ff2cc
--- /dev/null
+++ b/connectivity/inc/TKey.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <connectivity/dbtoolsdllapi.hxx>
+#include "sdbcx/VKey.hxx"
+
+namespace connectivity
+{
+ class OTableHelper;
+ class OTableKeyHelper final : public connectivity::sdbcx::OKey
+ {
+ OTableHelper* m_pTable;
+ public:
+ virtual void refreshColumns() override;
+ public:
+ OTableKeyHelper( OTableHelper* _pTable);
+ OTableKeyHelper( OTableHelper* _pTable
+ ,const OUString& Name
+ ,const std::shared_ptr<sdbcx::KeyProperties>& _rProps
+ );
+ OTableHelper* getTable() const { return m_pTable; }
+ };
+}
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/inc/TKeyColumns.hxx b/connectivity/inc/TKeyColumns.hxx
new file mode 100644
index 000000000000..c40cd1cd7a61
--- /dev/null
+++ b/connectivity/inc/TKeyColumns.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <connectivity/sdbcx/VCollection.hxx>
+#include <connectivity/dbtoolsdllapi.hxx>
+
+namespace connectivity
+{
+ class OTableKeyHelper;
+ class OKeyColumnsHelper final : public connectivity::sdbcx::OCollection
+ {
+ OTableKeyHelper* m_pKey;
+ virtual sdbcx::ObjectType createObject(const OUString& _rName) override;
+ virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override;
+ virtual void impl_refresh() override;
+ public:
+ OKeyColumnsHelper( OTableKeyHelper* _pKey,
+ ::osl::Mutex& _rMutex,
+ const ::std::vector< OUString> &_rVector);
+ };
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/inc/pch/precompiled_dbase.hxx b/connectivity/inc/pch/precompiled_dbase.hxx
index 8882fc958888..7d84b5570cc2 100644
--- a/connectivity/inc/pch/precompiled_dbase.hxx
+++ b/connectivity/inc/pch/precompiled_dbase.hxx
@@ -219,7 +219,7 @@
#include <connectivity/dbexception.hxx>
#include <connectivity/dbtoolsdllapi.hxx>
#include <connectivity/sdbcx/IRefreshable.hxx>
-#include <connectivity/sdbcx/VCatalog.hxx>
+#include <sdbcx/VCatalog.hxx>
#include <connectivity/sdbcx/VColumn.hxx>
#include <connectivity/sqliterator.hxx>
#include <propertyids.hxx>
diff --git a/connectivity/inc/pch/precompiled_flat.hxx b/connectivity/inc/pch/precompiled_flat.hxx
index bcf25cae8f5c..4712783cb181 100644
--- a/connectivity/inc/pch/precompiled_flat.hxx
+++ b/connectivity/inc/pch/precompiled_flat.hxx
@@ -201,7 +201,7 @@
#include <connectivity/dbexception.hxx>
#include <connectivity/dbtoolsdllapi.hxx>
#include <connectivity/sdbcx/IRefreshable.hxx>
-#include <connectivity/sdbcx/VCatalog.hxx>
+#include <sdbcx/VCatalog.hxx>
#include <connectivity/sdbcx/VDescriptor.hxx>
#endif // PCH_LEVEL >= 4
diff --git a/connectivity/inc/sdbcx/VCatalog.hxx b/connectivity/inc/sdbcx/VCatalog.hxx
new file mode 100644
index 000000000000..a9b1d18bb0a3
--- /dev/null
+++ b/connectivity/inc/sdbcx/VCatalog.hxx
@@ -0,0 +1,118 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
+#include <com/sun/star/sdbcx/XUsersSupplier.hpp>
+#include <com/sun/star/sdbcx/XGroupsSupplier.hpp>
+#include <cppuhelper/compbase.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <connectivity/CommonTools.hxx>
+#include <connectivity/sdbcx/IRefreshable.hxx>
+#include <connectivity/dbtoolsdllapi.hxx>
+#include <memory>
+
+namespace com::sun::star::sdbc { class XConnection; }
+namespace com::sun::star::sdbc { class XDatabaseMetaData; }
+namespace com::sun::star::sdbc { class XResultSet; }
+namespace com::sun::star::sdbc { class XRow; }
+
+namespace connectivity
+{
+ namespace sdbcx
+ {
+
+ class OCollection;
+ // OCatalog is a general catalog class
+ // other drivers can be derived their catalog from this class when they want to support sdbcx
+ // it holds already tables, views, groups and users
+
+ typedef ::cppu::WeakComponentImplHelper< css::sdbcx::XTablesSupplier,
+ css::sdbcx::XViewsSupplier,
+ css::sdbcx::XUsersSupplier,
+ css::sdbcx::XGroupsSupplier,
+ css::lang::XServiceInfo> OCatalog_BASE;
+
+
+ class OOO_DLLPUBLIC_DBTOOLS SAL_NO_VTABLE OCatalog :
+ public OCatalog_BASE,
+ public IRefreshableGroups,
+ public IRefreshableUsers
+ {
+ protected:
+
+ ::osl::Mutex m_aMutex;
+
+ // this members are deleted when the dtor is called
+ // they are hold weak
+ std::unique_ptr<OCollection> m_pTables;
+ std::unique_ptr<OCollection> m_pViews;
+ std::unique_ptr<OCollection> m_pGroups;
+ std::unique_ptr<OCollection> m_pUsers;
+
+ css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData; // just to make things easier
+
+ /** builds the name which should be used to access the object later on in the collection.
+ Will only be called in fillNames.
+ @param _xRow
+ The current row from the resultset given to fillNames.
+ */
+ virtual OUString buildName( const css::uno::Reference< css::sdbc::XRow >& _xRow);
+
+ /** fills a vector with the necessary names which can be used in combination with the collections.
+ For each row buildName will be called.
+ @param _xResult
+ The resultset which should be used to fill the names. Will be disposed after return and set to NULL.
+ @param _rNames
+ The vector who will be filled.
+ */
+ void fillNames(css::uno::Reference< css::sdbc::XResultSet >& _xResult,::std::vector< OUString>& _rNames);
+
+ public:
+ OCatalog(const css::uno::Reference< css::sdbc::XConnection> &_xConnection);
+ virtual ~OCatalog() override;
+
+ DECLARE_SERVICE_INFO();
+
+ // refreshTables is called when the method getTables had been called
+ // the member m_pTables has to be created
+ virtual void refreshTables() = 0;
+ // refreshViews is called when the method getViews had been called
+ virtual void refreshViews() = 0;
+
+ // the other refresh methods come from base classes IRefreshableGroups and IRefreshableUsers
+
+ // ::cppu::OComponentHelper
+ virtual void SAL_CALL disposing() override;
+ // XTablesSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTables( ) override;
+ // XViewsSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getViews( ) override;
+ // XUsersSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getUsers( ) override;
+ // XGroupsSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getGroups( ) override;
+
+ };
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/inc/sdbcx/VGroup.hxx b/connectivity/inc/sdbcx/VGroup.hxx
new file mode 100644
index 000000000000..dcf50d1a98b0
--- /dev/null
+++ b/connectivity/inc/sdbcx/VGroup.hxx
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/sdbcx/XUsersSupplier.hpp>
+#include <com/sun/star/sdbcx/XAuthorizable.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <comphelper/proparrhlp.hxx>
+#include <cppuhelper/compbase.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <connectivity/sdbcx/VCollection.hxx>
+#include <connectivity/sdbcx/IRefreshable.hxx>
+#include <connectivity/sdbcx/VDescriptor.hxx>
+#include <connectivity/dbtoolsdllapi.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+
+namespace connectivity
+{
+ namespace sdbcx
+ {
+ typedef OCollection OUsers;
+
+ typedef ::cppu::WeakComponentImplHelper< css::sdbcx::XUsersSupplier,
+ css::sdbcx::XAuthorizable,
+ css::container::XNamed,
+ css::lang::XServiceInfo> OGroup_BASE;
+
+ class OOO_DLLPUBLIC_DBTOOLS OGroup :
+ public cppu::BaseMutex,
+ public OGroup_BASE,
+ public IRefreshableUsers,
+ public ::comphelper::OPropertyArrayUsageHelper<OGroup>,
+ public ODescriptor
+ {
+ protected:
+ // no Reference! see OCollection::acquire
+ std::unique_ptr<OUsers> m_pUsers;
+
+ using OGroup_BASE::rBHelper;
+
+ // OPropertyArrayUsageHelper
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
+ // OPropertySetHelper
+ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
+ public:
+ OGroup(bool _bCase);
+ OGroup( const OUString& Name, bool _bCase);
+ virtual ~OGroup() override;
+ DECLARE_SERVICE_INFO();
+
+ // XInterface
+ virtual void SAL_CALL acquire() throw() override;
+ virtual void SAL_CALL release() throw() override;
+
+ //XInterface
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ //XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+
+ // ::cppu::OComponentHelper
+ virtual void SAL_CALL disposing() override;
+ // XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
+ // XUsersSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getUsers( ) override;
+ // XAuthorizable
+ virtual sal_Int32 SAL_CALL getPrivileges( const OUString& objName, sal_Int32 objType ) override;
+ virtual sal_Int32 SAL_CALL getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) override;
+ virtual void SAL_CALL grantPrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) override;
+ virtual void SAL_CALL revokePrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) override;
+
+ // XNamed
+ virtual OUString SAL_CALL getName( ) override;
+ virtual void SAL_CALL setName( const OUString& aName ) override;
+ };
+ }
+}
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/inc/sdbcx/VIndex.hxx b/connectivity/inc/sdbcx/VIndex.hxx
new file mode 100644
index 000000000000..8bf0a4db2be4
--- /dev/null
+++ b/connectivity/inc/sdbcx/VIndex.hxx
@@ -0,0 +1,100 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
+#include <comphelper/IdPropArrayHelper.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <connectivity/CommonTools.hxx>
+#include <sdbcx/VTypeDef.hxx>
+#include <connectivity/sdbcx/IRefreshable.hxx>
+#include <connectivity/sdbcx/VDescriptor.hxx>
+#include <connectivity/dbtoolsdllapi.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+namespace connectivity
+{
+ namespace sdbcx
+ {
+ class OCollection;
+ class OIndex;
+ typedef ::cppu::ImplHelper1< css::sdbcx::XDataDescriptorFactory > OIndex_BASE;
+ typedef ::comphelper::OIdPropertyArrayUsageHelper<OIndex> OIndex_PROP;
+
+ class OOO_DLLPUBLIC_DBTOOLS OIndex :
+ public cppu::BaseMutex,
+ public ODescriptor_BASE,
+ public IRefreshableColumns,
+ public OIndex_PROP,
+ public ODescriptor,
+ public OIndex_BASE
+ {
+ protected:
+ OUString m_Catalog;
+ bool m_IsUnique;
+ bool m_IsPrimaryKeyIndex;
+ bool m_IsClustered;
+
+ // no Reference! see OCollection::acquire
+ std::unique_ptr<OCollection> m_pColumns;
+
+ using ODescriptor_BASE::rBHelper;
+ virtual void refreshColumns() override;
+ // OPropertyArrayUsageHelper
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper( sal_Int32 _nId) const override;
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
+ public:
+ OIndex(bool _bCase);
+ OIndex( const OUString& Name,
+ const OUString& Catalog,
+ bool _isUnique,
+ bool _isPrimaryKeyIndex,
+ bool _isClustered,
+ bool _bCase);
+
+ virtual ~OIndex( ) override;
+
+ DECLARE_SERVICE_INFO();
+
+ //XInterface
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ virtual void SAL_CALL acquire() throw() override;
+ virtual void SAL_CALL release() throw() override;
+ //XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+ // ODescriptor
+ virtual void construct() override;
+ // ::cppu::OComponentHelper
+ virtual void SAL_CALL disposing() override;
+ // XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
+ // XColumnsSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns( ) override;
+
+ // XNamed
+ virtual OUString SAL_CALL getName( ) override;
+ virtual void SAL_CALL setName( const OUString& aName ) override;
+ // XDataDescriptorFactory
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor( ) override;
+ };
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/inc/sdbcx/VIndexColumn.hxx b/connectivity/inc/sdbcx/VIndexColumn.hxx
new file mode 100644
index 000000000000..6677b291ea5c
--- /dev/null
+++ b/connectivity/inc/sdbcx/VIndexColumn.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <connectivity/dbtoolsdllapi.hxx>
+#include <connectivity/sdbcx/VColumn.hxx>
+
+namespace connectivity
+{
+ namespace sdbcx
+ {
+ class OIndexColumn;
+ typedef ::comphelper::OIdPropertyArrayUsageHelper<OIndexColumn> OIndexColumn_PROP;
+
+ class OOO_DLLPUBLIC_DBTOOLS OIndexColumn :
+ public OColumn, public OIndexColumn_PROP
+ {
+ bool m_IsAscending;
+ protected:
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper( sal_Int32 _nId) const override;
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
+ public:
+ OIndexColumn( bool _bCase);
+ OIndexColumn( bool IsAscending,
+ const OUString& Name,
+ const OUString& TypeName,
+ const OUString& DefaultValue,
+ sal_Int32 IsNullable,
+ sal_Int32 Precision,
+ sal_Int32 Scale,
+ sal_Int32 Type,
+ bool _bCase,
+ const OUString& CatalogName,
+ const OUString& SchemaName,
+ const OUString& TableName);
+
+ virtual void construct() override;
+ DECLARE_SERVICE_INFO();
+ };
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/inc/sdbcx/VKey.hxx b/connectivity/inc/sdbcx/VKey.hxx
new file mode 100644
index 000000000000..01e1d839f8b4
--- /dev/null
+++ b/connectivity/inc/sdbcx/VKey.hxx
@@ -0,0 +1,111 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+
+#include <comphelper/IdPropArrayHelper.hxx>
+#include <connectivity/CommonTools.hxx>
+#include <sdbcx/VTypeDef.hxx>
+#include <connectivity/sdbcx/IRefreshable.hxx>
+#include <connectivity/sdbcx/VDescriptor.hxx>
+#include <connectivity/dbtoolsdllapi.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
+#include <memory>
+
+namespace connectivity
+{
+ namespace sdbcx
+ {
+
+ struct OOO_DLLPUBLIC_DBTOOLS KeyProperties
+ {
+ ::std::vector< OUString> m_aKeyColumnNames;
+ OUString m_ReferencedTable;
+ sal_Int32 m_Type;
+ sal_Int32 m_UpdateRule;
+ sal_Int32 m_DeleteRule;
+ KeyProperties(const OUString& ReferencedTable,
+ sal_Int32 Type,
+ sal_Int32 UpdateRule,
+ sal_Int32 DeleteRule)
+ :m_ReferencedTable(ReferencedTable),
+ m_Type(Type),
+ m_UpdateRule(UpdateRule),
+ m_DeleteRule(DeleteRule)
+ {}
+ KeyProperties():m_Type(0),m_UpdateRule(0),m_DeleteRule(0){}
+ };
+ typedef ::cppu::ImplHelper1< css::sdbcx::XDataDescriptorFactory > OKey_BASE;
+ class OCollection;
+
+ class OOO_DLLPUBLIC_DBTOOLS OKey :
+ public cppu::BaseMutex,
+ public ODescriptor_BASE,
+ public IRefreshableColumns,
+ public ::comphelper::OIdPropertyArrayUsageHelper<OKey>,
+ public ODescriptor,
+ public OKey_BASE
+ {
+ protected:
+ std::shared_ptr<KeyProperties> m_aProps;
+ // no Reference! see OCollection::acquire
+ std::unique_ptr<OCollection> m_pColumns;
+
+ using ODescriptor_BASE::rBHelper;
+ // OPropertyArrayUsageHelper
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper( sal_Int32 _nId) const override;
+ // OPropertySetHelper
+ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
+ public:
+ OKey(bool _bCase);
+ OKey(const OUString& Name,const std::shared_ptr<KeyProperties>& _rProps,bool _bCase);
+
+ virtual ~OKey( ) override;
+
+ DECLARE_SERVICE_INFO();
+ //XInterface
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ virtual void SAL_CALL acquire() throw() override;
+ virtual void SAL_CALL release() throw() override;
+ //XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+ // ODescriptor
+ virtual void construct() override;
+
+ // ::cppu::OComponentHelper
+ virtual void SAL_CALL disposing() override;
+ // XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
+ // XColumnsSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns( ) override;
+
+ // XNamed
+ virtual OUString SAL_CALL getName( ) override;
+ virtual void SAL_CALL setName( const OUString& aName ) override;
+ // XDataDescriptorFactory
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor( ) override;
+ };
+ }
+}
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/inc/sdbcx/VKeyColumn.hxx b/connectivity/inc/sdbcx/VKeyColumn.hxx
new file mode 100644
index 000000000000..cb6548f31964
--- /dev/null
+++ b/connectivity/inc/sdbcx/VKeyColumn.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <connectivity/dbtoolsdllapi.hxx>
+#include <connectivity/sdbcx/VColumn.hxx>
+
+namespace connectivity
+{
+ namespace sdbcx
+ {
+ class OKeyColumn;
+ typedef ::comphelper::OIdPropertyArrayUsageHelper<OKeyColumn> OKeyColumn_PROP;
+
+ class OKeyColumn :
+ public OColumn, public OKeyColumn_PROP
+ {
+ OUString m_ReferencedColumn;
+ protected:
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper( sal_Int32 _nId) const override;
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
+ public:
+ OKeyColumn(bool _bCase);
+ OKeyColumn( const OUString& ReferencedColumn,
+ const OUString& Name,
+ const OUString& TypeName,
+ const OUString& DefaultValue,
+ sal_Int32 IsNullable,
+ sal_Int32 Precision,
+ sal_Int32 Scale,
+ sal_Int32 Type,
+ bool _bCase,
+ const OUString& CatalogName,
+ const OUString& SchemaName,
+ const OUString& TableName);
+ // just to make it not inline
+ virtual ~OKeyColumn() override;
+
+ virtual void construct() override;
+ DECLARE_SERVICE_INFO();
+ };
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/inc/sdbcx/VTypeDef.hxx b/connectivity/inc/sdbcx/VTypeDef.hxx
new file mode 100644
index 000000000000..2054003930e4
--- /dev/null
+++ b/connectivity/inc/sdbcx/VTypeDef.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#include <cppuhelper/compbase.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+
+namespace connectivity
+{
+ namespace sdbcx
+ {
+ typedef cppu::WeakComponentImplHelper< css::sdbcx::XColumnsSupplier,
+ css::container::XNamed,
+ css::lang::XServiceInfo> ODescriptor_BASE;
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/inc/sdbcx/VUser.hxx b/connectivity/inc/sdbcx/VUser.hxx
new file mode 100644
index 000000000000..c16679466bdd
--- /dev/null
+++ b/connectivity/inc/sdbcx/VUser.hxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/sdbcx/XUser.hpp>
+#include <com/sun/star/sdbcx/XGroupsSupplier.hpp>
+#include <comphelper/proparrhlp.hxx>
+#include <cppuhelper/compbase.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <connectivity/CommonTools.hxx>
+#include <connectivity/sdbcx/VCollection.hxx>
+#include <com/sun/star/container/XNamed.hpp>
+#include <connectivity/sdbcx/IRefreshable.hxx>
+#include <connectivity/sdbcx/VDescriptor.hxx>
+#include <connectivity/dbtoolsdllapi.hxx>
+
+namespace connectivity
+{
+ namespace sdbcx
+ {
+ typedef OCollection OGroups;
+
+ typedef ::cppu::WeakComponentImplHelper< css::sdbcx::XUser,
+ css::sdbcx::XGroupsSupplier,
+ css::container::XNamed,
+ css::lang::XServiceInfo> OUser_BASE;
+
+ class OOO_DLLPUBLIC_DBTOOLS OUser :
+ public cppu::BaseMutex,
+ public OUser_BASE,
+ public IRefreshableGroups,
+ public ::comphelper::OPropertyArrayUsageHelper<OUser>,
+ public ODescriptor
+ {
+ protected:
+ // no Reference! see OCollection::acquire
+ std::unique_ptr<OGroups> m_pGroups;
+
+ using OUser_BASE::rBHelper;
+
+ // OPropertyArrayUsageHelper
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
+ // OPropertySetHelper
+ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
+ public:
+ OUser(bool _bCase);
+ OUser(const OUString& Name,bool _bCase);
+
+ virtual ~OUser( ) override;
+
+ DECLARE_SERVICE_INFO();
+
+ // ::cppu::OComponentHelper
+ virtual void SAL_CALL disposing() override;
+ //XInterface
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ virtual void SAL_CALL acquire() throw() override;
+ virtual void SAL_CALL release() throw() override;
+ //XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+ // XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
+ // XUser
+ virtual void SAL_CALL changePassword( const OUString& objPassword, const OUString& newPassword ) override;
+ // XAuthorizable
+ virtual sal_Int32 SAL_CALL getPrivileges( const OUString& objName, sal_Int32 objType ) override;
+ virtual sal_Int32 SAL_CALL getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) override;
+ virtual void SAL_CALL grantPrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) override;
+ virtual void SAL_CALL revokePrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) override;
+ // XGroupsSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getGroups( ) override;
+
+ // XNamed
+ virtual OUString SAL_CALL getName( ) override;
+ virtual void SAL_CALL setName( const OUString& aName ) override;
+ };
+ }
+}
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */