summaryrefslogtreecommitdiffstats
path: root/dom/media/webrtc/transport/third_party/nrappkit/src/registry/registry_vtbl.h
blob: 0f75a03b95342c0b4fdb80fc5579898b32bfb8fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
 *
 *    registry_vtbl.h
 *
 *    $Source: /Users/ekr/tmp/nrappkit-dump/nrappkit/src/registry/registry_vtbl.h,v $
 *    $Revision: 1.2 $
 *    $Date: 2006/08/16 19:39:14 $
 *
 *
 *    Copyright (C) 2006, Network Resonance, Inc.
 *    All Rights Reserved
 *
 *    Redistribution and use in source and binary forms, with or without
 *    modification, are permitted provided that the following conditions
 *    are met:
 *
 *    1. Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *    2. Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *    3. Neither the name of Network Resonance, Inc. nor the name of any
 *       contributors to this software may be used to endorse or promote
 *       products derived from this software without specific prior written
 *       permission.
 *
 *    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
 *    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 *    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 *    ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 *    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 *    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 *    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 *    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 *    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 *    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 *    POSSIBILITY OF SUCH DAMAGE.
 *
 *
 */

#ifndef __REGISTRY_VTBL_H__
#define __REGISTRY_VTBL_H__

typedef struct nr_registry_module_ nr_registry_module;

typedef struct nr_registry_module_vtbl_ {
    int (*init)(nr_registry_module*);

    int (*get_char)(NR_registry name, char *out);
    int (*get_uchar)(NR_registry name, UCHAR *out);
    int (*get_int2)(NR_registry name, INT2 *out);
    int (*get_uint2)(NR_registry name, UINT2 *out);
    int (*get_int4)(NR_registry name, INT4 *out);
    int (*get_uint4)(NR_registry name, UINT4 *out);
    int (*get_int8)(NR_registry name, INT8 *out);
    int (*get_uint8)(NR_registry name, UINT8 *out);
    int (*get_double)(NR_registry name, double *out);
    int (*get_registry)(NR_registry name, NR_registry out);

    int (*get_bytes)(NR_registry name, UCHAR *out, size_t size, size_t *length);
    int (*get_string)(NR_registry name, char *out, size_t size);
    int (*get_length)(NR_registry name, size_t *length);
    int (*get_type)(NR_registry name, NR_registry_type type);

    int (*set_char)(NR_registry name, char data);
    int (*set_uchar)(NR_registry name, UCHAR data);
    int (*set_int2)(NR_registry name, INT2 data);
    int (*set_uint2)(NR_registry name, UINT2 data);
    int (*set_int4)(NR_registry name, INT4 data);
    int (*set_uint4)(NR_registry name, UINT4 data);
    int (*set_int8)(NR_registry name, INT8 data);
    int (*set_uint8)(NR_registry name, UINT8 data);
    int (*set_double)(NR_registry name, double data);
    int (*set_registry)(NR_registry name);

    int (*set_bytes)(NR_registry name, UCHAR *data, size_t length);
    int (*set_string)(NR_registry name, char *data);

    int (*del)(NR_registry name);

    int (*get_child_count)(NR_registry parent, size_t *count);
    int (*get_children)(NR_registry parent, NR_registry *data, size_t size, size_t *length);

    int (*fin)(NR_registry name);

    int (*dump)(int sorted);
} nr_registry_module_vtbl;

struct nr_registry_module_ {
    void *handle;
    nr_registry_module_vtbl *vtbl;
};

#endif