Ejemplo n.º 1
0
int ptype_timestamp_mod_register(struct mod_reg *mod) {

	static struct ptype_reg_info pt_timestamp;
	memset(&pt_timestamp, 0, sizeof(struct ptype_reg_info));

	pt_timestamp.name = "timestamp";
	pt_timestamp.api_ver = PTYPE_API_VER;

	pt_timestamp.alloc = ptype_timestamp_alloc;
	pt_timestamp.cleanup = ptype_timestamp_cleanup;
	
	pt_timestamp.print_val = ptype_timestamp_print;
	pt_timestamp.compare_val = ptype_timestamp_compare;
	pt_timestamp.serialize = ptype_timestamp_serialize;
	pt_timestamp.unserialize = ptype_timestamp_unserialize;
	pt_timestamp.copy = ptype_timestamp_copy;
	pt_timestamp.value_size = ptype_timestamp_value_size;

	pt_timestamp.ops = PTYPE_OP_ALL;

	return ptype_register(&pt_timestamp, mod);

}
Ejemplo n.º 2
0
int ptype_bool_mod_register(struct mod_reg *mod) {

	static struct ptype_reg_info pt_bool;
	memset(&pt_bool, 0, sizeof(struct ptype_reg_info));

	pt_bool.name = "bool";
	pt_bool.api_ver = PTYPE_API_VER;

	pt_bool.alloc = ptype_bool_alloc;
	pt_bool.cleanup = ptype_bool_cleanup;
	
	pt_bool.parse_val = ptype_bool_parse;
	pt_bool.print_val = ptype_bool_print;
	pt_bool.compare_val = ptype_bool_compare;
	pt_bool.serialize = ptype_bool_serialize;
	pt_bool.unserialize = ptype_bool_parse;
	pt_bool.copy = ptype_bool_copy;
	pt_bool.value_size = ptype_bool_value_size;

	pt_bool.ops = PTYPE_OP_ALL;

	return ptype_register(&pt_bool, mod);

}
Ejemplo n.º 3
0
int ptype_uint16_mod_register(struct mod_reg *mod) {

	static struct ptype_reg_info pt_u16;
	memset(&pt_u16, 0, sizeof(struct ptype_reg_info));

	pt_u16.name = "uint16";
	pt_u16.api_ver = PTYPE_API_VER;

	pt_u16.alloc = ptype_uint16_alloc;
	pt_u16.cleanup = ptype_uint16_cleanup;
	
	pt_u16.parse_val = ptype_uint16_parse;
	pt_u16.print_val = ptype_uint16_print;
	pt_u16.compare_val = ptype_uint16_compare;
	pt_u16.serialize = ptype_uint16_serialize;
	pt_u16.unserialize = ptype_uint16_parse;
	pt_u16.copy = ptype_uint16_copy;
	pt_u16.value_size = ptype_uint16_value_size;

	pt_u16.ops = PTYPE_OP_ALL;

	return ptype_register(&pt_u16, mod);

}
Ejemplo n.º 4
0
int ptype_uint64_mod_register(struct mod_reg *mod) {

	static struct ptype_reg_info pt_u64;
	memset(&pt_u64, 0, sizeof(struct ptype_reg_info));

	pt_u64.name = "uint64";
	pt_u64.api_ver = PTYPE_API_VER;

	pt_u64.alloc = ptype_uint64_alloc;
	pt_u64.cleanup = ptype_uint64_cleanup;
	
	pt_u64.parse_val = ptype_uint64_parse;
	pt_u64.print_val = ptype_uint64_print;
	pt_u64.compare_val = ptype_uint64_compare;
	pt_u64.serialize = ptype_uint64_serialize;
	pt_u64.unserialize = ptype_uint64_parse;
	pt_u64.copy = ptype_uint64_copy;
	pt_u64.value_size = ptype_uint64_value_size;

	pt_u64.ops = PTYPE_OP_ALL;

	return ptype_register(&pt_u64, mod);

}