1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: framework.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #if !defined INCLUDED_JVMFWK_LOCAL_FRAMEWORK_HXX
31 #define INCLUDED_JVMFWK_LOCAL_FRAMEWORK_HXX
32 #include "rtl/ustring.hxx"
33 #include "rtl/byteseq.hxx"
34 #include "jvmfwk/framework.h"
35 #include "jvmfwk/vendorplugin.h"
37 /** typedefs for functions from vendorplugin.h
39 typedef javaPluginError (*jfw_plugin_getAllJavaInfos_ptr
)(
40 rtl_uString
* sVendor
,
41 rtl_uString
* sMinVersion
,
42 rtl_uString
* sMaxVersion
,
43 rtl_uString
* * arExcludeList
,
45 JavaInfo
*** parJavaInfo
,
46 sal_Int32
*nLenInfoList
);
48 typedef javaPluginError (*jfw_plugin_getJavaInfoByPath_ptr
)(
50 rtl_uString
* sVendor
,
51 rtl_uString
* sMinVersion
,
52 rtl_uString
* sMaxVersion
,
53 rtl_uString
* * arExcludeList
,
57 /** starts a Java Virtual Machine.
59 The function shall ensure, that the VM does not abort the process
63 typedef javaPluginError (*jfw_plugin_startJavaVirtualMachine_ptr
)(
65 const JavaVMOption
* options
,
76 static JavaInfo
* copyJavaInfo(const JavaInfo
* pInfo
);
78 enum _transfer_ownership
{TRANSFER
};
79 /*Attaching the pointer to this class. The argument pInfo must not
82 CJavaInfo(::JavaInfo
* info
, _transfer_ownership
);
90 CJavaInfo(const CJavaInfo
&);
92 CJavaInfo
& operator =(const ::JavaInfo
* info
);
93 CJavaInfo
& operator = (const CJavaInfo
& info
);
95 /* The returned class takes ownership of the argument info. info
96 must not been freed afterwards.
98 static CJavaInfo
createWrapper(::JavaInfo
* info
);
99 /*Attaching the pointer to this class. The argument pInfo must not
102 void attach(::JavaInfo
* pInfo
);
103 ::JavaInfo
* detach();
104 const ::JavaInfo
* operator ->() const;
105 // ::JavaInfo** operator & ();
106 operator ::JavaInfo
* ();
107 operator ::JavaInfo
const * () const;
108 ::JavaInfo
* cloneJavaInfo() const;
110 rtl::OUString
getVendor() const;
111 rtl::OUString
getLocation() const;
112 sal_uInt64
getFeatures() const;
115 class FrameworkException
119 FrameworkException(javaFrameworkError err
, const rtl::OString
& msg
):
120 errorCode(err
), message(msg
)
123 javaFrameworkError errorCode
;
124 rtl::OString message
;