/* * The Npic library * * Copyright (C) 2003 Edouard Thiel * * This library is free software under the terms of the * GNU Lesser General Public License (LGPL) version 2.1. */ /* * files_hints.h - 15/10/2010 * * Hints in filenames */ #ifndef NPIC__FILES_HINTS_H #define NPIC__FILES_HINTS_H /* PUBLIC */ /* PRIVATE */ typedef enum { NPIC_COMPRESS_NONE, NPIC_COMPRESS_GZ, NPIC_COMPRESS_BZ2, NPIC_COMPRESS_7Z } Npic_file_compress; #define NPIC_FILE_HINTS 1024 typedef struct { char *filename; /* file name with hints */ char *realname; /* file name without hints */ char *extension; /* last extension before .gz|bz2|7z */ char *hints[NPIC_FILE_HINTS]; /* NULL-terminated */ Npic_file_compress comp; } Npic_file_hints; int NpicFileParseHints (const char *filename, Npic_file_hints *h); void NpicFileFreeHints (Npic_file_hints *h); int NpicFileHint (Npic_file_hints *h, const char *hint); int NpicFileCheckHints (Npic_file_hints *h, const char *allowed_list[]); #endif /* NPIC__FILES_HINTS_H */