replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / connectivity / common / inc / uarraylist.h
index 31a70f6..cf1085b 100644 (file)
@@ -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.