2 * Copyright (c) 2000 - 2020 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 * @brief This file declares API of the bundle library.
26 * @addtogroup CORE_LIB_BUNDLE_MODULE
32 #include <tizen_error.h>
39 * @brief Enumeration for error codes of Bundle.
40 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
43 BUNDLE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
44 BUNDLE_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
45 BUNDLE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
46 BUNDLE_ERROR_KEY_NOT_AVAILABLE = TIZEN_ERROR_KEY_NOT_AVAILABLE, /**< Required key not available */
47 BUNDLE_ERROR_KEY_EXISTS = TIZEN_ERROR_BUNDLE | 0x01, /**< Key exists */
48 BUNDLE_ERROR_ARRAY_INDEX_OUT_OF_BOUNDS = TIZEN_ERROR_BUNDLE | 0x02 /**< The index is out of bounds of the array */
53 * @brief The bundle handle.
54 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
56 typedef struct _bundle_t bundle;
60 * @brief The encoded data type.
61 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
62 * @see bundle_encode()
63 * @see bundle_decode()
65 typedef unsigned char bundle_raw;
69 * @brief Enumeration for key-value pair types.
70 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
72 enum bundle_type_property {
73 BUNDLE_TYPE_ARRAY = 0x0100, /**< Array type */
74 BUNDLE_TYPE_PRIMITIVE = 0x0200, /**< Primitive type */
75 BUNDLE_TYPE_MEASURABLE = 0x0400 /**< Measurable type */
80 * @brief Enumeration for bundle types.
81 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
84 BUNDLE_TYPE_NONE = -1, /**< None */
85 BUNDLE_TYPE_ANY = 0, /**< Any type */
86 BUNDLE_TYPE_STR = 1 | BUNDLE_TYPE_MEASURABLE, /**< String type (Default) */
87 BUNDLE_TYPE_STR_ARRAY = BUNDLE_TYPE_STR | BUNDLE_TYPE_ARRAY | BUNDLE_TYPE_MEASURABLE, /**< String array type */
88 BUNDLE_TYPE_BYTE = 2, /**< Byte type */
89 BUNDLE_TYPE_BYTE_ARRAY = BUNDLE_TYPE_BYTE | BUNDLE_TYPE_ARRAY /**< Byte array type */
94 * @brief The key-value pair handle.
95 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
96 * @see bundle_iterator_t
98 typedef struct keyval_t bundle_keyval_t;
102 * @brief Called for every key-value pair.
103 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
104 * @param[in] key The key of key-value pair
105 * @param[in] type The type of bundle
106 * @param[in] kv The handle of key-value pair
107 * @param[in] user_data The user data
108 * @see bundle_foreach()
110 typedef void (*bundle_iterator_t) (const char *key, const int type, const bundle_keyval_t *kv, void *user_data);
114 * @brief Creates a bundle object.
115 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
116 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
117 * @return The bundle object,
119 * @exception #BUNDLE_ERROR_NONE Success
120 * @exception #BUNDLE_ERROR_OUT_OF_MEMORY Out of memory
125 bundle *b = bundle_create(); // Create a new bundle object
126 bundle_free(b); // Free the bundle
129 bundle *bundle_create(void);
133 * @brief Frees the given bundle object with key-value pairs in it.
134 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
135 * @param[in] b The bundle object to be freed
136 * @return The operation result
137 * @retval #BUNDLE_ERROR_NONE Success
138 * @retval #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
139 * @pre @a b must be a valid bundle object.
140 * @see bundle_create()
144 bundle *b = bundle_create(); // Create a new bundle object
145 bundle_free(b); // Free the bundle
148 int bundle_free(bundle *b);
152 * @brief Adds a strings array type key-value pair into a given bundle.
153 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
154 * @param[in] b The bundle object
155 * @param[in] key The key
156 * @param[in] str_array The string type value; if @c NULL, an empty array is created; you can change an item with
157 * @param[in] len The length of the array
158 * @return The operation result
159 * @retval #BUNDLE_ERROR_NONE Success
160 * @retval #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
161 * @retval #BUNDLE_ERROR_KEY_EXISTS Key already exists
162 * @retval #BUNDLE_ERROR_OUT_OF_MEMORY Out of memory
163 * @pre @a b must be a valid bundle object.
164 * @see bundle_get_str_array()
168 char *sa = {"aaa", "bbb", "ccc"}; // String array of length 3
169 bundle *b = bundle_create();
170 bundle_add_str_array(b, "foo", sa, 3); // Add a key-value pair
174 int bundle_add_str_array(bundle *b, const char *key, const char **str_array, const int len);
178 * @brief Deletes a key-value object with the given key.
179 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
180 * @param[in] b The bundle object
181 * @param[in] key The given key
182 * @return The operation result
183 * @retval #BUNDLE_ERROR_NONE Success
184 * @retval #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
185 * @retval #BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available
186 * @pre @a b must be a valid bundle object.
190 bundle *b = bundle_create(); // Create a new bundle object
191 bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair
192 bundle_del(b, "foo_key"); // Delete "foo_key" from b
197 int bundle_del(bundle *b, const char *key);
201 * @brief Gets a string array from a given key.
202 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
203 * @remarks You MUST NOT free or modify the returned string. \n
204 * The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
205 * @param[in] b The bundle object
206 * @param[in] key The key
207 * @param[out] len The array length
208 * @return The pointer to the array of strings,
209 * @c NULL - Key not found
210 * @exception #BUNDLE_ERROR_NONE Success
211 * @exception #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
212 * @exception #BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available
213 * @pre @a b must be a valid bundle object.
214 * @see bundle_add_str_array()
218 bundle *b = bundle_create();
219 char *sa = {"aaa", "bbb", "ccc"}; // String array of length 3
220 bundle_add_str_array(b, "foo", sa, 3); // Add a key-value pair
222 char **str_array = NULL;
223 int len_str_array = 0;
225 str_array=bundle_get_str_array(b, "foo", &len_str_array);
226 // str_array = {"aaa", "bbb", "ccc"}, and len_str_array = 3
231 const char **bundle_get_str_array(bundle *b, const char *key, int *len);
235 * @brief Gets the number of bundle items.
236 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
237 * @param[in] b The bundle object
238 * @return The number of bundle items
239 * @pre @a b must be a valid bundle object.
243 bundle *b = bundle_create(); // Create a new bundle object
244 bundle_add_str(b, "key1", "val1"); // Add a key-value pair
245 int count = bundle_get_count(b); // count = 1
246 bundle_add_str(b, "key2", "val2"); // Add another key-value pair
247 count = bundle_get_count(b); // count = 2
252 int bundle_get_count(bundle *b);
256 * @brief Gets the type of the value with a given key.
257 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
258 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
259 * @param[in] b A bundle
260 * @param[in] key A key in the bundle
261 * @return The type of a key in @a b
262 * @exception #BUNDLE_ERROR_NONE Success
263 * @exception #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
264 * @exception #BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available
265 * @pre @a b must be a valid bundle object.
268 int bundle_get_type(bundle *b, const char *key);
272 * @brief Duplicates a given bundle object.
273 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
274 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
275 * The returned value should be released using bundle_free().
276 * @param[in] b_from The bundle object to be duplicated
277 * @return The new bundle object,
279 * @exception #BUNDLE_ERROR_NONE Success
280 * @exception #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
281 * @pre @a b_from must be a valid bundle object.
285 bundle *b = bundle_create(); // Create a new bundle object
286 bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair
287 bundle *b_dup = bundle_dup(b); // Duplicate b
293 bundle *bundle_dup(bundle *b_from);
297 * @brief Iterates a callback function for each key-value pair in a given bundle.
298 * @details Supports all types of values.
299 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
300 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. \n
301 * This function supports all types.
302 * @param[in] b The bundle object
303 * @param[in] iter The iteration callback function
304 * @param[in] user_data The data for the callback function
305 * @exception #BUNDLE_ERROR_NONE Success
306 * @exception #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
307 * @pre @a b must be a valid bundle object.
308 * @see bundle_keyval_get_type()
309 * @see bundle_keyval_type_is_array()
310 * @see bundle_keyval_get_basic_val()
311 * @see bundle_keyval_get_array_val()
317 sample_cb(const char *key, const int type, const bundle_keyval_t *kv, void *user_data)
319 void *basic_val = NULL;
320 size_t basic_size = 0;
321 void **array_val = NULL;
323 size_t *array_elem_size = NULL;
325 printf("Key:%s, Type:%d\n", key, type);
326 if (bundle_keyval_type_is_array(kv)) {
327 bundle_keyval_get_array_val(kv, &array_val, &array_len, &array_elem_size);
331 bundle_keyval_get_basic_val(kv, &basic_val, &basic_size);
338 bundle *b = bundle_create(); // Create a new bundle object
339 bundle_add_str(b, "k1", "v1"); // Add a key-value pair
340 bundle_add_byte(b, "k2", "v2", 3); // Add a key-value pair
341 char *s_arr[] = {"abc", "bcd", "cde"};
342 bundle_add_str_array(b, "k3", s_arr, 3); // Add a key-value pair
343 bundle_foreach(b, sample_cb, NULL); // Iterate sample_cb() for each key/value
349 void bundle_foreach(bundle *b, bundle_iterator_t iter, void *user_data);
353 * @brief Gets the type of a key-value pair.
354 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
355 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
356 * @param[in] kv A bundle_keyval_t object
357 * @return The type of @a kv,
359 * @exception #BUNDLE_ERROR_NONE Success
360 * @exception #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
361 * @pre @a kv must be a valid bundle_keyval_t object.
362 * @see bundle_foreach()
364 int bundle_keyval_get_type(bundle_keyval_t *kv);
368 * @brief Determines whether the type of a key-value pair is an array.
369 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
370 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
371 * @param[in] kv A bundle_keyval_t object
372 * @return The operation result
373 * @c 1 - @a kv is an array
374 * @c 0 - @a kv is not an array
375 * @exception #BUNDLE_ERROR_NONE Success
376 * @exception #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
377 * @pre @a kv must be a valid bundle_keyval_t object.
378 * @see bundle_foreach()
380 int bundle_keyval_type_is_array(bundle_keyval_t *kv);
384 * @brief Gets the value and size of the value from a key-value pair of basic type.
385 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
386 * @remarks You must not free @a val.
387 * @param[in] kv A bundle_keyval_t object
388 * @param[out] val The value
389 * @param[out] size The size of @a val
390 * @return The operation result
391 * @retval #BUNDLE_ERROR_NONE Success
392 * @retval #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
393 * @pre @a kv must be a valid bundle_keyval_t object.
394 * @post @a val and @a size are set.
395 * @see bundle_foreach()
397 int bundle_keyval_get_basic_val(bundle_keyval_t *kv, void **val, size_t *size);
401 * @brief Gets the value array, length of the array, and size of each array item.
402 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
403 * @param[in] kv A bundle_keyval_t object
404 * @param[out] array_val The array pointer of values
405 * @param[out] array_len The length of @a array_val
406 * @param[out] array_element_size The array of size of each array element
407 * @return The operation result
408 * @retval #BUNDLE_ERROR_NONE Success
409 * @retval #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
410 * @pre @a kv must be a valid bundle_keyval_t object.
411 * @post @a array_val, @a array_len, @a array_element_size are set.
412 * @see bundle_foreach()
414 int bundle_keyval_get_array_val(bundle_keyval_t *kv, void ***array_val, unsigned int *array_len, size_t **array_element_size);
418 * @brief Encodes a bundle to the bundle_raw format (uses base64 format).
419 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
420 * @param[in] b The bundle object
421 * @param[out] r The returned bundle_raw data(byte data)
422 * @a r MUST BE FREED by free(r)
423 * @param[out] len The size of @a r (in bytes)
424 * @return The size of the raw data
425 * @retval #BUNDLE_ERROR_NONE Success
426 * @retval #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
427 * @pre @a b must be a valid bundle object.
431 bundle *b = bundle_create(); // Create a new bundle object
432 bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair
435 bundle_encode(b, &r, &len); // Encode b
440 int bundle_encode(bundle *b, bundle_raw **r, int *len);
444 * @brief Deserializes bundle_raw and gets the bundle object.
445 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
446 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
447 * The returned value should be released using bundle_free().
448 * @param[in] r The bundle_raw data to be converted to bundle object
449 * @param[in] len The size of @a r
450 * @return The bundle object,
452 * @exception #BUNDLE_ERROR_NONE Success
453 * @exception #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
454 * @pre @a r must be a valid bundle object.
458 bundle *b = bundle_create(); // Create a new bundle object
459 bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair
461 bundle_raw *encoded_b;
463 bundle_encode(b, &encoded_b, &len); // Encode b
466 b_dup = bundle_decode(encoded_b, len); // Decoded bundle object
473 bundle *bundle_decode(const bundle_raw *r, const int len);
477 * @brief Adds a string type key-value pair into a bundle.
478 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
479 * @param[in] b The bundle object
480 * @param[in] key The key
481 * @param[in] str The string type value
482 * @return The operation result
483 * @retval #BUNDLE_ERROR_NONE Success
484 * @retval #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
485 * @retval #BUNDLE_ERROR_KEY_EXISTS Key already exists
486 * @retval #BUNDLE_ERROR_OUT_OF_MEMORY Out of memory
487 * @pre @a b must be a valid bundle object.
488 * @see bundle_get_str()
491 bundle *b = bundle_create(); // Create a new bundle object
492 bundle_add_str(b, "foo", "bar"); // Add a key-value pair
497 int bundle_add_str(bundle *b, const char *key, const char *str);
501 * @brief Adds a byte sequence type key-value pair into a bundle.
502 * @details The bundle will contain a copy of the added byte sequence.
503 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
504 * @param[in] b The bundle object
505 * @param[in] key The key
506 * @param[in] bytes The byte sequence
507 * @param[in] size The byte sequence size in bytes
508 * @return The operation result
509 * @retval #BUNDLE_ERROR_NONE Success
510 * @retval #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
511 * @retval #BUNDLE_ERROR_KEY_EXISTS Key already exists
512 * @retval #BUNDLE_ERROR_OUT_OF_MEMORY Out of memory
513 * @pre @a b must be a valid bundle object.
514 * @see bundle_get_byte()
518 bundle *b = bundle_create(); // Create a new bundle object
519 bundle_add_byte(b, "foo", "bar\0", 4); // Add a key-value pair
522 bundle_add_byte(b, "number", &number, sizeof(int));
527 int bundle_add_byte(bundle *b, const char *key, const void *bytes, const size_t size);
531 * @brief Gets the string value with the given key.
532 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
533 * @remarks You must not free str.
534 * @param[in] b The bundle object
535 * @param[in] key The key
536 * @param[out] str The returned value
537 * @return The operation result
538 * @retval #BUNDLE_ERROR_NONE Success
539 * @retval #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
540 * @retval #BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available
541 * @pre @a b must be a valid bundle object.
542 * @see bundle_add_str()
546 bundle *b = bundle_create(); // Create a new bundle object
547 bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair
550 bundle_get_str(b, "foo_key", &v); // v = "bar_val"
552 bundle_free(b); // After freeing b, v becomes a dangling pointer
556 int bundle_get_str(bundle *b, const char *key, char **str);
560 * @brief Gets the byte sequence with the given key.
561 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
562 * @remarks You must not free @a bytes.
563 * @param[in] b The bundle object
564 * @param[in] key The key
565 * @param[out] bytes The byte sequence
566 * @param[out] size The byte sequence size in bytes
567 * @return The operation result
568 * @retval #BUNDLE_ERROR_NONE Success
569 * @retval #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
570 * @retval #BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available
571 * @pre @a b must be a valid bundle object.
572 * @see bundle_add_byte()
576 bundle *b = bundle_create(); // Create a new bundle object
577 bundle_add_byte(b, "foo", "bar\0", 4); // Add a string to the bundle
579 bundle_add_byte(b, "number", (const void**)&number, sizeof(int)); // Add an integer to the bundle
581 unsigned char *v = NULL;
583 bundle_get_byte(b, "foo", (void**)&v, &v_size); // v = "bar\0"
586 bundle_get_byte(b, "number", (void**)&n, &n_size); // number = 12345
588 bundle_free(b); // After freeing b, v and n become a dangling pointer
591 int bundle_get_byte(bundle *b, const char *key, void **bytes, size_t *size);
594 * @brief Adds an 'array of byte sequences' type key-value pair into a bundle.
596 * @remarks To set the value of the byte array element, you should use bundle_set_byte_array_element().
597 * This function is only for creating a buffer of the byte array.
599 * @param[in] b The bundle object
600 * @param[in] key The key
601 * @param[in] len The length of the array to be created
602 * @return @c 0 on success,
603 * otherwise a negative error value
604 * @retval #BUNDLE_ERROR_NONE Successful
605 * @retval #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
606 * @retval #BUNDLE_ERROR_KEY_EXISTS Key already exists
607 * @retval #BUNDLE_ERROR_OUT_OF_MEMORY Out of memory
609 * @see bundle_get_byte_array()
610 * @see bundle_set_byte_array_element()
612 int bundle_add_byte_array(bundle *b, const char *key, const unsigned int len);
615 * @brief Sets an element of an array of byte sequences.
616 * @details The array will contain its own copy of the added value.
619 * @param[in] b The bundle object
620 * @param[in] key The key
621 * @param[in] idx The index of the array element to be changed
622 * @param[in] bytes The byte sequence
623 * @param[in] size The byte sequence size in bytes
624 * @return @c 0 on success,
625 * otherwise a negative error value
626 * @retval #BUNDLE_ERROR_NONE Successful
627 * @retval #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
628 * @retval #BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available
629 * @retval #BUNDLE_ERROR_OUT_OF_MEMORY Out of memory
630 * @retval #BUNDLE_ERROR_ARRAY_INDEX_OUT_OF_BOUNDS The index is out of bounds of the array
632 * @see bundle_add_byte_array()
633 * @see bundle_get_byte_array()
635 int bundle_set_byte_array_element(bundle *b, const char *key, const unsigned int idx, const void *bytes, const size_t size);
638 * @brief Gets the array of byte sequences with the given key.
640 * @remarks You should not release @a byte_array, @a len and @a array_element_size.
641 * @a byte_array, @a len and @a array_element_size will be released when the bundle containing them is released with bundle_free().
643 * @param[in] b The bundle object
644 * @param[in] key The key
645 * @param[out] byte_array The array pointer of the byte value
646 * @param[out] len The array length
647 * @param[out] array_element_size An array of sizes of each @a byte_array element
648 * @return @c 0 on success,
649 * otherwise a negative error value
650 * @retval #BUNDLE_ERROR_NONE Successful
651 * @retval #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
652 * @retval #BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available
654 * @see bundle_add_byte_array()
655 * @see bundle_set_byte_array_element()
657 int bundle_get_byte_array(bundle *b, const char *key, void ***byte_array, unsigned int *len, unsigned int **array_element_size);
667 #endif /* __BUNDLE_H__ */