FDO API Reference Feature Data Objects

IConnection.h

Go to the documentation of this file.
00001 #ifndef _ICONNECTION_H_
00002 #define _ICONNECTION_H_
00003 // 
00004 
00005 //
00006 // Copyright (C) 2004-2006  Autodesk, Inc.
00007 // 
00008 // This library is free software; you can redistribute it and/or
00009 // modify it under the terms of version 2.1 of the GNU Lesser
00010 // General Public License as published by the Free Software Foundation.
00011 // 
00012 // This library is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 // Lesser General Public License for more details.
00016 // 
00017 // You should have received a copy of the GNU Lesser General Public
00018 // License along with this library; if not, write to the Free Software
00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 //
00021 
00022 #ifdef _WIN32
00023 #pragma once
00024 #endif
00025 
00026 #include <FdoStd.h>
00027 #include <Fdo/Commands/ICommand.h>
00028 #include <Fdo/Commands/Schema/PhysicalSchemaMapping.h>
00029 #include <Fdo/Connections/ConnectionException.h>
00030 #include <Fdo/Connections/ConnectionState.h>
00031 #include <Fdo/Connections/IConnection.h>
00032 #include <Fdo/Connections/IConnectionInfo.h>
00033 #include <Fdo/Connections/IConnectionPropertyDictionary.h>
00034 #include <Fdo/Connections/ITransaction.h>
00035 #include <Fdo/Connections/Capabilities/ArgumentDefinition.h>
00036 #include <Fdo/Connections/Capabilities/FunctionDefinition.h>
00037 #include <Fdo/Connections/Capabilities/ICommandCapabilities.h>
00038 #include <Fdo/Connections/Capabilities/IConnectionCapabilities.h>
00039 #include <Fdo/Connections/Capabilities/IExpressionCapabilities.h>
00040 #include <Fdo/Connections/Capabilities/IFilterCapabilities.h>
00041 #include <Fdo/Connections/Capabilities/ISchemaCapabilities.h>
00042 #include <Fdo/Connections/Capabilities/ThreadCapability.h>
00043 #include <Fdo/Connections/Capabilities/IRasterCapabilities.h>
00044 #include <Fdo/Connections/Capabilities/ITopologyCapabilities.h>
00045 #include <Fdo/Connections/Capabilities/IGeometryCapabilities.h>
00046 
00047 class FdoICommand;
00048 
00049 /// \brief
00050 /// The FdoIConnection interface enables a feature provider to implement a
00051 /// connection class, which represents a unique session with a data
00052 /// store.
00053 class FdoIConnection : public FdoIDisposable
00054 {
00055 public:
00056     /// \brief
00057     /// Gets an FdoIConnectionCapabilities interface describing the capabilities
00058     /// of the connection.
00059     /// 
00060     /// \return
00061     /// Returns the connection capabilities
00062     /// 
00063     FDO_API virtual FdoIConnectionCapabilities* GetConnectionCapabilities() = 0;
00064 
00065     /// \brief
00066     /// Gets an FdoISchemaCapabilities interface describing the provider's support for the feature schema.
00067     /// 
00068     /// \return
00069     /// Returns schema capabilities
00070     /// 
00071     FDO_API virtual FdoISchemaCapabilities* GetSchemaCapabilities() = 0;
00072 
00073     /// \brief
00074     /// Gets an FdoICommandCapabilities interface describing the commands a provider supports.
00075     /// 
00076     /// \return
00077     /// Returns the command capabilities
00078     /// 
00079     FDO_API virtual FdoICommandCapabilities* GetCommandCapabilities() = 0;
00080 
00081     /// \brief
00082     /// Gets an FdoIFilterCapabilities interface describing the provider's support for filters.
00083     /// 
00084     /// \return
00085     /// Returns the filter capabilities
00086     /// 
00087     FDO_API virtual FdoIFilterCapabilities* GetFilterCapabilities() = 0;
00088 
00089     /// \brief
00090     /// Gets an FdoIExpressionCapabilities interface describing the provider's support for expressions.
00091     /// 
00092     /// \return
00093     /// Returns the expression capabilities
00094     /// 
00095     FDO_API virtual FdoIExpressionCapabilities* GetExpressionCapabilities() = 0;
00096 
00097     /// \brief
00098     /// Gets an FdoIRasterCapabilities interface describing the provider's support for raster images.
00099     /// 
00100     /// \return
00101     /// Returns the raster capabilities
00102     /// 
00103     FDO_API virtual FdoIRasterCapabilities* GetRasterCapabilities() = 0;
00104 
00105     /// \brief
00106     /// Gets an FdoITopologyCapabilities interface describing the provider's support for topology.
00107     /// 
00108     /// \return
00109     /// Returns the topology capabilities
00110     /// 
00111     FDO_API virtual FdoITopologyCapabilities* GetTopologyCapabilities() = 0;
00112 
00113     /// \brief
00114     /// Gets an FdoIGeometryCapabilities interface describing the provider's support for geometry.
00115     /// 
00116     /// \return
00117     /// Returns the geometry capabilities
00118     /// 
00119     FDO_API virtual FdoIGeometryCapabilities* GetGeometryCapabilities() = 0;
00120 
00121     /// \brief
00122     /// Gets the connection string used to open a DataStore.
00123     /// 
00124     /// \return
00125     /// Returns the connection string
00126     /// 
00127     FDO_API virtual FdoString* GetConnectionString() = 0;
00128 
00129     /// \brief
00130     /// Sets the connection string used to open a DataStore. SetConnectionString can only be set while the
00131     /// connection is closed.
00132     /// 
00133     /// \param value 
00134     /// Input the connection string
00135     /// 
00136     /// \return
00137     /// Returns nothing
00138     /// 
00139     FDO_API virtual void SetConnectionString(FdoString* value) = 0;
00140 
00141     /// \brief
00142     /// Gets an FdoIConnectionInfo interface that can be used to interrogate and set connection properties.
00143     /// 
00144     /// \return
00145     /// Returns the connection info
00146     /// 
00147     FDO_API virtual FdoIConnectionInfo* GetConnectionInfo() = 0;
00148 
00149     /// \brief
00150     /// Gets the current state of the connection.
00151     /// 
00152     /// \return
00153     /// Returns the current state of the connection
00154     /// 
00155     FDO_API virtual FdoConnectionState GetConnectionState() = 0;
00156 
00157     /// \brief
00158     /// Gets the number of milliseconds to wait while trying to establish a
00159     /// connection before terminating the attempt and generating an error. If
00160     /// the provider does not support the timeout capability 0 will be returned
00161     /// 
00162     /// \return
00163     /// Returns the time to wait (in milliseconds)
00164     /// 
00165     FDO_API virtual FdoInt32 GetConnectionTimeout() = 0;
00166 
00167     /// \brief
00168     /// Sets the number of milliseconds to wait while trying to establish a
00169     /// connection before terminating the attempt and generating an error. If
00170     /// the provider does not support the timeout capability then attempting to
00171     /// set a timeout will result in an exception
00172     /// 
00173     /// \param value 
00174     /// Input the time to wait (in milliseconds)
00175     /// 
00176     /// \return
00177     /// Returns nothing
00178     /// 
00179     FDO_API virtual void SetConnectionTimeout(FdoInt32 value) = 0;
00180 
00181     /// \brief
00182     /// Opens a feature connection with the settings specified by the
00183     /// ConnectionString attribute of the provider-specific feature connection
00184     /// object.
00185     /// 
00186     /// \return
00187     /// Returns nothing
00188     /// 
00189     FDO_API virtual FdoConnectionState Open() = 0;
00190 
00191     /// \brief
00192     /// Closes the connection to the DataStore
00193     /// 
00194     /// \return
00195     /// Returns nothing
00196     /// 
00197     FDO_API virtual void Close() = 0;
00198 
00199     /// \brief
00200     /// Begins a transaction and returns an object that realizes
00201     /// FdoITransaction.
00202     /// 
00203     /// \return
00204     /// Returns the transaction
00205     /// 
00206     FDO_API virtual FdoITransaction* BeginTransaction() = 0;
00207 
00208     /// \brief
00209     /// Creates and returns the specified type of command object associated with
00210     /// the connection.
00211     /// 
00212     /// \param commandType 
00213     /// Input the command type to be created
00214     /// 
00215     /// \return
00216     /// Returns the command
00217     /// 
00218     FDO_API virtual FdoICommand* CreateCommand(FdoInt32 commandType) = 0;
00219 
00220     /// \brief
00221     /// Factory function that creates an empty Schema Override set specific
00222     /// to this FDO Provider.
00223     /// 
00224     /// \return
00225     /// Returns FdoPhysicalSchemaMapping
00226     /// 
00227     FDO_API virtual FdoPhysicalSchemaMapping* CreateSchemaMapping() = 0;
00228 
00229     /// \brief
00230     /// Sets the XML configuration stream used to configure the Data Store. 
00231     /// SetConfiguration can only be called while the connection is closed.
00232     /// 
00233     /// \param configStream 
00234     /// Input the XML configuration stream
00235     /// 
00236     /// \return
00237     /// Returns nothing
00238     /// 
00239     FDO_API virtual void SetConfiguration(FdoIoStream* configStream) = 0;
00240 };
00241 #endif
00242 
00243 

Comments or suggestions? Send us feedback.