summaryrefslogtreecommitdiff
path: root/sal/inc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-09-24 10:38:43 +0300
committerTor Lillqvist <tml@iki.fi>2012-10-11 10:07:05 +0300
commit4b7e701024219be48b7f8154a508c79cb0a6fdc1 (patch)
tree4642c4c47de58d99fd027eac0d595c6c747baa24 /sal/inc
parentb62bead21d0c956a7da239931069b7e972bfbaf1 (diff)
Use DISABLE_DYNLOADING on Android
IN this branch these changes are not conditional. Unclear yet whether this is what we finally will want to use or not. Maybe should make these changes conditional and do this stuff in master instead? Change-Id: I379d570a0e00648d295c675fd90eba6594ba3182
Diffstat (limited to 'sal/inc')
-rw-r--r--sal/inc/osl/detail/android-bootstrap.h17
-rw-r--r--sal/inc/osl/detail/component-mapping.h62
-rw-r--r--sal/inc/osl/detail/ios-bootstrap.h14
3 files changed, 67 insertions, 26 deletions
diff --git a/sal/inc/osl/detail/android-bootstrap.h b/sal/inc/osl/detail/android-bootstrap.h
index bd453b3475dd..333d14b12550 100644
--- a/sal/inc/osl/detail/android-bootstrap.h
+++ b/sal/inc/osl/detail/android-bootstrap.h
@@ -29,29 +29,19 @@
#ifndef ANDROID_BOOSTRAP_H
#define ANDROID_BOOSTRAP_H
+
#if defined(ANDROID)
#include <jni.h>
-#include <dlfcn.h>
#include <dirent.h>
#ifdef __cplusplus
extern "C" {
#endif
-typedef struct lo_apk_dir lo_apk_dir;
-
-char **lo_dlneeds(const char *library);
-
-void *lo_dlopen(const char *library);
+#include <osl/detail/component-mapping.h>
-void *lo_dlsym(void *handle,
- const char *symbol);
-
-int lo_dladdr(void *addr,
- Dl_info *info);
-
-int lo_dlclose(void *handle);
+typedef struct lo_apk_dir lo_apk_dir;
void *lo_apkentry(const char *filename,
size_t *size);
@@ -77,6 +67,7 @@ struct android_app *lo_get_app(void);
#endif
#endif // ANDROID
+
#endif // ANDROID_BOOTSTRAP_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/inc/osl/detail/component-mapping.h b/sal/inc/osl/detail/component-mapping.h
new file mode 100644
index 000000000000..e085fbd659f1
--- /dev/null
+++ b/sal/inc/osl/detail/component-mapping.h
@@ -0,0 +1,62 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http: *www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2011 Tor Lillqvist <tml@iki.fi> (initial developer)
+ * Copyright (C) 2011 SUSE Linux http://suse.com (initial developer's employer)
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#ifndef COMPONENT_MAPPING_H
+#define COMPONENT_MAPPING_H
+
+#ifdef DISABLE_DYNLOADING
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* On iOS and perhaps Android static linking of the LO code into one
+ * executable (on Android, into one shared library) is used. In order to get
+ * the needed UNO coponent linked in, the "main" code for an app needs to
+ * implement the lo_get_libmap() function to map UNO component library names
+ * as produced in a build for iOS (like configmgr.uno.a or libsclo.a) to the
+ * corresponding component_getFactory functions.
+ */
+
+typedef struct {
+ const char *lib;
+ void * (*component_getFactory_function)(const char *, void *, void *);
+} lib_to_component_mapping;
+
+const lib_to_component_mapping *lo_get_libmap(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* DISABLE_DYNLOADING */
+
+#endif /* COMPONENT_MAPPING_H */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/inc/osl/detail/ios-bootstrap.h b/sal/inc/osl/detail/ios-bootstrap.h
index ac8ccf6562ef..5e4ced7934a0 100644
--- a/sal/inc/osl/detail/ios-bootstrap.h
+++ b/sal/inc/osl/detail/ios-bootstrap.h
@@ -36,19 +36,7 @@
extern "C" {
#endif
-/* On iOS static linking is used. In order to get the needed UNO
- * coponent linked in, the "main" code for an app needs to implement
- * the lo_get_libmap() function to map UNO component library names as
- * produced in a build for iOS (like configmgr.uno.a or libsclo.a) to
- * the corresponding component_getFactory functions.
- */
-
-typedef struct {
- const char *lib;
- void * (*component_getFactory_function)(const char *, void *, void *);
-} lib_to_component_mapping;
-
-const lib_to_component_mapping *lo_get_libmap(void);
+#include <osl/detail/component-mapping.h>
#ifdef __cplusplus
}