github.com/igggame/nebulas-go@v2.1.0+incompatible/nbre/cmd/dummy_neb/cli/pkg.h (about)

     1  // Copyright (C) 2018 go-nebulas authors
     2  //
     3  // This file is part of the go-nebulas library.
     4  //
     5  // the go-nebulas library is free software: you can redistribute it and/or
     6  // modify
     7  // it under the terms of the GNU General Public License as published by
     8  // the Free Software Foundation, either version 3 of the License, or
     9  // (at your option) any later version.
    10  //
    11  // the go-nebulas library is distributed in the hope that it will be useful,
    12  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    13  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14  // GNU General Public License for more details.
    15  //
    16  // You should have received a copy of the GNU General Public License
    17  // along with the go-nebulas library.  If not, see
    18  // <http://www.gnu.org/licenses/>.
    19  //
    20  #pragma once
    21  #include "cmd/dummy_neb/dummy_common.h"
    22  #include "core/net_ipc/nipc_pkg.h"
    23  #include "util/controller.h"
    24  #include <ff/network.h>
    25  
    26  enum {
    27    cli_brief_req_pkg = ctl_last_pkg_id,
    28    cli_brief_ack_pkg,
    29    cli_submit_ir_pkg,
    30    cli_submit_ack_pkg,
    31  };
    32  
    33  define_nt(p_account_num, uint64_t);
    34  define_nt(p_nr_ir_status, std::vector<std::string>);
    35  define_nt(p_dip_ir_status, std::vector<std::string>);
    36  define_nt(p_auth_ir_status, std::vector<std::string>);
    37  define_nt(p_checker_status, std::string);
    38  
    39  typedef ff::net::ntpackage<cli_brief_req_pkg> cli_brief_req_t;
    40  typedef ff::net::ntpackage<cli_brief_ack_pkg, p_height, p_account_num,
    41                             p_checker_status>
    42      cli_brief_ack_t;
    43  
    44  define_nt(p_type, std::string);
    45  define_nt(p_payload, std::string);
    46  define_nt(p_result, std::string);
    47  typedef ff::net::ntpackage<cli_submit_ir_pkg, p_type, p_payload>
    48      cli_submit_ir_t;
    49  
    50  typedef ff::net::ntpackage<cli_submit_ack_pkg, p_result> cli_submit_ack_t;
    51