FDO .NET API Reference Feature Data Objects

mgIConnectionImp.h

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

Comments or suggestions? Send us feedback.