1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _CONNECTIVITY_ADABAS_GROUP_HXX_
25 #define _CONNECTIVITY_ADABAS_GROUP_HXX_
26 
27 #include "connectivity/sdbcx/VGroup.hxx"
28 #include "ado/Awrapadox.hxx"
29 
30 namespace connectivity
31 {
32 	namespace ado
33 	{
34 		typedef sdbcx::OGroup OGroup_ADO;
35 		class OCatalog;
36 
37 		class OAdoGroup :	public OGroup_ADO
38 		{
39 			WpADOGroup		m_aGroup;
40 			OCatalog*		m_pCatalog;
41 
42 			sal_Int32		MapRight(RightsEnum _eNum);
43 			RightsEnum		Map2Right(sal_Int32 _eNum);
44 			ObjectTypeEnum	MapObjectType(sal_Int32 _ObjType);
45 		protected:
46             virtual void SAL_CALL getFastPropertyValue(::com::sun::star::uno::Any& rValue,sal_Int32 nHandle) const;
47             virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const ::com::sun::star::uno::Any& rValue)throw (::com::sun::star::uno::Exception);
48 
49 		public:
50 			virtual void refreshUsers();
51 		public:
52 			OAdoGroup(OCatalog* _pParent,sal_Bool _bCase, ADOGroup* _pGroup=NULL);
53 			OAdoGroup(OCatalog* _pParent,sal_Bool _bCase, const ::rtl::OUString& _Name);
54 
55 			virtual void SAL_CALL acquire() throw();
56             virtual void SAL_CALL release() throw();
57 			// com::sun::star::lang::XUnoTunnel
58             virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
59             static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
60 
61 			// XAuthorizable
62 			virtual sal_Int32 SAL_CALL getPrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
63 			virtual sal_Int32 SAL_CALL getGrantablePrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
64 			virtual void SAL_CALL grantPrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
65 			virtual void SAL_CALL revokePrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
66 
getImpl() const67 			WpADOGroup getImpl() const { return m_aGroup; }
68 		};
69 	}
70 }
71 #endif // _CONNECTIVITY_ADABAS_GROUP_HXX_
72 
73