bump product version to 7.2.5.1
[LibreOffice.git] / connectivity / source / drivers / firebird / Users.cxx
blob50cfef84be8c5dcc37bcccb5d34f10488f467dd1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #include "User.hxx"
11 #include "Users.hxx"
13 using namespace ::connectivity;
14 using namespace ::connectivity::firebird;
15 using namespace ::connectivity::sdbcx;
16 using namespace ::cppu;
17 using namespace ::osl;
18 using namespace ::com::sun::star;
19 using namespace ::com::sun::star::beans;
20 using namespace ::com::sun::star::container;
21 using namespace ::com::sun::star::lang;
22 using namespace ::com::sun::star::sdbc;
23 using namespace ::com::sun::star::uno;
26 Users::Users(const uno::Reference< XDatabaseMetaData >& rMetaData,
27 OWeakObject& rParent,
28 Mutex& rMutex,
29 ::std::vector< OUString> const & rNames) :
30 OCollection(rParent,
31 true,
32 rMutex,
33 rNames),
34 m_xMetaData(rMetaData)
38 //----- OCollection -----------------------------------------------------------
39 void Users::impl_refresh()
41 // TODO: IMPLEMENT ME
44 ObjectType Users::createObject(const OUString& rName)
46 return new User(m_xMetaData->getConnection(), rName);
49 uno::Reference< XPropertySet > Users::createDescriptor()
51 // There is some internal magic so that the same class can be used as either
52 // a descriptor or as a normal user. See VUser.cxx for the details. In our
53 // case we just need to ensure we use the correct constructor.
54 return new User(m_xMetaData->getConnection());
57 //----- XAppend ---------------------------------------------------------------
58 ObjectType Users::appendObject(const OUString& rName,
59 const uno::Reference< XPropertySet >&)
61 // TODO: set sSql as appropriate
62 m_xMetaData->getConnection()->createStatement()->execute(OUString());
64 return createObject(rName);
67 //----- XDrop -----------------------------------------------------------------
68 void Users::dropObject(sal_Int32 nPosition, const OUString&)
70 uno::Reference< XPropertySet > xUser(getObject(nPosition));
72 if (!ODescriptor::isNew(xUser))
74 // TODO: drop me
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */