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

mrss_generic.c File Reference

#include "mrss.h"
#include "mrss_internal.h"

Include dependency graph for mrss_generic.c:

Go to the source code of this file.

Functions

char * mrss_strerror (mrss_error_t err)
mrss_error_t mrss_element (mrss_generic_t element, mrss_element_t *ret)


Function Documentation

mrss_error_t mrss_element mrss_generic_t  element,
mrss_element_t ret
 

This functions returns the mrss_element_t of a mrss data struct.

Parameters:
element it is the element that you want check
ret it is a pointer to a mrss_element_t. It will be sets.
Returns:
the error code

Definition at line 51 of file mrss_generic.c.

References mrss_t::element, MRSS_ERR_DATA, and MRSS_OK.

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 }

char* mrss_strerror mrss_error_t  err  ) 
 

This function returns a static string with the description of error code

Parameters:
err the error code that you need as string
Returns:
a string. Don't free this string!

Definition at line 29 of file mrss_generic.c.

References MRSS_ERR_DATA, MRSS_ERR_PARSER, MRSS_ERR_VERSION, and MRSS_OK.

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 }


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