diff options
author | Hans Petter <hansp@src.gnome.org> | 2003-09-12 06:04:44 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2003-09-12 06:04:44 +0800 |
commit | 697761cc337aa77a47140c8df50ed84bc25e23f6 (patch) | |
tree | b785830f72e9938cceaa016a419c7b6d9892bada /libical/src/java/jlibical_utils_cxx.h | |
parent | 733d77e657516f9a59b5c1a7b62acb87b03ec86f (diff) | |
download | gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.gz gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.bz2 gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.lz gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.xz gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.zst gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.zip |
Import new libical from mainline HEAD and make appropriate changes to
Evolution.
svn path=/trunk/; revision=22538
Diffstat (limited to 'libical/src/java/jlibical_utils_cxx.h')
-rw-r--r-- | libical/src/java/jlibical_utils_cxx.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/libical/src/java/jlibical_utils_cxx.h b/libical/src/java/jlibical_utils_cxx.h new file mode 100644 index 0000000000..a6cdbc56be --- /dev/null +++ b/libical/src/java/jlibical_utils_cxx.h @@ -0,0 +1,59 @@ + +/*====================================================================== + FILE: jlibical_utils_cxx.h + CREATOR: Srinivasa Boppana/George Norman + (C) COPYRIGHT 2002, Critical Path +======================================================================*/ + +#ifndef TEST_CXX_H +#define TEST_CXX_H + +#ifndef JNI_H +#include <jni.h> +#endif + +class VComponent; +class ICalProperty; +class ICalValue; +class ICalParameter; +struct icaltimetype; +struct icaltriggertype; +struct icaldurationtype; +struct icalrecurrencetype; +struct icalperiodtype; + +// get & set +void* getCObjectPtr(JNIEnv *env, jobject anObj); +void setCObjectPtr(JNIEnv *env, jobject anObj, void* val); + +// type-safe getters +VComponent* getSubjectAsVComponent(JNIEnv *env, jobject surrogateComponent, int exceptionType); +ICalProperty* getSubjectAsICalProperty(JNIEnv *env, jobject surrogateProperty, int exceptionType); +ICalValue* getSubjectAsICalValue(JNIEnv *env, jobject surrogateValue, int exceptionType); +ICalParameter* getSubjectAsICalParameter(JNIEnv *env, jobject surrogateParameter, int exceptionType); + +bool copyObjToicaltimetype(JNIEnv *env, jobject src, icaltimetype* dest); +bool copyObjToicaltriggertype(JNIEnv *env, jobject src, icaltriggertype* dest); +bool copyObjToicaldurationtype(JNIEnv *env, jobject src, icaldurationtype* dest); +bool copyObjToicalrecurrencetype(JNIEnv *env, jobject src, icalrecurrencetype* dest); +bool copyObjToicalperiodtype(JNIEnv *env, jobject src, icalperiodtype* dest); + +// exception handling +void throwException( JNIEnv *env, int cpErr ); + +// create objects +jobject createNewVComponentSurrogate(JNIEnv *env, VComponent* subject); +jobject createNewICalPropertySurrogate(JNIEnv *env, ICalProperty* subject); +jobject createNewICalValueSurrogate(JNIEnv *env, ICalValue* subject); +jobject createNewICalParameterSurrogate(JNIEnv *env, ICalParameter* subject); + +jobject createNewICalTimeType(JNIEnv *env, icaltimetype* source); +jobject createNewICalTriggerType(JNIEnv *env, icaltriggertype* source); +jobject createNewICalDurationType(JNIEnv *env, icaldurationtype* source); +jobject createNewICalRecurrenceType(JNIEnv *env, icalrecurrencetype* source); +jobject createNewICalPeriodType(JNIEnv *env, icalperiodtype* source); + +jobject doCreateNewSurrogate(JNIEnv *env, jclass surrogateClass, jlong subject); + + +#endif /*TEST_CXX_H*/ |