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_ADO_AWRAPADOX_HXX_ 25 #define _CONNECTIVITY_ADO_AWRAPADOX_HXX_ 26 27 #include <com/sun/star/beans/PropertyAttribute.hpp> 28 29 #ifndef __User_FWD_DEFINED__ 30 #define __User_FWD_DEFINED__ 31 typedef struct _ADOUser User; 32 #endif /* __User_FWD_DEFINED__ */ 33 34 #ifndef __Group_FWD_DEFINED__ 35 #define __Group_FWD_DEFINED__ 36 typedef struct _ADOGroup Group; 37 #endif /* __Group_FWD_DEFINED__ */ 38 39 #ifndef __Column_FWD_DEFINED__ 40 #define __Column_FWD_DEFINED__ 41 typedef struct _ADOColumn Column; 42 #endif /* __Column_FWD_DEFINED__ */ 43 44 #ifndef __Index_FWD_DEFINED__ 45 #define __Index_FWD_DEFINED__ 46 typedef struct _ADOIndex Index; 47 #endif /* __cplusplus */ 48 49 #ifndef __Key_FWD_DEFINED__ 50 #define __Key_FWD_DEFINED__ 51 typedef struct _ADOKey Key; 52 #endif /* __Key_FWD_DEFINED__ */ 53 54 #ifndef __Table_FWD_DEFINED__ 55 #define __Table_FWD_DEFINED__ 56 typedef struct _ADOTable Table; 57 #endif /* __Table_FWD_DEFINED__ */ 58 59 60 #include "ado_pre_sys_include.h" 61 // A modern Windows SDK ships the ADO interfaces twice: adoint.h, which has 62 // dropped the <Enum>_Param typedefs, and adoint_Backcompat.h, which keeps 63 // them. This driver uses PositionEnum_Param, so it needs the latter: 64 // 65 // AResultSet.cxx(277): error C2065: 'PositionEnum_Param': undeclared 66 // 67 // INSTEAD OF and not in addition to. Both files open with 68 // 69 // #ifndef _ADOINT_H_ 70 // 71 // so whichever is included second is skipped entirely -- adding the 72 // back-compat header after adoint.h looks right and does exactly nothing. 73 // The two declare the same interfaces (ADOConnection, ADORecordset, ...); 74 // only the typedefs differ. 75 // 76 // Gated on the compiler generation rather than __has_include, which is C++17 77 // and this build is /std:c++14. On this branch a UCRT-era compiler always 78 // pairs with the Windows 10 SDK, and VC9 always with an SDK whose adoint.h 79 // still carries the typedefs itself. 80 #if defined(_MSC_VER) && _MSC_VER >= 1900 81 #include <adoint_Backcompat.h> 82 #else 83 #include <adoint.h> 84 #endif 85 #include <adoctint.h> 86 #include "ado_post_sys_include.h" 87 88 89 #include "ado/Aolewrap.hxx" 90 #include "ado/Aolevariant.hxx" 91 #include "ado/adoimp.hxx" 92 #include "ado/Awrapado.hxx" 93 #include "ado/WrapColumn.hxx" 94 #include "ado/WrapIndex.hxx" 95 #include "ado/WrapKey.hxx" 96 #include "ado/WrapTable.hxx" 97 #include "ado/WrapCatalog.hxx" 98 99 namespace connectivity 100 { 101 namespace ado 102 { 103 class WpADOView : public WpOLEBase<ADOView> 104 { 105 public: WpADOView(ADOView * pInt=NULL)106 WpADOView(ADOView* pInt=NULL) : WpOLEBase<ADOView>(pInt){} WpADOView(const WpADOView & rhs)107 WpADOView(const WpADOView& rhs){operator=(rhs);} 108 operator =(const WpADOView & rhs)109 inline WpADOView& operator=(const WpADOView& rhs) 110 {WpOLEBase<ADOView>::operator=(rhs); return *this;} 111 112 ::rtl::OUString get_Name() const; 113 void get_Command(OLEVariant& _rVar) const; 114 void put_Command(OLEVariant& _rVar); 115 }; 116 117 class WpADOGroup : public WpOLEBase<ADOGroup> 118 { 119 public: WpADOGroup(ADOGroup * pInt=NULL)120 WpADOGroup(ADOGroup* pInt=NULL) : WpOLEBase<ADOGroup>(pInt){} WpADOGroup(const WpADOGroup & rhs)121 WpADOGroup(const WpADOGroup& rhs){operator=(rhs);} 122 operator =(const WpADOGroup & rhs)123 inline WpADOGroup& operator=(const WpADOGroup& rhs) 124 {WpOLEBase<ADOGroup>::operator=(rhs); return *this;} 125 126 void Create(); 127 128 ::rtl::OUString get_Name() const; 129 void put_Name(const ::rtl::OUString& _rName); 130 RightsEnum GetPermissions( 131 /* [in] */ const OLEVariant& Name, 132 /* [in] */ ObjectTypeEnum ObjectType); 133 sal_Bool SetPermissions( 134 /* [in] */ const OLEVariant& Name, 135 /* [in] */ ObjectTypeEnum ObjectType, 136 /* [in] */ ActionEnum Action, 137 /* [in] */ RightsEnum Rights); 138 WpADOUsers get_Users( ); 139 }; 140 141 class WpADOUser : public WpOLEBase<_ADOUser> 142 { 143 public: WpADOUser(_ADOUser * pInt=NULL)144 WpADOUser(_ADOUser* pInt=NULL) : WpOLEBase<_ADOUser>(pInt){} WpADOUser(const WpADOUser & rhs)145 WpADOUser(const WpADOUser& rhs){operator=(rhs);} 146 operator =(const WpADOUser & rhs)147 inline WpADOUser& operator=(const WpADOUser& rhs) 148 {WpOLEBase<_ADOUser>::operator=(rhs); return *this;} 149 150 void Create(); 151 152 ::rtl::OUString get_Name() const; 153 void put_Name(const ::rtl::OUString& _rName); 154 sal_Bool ChangePassword(const ::rtl::OUString& _rPwd,const ::rtl::OUString& _rNewPwd); 155 WpADOGroups get_Groups(); 156 RightsEnum GetPermissions( 157 /* [in] */ const OLEVariant& Name, 158 /* [in] */ ObjectTypeEnum ObjectType); 159 sal_Bool SetPermissions( 160 /* [in] */ const OLEVariant& Name, 161 /* [in] */ ObjectTypeEnum ObjectType, 162 /* [in] */ ActionEnum Action, 163 /* [in] */ RightsEnum Rights); 164 }; 165 } 166 } 167 #endif // _CONNECTIVITY_ADO_AWRAPADOX_HXX_ 168