⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rpcdict.h

📁 PB 熟悉的哥们希望大家可以互相学习一下
💻 H
字号:
/*******************************************************************
 *                                                                 *
 *  rpcdict.h                                                      *
 *                                                                 *
 *  This file is a part of the eXtremeDB source code               *
 *  Copyright (c) 2001-2007 McObject LLC                           * 
 *  All Rights Reserved                                            *
 *                                                                 *
 *******************************************************************/

#ifndef _MCO_RPC_DICTIONARY_H
    #define _MCO_RPC_DICTIONARY_H


    #define MCORPC_MEMB_ZEROTERM        1       /* for scalars only */
    #define MCORPC_MEMB_UNION           2       /* for unions only.  */
    #define MCORPC_MEMB_SIZE            4       /* for structs only. */
    #define MCORPC_MEMB_LENGTH          8       /* for structs only. */
    #define MCORPC_MEMB_VAR_SIZE        (MCORPC_MEMB_SIZE|MCORPC_MEMB_LENGTH)

    typedef struct tag_mco_rpc_type_member
    {
        unsigned int offset; /* offset of the field */
        unsigned int n_elements; /* number of elements in the field */
        unsigned int n_deref; /* number of derefirence for an element */
        unsigned int type_i; /* type of an element */

        unsigned int attrs; /* flags */
        unsigned int active; /* active member for union */
        unsigned int size_length; /* index of size or length field for struct. */
    } mco_rpc_type_member_t, * mco_rpc_type_member_p;

    #define MCORPC_TYPE_ZEROTERM        1       /* for scalars only */
    #define MCORPC_TYPE_UNION           2       /* for unions only.  */
    #define MCORPC_TYPE_NETWORK_ORDER   0x100   /* for numerical data types only.  */

    typedef struct tag_mco_rpc_type
    {

        unsigned int n_elements; /* number of elements */
        unsigned int n_deref; /* how many times we need to dereference the pointer to get the value */
        unsigned int ref_i; /* reference to other data-type */
        unsigned int size; /* total size (in bytes) of the data */

        unsigned int n_members; /* number of members in member-array (structs, unions) */
        unsigned int member_i; /* pointer to a members-array */
        unsigned int attrs; /* flags */

    } mco_rpc_type_t, * mco_rpc_type_p;

    typedef struct tag_mco_rpc_dict
    {

        unsigned int version;
        unsigned int n_types;
        mco_rpc_type_p types;
        mco_rpc_type_member_p members;

    } mco_rpc_dict_t, * mco_rpc_dict_p;

#endif /* _MCO_RPC_DICTIONARY_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -