X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Fcommon%2Finc%2Fuarraylist.h;h=cf1085b9a61a0b8613cd56017043d2a307f396d4;hb=8229635f6d207516ccbbdf23b13be164e0fc1787;hp=31a70f6ca6c4601647de8594e732805d10368c4a;hpb=659142c01b7a3a0dcfd1c84c00c50b48913539c5;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/common/inc/uarraylist.h b/resource/csdk/connectivity/common/inc/uarraylist.h index 31a70f6..cf1085b 100644 --- a/resource/csdk/connectivity/common/inc/uarraylist.h +++ b/resource/csdk/connectivity/common/inc/uarraylist.h @@ -68,8 +68,9 @@ void u_arraylist_free(u_arraylist_t **list); * entries. * @param list the list to operate on. * @param count the size to attempt to reserve room for. + * @return true if success, false otherwise. */ -void u_arraylist_reserve(u_arraylist_t *list, size_t count); +bool u_arraylist_reserve(u_arraylist_t *list, size_t count); /** * Request that the storage in the list be reduced to fit its current length. @@ -88,6 +89,15 @@ void u_arraylist_shrink_to_fit(u_arraylist_t *list); void *u_arraylist_get(const u_arraylist_t *list, uint32_t index); /** + * Returns the index of the data from the array list. + * @param[in] list pointer of array list. + * @param[in] data pointer of data. + * @param[out]index index of array list. + * @return true if success, false otherwise. + */ +bool u_arraylist_get_index(const u_arraylist_t *list, const void *data, uint32_t *index); + +/** * Add data in the array list. * @param[in] list pointer of array list. * @param[in] data pointer of data.