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

Go to the source code of this file.

Typedefs

typedef struct KSI_FsClient_st KSI_FsClient
 

Functions

int KSI_FsClient_new (KSI_CTX *ctx, KSI_NetworkClient **client)
 
int KSI_FsClient_setPublicationUrl (KSI_NetworkClient *client, const char *path)
 
int KSI_FsClient_setExtender (KSI_NetworkClient *client, const char *path, const char *user, const char *pass)
 
int KSI_FsClient_setAggregator (KSI_NetworkClient *client, const char *path, const char *user, const char *pass)
 
int KSI_FsClient_extractPath (const char *uri, char **path)
 

Typedef Documentation

typedef struct KSI_FsClient_st KSI_FsClient

Function Documentation

int KSI_FsClient_extractPath ( const char *  uri,
char **  path 
)

Extract file path from URI

Parameters
[in]uriFile URI.
[out]pathPath to the file
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_FsClient_new ( KSI_CTX ctx,
KSI_NetworkClient **  client 
)

Creates a new file system client.

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

Setter for the file system aggregator parameters.

Parameters
[in]clientPointer to tcp client.
[in]pathPath to the file.
[in]userNULL-terminated user name
[in]passNULL-terminated password
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
It must be noted that access to metadata, supported by some file systems, is limited by the use of function fopen. Alternate Data Streams (WIndows NTFS) and Resource Forks (OS X HFS) may or may not be supported, depending on the C standard library used in the application.
int KSI_FsClient_setExtender ( KSI_NetworkClient client,
const char *  path,
const char *  user,
const char *  pass 
)

Setter for the file system client extender parameters.

Parameters
[in]clientPointer to tcp client.
[in]pathPath to the file.
[in]userNULL-terminated user name
[in]passNULL-terminated password
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
It must be noted that access to metadata, supported by some file systems, is limited by the use of function fopen. Alternate Data Streams (WIndows NTFS) and Resource Forks (OS X HFS) may or may not be supported, depending on the C standard library used in the application.
int KSI_FsClient_setPublicationUrl ( KSI_NetworkClient client,
const char *  path 
)

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]pathNull-terminated file path.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
It must be noted that access to metadata, supported by some file systems, is limited by the use of function fopen. Alternate Data Streams (WIndows NTFS) and Resource Forks (OS X HFS) may or may not be supported, depending on the C standard library used in the application.