Guardtime KSI c SDK
Typedefs | Functions
net_http.h File Reference
#include "net.h"
#include "common.h"

Go to the source code of this file.

Typedefs

typedef struct KSI_HttpClient_st KSI_HttpClient
 

Functions

int KSI_HttpClient_new (KSI_CTX *ctx, KSI_NetworkClient **http)
 
int KSI_AbstractHttpClient_new (KSI_CTX *ctx, KSI_NetworkClient **http)
 
int KSI_HttpClient_setPublicationUrl (KSI_NetworkClient *client, const char *val)
 
int KSI_HttpClient_setConnectTimeoutSeconds (KSI_NetworkClient *client, int val)
 
int KSI_HttpClient_setReadTimeoutSeconds (KSI_NetworkClient *client, int val)
 
int KSI_HttpClient_setExtender (KSI_NetworkClient *client, const char *url, const char *user, const char *key)
 
int KSI_HttpClient_setAggregator (KSI_NetworkClient *client, const char *url, const char *user, const char *key)
 
int KSI_HttpAsyncClient_new (KSI_CTX *ctx, KSI_AsyncClient **c)
 
int KSI_HttpAsyncClient_setService (KSI_AsyncClient *c, const char *url, const char *user, const char *pass)
 
int KSI_Http_init (KSI_CTX *ctx)
 

Typedef Documentation

typedef struct KSI_HttpClient_st KSI_HttpClient

Function Documentation

int KSI_AbstractHttpClient_new ( KSI_CTX ctx,
KSI_NetworkClient **  http 
)

Creates a new http client.

Parameters
[in]ctxKSI context.
[out]httpPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_Http_init ( KSI_CTX ctx)

Initialize HTTP implementation globals.

Parameters
[in]ctxKSI context.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_HttpAsyncClient_new ( KSI_CTX ctx,
KSI_AsyncClient **  c 
)

Creates a new HTTP async client.

Parameters
[in]ctxKSI context.
[out]cPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
See also
KSI_AsyncClient_free
KSI_HttpAsyncClient_setService
int KSI_HttpAsyncClient_setService ( KSI_AsyncClient c,
const char *  url,
const char *  user,
const char *  pass 
)

Setter for the HTTP service endpoint parameters.

Parameters
[in]cPointer to tcp async client.
[in]urlHost name.
[in]userUser name.
[in]passHMAC shared secret.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
See also
KSI_HttpAsyncClient_new
int KSI_HttpClient_new ( KSI_CTX ctx,
KSI_NetworkClient **  http 
)

Creates a new http client.

Parameters
[in]ctxKSI context.
[out]httpPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_HttpClient_setAggregator ( KSI_NetworkClient client,
const char *  url,
const char *  user,
const char *  key 
)

Setter for the http aggregator parameters.

Parameters
[in]clientPointer to http client.
[in]urlHost URL.
[in]userUser name.
[in]keyHMAC shared secret.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_HttpClient_setConnectTimeoutSeconds ( KSI_NetworkClient client,
int  val 
)

Setter for the connection timeout in seconds.

Parameters
[in]clientPointer to the http client.
[in]valTimeout in seconds.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_HttpClient_setExtender ( KSI_NetworkClient client,
const char *  url,
const char *  user,
const char *  key 
)

Setter for the http client extender parameters.

Parameters
[in]clientPointer to http client.
[in]urlHost name.
[in]userUser name.
[in]keyHMAC shared secret.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_HttpClient_setPublicationUrl ( KSI_NetworkClient client,
const char *  val 
)

Setter for the publications file URL. The value will be copied and thus can be freed after successful call.

Parameters
[in]clientPointer to the http client.
[in]valNull-terminated URL.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_HttpClient_setReadTimeoutSeconds ( KSI_NetworkClient client,
int  val 
)

Setter for the read timeout in seconds.

Parameters
[in]clientPointer to the http client.
[in]valTimeout in seconds.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).