NetSurf
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "utils/config.h"
#include "utils/utsname.h"
#include "desktop/version.h"
#include "utils/log.h"
#include "utils/useragent.h"
Go to the source code of this file.
Macros | |
#define | NETSURF_UA_FORMAT_STRING "Mozilla/5.0 (%s) NetSurf/%d.%d" |
Functions | |
static void | user_agent_build_string (void) |
Prepare core_user_agent_string with a string suitable for use as a user agent in HTTP requests. More... | |
const char * | user_agent_string (void) |
Retrieve the core user agent for this release. More... | |
void | free_user_agent_string (void) |
Free any memory allocated for the user_agent_string. More... | |
Variables | |
static const char * | core_user_agent_string = NULL |
#define NETSURF_UA_FORMAT_STRING "Mozilla/5.0 (%s) NetSurf/%d.%d" |
Definition at line 33 of file useragent.c.
void free_user_agent_string | ( | void | ) |
Free any memory allocated for the user_agent_string.
After calling this, the value returned by user_agent_string() is to be considered invalid.
Definition at line 88 of file useragent.c.
References core_user_agent_string.
Referenced by netsurf_exit().
|
static |
Prepare core_user_agent_string with a string suitable for use as a user agent in HTTP requests.
Definition at line 41 of file useragent.c.
References core_user_agent_string, NETSURF_UA_FORMAT_STRING, netsurf_version_major, netsurf_version_minor, NSLOG, utsname::sysname, and uname().
Referenced by user_agent_string().
const char * user_agent_string | ( | void | ) |
Retrieve the core user agent for this release.
The string returned can be relied upon to exist for the duration of the execution of the program. There is no need to copy it.
Definition at line 79 of file useragent.c.
References core_user_agent_string, and user_agent_build_string().
Referenced by atari_about_show(), fetch_curl_register(), and nsbeos_about().
|
static |
Definition at line 30 of file useragent.c.
Referenced by free_user_agent_string(), user_agent_build_string(), and user_agent_string().