Documentation for the ABC Analysis
[cacao.git] / src / native / native.hpp
index c373e96f146f17071e694f86f6d79c4df262dc07..4a0b4c3c3795ec671af05b5fa24d06020fcb2d22 100644 (file)
@@ -32,6 +32,7 @@
 #ifdef __cplusplus
 #include <map>
 #include <set>
+#include <vector>
 #endif
 
 #include "native/jni.hpp"
@@ -110,7 +111,7 @@ public:
        bool  is_loaded(NativeLibrary& library);
        void* resolve_symbol(utf* symbolname, classloader_t* classloader);
 };
-#endif
+#endif /* defined(ENABLE_DL) */
 
 
 /**
@@ -157,6 +158,39 @@ public:
        void* find_registered_method(methodinfo* m);
 };
 
+
+#if defined(ENABLE_JVMTI)
+/**
+ * Represents a registered native agent.
+ */
+class NativeAgent {
+private:
+       char* _library;
+       char* _options;
+
+public:
+       NativeAgent(char* library, char* options) : _library(library), _options(options) {}
+
+       char* get_library() const { return _library; }
+       char* get_options() const { return _options; }
+};
+
+
+/**
+ * Table containing all native agent libraries.
+ */
+class NativeAgents {
+private:
+       std::vector<NativeAgent> _agents;
+
+public:
+       void register_agent_library(char* library, char* options);
+       void register_agent_path(char* path, char* options);
+       bool load_agents();
+       bool unload_agents();
+};
+#endif /* defined(ENABLE_JVMTI) */
+
 #endif
 
 /* function prototypes ********************************************************/