+#if defined(__WITH_DTLS__) || defined(__WITH_TLS__)
+/**
+ * Callback function definition for Change in TrustCertChain
+ *
+ * @param[IN] ctx - user context returned in the callback.
+ * @param[IN] credId - trustCertChain changed for this ID
+ * @param[IN] trustCertChain - trustcertchain binary blob.
+ * @param[IN] chainSize - size of trustchain
+ */
+typedef void (*TrustCertChainChangeCB)(void *ctx, uint16_t credId, uint8_t *trustCertChain,
+ size_t chainSize);
+
+/**
+ * certChain context structure.
+ */
+typedef struct trustCertChainContext
+{
+ TrustCertChainChangeCB callback;
+ void *context;
+} trustCertChainContext_t;
+#endif
+
+/**
+ * OTM State
+ */
+typedef enum
+{
+ OC_OTM_READY = 0,
+ OC_OTM_STARTED = 1,
+ OC_OTM_DONE = 2,
+ OC_OTM_ERROR = 3
+} OCOtmEvent_t;
+
+/**
+ * Callback function to receive the OTM event on server side.
+ *
+ * @param[in] ctx user context returned in the callback
+ * @param[in] addr PT's address (address can be NULL in case of init state)
+ * @param[in] port PT's port (It is meaningless in case of init state & BLE)
+ * @param[in] uuid PT's UUID (UUID can be NULL in case of init state & coap reqest)
+ * @param[in] event OTM state (@ref OCOtmEvent_t)
+ */
+typedef void (*OCOtmEventHandler)(void *ctx, const char *addr, uint16_t port,
+ const char *ownerId, OCOtmEvent_t event);