merge with master
authorJinkun Jang <jinkun.jang@samsung.com>
Fri, 15 Mar 2013 16:12:51 +0000 (01:12 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Fri, 15 Mar 2013 16:12:51 +0000 (01:12 +0900)
CMakeLists.txt
include/bundle.h
packaging/bundle.changes [new file with mode: 0644]
packaging/bundle.spec
src/bundle.c

index 9a298eb..95b8e07 100644 (file)
@@ -38,7 +38,7 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/bundle.pc.in ${CMAKE_BINARY_DIR}/bundle.pc @O
 
 ### Install
 install(TARGETS bundle
-       DESTINATION lib
+    DESTINATION lib${LIB_SUFFIX}
        )
 install(FILES 
        ${CMAKE_SOURCE_DIR}/include/bundle.h 
@@ -46,7 +46,7 @@ install(FILES
        DESTINATION include/
                )
 install(FILES ${CMAKE_BINARY_DIR}/bundle.pc 
-               DESTINATION lib/pkgconfig/
+    DESTINATION lib${LIB_SUFFIX}/pkgconfig/
                )
 
 
index d12cd06..15b22fc 100755 (executable)
@@ -448,6 +448,20 @@ API int bundle_keyval_type_is_array(bundle_keyval_t *kv);
 
 
 /**
+ * @brief      Determine if kv is measurable type or not.
+ * @pre                kv must be a valid bundle_keyval_t object.
+ * @post       None
+ * @see                bundle_foreach
+ * @param[in]  kv      A bundle_keyval_t object
+ * @return             Operation result
+ * @retval             1       kv is an measurable.
+ * @retval             0       kv is not an measurable.
+ * @remark
+ */
+API int bundle_keyval_type_is_measurable(bundle_keyval_t *kv);
+
+
+/**
  * @brief      Get value and size of the value from kv of basic type.
  * @pre                kv must be a valid bundle_keyval_t object.
  * @post       val, size are set.
@@ -637,7 +651,6 @@ API int                             bundle_free_exported_argv(int argc, char ***argv);
  */
 API bundle *           bundle_import_from_argv(int argc, char **argv);
 
-#if 0
 /**
  * @brief              Add a string type key-value pair into bundle. 
  * @pre                        b must be a valid bundle object.
@@ -897,7 +910,6 @@ API int bundle_get_byte(bundle *b, const char *key, void **byte, size_t *size);
  @endcode
  */
 API int bundle_get_byte_array(bundle *b, const char *key, void ***byte_array, unsigned int *len, unsigned int **array_element_size);
-#endif
 
 
 #ifdef __cplusplus
diff --git a/packaging/bundle.changes b/packaging/bundle.changes
new file mode 100644 (file)
index 0000000..7f9e669
--- /dev/null
@@ -0,0 +1,3 @@
+* Fri Jan 18 2013 Anas Nashif <anas.nashif@intel.com> accepted/trunk/20130116.003550@4ecb922
+- Support installation in /usr/lib64
+
index d4a91fe..95ab43c 100644 (file)
@@ -1,23 +1,16 @@
-
 Name:       bundle
 Summary:    String key-val dictionary ADT
-Version:    0.1.27
+Version:    0.1.30
 Release:    1
 Group:      System/Libraries
 License:    Apache License, Version 2.0
 Source0:    bundle-%{version}.tar.gz
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(dlog)
-
-
 %description
 Simple string key-val dictionary ADT
 
-
-
 %package devel
 Summary:    String key-val dictionary ADT (devel)
 Group:      Development/Libraries
@@ -32,26 +25,17 @@ Simple string key-val dictionary ADT (devel)
 
 
 %build
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
-
-
+%cmake .
 make %{?jobs:-j%jobs}
 
 %install
-rm -rf %{buildroot}
 %make_install
 
-
-
-
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
 
 
-
-
-
 %files
 %manifest bundle.manifest
 %defattr(-,root,root,-)
index ce45976..5775954 100755 (executable)
@@ -326,6 +326,12 @@ bundle_keyval_type_is_array(bundle_keyval_t *kv)
 }
 
 int 
+bundle_keyval_type_is_measurable(bundle_keyval_t *kv)
+{
+       return keyval_type_is_measurable(kv->type);
+}
+
+int 
 bundle_keyval_get_basic_val(bundle_keyval_t *kv, void **val, size_t *size)
 {
        return keyval_get_data(kv, NULL, val, size);
@@ -693,38 +699,38 @@ bundle_get_array_val_size(bundle *b, const char *key, const void *val_ptr)
 {
        return 0;
 }
-/*static int
-  bundle_set_array_val(bundle *b, const char *key, const int type, const unsigned int idx, const void *val, const size_t size)
-  {
+static int
+bundle_set_array_val(bundle *b, const char *key, const int type, const unsigned int idx, const void *val, const size_t size)
+{
 //void **array = NULL;
 
-keyval_t *kv = _bundle_find_kv(b, key);
-if(NULL == kv) return -1;
+       keyval_t *kv = _bundle_find_kv(b, key);
+       if(NULL == kv) return -1;
 
-if(type != kv->type) {
-errno = EINVAL;
-return -1;
-}
+       if(type != kv->type) {
+               errno = EINVAL;
+               return -1;
+       }
 
-if(! keyval_type_is_array(kv->type)) { // TODO: Is this needed?
-errno = EINVAL;
-return -1;
-}
+       if(! keyval_type_is_array(kv->type)) {  // TODO: Is this needed?
+               errno = EINVAL;
+               return -1;
+       }
 
-keyval_array_t *kva = (keyval_array_t *)kv;
+       keyval_array_t *kva = (keyval_array_t *)kv;
 
-if(! keyval_array_is_idx_valid(kva, idx)) {
-errno = EINVAL;
-return -1;
-}
+       if(! keyval_array_is_idx_valid(kva, idx)) {
+               errno = EINVAL;
+               return -1;
+       }
 
-if(!kva->array_val) {  // NULL value test (TODO: is this needed?)
-errno = ENOMEM;
-return -1;
-}
+       if(!kva->array_val) {   // NULL value test (TODO: is this needed?)
+               errno = ENOMEM;
+               return -1;
+       }
 
-return keyval_array_set_element(kva, idx, val, size);
-}*/
+       return keyval_array_set_element(kva, idx, val, size);
+}
 
 
        int
@@ -771,7 +777,6 @@ bundle_compare(bundle *b1, bundle *b2)
 
 
 
-#if 0
        int
 bundle_set_str_array_element(bundle *b, const char *key, const unsigned int idx, const char *val)
 {
@@ -815,5 +820,3 @@ bundle_set_byte_array_element(bundle *b, const char *key, const unsigned int idx
        return bundle_set_array_val(b, key, BUNDLE_TYPE_BYTE_ARRAY, idx, val, size);
 }
 
-#endif
-