This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch feature/511-remove-resolver
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 34f0e990127ab3bf9857f557a968193a6b5fa6b2
Author: PengZheng <[email protected]>
AuthorDate: Sat Jul 29 18:43:03 2023 +0800

    Remove export_import example from Celix examples
    
    This was done as the example was outdated and caused confusion as it did 
not reflect the current state of the Celix library. Clearing out such outdated 
references keeps the examples relevant and avoids spreading incorrect or 
outdated information about the library usage.
---
 examples/celix-examples/CMakeLists.txt             |  3 -
 .../celix-examples/export_import/CMakeLists.txt    | 59 ------------------
 .../celix-examples/export_import/include/test.h    | 34 -----------
 .../celix-examples/export_import/include/test2.h   | 34 -----------
 .../celix-examples/export_import/src/activator.c   | 69 ----------------------
 examples/celix-examples/export_import/src/test.c   | 32 ----------
 examples/celix-examples/export_import/src/test2.c  | 32 ----------
 7 files changed, 263 deletions(-)

diff --git a/examples/celix-examples/CMakeLists.txt 
b/examples/celix-examples/CMakeLists.txt
index c05966ec..42a1f769 100644
--- a/examples/celix-examples/CMakeLists.txt
+++ b/examples/celix-examples/CMakeLists.txt
@@ -40,9 +40,6 @@ if (EXAMPLES)
         add_subdirectory(readme_cxx_examples)
     endif ()
 
-    #TODO refactor export_import
-    #add_subdirectory(export_import)
-
     add_subdirectory(http_example)
     add_subdirectory(embedding)
     add_subdirectory(track_tracker_example)
diff --git a/examples/celix-examples/export_import/CMakeLists.txt 
b/examples/celix-examples/export_import/CMakeLists.txt
deleted file mode 100644
index fa5fa8d0..00000000
--- a/examples/celix-examples/export_import/CMakeLists.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-if(NOT APPLE)
-    #Importing and exporting libraries not (yet) work under OSX.
-
-    add_library(hello_testlib SHARED
-        private/src/test
-    )
-    set_library_version(hello_testlib "4.3.2") # sets target propery VERSION 
to 4.3.2 and SOVERSION to 4
-
-
-    add_library(hello_test2lib SHARED
-            private/src/test2
-    )
-    set_library_version(hello_test2lib "3.3.3")
-
-    add_celix_bundle(hello_bundle
-        VERSION "1.2"
-        SOURCES
-            private/src/activator.c
-        IMPORT_LIBRARIES hello_test2lib
-    )
-
-    add_celix_bundle(hello_export
-        VERSION "1.0"
-        NO_ACTIVATOR
-        EXPORT_LIBRARIES hello_test2lib
-    )
-
-    celix_bundle_private_libs(hello_bundle
-        hello_testlib
-    )
-
-    add_celix_container(helloworld_byref
-        GROUP experimental #import/export feature is experimental
-        BUNDLES hello_export hello_bundle ${CELIX_SHELL_BUNDLE} 
${CELIX_SHELL_TUI_BUNDLE}
-    )
-
-    add_celix_container(helloworld_withcopy
-        GROUP experimental #import/export feature is experimental
-        COPY #Ensures that bundles are copied in the deploy location
-        BUNDLES hello_export hello_bundle ${SHELL_BUNDLE} ${SHELL_TUI_BUNDLE}
-    )
-endif()
diff --git a/examples/celix-examples/export_import/include/test.h 
b/examples/celix-examples/export_import/include/test.h
deleted file mode 100644
index 04c70468..00000000
--- a/examples/celix-examples/export_import/include/test.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/**
- * test.h
- *
- *  \date       12 Feb 2014
- *  \author     <a href="mailto:[email protected]";>Apache Celix Project 
Team</a>
- *  \copyright  Apache License, Version 2.0
- */
-
-#ifndef TEST_H_
-#define TEST_H_
-
-
-void doo(void);
-
-
-#endif /* TEST_H_ */
diff --git a/examples/celix-examples/export_import/include/test2.h 
b/examples/celix-examples/export_import/include/test2.h
deleted file mode 100644
index ef159061..00000000
--- a/examples/celix-examples/export_import/include/test2.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/**
- * test.h
- *
- *  \date       12 Feb 2014
- *  \author     <a href="mailto:[email protected]";>Apache Celix Project 
Team</a>
- *  \copyright  Apache License, Version 2.0
- */
-
-#ifndef TEST2_H_
-#define TEST2_H_
-
-
-void bar(void);
-
-
-#endif /* TEST2_H_ */
diff --git a/examples/celix-examples/export_import/src/activator.c 
b/examples/celix-examples/export_import/src/activator.c
deleted file mode 100644
index 3a2522a0..00000000
--- a/examples/celix-examples/export_import/src/activator.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/**
- * activator.c
- *
- *  \date       Aug 20, 2010
- *  \author     <a href="mailto:[email protected]";>Apache Celix Project 
Team</a>
- *  \copyright  Apache License, Version 2.0
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "bundle_activator.h"
-
-#include "test.h"
-#include "test2.h"
-
-struct userData {
-    char * word;
-};
-
-celix_status_t bundleActivator_create(celix_bundle_context_t *context, void 
**userData) {
-    celix_status_t status = CELIX_SUCCESS;
-    *userData = malloc(sizeof(struct userData));
-    if (*userData != NULL) {
-        ((struct userData *)(*userData))->word = "World";
-    } else {
-        status = CELIX_START_ERROR;
-    }
-    return status;
-}
-
-celix_status_t bundleActivator_start(void * userData, celix_bundle_context_t 
*context) {
-    struct userData * data = (struct userData *) userData;
-    printf("Hello %s\n", data->word);
-
-    doo();
-    bar();
-
-    return CELIX_SUCCESS;
-}
-
-celix_status_t bundleActivator_stop(void * userData, celix_bundle_context_t 
*context) {
-    struct userData * data = (struct userData *) userData;
-    printf("Goodbye %s\n", data->word);
-    return CELIX_SUCCESS;
-}
-
-celix_status_t bundleActivator_destroy(void * userData, celix_bundle_context_t 
*context) {
-    free(userData);
-    return CELIX_SUCCESS;
-}
diff --git a/examples/celix-examples/export_import/src/test.c 
b/examples/celix-examples/export_import/src/test.c
deleted file mode 100644
index 0c6087d1..00000000
--- a/examples/celix-examples/export_import/src/test.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/**
- * test.c
- *
- *  \date       12 Feb 2014
- *  \author     <a href="mailto:[email protected]";>Apache Celix Project 
Team</a>
- *  \copyright  Apache License, Version 2.0
- */
-
-#include <stdio.h>
-
-void doo()
-{
-    printf("Hello from second lib\n");
-}
diff --git a/examples/celix-examples/export_import/src/test2.c 
b/examples/celix-examples/export_import/src/test2.c
deleted file mode 100644
index 705512f7..00000000
--- a/examples/celix-examples/export_import/src/test2.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/**
- * test2.c
- *
- *  \date       12 Feb 2014
- *  \author     <a href="mailto:[email protected]";>Apache Celix Project 
Team</a>
- *  \copyright  Apache License, Version 2.0
- */
-
-#include <stdio.h>
-
-void bar()
-{
-    printf("Hello from (imported) third lib\n");
-}

Reply via email to