celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject celix git commit: CELIX-77: refactor bundle_getLocation
Date Tue, 15 Dec 2015 05:52:34 GMT
Repository: celix
Updated Branches:
  refs/heads/develop 773a1091e -> 82933b2b5


CELIX-77: refactor bundle_getLocation


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/82933b2b
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/82933b2b
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/82933b2b

Branch: refs/heads/develop
Commit: 82933b2b50fdec89825e95955d61702cdecc3817
Parents: 773a109
Author: Bjoern Petri <bpetri@apache.org>
Authored: Tue Dec 15 06:46:41 2015 +0100
Committer: Bjoern Petri <bpetri@apache.org>
Committed: Tue Dec 15 06:46:41 2015 +0100

----------------------------------------------------------------------
 config_admin/service/CMakeLists.txt             |  1 -
 .../service/private/src/framework_patch.c       | 60 --------------------
 framework/private/src/bundle.c                  | 21 +++++++
 framework/public/include/bundle.h               |  3 +
 4 files changed, 24 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/82933b2b/config_admin/service/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/config_admin/service/CMakeLists.txt b/config_admin/service/CMakeLists.txt
index 14ce4a4..0dfd419 100644
--- a/config_admin/service/CMakeLists.txt
+++ b/config_admin/service/CMakeLists.txt
@@ -30,7 +30,6 @@ bundle(config_admin SOURCES
 	private/src/configuration_admin_impl
 	private/src/configuration_impl
 	private/src/configuration_store
-	private/src/framework_patch
 	private/src/managed_service_impl.c
 	private/src/managed_service_tracker.c
 	private/src/updated_thread_pool.c

http://git-wip-us.apache.org/repos/asf/celix/blob/82933b2b/config_admin/service/private/src/framework_patch.c
----------------------------------------------------------------------
diff --git a/config_admin/service/private/src/framework_patch.c b/config_admin/service/private/src/framework_patch.c
deleted file mode 100644
index 9162a29..0000000
--- a/config_admin/service/private/src/framework_patch.c
+++ /dev/null
@@ -1,60 +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.
- */
-/*
- * framework_patch.c
- *
- *  \date       Aug 12, 2013
- *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
- *  \copyright	Apache License, Version 2.0
- */
-
-
-#include "framework_patch.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-/* celix.framework.public */
-#include "celix_errno.h"
-#include "bundle.h"
-#include "bundle_archive.h"
-#include "properties.h"
-#include "hash_map.h"
-
-
-celix_status_t bundle_getBundleLocation(bundle_pt bundle, char **location){
-
-	celix_status_t status;
-
-	bundle_archive_pt archive = NULL;
-
-	status = bundle_getArchive(bundle, &archive);
-	if (status != CELIX_SUCCESS){
-		printf("[ ERROR ]: Bundle - getBundleLocation (BundleArchive) \n");
-		return status;
-	}
-
-	status =  bundleArchive_getLocation(archive, location);
-	if (status != CELIX_SUCCESS){
-		printf("[ ERROR ]:  Bundle - getBundleLocation (BundleArchiveLocation) \n");
-		return status;
-	}
-
-	return CELIX_SUCCESS;
-}
-

http://git-wip-us.apache.org/repos/asf/celix/blob/82933b2b/framework/private/src/bundle.c
----------------------------------------------------------------------
diff --git a/framework/private/src/bundle.c b/framework/private/src/bundle.c
index 366363c..2cdb3fc 100644
--- a/framework/private/src/bundle.c
+++ b/framework/private/src/bundle.c
@@ -674,3 +674,24 @@ celix_status_t bundle_getFramework(bundle_pt bundle, framework_pt *framework)
{
 
 	return status;
 }
+
+celix_status_t bundle_getBundleLocation(bundle_pt bundle, char **location){
+
+	celix_status_t status;
+
+	bundle_archive_pt archive = NULL;
+
+	status = bundle_getArchive(bundle, &archive);
+	if (status != CELIX_SUCCESS){
+		printf("[ ERROR ]: Bundle - getBundleLocation (BundleArchive) \n");
+		return status;
+	}
+
+	status =  bundleArchive_getLocation(archive, location);
+	if (status != CELIX_SUCCESS){
+		printf("[ ERROR ]:  Bundle - getBundleLocation (BundleArchiveLocation) \n");
+		return status;
+	}
+
+	return CELIX_SUCCESS;
+}

http://git-wip-us.apache.org/repos/asf/celix/blob/82933b2b/framework/public/include/bundle.h
----------------------------------------------------------------------
diff --git a/framework/public/include/bundle.h b/framework/public/include/bundle.h
index 44501cc..588e4cc 100644
--- a/framework/public/include/bundle.h
+++ b/framework/public/include/bundle.h
@@ -96,4 +96,7 @@ FRAMEWORK_EXPORT celix_status_t bundle_getServicesInUse(bundle_pt bundle,
array_
 FRAMEWORK_EXPORT celix_status_t bundle_setFramework(bundle_pt bundle, framework_pt framework);
 FRAMEWORK_EXPORT celix_status_t bundle_getFramework(bundle_pt bundle, framework_pt *framework);
 
+FRAMEWORK_EXPORT celix_status_t bundle_getBundleLocation(bundle_pt bundle, char **location);
+
+
 #endif /* BUNDLE_H_ */


Mime
View raw message