All Data Structures Files Functions Variables Typedefs Macros
msv.h
Go to the documentation of this file.
#ifndef _MSV_H
#define _MSV_H 1
#define LIBMSV_ERROR_SUCCESS 0
#define LIBMSV_ERROR_INVALID 1
#define LIBMSV_ERROR_NOENVVAR 2
#define LIBMSV_ERROR_CURLINIT_FAILED 3
#define LIBMSV_ERROR_CURLCODE 4
#define LIBMSV_ERROR_INCOMPATIBLE_AGENT 5
#define LIBMSV_ERROR_BADARG 6
#define LIBMSV_ERROR_UNEXPECTED_RESPONSE 7
struct msv_ctxt;
typedef struct msv_ctxt *msv_ctxt_t;
struct msv_query
{
const char *context;
const char *peertype;
const char *peername;
const char *pkctype;
const char *pkcdata;
};
struct msv_response
{
int valid;
char *message;
size_t sz;
};
extern msv_ctxt_t msv_ctxt_init (const char *url);
extern void msv_ctxt_destroy (msv_ctxt_t ctx);
extern const char *msv_strerror (msv_ctxt_t ctx, int error_code);
extern int msv_check_msva (msv_ctxt_t ctx);
extern int msv_query_agent (msv_ctxt_t ctx, struct msv_query q,
struct msv_response **response_ptr);
extern void msv_response_destroy (struct msv_response *response);
#endif /* _MSV_H */