Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 /*
2 *
3 * registry_vtbl.h
4 *
5 * $Source: /Users/ekr/tmp/nrappkit-dump/nrappkit/src/registry/registry_vtbl.h,v $
6 * $Revision: 1.2 $
7 * $Date: 2006/08/16 19:39:14 $
8 *
9 *
10 * Copyright (C) 2006, Network Resonance, Inc.
11 * All Rights Reserved
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 *
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.
22 * 3. Neither the name of Network Resonance, Inc. nor the name of any
23 * contributors to this software may be used to endorse or promote
24 * products derived from this software without specific prior written
25 * permission.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
28 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
31 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 * POSSIBILITY OF SUCH DAMAGE.
38 *
39 *
40 */
42 #ifndef __REGISTRY_VTBL_H__
43 #define __REGISTRY_VTBL_H__
45 typedef struct nr_registry_module_ nr_registry_module;
47 typedef struct nr_registry_module_vtbl_ {
48 int (*init)(nr_registry_module*);
50 int (*get_char)(NR_registry name, char *out);
51 int (*get_uchar)(NR_registry name, UCHAR *out);
52 int (*get_int2)(NR_registry name, INT2 *out);
53 int (*get_uint2)(NR_registry name, UINT2 *out);
54 int (*get_int4)(NR_registry name, INT4 *out);
55 int (*get_uint4)(NR_registry name, UINT4 *out);
56 int (*get_int8)(NR_registry name, INT8 *out);
57 int (*get_uint8)(NR_registry name, UINT8 *out);
58 int (*get_double)(NR_registry name, double *out);
59 int (*get_registry)(NR_registry name, NR_registry out);
61 int (*get_bytes)(NR_registry name, UCHAR *out, size_t size, size_t *length);
62 int (*get_string)(NR_registry name, char *out, size_t size);
63 int (*get_length)(NR_registry name, size_t *length);
64 int (*get_type)(NR_registry name, NR_registry_type type);
66 int (*set_char)(NR_registry name, char data);
67 int (*set_uchar)(NR_registry name, UCHAR data);
68 int (*set_int2)(NR_registry name, INT2 data);
69 int (*set_uint2)(NR_registry name, UINT2 data);
70 int (*set_int4)(NR_registry name, INT4 data);
71 int (*set_uint4)(NR_registry name, UINT4 data);
72 int (*set_int8)(NR_registry name, INT8 data);
73 int (*set_uint8)(NR_registry name, UINT8 data);
74 int (*set_double)(NR_registry name, double data);
75 int (*set_registry)(NR_registry name);
77 int (*set_bytes)(NR_registry name, UCHAR *data, size_t length);
78 int (*set_string)(NR_registry name, char *data);
80 int (*del)(NR_registry name);
82 int (*get_child_count)(NR_registry parent, size_t *count);
83 int (*get_children)(NR_registry parent, NR_registry *data, size_t size, size_t *length);
85 int (*fin)(NR_registry name);
87 int (*dump)(int sorted);
88 } nr_registry_module_vtbl;
90 struct nr_registry_module_ {
91 void *handle;
92 nr_registry_module_vtbl *vtbl;
93 };
95 #endif