FDO .NET API Reference Feature Data Objects

mgIConnection.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\mgConnectionState.h"
00022 #include "FDO\Commands\mgCommandType.h"
00023 
00024 BEGIN_NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES
00025 public __gc __interface IConnectionCapabilities;
00026 public __gc __interface ISchemaCapabilities;
00027 public __gc __interface ICommandCapabilities;
00028 public __gc __interface IFilterCapabilities;
00029 public __gc __interface IExpressionCapabilities;
00030 public __gc __interface IRasterCapabilities;
00031 public __gc __interface ITopologyCapabilities;
00032 public __gc __interface IGeometryCapabilities;
00033 END_NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES
00034 
00035 BEGIN_NAMESPACE_OSGEO_FDO_COMMANDS
00036 public __gc __interface ICommand;
00037 END_NAMESPACE_OSGEO_FDO_COMMANDS
00038 
00039 BEGIN_NAMESPACE_OSGEO_FDO_COMMANDS_SCHEMA
00040 public __gc class PhysicalSchemaMapping;
00041 END_NAMESPACE_OSGEO_FDO_COMMANDS_SCHEMA
00042 
00043 BEGIN_NAMESPACE_OSGEO_COMMON_IO
00044 public __gc class IoStream;
00045 END_NAMESPACE_OSGEO_COMMON_IO
00046 
00047 using namespace NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES;
00048 using namespace NAMESPACE_OSGEO_FDO_COMMANDS;
00049 using namespace NAMESPACE_OSGEO_FDO_COMMANDS_SCHEMA;
00050 
00051 BEGIN_NAMESPACE_OSGEO_FDO_CONNECTIONS
00052 public __gc __interface IConnectionInfo;
00053 public __gc __interface ITransaction;
00054 
00055 /// \ingroup (OSGeoFDOConnections)
00056 /// \interface OSGeo::FDO::Connections::IConnection
00057 /// \brief
00058 /// The IConnection interface enables a feature provider to implement a
00059 /// connection class, which represents a unique session with a data
00060 /// store.
00061 public __gc __interface IConnection : public System::IDisposable
00062 {
00063 public:
00064     /// \brief
00065     /// Gets an IConnectionCapabilities interface describing the capabilities
00066     /// of the connection.
00067     /// 
00068     /// \return
00069     /// Returns the connection capabilities
00070     /// 
00071     __property NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::IConnectionCapabilities* get_ConnectionCapabilities();
00072 
00073     /// \brief
00074     /// Gets an ISchemaCapabilities interface describing the provider's support for the feature schema.
00075     /// 
00076     /// \return
00077     /// Returns schema capabilities
00078     /// 
00079     __property NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ISchemaCapabilities* get_SchemaCapabilities();
00080 
00081     /// \brief
00082     /// Gets an ICommandCapabilities interface describing the commands a provider supports.
00083     /// 
00084     /// \return
00085     /// Returns the command capabilities
00086     /// 
00087     __property NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ICommandCapabilities* get_CommandCapabilities();
00088 
00089     /// \brief
00090     /// Gets an IFilterCapabilities interface describing the provider's support for filters.
00091     /// 
00092     /// \return
00093     /// Returns the filter capabilities
00094     /// 
00095     __property NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::IFilterCapabilities* get_FilterCapabilities();
00096 
00097     /// \brief
00098     /// Gets an IExpressionCapabilities interface describing the provider's support for expressions.
00099     /// 
00100     /// \return
00101     /// Returns the expression capabilities
00102     /// 
00103     __property NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::IExpressionCapabilities* get_ExpressionCapabilities();
00104 
00105     /// \brief
00106     /// Gets an IRasterCapabilities interface describing the provider's support for raster images.
00107     /// 
00108     /// \return
00109     /// Returns the raster capabilities
00110     /// 
00111     __property NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::IRasterCapabilities* get_RasterCapabilities();
00112 
00113     /// \brief
00114     /// Gets an ITopologyCapabilities interface describing the provider's support for topology.
00115     /// 
00116     /// \return
00117     /// Returns the topology capabilities
00118     /// 
00119     __property NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ITopologyCapabilities* get_TopologyCapabilities();
00120 
00121     /// \brief
00122     /// Gets an IGeometryCapabilities interface describing the provider's support for geometry.
00123     /// 
00124     /// \return
00125     /// Returns the geometry capabilities
00126     /// 
00127     __property NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::IGeometryCapabilities* get_GeometryCapabilities();
00128 
00129     /// \brief
00130     /// Gets the connection string used to open a DataStore.
00131     /// 
00132     /// \return
00133     /// Returns the connection string
00134     /// 
00135     __property  System::String* get_ConnectionString();
00136 
00137     /// \brief
00138     /// Sets the connection string used to open a DataStore. SetConnectionString can only be set while the
00139     /// connection is closed.
00140     /// 
00141     /// \param value 
00142     /// Input the connection string
00143     /// 
00144     /// \return
00145     /// Returns nothing
00146     /// 
00147     __property System::Void set_ConnectionString( System::String* value);
00148 
00149     /// \brief
00150     /// Gets an IConnectionInfo interface that can be used to interrogate and set connection properties.
00151     /// 
00152     /// \return
00153     /// Returns the connection info
00154     /// 
00155     __property NAMESPACE_OSGEO_FDO_CONNECTIONS::IConnectionInfo* get_ConnectionInfo();
00156 
00157     /// \brief
00158     /// Gets the current state of the connection.
00159     /// 
00160     /// \return
00161     /// Returns the current state of the connection
00162     /// 
00163     __property NAMESPACE_OSGEO_FDO_CONNECTIONS::ConnectionState get_ConnectionState();
00164 
00165     /// \brief
00166     /// Gets the number of milliseconds to wait while trying to establish a
00167     /// connection before terminating the attempt and generating an error. If
00168     /// the provider does not support the timeout capability 0 will be returned
00169     /// 
00170     /// \return
00171     /// Returns the time to wait (in milliseconds)
00172     /// 
00173     __property System::Int32 get_ConnectionTimeout();
00174 
00175     /// \brief
00176     /// Sets the number of milliseconds to wait while trying to establish a
00177     /// connection before terminating the attempt and generating an error. If
00178     /// the provider does not support the timeout capability then attempting to
00179     /// set a timeout will result in an exception
00180     /// 
00181     /// \param value 
00182     /// Input the time to wait (in milliseconds)
00183     /// 
00184     /// \return
00185     /// Returns nothing
00186     /// 
00187     __property System::Void set_ConnectionTimeout(System::Int32 value);
00188 
00189     /// \brief
00190     /// Opens a feature connection with the settings specified by the
00191     /// ConnectionString attribute of the provider-specific feature connection
00192     /// object.
00193     /// 
00194     /// \return
00195     /// Returns nothing
00196     /// 
00197     NAMESPACE_OSGEO_FDO_CONNECTIONS::ConnectionState Open();
00198 
00199     /// \brief
00200     /// Closes the connection to the DataStore
00201     /// 
00202     /// \return
00203     /// Returns nothing
00204     /// 
00205     System::Void Close();
00206 
00207     /// \brief
00208     /// Begins a transaction and returns an object that realizes
00209     /// ITransaction.
00210     /// 
00211     /// \return
00212     /// Returns the transaction
00213     /// 
00214     NAMESPACE_OSGEO_FDO_CONNECTIONS::ITransaction* BeginTransaction();
00215 
00216     /// \brief
00217     /// Creates and returns the specified type of command object associated with
00218     /// the connection.
00219     /// 
00220     /// \param commandType 
00221     /// Input the command type to be created
00222     /// 
00223     /// \return
00224     /// Returns the command
00225     /// 
00226     NAMESPACE_OSGEO_FDO_COMMANDS::ICommand* CreateCommand(NAMESPACE_OSGEO_FDO_COMMANDS::CommandType commandType);
00227 
00228     /// \brief
00229     /// Factory function that creates an empty Schema Override set specific
00230     /// to this FDO Provider.
00231     /// 
00232     /// \return
00233     /// Returns PhysicalSchemaMapping
00234     /// 
00235     NAMESPACE_OSGEO_FDO_COMMANDS_SCHEMA::PhysicalSchemaMapping* CreateSchemaMapping();
00236 
00237     /// \brief
00238     /// Sets the XML configuration stream used to configure the Data Store. 
00239     /// SetConfiguration can only be called while the connection is closed.
00240     /// 
00241     /// \param configStream 
00242     /// Input the XML configuration stream
00243     /// 
00244     /// \return
00245     /// Returns nothing
00246     /// 
00247     __property System::Void set_Configuration( NAMESPACE_OSGEO_COMMON_IO::IoStream* configStream);
00248 
00249     /// \brief
00250     /// Forces the writes of any cached data to the targed datastore.
00251     /// 
00252     /// \return
00253     /// Returns nothing
00254     /// 
00255     System::Void Flush();
00256 };
00257 
00258 END_NAMESPACE_OSGEO_FDO_CONNECTIONS
00259 
00260 

Comments or suggestions? Send us feedback.