Fix for all discovered devices to include a secure port
[platform/upstream/iotivity.git] / resource / csdk / security / provisioning / include / pmtypes.h
index 4313e36..1a5f8cb 100644 (file)
@@ -67,11 +67,32 @@ typedef struct OCProvisionDev
     OicSecDoxm_t    *doxm;           /**< Pointer to target's doxm resource. **/
     OCConnectivityType connType;     /**< Connectivity type of endpoint */
     uint16_t        securePort;      /**< secure port **/
+#ifdef WITH_TCP
+    uint16_t        tcpPort;         /**< tcp port **/
+#endif
+    char             secVer[MAX_VERSION_LEN];         /**< security version **/
     DeviceStatus    devStatus;       /**< status of device **/
+    OCDoHandle    handle;
     struct OCProvisionDev  *next;    /**< Next pointer. **/
 }OCProvisionDev_t;
 
 /**
+ * Device Information of discoverd direct pairing device(s).
+ */
+typedef struct OCDirectPairingDev
+{
+    OCDevAddr               endpoint;
+    OCConnectivityType   connType;
+    uint16_t                     securePort;
+    bool              edp;
+    OicSecPrm_t  *prm;
+    size_t            prmLen;
+    OicUuid_t       deviceID;
+    OicUuid_t       rowner;
+    struct OCDirectPairingDev *next;
+} OCDirectPairingDev_t;
+
+/**
  * Result information for each target device.
  */
 typedef struct OCPMResult{
@@ -90,6 +111,18 @@ typedef struct OCPMResult{
  */
 typedef void (*OCProvisionResultCB)(void* ctx, int nOfRes, OCProvisionResult_t *arr, bool hasError);
 
+
+/**
+ * Callback function definition of direct-pairing
+ *
+ * @param[OUT] ctx - User context which will be returned wth callback
+ * @param[OUT] peer - pairing device info.
+ * @param[OUT} result - It's returned with 'OC_STACK_XXX'. It will return 'OC_STACK_OK'
+ *                                   if D2D pairing is success without error
+ */
+typedef void (*OCDirectPairingResultCB)(void *ctx, OCDirectPairingDev_t *peer, OCStackResult result);
+
+
 #ifdef __cplusplus
 }
 #endif