Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

iso3166.h File Reference

#include <glib.h>

Go to the source code of this file.

Functions

gint iso3166_encode_cc (const gchar *cc)
 Encodes a valid 2-letter country code into an integer.

void iso3166_init (void)
void iso3166_close (void)
const gchar * iso3166_country_name (gint code)
 Maps a valid encoded country code to the country name.

const gchar * iso3166_country_cc (gint code)
 Maps a valid encoded country code to the 2-letter code.


Function Documentation

void iso3166_close void   ) 
 

const gchar* iso3166_country_cc gint  code  ) 
 

Maps a valid encoded country code to the 2-letter code.

Returns:
NULL integer isn't a validly encoded country code. If the country is valid, a string pointing two the 2-letter code is returned. Each string has its own buffer which is only free()d by iso3166_close().

const gchar* iso3166_country_name gint  code  ) 
 

Maps a valid encoded country code to the country name.

Returns:
NULL integer isn't a validly encoded country code. If the country is valid, a string pointing two the country name is returned. Each string has its own buffer which is only free()d by iso3166_close().

gint iso3166_encode_cc const gchar *  cc  ) 
 

Encodes a valid 2-letter country code into an integer.

Returns:
-1 if the given string is obviously not a 2-letter country code.

void iso3166_init void   ) 
 


Generated on Sun Feb 12 10:50:04 2006 for Gtk-Gnutella by doxygen 1.3.6