Main Page | Modules | Data Structures | File List | Data Fields | Globals

internal.h

Go to the documentation of this file.
00001 // $Id: internal.h,v 1.11 2004/10/21 19:01:04 ensc Exp $    --*- c++ -*--
00002 
00003 // Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
00004 //  
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; version 2 of the License.
00008 //  
00009 // This program is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 //  
00014 // You should have received a copy of the GNU General Public License
00015 // along with this program; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017 
00022 #ifndef H_UTIL_VSERVER_LIB_INTERNAL_H
00023 #define H_UTIL_VSERVER_LIB_INTERNAL_H
00024 
00025 #include "fmt.h"
00026 #include <stdlib.h>
00027 #include <stdbool.h>
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033 int     utilvserver_checkCompatVersion();
00034 bool    utilvserver_isDirectory(char const *path, bool follow_link);
00035 bool    utilvserver_isFile(char const *path, bool follow_link);
00036 bool    utilvserver_isLink(char const *path);
00037 
00038 int     utilvserver_listparser_uint32(char const *str, size_t len,
00039                                       char const **err_ptr, size_t *err_len,
00040                                       uint_least32_t *flag,
00041                                       uint_least32_t *mask,
00042                                       uint_least32_t (*func)(char const*,
00043                                                              size_t)) NONNULL((1,5,6,7));
00044   
00045 int     utilvserver_listparser_uint64(char const *str, size_t len,
00046                                       char const **err_ptr, size_t *err_len,
00047                                       uint_least64_t *flag,
00048                                       uint_least64_t *mask,
00049                                       uint_least64_t (*func)(char const*,
00050                                                              size_t)) NONNULL((1,5,6,7));
00051 
00052 struct Mapping_uint32 {
00053     char const * const  id;
00054     size_t                      len;
00055     uint_least32_t              val;
00056 };
00057 
00058 struct Mapping_uint64 {
00059     char const * const  id;
00060     size_t                      len;
00061     uint_least64_t              val;
00062 };
00063   
00064 ssize_t utilvserver_value2text_uint32(char const *str, size_t len,
00065                                       struct Mapping_uint32 const *map,
00066                                       size_t map_len) NONNULL((1,3));
00067 
00068 ssize_t utilvserver_value2text_uint64(char const *str, size_t len,
00069                                       struct Mapping_uint64 const *map,
00070                                       size_t map_len) NONNULL((1,3));
00071 
00072 ssize_t utilvserver_text2value_uint32(uint_least32_t *val,
00073                                       struct Mapping_uint32 const *map,
00074                                       size_t map_len) NONNULL((1,2));
00075   
00076 ssize_t utilvserver_text2value_uint64(uint_least64_t *val,
00077                                       struct Mapping_uint64 const *map,
00078                                       size_t map_len) NONNULL((1,2));
00079 #ifdef __cplusplus
00080 }
00081 #endif
00082 
00083 
00084 #endif  //  H_UTIL_VSERVER_LIB_INTERNAL_H

Generated on Fri Jan 28 17:47:53 2005 for util-vserver (libvserver) by  doxygen 1.4.1