#include "common.h"
#include "version.h"
#include "token.h"
#include "settings.h"
#include "if/gnet_property.h"
#include "if/gnet_property_priv.h"
#include "lib/atoms.h"
#include "lib/getdate.h"
#include "lib/misc.h"
#include "lib/glib-missing.h"
#include "lib/tm.h"
#include "lib/utf8.h"
#include "lib/override.h"
Defines | |
#define | SECS_PER_DAY 86400 |
Functions | |
RCSID ("$Id:version.c, v 1.19 2005/12/21 13:43:04 rmanfredi Exp $") | |
const gchar * | version_get_string (void) |
Get version string. | |
guint8 | version_get_code (void) |
Get version code (year/month coded in one byte). | |
void | version_dump (const gchar *str, const version_t *ver, const gchar *cmptag) |
Dump original version string and decompiled form to stdout. | |
const gchar * | version_str (const version_t *ver) |
void | version_stamp (const gchar *str, version_t *ver) |
Parse gtk-gnutella's version number in User-Agent/Server string `str' and extract timestamp into `ver'. | |
gboolean | version_parse (const gchar *str, version_t *ver) |
Parse gtk-gnutella's version number in User-Agent/Server string `str' and extract relevant information into `ver'. | |
gint | version_tagcmp (guchar a, guchar b) |
Compare two tag chars, assuming version numbers are equal. | |
gint | version_cmp (const version_t *a, const version_t *b) |
Compare two gtk-gnutella versions, timestamp not withstanding. | |
gboolean | version_fill (const gchar *version, version_t *vs) |
Parse vendor string and fill supplied version structure `vs'. | |
void | version_new_found (const gchar *text, gboolean stable) |
Invoked when a newer version is found. | |
gboolean | version_check (const gchar *str, const gchar *token, const host_addr_t addr) |
Check version of servent, and if it's a gtk-gnutella more recent than we are, record that fact and change the status bar. | |
void | version_init (void) |
Initialize version string. | |
void | version_maybe_refuse (gint overtime) |
Called when the version has expired since the indicated amount. | |
void | version_ancient_warn (void) |
Called after GUI initialized to warn them about an ancient version. | |
gboolean | version_is_too_old (const gchar *vendor) |
Check the timestamp in the GTKG version string and returns TRUE if it is too old or could not be parsed, FALSE if OK. | |
void | version_close (void) |
Free version string. | |
Variables | |
gchar * | version_string = NULL |
gchar * | version_short_string = NULL |
version_t | our_version |
version_t | last_rel_version |
version_t | last_dev_version |
guint8 | version_code |
|
|
|
|
|
Called after GUI initialized to warn them about an ancient version. (over a year old). If the version being ran is not a stable one, warn after 60 days, otherwise warn after a year. If we're not "expired" yet but are approaching the deadline, start to remind them. After the deadline plus some grace period, refuse to run unless a special property is set. |
|
Check version of servent, and if it's a gtk-gnutella more recent than we are, record that fact and change the status bar. The `addr' is being passed solely for the tok_version_valid() call.
|
|
Free version string.
|
|
Compare two gtk-gnutella versions, timestamp not withstanding.
|
|
Dump original version string and decompiled form to stdout.
|
|
Parse vendor string and fill supplied version structure `vs'.
|
|
Get version code (year/month coded in one byte).
|
|
Get version string.
|
|
Initialize version string.
|
|
Check the timestamp in the GTKG version string and returns TRUE if it is too old or could not be parsed, FALSE if OK.
|
|
Called when the version has expired since the indicated amount. If that amount is greater than our grace period, refuse to run unless they set the "ancient_version_force" property explicitly. |
|
Invoked when a newer version is found.
|
|
Parse gtk-gnutella's version number in User-Agent/Server string `str' and extract relevant information into `ver'.
|
|
Parse gtk-gnutella's version number in User-Agent/Server string `str' and extract timestamp into `ver'.
|
|
|
|
Compare two tag chars, assuming version numbers are equal.
|
|
|
|
|
|
|
|
|
|
|
|
|