]> git.saurik.com Git - cycript.git/blobdiff - cycript.hpp
Removed all global cache objects, placing them in a object in the context.
[cycript.git] / cycript.hpp
index 05fc892edcdea24688c00834aa389f01614e21f2..4412916c55cddf21722bad355941e4aea69ac31f 100644 (file)
@@ -78,6 +78,8 @@ bool CYSendAll(int socket, const Type_ *data, size_t size) {
 JSGlobalContextRef CYGetJSContext();
 apr_pool_t *CYGetGlobalPool();
 JSObjectRef CYGetGlobalObject(JSContextRef context);
+
+void CYSetupContext(JSGlobalContextRef context);
 const char *CYExecute(apr_pool_t *pool, const char *code);
 
 void CYSetArgs(int argc, const char *argv[]);
@@ -93,6 +95,8 @@ JSValueRef CYGetProperty(JSContextRef context, JSObjectRef object, JSStringRef n
 void CYSetProperty(JSContextRef context, JSObjectRef object, size_t index, JSValueRef value);
 void CYSetProperty(JSContextRef context, JSObjectRef object, JSStringRef name, JSValueRef value, JSPropertyAttributes attributes = kJSPropertyAttributeNone);
 
+JSObjectRef CYGetCachedObject(JSContextRef context, JSStringRef name);
+
 JSValueRef CYCastJSValue(JSContextRef context, bool value);
 JSValueRef CYCastJSValue(JSContextRef context, double value);
 JSValueRef CYCastJSValue(JSContextRef context, int value);
@@ -132,6 +136,8 @@ struct CYHooks {
 
     JSValueRef (*RuntimeProperty)(JSContextRef, CYUTF8String);
     void (*CallFunction)(JSContextRef, ffi_cif *, void (*)(), uint8_t *, void **);
+
+    void (*Initialize)();
     void (*SetupContext)(JSContextRef);
 
     bool (*PoolFFI)(apr_pool_t *, JSContextRef, sig::Type *, ffi_type *, void *, JSValueRef);