media/mtransport/third_party/nrappkit/src/registry/registry_int.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

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 #if 0
     2 #define NR_LOG_REGISTRY BLAHBLAH()
     3 #define LOG_REGISTRY BLAHBLAH()
     4 static int BLAHBLAH() {
     5 int blahblah;
     6 r_log_register("registry",&blahblah);
     7 return blahblah;
     8 }
     9 #endif
    11 /*
    12  *
    13  *    registry_int.h
    14  *
    15  *    $Source: /Users/ekr/tmp/nrappkit-dump/nrappkit/src/registry/registry_int.h,v $
    16  *    $Revision: 1.3 $
    17  *    $Date: 2007/06/26 22:37:51 $
    18  *
    19  *    Callback-related functions
    20  *
    21  *
    22  *    Copyright (C) 2005, Network Resonance, Inc.
    23  *    Copyright (C) 2006, Network Resonance, Inc.
    24  *    All Rights Reserved
    25  *
    26  *    Redistribution and use in source and binary forms, with or without
    27  *    modification, are permitted provided that the following conditions
    28  *    are met:
    29  *
    30  *    1. Redistributions of source code must retain the above copyright
    31  *       notice, this list of conditions and the following disclaimer.
    32  *    2. Redistributions in binary form must reproduce the above copyright
    33  *       notice, this list of conditions and the following disclaimer in the
    34  *       documentation and/or other materials provided with the distribution.
    35  *    3. Neither the name of Network Resonance, Inc. nor the name of any
    36  *       contributors to this software may be used to endorse or promote
    37  *       products derived from this software without specific prior written
    38  *       permission.
    39  *
    40  *    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
    41  *    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    42  *    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    43  *    ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
    44  *    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    45  *    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    46  *    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    47  *    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    48  *    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    49  *    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    50  *    POSSIBILITY OF SUCH DAMAGE.
    51  *
    52  *
    53  */
    55 #ifndef __REGISTRY_INT_H__
    56 #define __REGISTRY_INT_H__
    58 #include <sys/types.h>
    59 #include <r_types.h>
    60 #ifndef NO_REG_RPC
    61 #include <rpc/rpc.h>
    62 #endif
    64 extern int NR_LOG_REGISTRY;
    66 int nr_reg_is_valid(NR_registry name);
    68 #define NR_REG_TYPE_CHAR               0
    69 #define NR_REG_TYPE_UCHAR              1
    70 #define NR_REG_TYPE_INT2               2
    71 #define NR_REG_TYPE_UINT2              3
    72 #define NR_REG_TYPE_INT4               4
    73 #define NR_REG_TYPE_UINT4              5
    74 #define NR_REG_TYPE_INT8               6
    75 #define NR_REG_TYPE_UINT8              7
    76 #define NR_REG_TYPE_DOUBLE             8
    77 #define NR_REG_TYPE_BYTES              9
    78 #define NR_REG_TYPE_STRING             10
    79 #define NR_REG_TYPE_REGISTRY           11
    80 char *nr_reg_type_name(int type);
    81 int nr_reg_compute_type(char *type_name, int *type);
    83 char *nr_reg_action_name(int action);
    85 int nr_reg_cb_init(void);
    86 int nr_reg_client_cb_init(void);
    87 int nr_reg_register_for_callbacks(int fd, int connect_to_port);
    88 int nr_reg_raise_event(NR_registry name, int action);
    89 #ifndef NO_REG_RPC
    90 int nr_reg_get_client(CLIENT **client);
    91 #endif
    93 #define CALLBACK_SERVER_ADDR     "127.0.0.1"
    94 #define CALLBACK_SERVER_PORT     8082
    95 #define CALLBACK_SERVER_BACKLOG  32
    97 #endif

mercurial