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

mrss_generic.c

Go to the documentation of this file.
00001 /* mRss - Copyright (C) 2005 bakunin - Andrea Marchesini 
00002  *                                <bakunin@autistici.org>
00003  *
00004  * This source code is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Public License as published 
00006  * by the Free Software Foundation; either version 2 of the License,
00007  * or (at your option) any later version.
00008  *
00009  * This source code 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.
00012  * Please refer to the GNU Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Public License along with
00015  * this source code; if not, write to:
00016  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017  */
00018 
00019 #ifdef HAVE_CONFIG_H
00020 #include <config.h>
00021 #else
00022 # error Use configure; make; make install
00023 #endif
00024 
00025 #include "mrss.h"
00026 #include "mrss_internal.h"
00027 
00028 char *
00029 mrss_strerror (mrss_error_t err)
00030 {
00031   switch (err)
00032     {
00033     case MRSS_OK:
00034       return "Success";
00035 
00036     case MRSS_ERR_PARSER:
00037       return "Parser error";
00038 
00039     case MRSS_ERR_VERSION:
00040       return "Version error";
00041 
00042     case MRSS_ERR_DATA:
00043       return "No correct paramenter in the function";
00044 
00045     default:
00046       return strerror (errno);
00047     }
00048 }
00049 
00050 mrss_error_t
00051 mrss_element (mrss_generic_t element, mrss_element_t * ret)
00052 {
00053   mrss_t *tmp;
00054 
00055   if (!element || !ret)
00056     return MRSS_ERR_DATA;
00057 
00058   tmp=(mrss_t *)element;
00059   *ret = tmp->element;
00060   return MRSS_OK;
00061 }
00062 
00063 /* EOF */

Generated on Thu Jul 28 12:15:04 2005 for libmrss by  doxygen 1.4.3-20050530