NetSurf
corestrings.h
Go to the documentation of this file.
1/*
2 * Copyright 2012 Michael Drake <tlsa@netsurf-browser.org>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19/** \file
20 * Useful interned string pointers (interface).
21 */
22
23#ifndef NETSURF_UTILS_CORESTRINGS_H_
24#define NETSURF_UTILS_CORESTRINGS_H_
25
26#include <libwapcaplet/libwapcaplet.h>
27#include "utils/errors.h"
28
29/** File url prefix. */
30#define FILE_SCHEME_PREFIX "file:///"
31
32/** File url prefix length. */
33#define FILE_SCHEME_PREFIX_LEN 8
34
35/**
36 * Initialise the core string tables
37 *
38 * \return NSERROR_OK on success else appropriate error code
39 */
41
42/**
43 * free resources of core string tables.
44 *
45 * \return NSERROR_OK on success else appropriate error code
46 */
48
49struct dom_string;
50
51/* declare corestrings */
52#define CORESTRING_LWC_VALUE(NAME,VALUE) \
53 extern lwc_string *corestring_lwc_##NAME
54#define CORESTRING_DOM_VALUE(NAME,VALUE) \
55 extern struct dom_string *corestring_dom_##NAME
56#define CORESTRING_NSURL(NAME,VALUE) \
57 extern struct nsurl *corestring_nsurl_##NAME
59#undef CORESTRING_LWC_VALUE
60#undef CORESTRING_DOM_VALUE
61#undef CORESTRING_NSURL
62
63#endif
Core string lists.
nserror corestrings_fini(void)
free resources of core string tables.
Definition: corestrings.c:40
nserror corestrings_init(void)
Initialise the core string tables.
Definition: corestrings.c:78
Error codes.
nserror
Enumeration of error codes.
Definition: errors.h:29