diff options
Diffstat (limited to 'src/async-wrap.h')
-rw-r--r-- | src/async-wrap.h | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/async-wrap.h b/src/async-wrap.h index a58031bb88..3f48290ed8 100644 --- a/src/async-wrap.h +++ b/src/async-wrap.h @@ -35,14 +35,37 @@ class AsyncWrap : public BaseObject { HAS_ASYNC_LISTENER = 1 }; - inline AsyncWrap(Environment* env, v8::Handle<v8::Object> object); + enum ProviderType { + PROVIDER_NONE = 1 << 0, + PROVIDER_CARES = 1 << 1, + PROVIDER_CONNECTWRAP = 1 << 2, + PROVIDER_CRYPTO = 1 << 3, + PROVIDER_FSEVENTWRAP = 1 << 4, + PROVIDER_GETADDRINFOREQWRAP = 1 << 5, + PROVIDER_PIPEWRAP = 1 << 6, + PROVIDER_PROCESSWRAP = 1 << 7, + PROVIDER_REQWRAP = 1 << 8, + PROVIDER_SHUTDOWNWRAP = 1 << 9, + PROVIDER_SIGNALWRAP = 1 << 10, + PROVIDER_STATWATCHER = 1 << 11, + PROVIDER_TCPWRAP = 1 << 12, + PROVIDER_TIMERWRAP = 1 << 13, + PROVIDER_TLSWRAP = 1 << 14, + PROVIDER_TTYWRAP = 1 << 15, + PROVIDER_UDPWRAP = 1 << 16, + PROVIDER_ZLIB = 1 << 17 + }; - inline ~AsyncWrap(); + inline AsyncWrap(Environment* env, + v8::Handle<v8::Object> object, + ProviderType provider); - inline uint32_t async_flags() const; + inline ~AsyncWrap(); inline bool has_async_listener(); + inline uint32_t provider_type() const; + // Only call these within a valid HandleScope. inline v8::Handle<v8::Value> MakeCallback(const v8::Handle<v8::Function> cb, int argc, @@ -65,6 +88,7 @@ class AsyncWrap : public BaseObject { v8::Handle<v8::Value>* argv); uint32_t async_flags_; + uint32_t provider_type_; }; } // namespace node |