CTWave Connection Holder Functions

Name

CTWave Connection Holder Functions -- CTWave Connection object management functions.

Synopsis


#include ctwave/ctwave-connection-holder.h


struct      CTWaveConnectionHolder;
CTWaveConnectionHolder* ctwave_connection_holder_new
                                            (gshort size,
                                             CS_CONTEXT *context,
                                             const gchar *ifile,
                                             const gchar *login,
                                             const gchar *password,
                                             const gchar *server,
                                             const gchar *database);
CTWaveConnectionHolder* ctwave_connection_holder_default_new
                                            ();
void        ctwave_connection_holder_del    (CTWaveConnectionHolder *holder);

CTWaveConnectionHolder* ctwave_connection_holder_current_db
                                            ();
WaveResult  ctwave_connection_holder_set_db (CTWaveConnectionHolder *holder);

void        ctwave_connection_holder_init   (CTWaveConnectionHolder *holder,
                                             gshort size,
                                             CS_CONTEXT *context,
                                             const gchar *ifile,
                                             const gchar *login,
                                             const gchar *password,
                                             const gchar *server,
                                             const gchar *database);
WaveResult  ctwave_connection_holder_drop   (CTWaveConnectionHolder *holder);
void        ctwave_connection_holder_set_locale
                                            (CTWaveConnectionHolder *holder,
                                             const gchar *loc);

Description

These functions manage the connection holder objects which contain the actual connection data.

Details

struct CTWaveConnectionHolder

struct CTWaveConnectionHolder {
  gshort      optimal_size;
  gchar      *ifile;
  gchar      *server;
  gchar      *login;
  gchar      *password;
  gchar      *database;
  gchar      *loc_name;
  CS_CONTEXT *context;
};

Use internals at your own risk.


ctwave_connection_holder_new ()

CTWaveConnectionHolder* ctwave_connection_holder_new
                                            (gshort size,
                                             CS_CONTEXT *context,
                                             const gchar *ifile,
                                             const gchar *login,
                                             const gchar *password,
                                             const gchar *server,
                                             const gchar *database);

Constructs a new CTWave Connection Holder Object. Init is called with the passed arguments.

size: Optimal size of the connection list.
context: CT-Lib context pointer.
ifile: Interfaces file location or NULL for default.
login: Sybase user name.
password: Sybase password.
server: Sybase server or NULL for default.
database: Sybase databasej or NULL for default.
Returns : The CTWave Connection Holder Object.


ctwave_connection_holder_default_new ()

CTWaveConnectionHolder* ctwave_connection_holder_default_new
                                            ();

Constructs a new CTWave Connection Holder Object. All attributes are set to zero.

Returns : The CTWave Connection Holder Object.


ctwave_connection_holder_del ()

void        ctwave_connection_holder_del    (CTWaveConnectionHolder *holder);

holder: 


ctwave_connection_holder_current_db ()

CTWaveConnectionHolder* ctwave_connection_holder_current_db
                                            ();

Returns the current connection holder object.

Returns : CTWave Connection Holder Object or NULL.


ctwave_connection_holder_set_db ()

WaveResult  ctwave_connection_holder_set_db (CTWaveConnectionHolder *holder);

Makes the apecified connection holder object current.

holder: CTWave Connection Holder Object.
Returns : WAVE_OK or WAVE_FAIL.


ctwave_connection_holder_init ()

void        ctwave_connection_holder_init   (CTWaveConnectionHolder *holder,
                                             gshort size,
                                             CS_CONTEXT *context,
                                             const gchar *ifile,
                                             const gchar *login,
                                             const gchar *password,
                                             const gchar *server,
                                             const gchar *database);

Adds the Connection Holder Object to the connection holder list.

holder: CTWave Connection Holder Object.
size: Optimal size of the connection list.
context: CT-Lib context pointer.
ifile: Interfaces file location or NULL for default.
login: Sybase user name.
password: Sybase password.
server: Sybase server or NULL for default.
database: Sybase databasej or NULL for default.


ctwave_connection_holder_drop ()

WaveResult  ctwave_connection_holder_drop   (CTWaveConnectionHolder *holder);

Removes the specified connection holder object from the connection holder list.

holder: CTWave Connection Holder Object.
Returns : WAVE_OK or WAVE_FAIL.


ctwave_connection_holder_set_locale ()

void        ctwave_connection_holder_set_locale
                                            (CTWaveConnectionHolder *holder,
                                             const gchar *loc);

Sets the "loc_name" for the specified connection holder object.

holder: CTWave Connection Holder Object.
loc: Locale name.