X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Finc%2Fcablockwisetransfer.h;h=3b848ccbf32c633448596aea74df8d0c67b28336;hb=02b64e2e546d5f2bb32e0a2b216f8b3a4d345518;hp=f25cb2eb53e1bdd2c0369c9305b08b7736953c34;hpb=a01c5d0400bfa9fd51388c1c0bb6e0a5d64d0a2e;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/inc/cablockwisetransfer.h b/resource/csdk/connectivity/inc/cablockwisetransfer.h index f25cb2e..3b848cc 100644 --- a/resource/csdk/connectivity/inc/cablockwisetransfer.h +++ b/resource/csdk/connectivity/inc/cablockwisetransfer.h @@ -28,12 +28,18 @@ #include -#include "coap.h" +#include #include "cathreadpool.h" #include "camutex.h" #include "uarraylist.h" #include "cacommon.h" #include "caprotocolmessage.h" +#include "camessagehandler.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /** * Callback to send block data. @@ -110,11 +116,6 @@ typedef enum CA_BLOCK_RECEIVED_ALREADY } CABlockState_t; -#ifdef __cplusplus -extern "C" -{ -#endif - /** * Initializes the block-wise transfer context. * @param[in] CASendThreadFunc function point to add data in send queue thread. @@ -492,6 +493,15 @@ uint8_t CAGetBlockOptionType(const CABlockDataID_t *blockID); CAData_t *CAGetDataSetFromBlockDataList(const CABlockDataID_t *blockID); /** + * Update the block data from block-wise transfer list. + * @param[in] blockID ID set of CABlockData. + * @param[in] sendData New block date should be sent. + * @return CABlockData_t structure. + */ +CABlockData_t *CAUpdateDataSetFromBlockDataList(const CABlockDataID_t *blockID, + const CAData_t *sendData); + +/** * Get token from block-wise transfer list. * @param[in] pdu received pdu binary data. * @param[in] endpoint remote endpoint information. @@ -550,12 +560,20 @@ CABlockData_t *CACreateNewBlockData(const CAData_t *sendData); CAResult_t CARemoveBlockDataFromList(const CABlockDataID_t *blockID); /** - * Check if data exist in block-wise transfer list. - * @param[in] blockID ID set of CABlockData. - * @return true or false. + * Remove all block data in block-wise transfer list. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ -bool CAIsBlockDataInList(const CABlockDataID_t *blockID); +CAResult_t CARemoveAllBlockDataFromList(); +/** + * Find the block data with seed info and remove it from block-wise transfer list. + * @param[in] token token of the message. + * @param[in] tokenLength token length of the message. + * @param[in] portNumber port. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). + */ +CAResult_t CARemoveBlockDataFromListWithSeed(const CAToken_t token, uint8_t tokenLength, + uint16_t portNumber); #ifdef __cplusplus } /* extern "C" */