1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/mtransport/third_party/nrappkit/src/registry/registry_int.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,97 @@ 1.4 +#if 0 1.5 +#define NR_LOG_REGISTRY BLAHBLAH() 1.6 +#define LOG_REGISTRY BLAHBLAH() 1.7 +static int BLAHBLAH() { 1.8 +int blahblah; 1.9 +r_log_register("registry",&blahblah); 1.10 +return blahblah; 1.11 +} 1.12 +#endif 1.13 + 1.14 +/* 1.15 + * 1.16 + * registry_int.h 1.17 + * 1.18 + * $Source: /Users/ekr/tmp/nrappkit-dump/nrappkit/src/registry/registry_int.h,v $ 1.19 + * $Revision: 1.3 $ 1.20 + * $Date: 2007/06/26 22:37:51 $ 1.21 + * 1.22 + * Callback-related functions 1.23 + * 1.24 + * 1.25 + * Copyright (C) 2005, Network Resonance, Inc. 1.26 + * Copyright (C) 2006, Network Resonance, Inc. 1.27 + * All Rights Reserved 1.28 + * 1.29 + * Redistribution and use in source and binary forms, with or without 1.30 + * modification, are permitted provided that the following conditions 1.31 + * are met: 1.32 + * 1.33 + * 1. Redistributions of source code must retain the above copyright 1.34 + * notice, this list of conditions and the following disclaimer. 1.35 + * 2. Redistributions in binary form must reproduce the above copyright 1.36 + * notice, this list of conditions and the following disclaimer in the 1.37 + * documentation and/or other materials provided with the distribution. 1.38 + * 3. Neither the name of Network Resonance, Inc. nor the name of any 1.39 + * contributors to this software may be used to endorse or promote 1.40 + * products derived from this software without specific prior written 1.41 + * permission. 1.42 + * 1.43 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' 1.44 + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1.45 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1.46 + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 1.47 + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 1.48 + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 1.49 + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 1.50 + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 1.51 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 1.52 + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 1.53 + * POSSIBILITY OF SUCH DAMAGE. 1.54 + * 1.55 + * 1.56 + */ 1.57 + 1.58 +#ifndef __REGISTRY_INT_H__ 1.59 +#define __REGISTRY_INT_H__ 1.60 + 1.61 +#include <sys/types.h> 1.62 +#include <r_types.h> 1.63 +#ifndef NO_REG_RPC 1.64 +#include <rpc/rpc.h> 1.65 +#endif 1.66 + 1.67 +extern int NR_LOG_REGISTRY; 1.68 + 1.69 +int nr_reg_is_valid(NR_registry name); 1.70 + 1.71 +#define NR_REG_TYPE_CHAR 0 1.72 +#define NR_REG_TYPE_UCHAR 1 1.73 +#define NR_REG_TYPE_INT2 2 1.74 +#define NR_REG_TYPE_UINT2 3 1.75 +#define NR_REG_TYPE_INT4 4 1.76 +#define NR_REG_TYPE_UINT4 5 1.77 +#define NR_REG_TYPE_INT8 6 1.78 +#define NR_REG_TYPE_UINT8 7 1.79 +#define NR_REG_TYPE_DOUBLE 8 1.80 +#define NR_REG_TYPE_BYTES 9 1.81 +#define NR_REG_TYPE_STRING 10 1.82 +#define NR_REG_TYPE_REGISTRY 11 1.83 +char *nr_reg_type_name(int type); 1.84 +int nr_reg_compute_type(char *type_name, int *type); 1.85 + 1.86 +char *nr_reg_action_name(int action); 1.87 + 1.88 +int nr_reg_cb_init(void); 1.89 +int nr_reg_client_cb_init(void); 1.90 +int nr_reg_register_for_callbacks(int fd, int connect_to_port); 1.91 +int nr_reg_raise_event(NR_registry name, int action); 1.92 +#ifndef NO_REG_RPC 1.93 +int nr_reg_get_client(CLIENT **client); 1.94 +#endif 1.95 + 1.96 +#define CALLBACK_SERVER_ADDR "127.0.0.1" 1.97 +#define CALLBACK_SERVER_PORT 8082 1.98 +#define CALLBACK_SERVER_BACKLOG 32 1.99 + 1.100 +#endif