LCOV - code coverage report
Current view: top level - connectivity/source/inc/mysql - YUser.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 2 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_MYSQL_YUSER_HXX
      21             : #define INCLUDED_CONNECTIVITY_SOURCE_INC_MYSQL_YUSER_HXX
      22             : 
      23             : #include <connectivity/sdbcx/VUser.hxx>
      24             : #include <com/sun/star/sdbc/XConnection.hpp>
      25             : 
      26             : namespace connectivity
      27             : {
      28             :     namespace mysql
      29             :     {
      30             :         typedef connectivity::sdbcx::OUser OUser_TYPEDEF;
      31             : 
      32           0 :         class OMySQLUser : public OUser_TYPEDEF
      33             :         {
      34             :             ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
      35             : 
      36             :             static OUString getPrivilegeString(sal_Int32 nRights);
      37             :             // return the privileges and additional the grant rights
      38             :             void findPrivilegesAndGrantPrivileges(const OUString& objName, sal_Int32 objType,sal_Int32& nRights,sal_Int32& nRightsWithGrant) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
      39             :         public:
      40             :             virtual void refreshGroups() SAL_OVERRIDE;
      41             :         public:
      42             :             OMySQLUser(  const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection);
      43             :             OMySQLUser(  const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,const OUString& _Name);
      44             : 
      45             :             // XUser
      46             :             virtual void SAL_CALL changePassword( const OUString& objPassword, const OUString& newPassword ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      47             :             // XAuthorizable
      48             :             virtual sal_Int32 SAL_CALL getPrivileges( const OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      49             :             virtual sal_Int32 SAL_CALL getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      50             :             virtual void SAL_CALL grantPrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      51             :             virtual void SAL_CALL revokePrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      52             :         };
      53             : 
      54             :         class OUserExtend;
      55             :         typedef ::comphelper::OPropertyArrayUsageHelper<OUserExtend> OUserExtend_PROP;
      56             : 
      57           0 :         class OUserExtend : public OMySQLUser,
      58             :                             public OUserExtend_PROP
      59             :         {
      60             :         protected:
      61             :             OUString m_Password;
      62             :             // OPropertyArrayUsageHelper
      63             :             virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const SAL_OVERRIDE;
      64             :             // OPropertySetHelper
      65             :             virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE;
      66             :         public:
      67             :             OUserExtend(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection);
      68             : 
      69             :             virtual void construct() SAL_OVERRIDE;
      70             :         };
      71             :     }
      72             : }
      73             : #endif // INCLUDED_CONNECTIVITY_SOURCE_INC_MYSQL_YUSER_HXX
      74             : 
      75             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11