bump product version to 5.0.4.1
[LibreOffice.git] / connectivity / source / inc / ado / adoimp.hxx
blobcc605cb29f4fcdf30500c25de47d79b2f7afc523
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 INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_ADOIMP_HXX
20 #define INCLUDED_CONNECTIVITY_SOURCE_INC_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 namespace connectivity
31 namespace ado
34 class WpADOField;
35 class OLEString;
36 class ADOS
38 public:
39 // Also here: Free BSTR with SysFreeString()!
40 static OLEString& GetKeyStr();
42 static const CLSID CLSID_ADOCATALOG_25;
43 static const IID IID_ADOCATALOG_25;
45 static const CLSID CLSID_ADOCONNECTION_21;
46 static const IID IID_ADOCONNECTION_21;
48 static const CLSID CLSID_ADOCOMMAND_21;
49 static const IID IID_ADOCOMMAND_21;
51 static const CLSID CLSID_ADORECORDSET_21;
52 static const IID IID_ADORECORDSET_21;
54 static const CLSID CLSID_ADOINDEX_25;
55 static const IID IID_ADOINDEX_25;
57 static const CLSID CLSID_ADOCOLUMN_25;
58 static const IID IID_ADOCOLUMN_25;
60 static const CLSID CLSID_ADOKEY_25;
61 static const IID IID_ADOKEY_25;
63 static const CLSID CLSID_ADOTABLE_25;
64 static const IID IID_ADOTABLE_25;
66 static const CLSID CLSID_ADOGROUP_25;
67 static const IID IID_ADOGROUP_25;
69 static const CLSID CLSID_ADOUSER_25;
70 static const IID IID_ADOUSER_25;
72 static const CLSID CLSID_ADOVIEW_25;
73 static const IID IID_ADOVIEW_25;
75 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);
76 static sal_Int32 MapADOType2Jdbc(DataTypeEnum eType);
77 static DataTypeEnum MapJdbc2ADOType(sal_Int32 _nType,sal_Int32 _nJetEngine);
78 static sal_Bool isJetEngine(sal_Int32 _nEngineType);
80 static ObjectTypeEnum mapObjectType2Ado(sal_Int32 objType);
81 static sal_Int32 mapAdoType2Object(ObjectTypeEnum objType);
82 static sal_Int32 mapAdoRights2Sdbc(RightsEnum eRights);
83 static sal_Int32 mapRights2Ado(sal_Int32 nRights);
85 static WpADOField getField(ADORecordset* _pRecordSet,sal_Int32 _nColumnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
92 #define ADO_PROP(ItemName) \
93 WpADOProperty aProp(aProps.GetItem(ItemName)); \
94 OLEVariant aVar; \
95 if(aProp.IsValid()) \
96 aVar = aProp.GetValue(); \
97 else \
98 ADOS::ThrowException(*m_pADOConnection,*this);
101 #endif // INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_ADOIMP_HXX
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */