replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / bt_le_adapter / linux / peripheral.h
index 89d9318..2333cb9 100644 (file)
@@ -78,7 +78,7 @@ typedef struct _CAPeripheralContext
     GMainLoop * event_loop;
 
     /// Mutex used to synchronize access to context fields.
-    ca_mutex lock;
+    oc_mutex lock;
 
     /**
      * Service registration condition variable.
@@ -90,7 +90,7 @@ typedef struct _CAPeripheralContext
      *
      * @see @c GMainLoop documentation for further details.
      */
-    ca_cond condition;
+    oc_cond condition;
 
 } CAPeripheralContext;
 
@@ -124,5 +124,23 @@ CAResult_t CAPeripheralStart(CALEContext * context);
  */
 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 */