Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / android_crazy_linker / src / include / crazy_linker.h
index 04fc8ce..e425f78 100644 (file)
@@ -32,6 +32,9 @@ extern "C" {
 // the library.
 #define _CRAZY_PUBLIC __attribute__((__visibility__("default")))
 
+// Maximum path length of a file in a zip file.
+const size_t kMaxFilePathLengthInZip = 256;
+
 // Status values returned by crazy linker functions to indicate
 // success or failure. They were chosen to match boolean values,
 // this allows one to test for failures with:
@@ -131,6 +134,12 @@ void crazy_context_get_java_vm(crazy_context_t* context,
                                void** java_vm,
                                int* minimum_jni_version);
 
+// Set the flag whether the fallback due to lack of support for mapping the
+// APK file with executable permission is enabled.
+void crazy_context_set_no_map_exec_support_fallback_enabled(
+    crazy_context_t* context,
+    bool no_map_exec_support_fallback_enabled) _CRAZY_PUBLIC;
+
 // Destroy a given context object.
 void crazy_context_destroy(crazy_context_t* context) _CRAZY_PUBLIC;
 
@@ -335,6 +344,20 @@ crazy_status_t crazy_library_find_from_address(
     void* address,
     crazy_library_t** library) _CRAZY_PUBLIC;
 
+// Return the full path of |lib_name| in the zip file
+// (lib/<abi>/crazy.<lib_name>). The result is returned in
+// |buffer[0..buffer_size - 1]|. If |buffer_size| is too small,
+// CRAZY_STATUS_FAILURE is returned.
+crazy_status_t crazy_library_file_path_in_zip_file(const char* lib_name,
+                                                   char* buffer,
+                                                   size_t buffer_size)
+    _CRAZY_PUBLIC;
+
+// Check whether |lib_name| is page aligned and uncompressed in |zipfile_name|.
+crazy_status_t crazy_linker_check_library_is_mappable_in_zip_file(
+    const char* zipfile_name,
+    const char* lib_name) _CRAZY_PUBLIC;
+
 // Close a library. This decrements its reference count. If it reaches
 // zero, the library be unloaded from the process.
 void crazy_library_close(crazy_library_t* library) _CRAZY_PUBLIC;