summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jvmfwk/source/framework.hxx47
1 files changed, 36 insertions, 11 deletions
diff --git a/jvmfwk/source/framework.hxx b/jvmfwk/source/framework.hxx
index 4ba4a7b80370..267e2e6156af 100644
--- a/jvmfwk/source/framework.hxx
+++ b/jvmfwk/source/framework.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: framework.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: hr $ $Date: 2004-07-23 11:54:52 $
+ * last change: $Author: hr $ $Date: 2004-11-09 14:00:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,10 +65,6 @@
#include "jvmfwk/framework.h"
#include "jvmfwk/vendorplugin.h"
-
-//#define NS_JAVA_FRAMEWORK "http://openoffice.org/2004/java/framework/1.0"
-//#define NS_SCHEMA_INSTANCE "http://www.w3.org/2001/XMLSchema-instance"
-
/** typedefs for functions from vendorplugin.h
*/
typedef javaPluginError (*jfw_plugin_getAllJavaInfos_ptr)(
@@ -108,19 +104,37 @@ namespace jfw
class CJavaInfo
{
- CJavaInfo(const CJavaInfo &);
- CJavaInfo& operator = (const CJavaInfo&);
-
static JavaInfo * copyJavaInfo(const JavaInfo * pInfo);
+
+ enum _transfer_ownership {TRANSFER};
+ /*Attaching the pointer to this class. The argument pInfo must not
+ be freed afterwards.
+ */
+ CJavaInfo(::JavaInfo * info, _transfer_ownership);
+
public:
::JavaInfo * pInfo;
+
+
CJavaInfo();
- CJavaInfo(const ::JavaInfo* pInfo);
+ explicit CJavaInfo(const ::JavaInfo* pInfo);
+ CJavaInfo(const CJavaInfo &);
~CJavaInfo();
CJavaInfo& operator =(const ::JavaInfo* info);
+ CJavaInfo & operator = (const CJavaInfo& info);
+
+ /* The returned class takes ownership of the argument info. info
+ must not been freed afterwards.
+ */
+ static CJavaInfo createWrapper(::JavaInfo* info);
+ /*Attaching the pointer to this class. The argument pInfo must not
+ be freed afterwards.
+ */
+ void attach(::JavaInfo* pInfo);
+ ::JavaInfo * detach();
const ::JavaInfo* operator ->() const;
- ::JavaInfo** operator & ();
+// ::JavaInfo** operator & ();
operator ::JavaInfo* ();
operator ::JavaInfo const * () const;
::JavaInfo* cloneJavaInfo() const;
@@ -133,5 +147,16 @@ public:
rtl::ByteSequence getVendorData() const;
};
+class FrameworkException
+{
+public:
+
+ FrameworkException(javaFrameworkError err, const rtl::OString& msg):
+ errorCode(err), message(msg)
+ {
+ }
+ javaFrameworkError errorCode;
+ rtl::OString message;
+};
}
#endif