translat.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: translat.h,v 1.10 2008/10/18 17:23:32 tat Exp $
00009  */
00010 
00011 #ifndef _KLONE_TRANSLAT_H_
00012 #define _KLONE_TRANSLAT_H_
00013 
00014 #include <u/libu.h>
00015 #include <klone/io.h>
00016 #include <klone/codecs.h>
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 
00022 enum { URI_BUFSZ = 1024, MIME_BUFSZ = 256, EMSG_BUFSZ = 512 };
00023 
00024 typedef struct trans_info_s
00025 {
00026     char file_in[U_FILENAME_MAX], file_out[U_FILENAME_MAX];
00027     char depend_out[U_FILENAME_MAX];
00028     char uri[URI_BUFSZ], mime_type[MIME_BUFSZ];
00029     char dfun[URI_BUFSZ];
00030     char key[CODEC_CIPHER_KEY_BUFSZ];
00031     char emsg[EMSG_BUFSZ];
00032     int comp;
00033     int encrypt;
00034     size_t file_size;
00035     time_t mtime;
00036 } trans_info_t;
00037 
00038 int translate(trans_info_t*);
00039 
00040 int translate_script_to_c(io_t *in, io_t *out, trans_info_t* ti);
00041 int translate_opaque_to_c(io_t *in, io_t *out, trans_info_t* ti);
00042 int translate_is_a_script(const char *filename);
00043 int translate_makefile_filepath(const char *filepath, const char *prefix, 
00044     char *buf, size_t size);
00045 
00046 #ifdef __cplusplus
00047 }
00048 #endif 
00049 
00050 #endif

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