supports() method



Hi all!

Well, it wasn't so difficult the addition of new methods to the CORBA
interface. I must confess that I always feel afraid when I think about
touching the IDLs, but I always find out that it's not as difficult than
I thought.

So, the MySQL server is now changed, for the other providers:

* open gda-[provider]srv.c and search for createTable (which is the last
method in the GDA_Connection interface) and add an entry for
impl_GDA_Connection_supports similar to the createTable. That is, you
must add:

    - add the impl_GDA_Connection_supports prototype
    - add "(gpointer) & impl_GDA_Connection_supports" to the end of the
        impl_GDA_Connection_epv structure
    - add the function itself:
        static CORBA_boolean
        impl_GDA_Connection_supports (impl_POA_GDA_Connection *servant,

GDA_Connection_Feature feature,

CORBA_Environment *ev);

In this function, just call gda_[provider]_connection_supports, which
you should implement as:

gboolean
gda_[provider]_connection_supports (Gda_[PROVIDER]_Connection *cnc,

GDA_Connection_Feature feature);

GDA_Connection_Feature is the new enum I added to the IDL. Right now, it
just contains GDA_Connection_FEATURE_TRANSACTIONS.

So, that's all, that was easy!

Another thing, check for your provider if the file gda-[provider]srv.h
is used in any source file. I think it's not being used by any provider,
so if so, remove it from CVS.

Cheers



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]