GCC Code Coverage Report
Directory: ../src/ Exec Total Coverage
File: /home/node-core-coverage/node-core-coverage/workdir/node/src/js_stream.h Lines: 0 1 0.0 %
Date: 2016-07-12 Branches: 0 0 0.0 %

Line Exec Source
1
#ifndef SRC_JS_STREAM_H_
2
#define SRC_JS_STREAM_H_
3
4
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
5
6
#include "async-wrap.h"
7
#include "env.h"
8
#include "stream_base.h"
9
#include "v8.h"
10
11
namespace node {
12
13
class JSStream : public AsyncWrap, public StreamBase {
14
 public:
15
  static void Initialize(v8::Local<v8::Object> target,
16
                         v8::Local<v8::Value> unused,
17
                         v8::Local<v8::Context> context);
18
19
  ~JSStream();
20
21
  void* Cast() override;
22
  bool IsAlive() override;
23
  bool IsClosing() override;
24
  int ReadStart() override;
25
  int ReadStop() override;
26
27
  int DoShutdown(ShutdownWrap* req_wrap) override;
28
  int DoWrite(WriteWrap* w,
29
              uv_buf_t* bufs,
30
              size_t count,
31
              uv_stream_t* send_handle) override;
32
33
  size_t self_size() const override { return sizeof(*this); }
34
35
 protected:
36
  JSStream(Environment* env, v8::Local<v8::Object> obj, AsyncWrap* parent);
37
38
  AsyncWrap* GetAsyncWrap() override;
39
40
  static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
41
  static void DoAlloc(const v8::FunctionCallbackInfo<v8::Value>& args);
42
  static void DoRead(const v8::FunctionCallbackInfo<v8::Value>& args);
43
  static void DoAfterWrite(const v8::FunctionCallbackInfo<v8::Value>& args);
44
  static void ReadBuffer(const v8::FunctionCallbackInfo<v8::Value>& args);
45
  static void EmitEOF(const v8::FunctionCallbackInfo<v8::Value>& args);
46
47
  template <class Wrap>
48
  static void Finish(const v8::FunctionCallbackInfo<v8::Value>& args);
49
};
50
51
}  // namespace node
52
53
#endif  // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
54
55
#endif  // SRC_JS_STREAM_H_