GMainLoop * event_loop;
/// Mutex used to synchronize access to context fields.
- ca_mutex lock;
+ oc_mutex lock;
/**
* Service registration condition variable.
*
* @see @c GMainLoop documentation for further details.
*/
- ca_cond condition;
+ oc_cond condition;
} CAPeripheralContext;
*/
CAResult_t CAPeripheralStop();
+/**
+ * Invoke function @a func for each registered GATT service.
+ *
+ * For each registered GATT service, invoke the function @a func,
+ * where the first (data) paramter will be a pointer to the
+ * ::CAGattService object, and the second will be the @a user_data
+ * argument provided to this function call.
+ *
+ * @param[in] func Function to be invoked for each
+ * ::CAGattService.
+ * @param[in] user_data User provided data passed as the second
+ * argument to the function @a func.
+ *
+ * @note This function exists to avoid exposing the BLE peripheral
+ * internals.
+ */
+void CAPeripheralForEachService(GFunc func, void * user_data);
+
#endif /* CA_BLE_LINUX_PERIPHERAL_H */