#ifndef node_h #define node_h #include #include #include #include #include "object_wrap.h" namespace node { #define NODE_VERSION "0.1.7" #define NODE_DEFINE_CONSTANT(target, constant) \ (target)->Set(v8::String::NewSymbol(#constant), \ v8::Integer::New(constant)) #define NODE_SET_METHOD(obj, name, callback) \ obj->Set(v8::String::NewSymbol(name), \ v8::FunctionTemplate::New(callback)->GetFunction()) #define NODE_SET_PROTOTYPE_METHOD(templ, name, callback) \ do { \ v8::Local __callback##_SIG = v8::Signature::New(templ); \ v8::Local __callback##_TEM = \ FunctionTemplate::New(callback, v8::Handle() , __callback##_SIG ); \ templ->PrototypeTemplate()->Set(v8::String::NewSymbol(name), \ __callback##_TEM); \ } while(0) enum encoding {ASCII, UTF8, RAW}; enum encoding ParseEncoding (v8::Handle encoding_v); void FatalException (v8::TryCatch &try_catch); int start (int argc, char *argv[]); } // namespace node #endif // node_h