version 1.19.2.2, 2006/06/23 17:44:59
|
version 1.26, 2006/09/22 19:42:10
|
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Adrian Schuur, schuur@de.ibm.com |
|
// |
|
// Modified By: |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
#ifndef _Provider_JMPIImpl_h | #ifndef _Provider_JMPIImpl_h |
#define _Provider_JMPIImpl_h | #define _Provider_JMPIImpl_h |
| |
|
#include <Pegasus/Common/Config.h> |
|
|
#include <jni.h> | #include <jni.h> |
|
|
|
#ifdef PEGASUS_PLATFORM_LINUX_GENERIC_GNU |
|
#if defined (__GNUC__) && GCC_VERSION >= 40000 |
|
// If gcc is compiled with -fvisibility=hidden then JMPI is broken. This is because |
|
// the JNI h file defines JNIEXPORT as empty since the default is visible. |
|
#undef JNIEXPORT |
|
#define JNIEXPORT __attribute__ ((visibility("default"))) |
|
#endif |
|
#endif |
|
|
#include <stdio.h> | #include <stdio.h> |
#include <stdlib.h> | #include <stdlib.h> |
#include <string.h> | #include <string.h> |
| |
#include <Pegasus/Common/Config.h> |
|
#include <Pegasus/Common/String.h> | #include <Pegasus/Common/String.h> |
#include <Pegasus/Common/System.h> | #include <Pegasus/Common/System.h> |
#include <Pegasus/Common/HashTable.h> | #include <Pegasus/Common/HashTable.h> |
#include <Pegasus/Common/CIMType.h> | #include <Pegasus/Common/CIMType.h> |
#include <Pegasus/Common/Mutex.h> | #include <Pegasus/Common/Mutex.h> |
|
#include <Pegasus/ProviderManager2/JMPI/Linkage.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
const METHOD_STRUCT *instanceMethodNames; | const METHOD_STRUCT *instanceMethodNames; |
} JvmVector; | } JvmVector; |
| |
class JMPIjvm { |
class PEGASUS_JMPIPM_LINKAGE JMPIjvm { |
public: | public: |
static int trace; | static int trace; |
static JavaVM *jvm; | static JavaVM *jvm; |
|
|
#define OperationContextUnassociate instMethodIDs[49] | #define OperationContextUnassociate instMethodIDs[49] |
#define ClassGetInterfaces instMethodIDs[50] | #define ClassGetInterfaces instMethodIDs[50] |
#define ClassGetName instMethodIDs[51] | #define ClassGetName instMethodIDs[51] |
|
#define UnsignedInt64NewStr instMethodIDs[52] |
| |
//extern "C" JNIEnv* attachThread(JvmVector**); | //extern "C" JNIEnv* attachThread(JvmVector**); |
//extern "C" void detachThread(); | //extern "C" void detachThread(); |