var.h

00001 /*
00002  * Copyright (c) 2005-2012 by KoanLogic s.r.l. <http://www.koanlogic.com>
00003  * All rights reserved.
00004  *
00005  * This file is part of KLone, and as such it is subject to the license stated
00006  * in the LICENSE file which you have received as part of this distribution.
00007  *
00008  * $Id: var.h,v 1.8 2006/01/09 12:38:38 tat Exp $
00009  */
00010 
00011 #ifndef _KLONE_VAR_H_
00012 #define _KLONE_VAR_H_
00013 
00014 #include <sys/types.h>
00015 #include <u/libu.h>
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020 
00021 struct var_s;
00022 typedef struct var_s var_t;
00023 
00024 int var_create(const char* name, const char *value, var_t**);
00025 int var_bin_create(const char* name, const unsigned char *data, size_t size, 
00026         var_t**);
00027 int var_free(var_t*);
00028 
00029 const char* var_get_name(var_t *v);
00030 const char* var_get_value(var_t *v);
00031 size_t var_get_value_size(var_t *v);
00032 
00033 u_string_t* var_get_name_s(var_t *v);
00034 u_string_t* var_get_value_s(var_t *v);
00035 
00036 int var_set(var_t*, const char *name, const char *value);
00037 int var_set_name(var_t *v, const char *name);
00038 int var_set_value(var_t *v, const char *value);
00039 int var_set_bin_value(var_t *v, const unsigned char *data, size_t size);
00040 
00041 void var_set_opaque(var_t *v, void *blob);
00042 void* var_get_opaque(var_t *v);
00043 
00044 #ifdef __cplusplus
00045 }
00046 #endif 
00047 
00048 #endif

←Products
Copyright © 2005-2012 - KoanLogic S.r.l. - All rights reserved