11cb0ef41Sopenharmony_ci#ifndef SRC_NODE_REPORT_H_ 21cb0ef41Sopenharmony_ci#define SRC_NODE_REPORT_H_ 31cb0ef41Sopenharmony_ci 41cb0ef41Sopenharmony_ci#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ci#include "node.h" 71cb0ef41Sopenharmony_ci#include "node_buffer.h" 81cb0ef41Sopenharmony_ci#include "uv.h" 91cb0ef41Sopenharmony_ci#include "util.h" 101cb0ef41Sopenharmony_ci 111cb0ef41Sopenharmony_ci#ifndef _WIN32 121cb0ef41Sopenharmony_ci#include <sys/types.h> 131cb0ef41Sopenharmony_ci#include <unistd.h> 141cb0ef41Sopenharmony_ci#endif 151cb0ef41Sopenharmony_ci 161cb0ef41Sopenharmony_ci#include <iomanip> 171cb0ef41Sopenharmony_ci#include <sstream> 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_cinamespace node { 201cb0ef41Sopenharmony_cinamespace report { 211cb0ef41Sopenharmony_ci// Function declarations - utility functions in src/node_report_utils.cc 221cb0ef41Sopenharmony_civoid WalkHandle(uv_handle_t* h, void* arg); 231cb0ef41Sopenharmony_ci 241cb0ef41Sopenharmony_citemplate <typename T> 251cb0ef41Sopenharmony_cistd::string ValueToHexString(T value) { 261cb0ef41Sopenharmony_ci std::stringstream hex; 271cb0ef41Sopenharmony_ci 281cb0ef41Sopenharmony_ci hex << "0x" << std::setfill('0') << std::setw(sizeof(T) * 2) << std::hex << 291cb0ef41Sopenharmony_ci value; 301cb0ef41Sopenharmony_ci return hex.str(); 311cb0ef41Sopenharmony_ci} 321cb0ef41Sopenharmony_ci 331cb0ef41Sopenharmony_ci// Function declarations - export functions in src/node_report_module.cc 341cb0ef41Sopenharmony_civoid WriteReport(const v8::FunctionCallbackInfo<v8::Value>& info); 351cb0ef41Sopenharmony_civoid GetReport(const v8::FunctionCallbackInfo<v8::Value>& info); 361cb0ef41Sopenharmony_ci 371cb0ef41Sopenharmony_ci} // namespace report 381cb0ef41Sopenharmony_ci} // namespace node 391cb0ef41Sopenharmony_ci 401cb0ef41Sopenharmony_ci#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 411cb0ef41Sopenharmony_ci 421cb0ef41Sopenharmony_ci#endif // SRC_NODE_REPORT_H_ 43