update credits
[LibreOffice.git] / connectivity / source / inc / ado / adoimp.hxx
blobd8de39bb5eeea8106c0937691014c98d5ed0b728
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef _CONNECTIVITY_ADO_ADOIMP_HXX_
20 #define _CONNECTIVITY_ADO_ADOIMP_HXX_
22 #include <com/sun/star/sdbc/SQLException.hpp>
24 #include "ado_pre_sys_include.h"
25 #include <adoctint.h>
26 #include "ado_post_sys_include.h"
28 struct ADOConnection;
29 enum DataTypeEnum;
30 namespace connectivity
32 namespace ado
35 class WpADOField;
36 class OLEString;
37 class ADOS
39 public:
40 // Also here: Free BSTR with SysFreeString()!
41 static OLEString& GetKeyStr();
43 static const CLSID CLSID_ADOCATALOG_25;
44 static const IID IID_ADOCATALOG_25;
46 static const CLSID CLSID_ADOCONNECTION_21;
47 static const IID IID_ADOCONNECTION_21;
49 static const CLSID CLSID_ADOCOMMAND_21;
50 static const IID IID_ADOCOMMAND_21;
52 static const CLSID CLSID_ADORECORDSET_21;
53 static const IID IID_ADORECORDSET_21;
55 static const CLSID CLSID_ADOINDEX_25;
56 static const IID IID_ADOINDEX_25;
58 static const CLSID CLSID_ADOCOLUMN_25;
59 static const IID IID_ADOCOLUMN_25;
61 static const CLSID CLSID_ADOKEY_25;
62 static const IID IID_ADOKEY_25;
64 static const CLSID CLSID_ADOTABLE_25;
65 static const IID IID_ADOTABLE_25;
67 static const CLSID CLSID_ADOGROUP_25;
68 static const IID IID_ADOGROUP_25;
70 static const CLSID CLSID_ADOUSER_25;
71 static const IID IID_ADOUSER_25;
73 static const CLSID CLSID_ADOVIEW_25;
74 static const IID IID_ADOVIEW_25;
76 static void ThrowException(ADOConnection* _pAdoCon,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
77 static sal_Int32 MapADOType2Jdbc(DataTypeEnum eType);
78 static DataTypeEnum MapJdbc2ADOType(sal_Int32 _nType,sal_Int32 _nJetEngine);
79 static sal_Bool isJetEngine(sal_Int32 _nEngineType);
81 static ObjectTypeEnum mapObjectType2Ado(sal_Int32 objType);
82 static sal_Int32 mapAdoType2Object(ObjectTypeEnum objType);
83 static sal_Int32 mapAdoRights2Sdbc(RightsEnum eRights);
84 static sal_Int32 mapRights2Ado(sal_Int32 nRights);
86 static WpADOField getField(ADORecordset* _pRecordSet,sal_Int32 _nColumnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
93 #define ADO_PROP(ItemName) \
94 WpADOProperty aProp(aProps.GetItem(ItemName)); \
95 OLEVariant aVar; \
96 if(aProp.IsValid()) \
97 aVar = aProp.GetValue(); \
98 else \
99 ADOS::ThrowException(*m_pADOConnection,*this);
102 #endif //_CONNECTIVITY_ADO_ADOIMP_HXX_
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */