summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-08-08 10:08:27 +0100
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2013-08-11 16:05:09 +0100
commit0c2b01f038b55d6410242e98067845ec6cda4b5a (patch)
tree0df43fda2c9f8db59669805199acf96a494b3ae9 /connectivity
parent75b2c92cfbaafff09e4f6e40010e5bc876979794 (diff)
Add skeleton sdbcx methods to Driver. (firebird-sdbc)
Change-Id: I531b4260e6ada7f82d71957381b0cc4896678d55
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/Driver.cxx24
-rw-r--r--connectivity/source/drivers/firebird/Driver.hxx21
2 files changed, 41 insertions, 4 deletions
diff --git a/connectivity/source/drivers/firebird/Driver.cxx b/connectivity/source/drivers/firebird/Driver.cxx
index 21afe46576c9..7be842a3e4fe 100644
--- a/connectivity/source/drivers/firebird/Driver.cxx
+++ b/connectivity/source/drivers/firebird/Driver.cxx
@@ -32,6 +32,7 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::sdbc;
+using namespace com::sun::star::sdbcx;
using namespace ::osl;
@@ -81,8 +82,9 @@ rtl::OUString FirebirdDriver::getImplementationName_Static() throw(RuntimeExcept
Sequence< OUString > FirebirdDriver::getSupportedServiceNames_Static() throw (RuntimeException)
{
// TODO: add com.sun.star.sdbcx.Driver once all sdbc functionality is implemented
- Sequence< OUString > aSNS( 1 );
+ Sequence< OUString > aSNS( 2 );
aSNS[0] = OUString("com.sun.star.sdbc.Driver");
+ aSNS[0] = OUString("com.sun.star.sdbcx.Driver");
return aSNS;
}
@@ -167,6 +169,26 @@ sal_Int32 SAL_CALL FirebirdDriver::getMinorVersion( ) throw(RuntimeException)
return 0;
}
+//----- XDataDefinitionSupplier
+uno::Reference< XTablesSupplier > SAL_CALL FirebirdDriver::getDataDefinitionByConnection(
+ const uno::Reference< XConnection >& rxConnection)
+ throw(SQLException, RuntimeException)
+{
+ (void) rxConnection;
+ // TODO: IMPLEMENT ME
+ return 0;
+}
+
+uno::Reference< XTablesSupplier > SAL_CALL FirebirdDriver::getDataDefinitionByURL(
+ const OUString& rsURL,
+ const uno::Sequence< PropertyValue >& rInfo)
+ throw(SQLException, RuntimeException)
+{
+ (void) rsURL;
+ (void) rInfo;
+ // TODO: IMPLEMENT ME
+ return 0;
+}
namespace connectivity
{
diff --git a/connectivity/source/drivers/firebird/Driver.hxx b/connectivity/source/drivers/firebird/Driver.hxx
index fcb0f5750b62..545d98ac714b 100644
--- a/connectivity/source/drivers/firebird/Driver.hxx
+++ b/connectivity/source/drivers/firebird/Driver.hxx
@@ -22,9 +22,10 @@
#include "Connection.hxx"
-#include <com/sun/star/sdbc/XDriver.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <cppuhelper/compbase2.hxx>
+#include <com/sun/star/sdbc/XDriver.hpp>
+#include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp>
+#include <cppuhelper/compbase3.hxx>
namespace connectivity
{
@@ -37,7 +38,8 @@ namespace connectivity
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL FirebirdDriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception );
- typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::sdbc::XDriver,
+ typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::sdbc::XDriver,
+ ::com::sun::star::sdbcx::XDataDefinitionSupplier,
::com::sun::star::lang::XServiceInfo > ODriver_BASE;
class FirebirdDriver : public ODriver_BASE
@@ -69,6 +71,19 @@ namespace connectivity
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo( const ::rtl::OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getMajorVersion( ) throw(::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getMinorVersion( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XDataDefinitionSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier >
+ SAL_CALL getDataDefinitionByConnection(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& rxConnection)
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier >
+ SAL_CALL getDataDefinitionByURL(
+ const OUString& rsURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rInfo)
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
};
}