X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=lib%2Fsilcclient%2Fsilcclient.h;h=928650c788e8bfff98e8dd81c6b9bbec974bf0ad;hp=88370db685a77b071ef8978f547fd40737278cd4;hb=275e2f50c1cbe4a0eec582cf490ef485049541af;hpb=7039cf461d3d2951acc2f3e123ccc1d68a55931d diff --git a/lib/silcclient/silcclient.h b/lib/silcclient/silcclient.h index 88370db6..928650c7 100644 --- a/lib/silcclient/silcclient.h +++ b/lib/silcclient/silcclient.h @@ -254,6 +254,28 @@ typedef enum { } SilcClientMessageType; /***/ +/****d* silcclient/SilcClientAPI/SilcClientConnectionStatus + * + * NAME + * + * typedef enum { ... } SilcClientConnectionStatus + * + * DESCRIPTION + * + * This type is returned to the `connect' client operation to indicate + * the status of the created connection. It can indicated if it was + * successful or whether an error occurred. + * + * SOURCE + */ +typedef enum { + SILC_CLIENT_CONN_SUCCESS, /* Successfully connected */ + SILC_CLIENT_CONN_SUCCESS_RESUME, /* Successfully connected and + resumed old detached session */ + SILC_CLIENT_CONN_ERROR, /* Error occurred during connecting */ +} SilcClientConnectionStatus; +/***/ + /****s* silcclient/SilcClientAPI/SilcClientOperations * * NAME @@ -346,9 +368,11 @@ typedef struct { /* Called to indicate that connection was either successfully established or connecting failed. This is also the first time application receives the SilcClientConnection object which it should save somewhere. - If the `success' is FALSE the application must always call the function + The `status' indicated whether the connection were successful. If it + is error value the application must always call the function silc_client_close_connection. */ - void (*connect)(SilcClient client, SilcClientConnection conn, int success); + void (*connect)(SilcClient client, SilcClientConnection conn, + SilcClientConnectionStatus status); /* Called to indicate that connection was disconnected to the server. */ void (*disconnect)(SilcClient client, SilcClientConnection conn);