LibreOffice Module dbaccess (master) 1
dsmeta.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <sal/config.h>
23
24#include <set>
25
26#include "dsitems.hxx"
27
28#include <rtl/ustring.hxx>
29
30#include <memory>
31
32namespace dbaui
33{
34
35 // AuthenticationMode
37 {
41 };
42
43 // DataSourceMetaData
44 class FeatureSet;
55 {
56 public:
57 DataSourceMetaData( const OUString& _sURL );
59
61 const FeatureSet& getFeatureSet() const;
62
64 static AuthenticationMode getAuthentication( const OUString& _sURL );
65
66 private:
67 OUString m_sURL;
68 };
69
70 // FeatureSet
74 {
75 public:
76 typedef std::set< ItemID >::const_iterator const_iterator;
77
78 public:
80
81 void put( const ItemID _id ) { m_aContent.insert( _id ); }
82 bool has( const ItemID _id ) const { return m_aContent.find( _id ) != m_aContent.end(); }
83
84 inline bool supportsAnySpecialSetting() const;
85 inline bool supportsGeneratedValues() const;
86
87 const_iterator begin() const { return m_aContent.begin(); }
88 const_iterator end() const { return m_aContent.end(); }
89
90 private:
91 std::set< ItemID > m_aContent;
92 };
93
95 {
97 }
98
100 {
101 return has( DSID_SQL92CHECK )
108 || has( DSID_CATALOG )
109 || has( DSID_SCHEMA )
119 ;
120 }
121
122} // namespace dbaui
123
124/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
encapsulates meta data for a data source
Definition: dsmeta.hxx:55
static AuthenticationMode getAuthentication(const OUString &_sURL)
determines whether or not the data source requires authentication
Definition: dsmeta.cxx:158
DataSourceMetaData(const OUString &_sURL)
Definition: dsmeta.cxx:144
const FeatureSet & getFeatureSet() const
returns a struct describing this data source type's support for our known advanced settings
Definition: dsmeta.cxx:153
can be used to ask for (UI) support for certain advanced features
Definition: dsmeta.hxx:74
std::set< ItemID >::const_iterator const_iterator
Definition: dsmeta.hxx:76
const_iterator end() const
Definition: dsmeta.hxx:88
bool has(const ItemID _id) const
Definition: dsmeta.hxx:82
const_iterator begin() const
Definition: dsmeta.hxx:87
bool supportsAnySpecialSetting() const
Definition: dsmeta.hxx:99
std::set< ItemID > m_aContent
Definition: dsmeta.hxx:91
bool supportsGeneratedValues() const
Definition: dsmeta.hxx:94
void put(const ItemID _id)
Definition: dsmeta.hxx:81
#define DSID_RESPECTRESULTSETTYPE
Definition: dsitems.hxx:93
#define DSID_SCHEMA
Definition: dsitems.hxx:79
#define DSID_ESCAPE_DATETIME
Definition: dsitems.hxx:89
#define DSID_ENABLEOUTERJOIN
Definition: dsitems.hxx:77
#define DSID_AS_BEFORE_CORRNAME
Definition: dsitems.hxx:85
#define DSID_INDEXAPPENDIX
Definition: dsitems.hxx:80
#define DSID_MAX_ROW_SCAN
Definition: dsitems.hxx:92
#define DSID_BOOLEANCOMPARISON
Definition: dsitems.hxx:75
sal_Int32 ItemID
Definition: dsitems.hxx:28
#define DSID_DOSLINEENDS
Definition: dsitems.hxx:83
#define DSID_PARAMETERNAMESUBST
Definition: dsitems.hxx:55
#define DSID_CHECK_REQUIRED_FIELDS
Definition: dsitems.hxx:86
#define DSID_PRIMARY_KEY_SUPPORT
Definition: dsitems.hxx:91
#define DSID_IGNOREDRIVER_PRIV
Definition: dsitems.hxx:74
#define DSID_AUTORETRIEVEENABLED
Definition: dsitems.hxx:71
#define DSID_CATALOG
Definition: dsitems.hxx:78
#define DSID_IGNORECURRENCY
Definition: dsitems.hxx:87
#define DSID_SUPPRESSVERSIONCL
Definition: dsitems.hxx:57
#define DSID_APPEND_TABLE_ALIAS
Definition: dsitems.hxx:72
#define DSID_SQL92CHECK
Definition: dsitems.hxx:68
AuthenticationMode
Definition: dsmeta.hxx:37
@ AuthPwd
Definition: dsmeta.hxx:40
@ AuthNone
Definition: dsmeta.hxx:38
@ AuthUserPwd
Definition: dsmeta.hxx:39