X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Fapi%2Fcainterface.h;h=b6677660212c072e582547cb4effa3b86eba4ab5;hb=3c093548382bb2542c87a67e6e5fa32552c29cb3;hp=a2538462f28875b98f94852089541a86ad23da3e;hpb=a29c54ef36ae8b0ea7769604aabd5851a2103d33;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/api/cainterface.h b/resource/csdk/connectivity/api/cainterface.h index a253846..b667766 100644 --- a/resource/csdk/connectivity/api/cainterface.h +++ b/resource/csdk/connectivity/api/cainterface.h @@ -68,32 +68,27 @@ typedef struct /** * Callback function to pass the connection information from CA to RI. * @param[out] object remote device information. + * @param[out] isConnected Whether keepalive message needs to be sent. + * @param[out] isClient Host Mode of Operation. */ -typedef void (*CAKeepAliveConnectedCallback)(const CAEndpoint_t *object); +typedef void (*CAKeepAliveConnectionCallback)(const CAEndpoint_t *object, bool isConnected, + bool isClient); /** - * Callback function to pass the disconnection information from CA to RI. - * @param[out] object remote device information. - */ -typedef void (*CAKeepAliveDisconnectedCallback)(const CAEndpoint_t *object); - -/** - * Register connected callback and disconnected callback to process KeepAlive. + * Register connection status changes callback to process KeepAlive. * connection informations are delivered these callbacks. - * @param[in] ConnHandler Connected callback. - * @param[in] DisconnHandler Disconnected Callback. + * @param[in] ConnHandler Connection status changes callback. */ -void CARegisterKeepAliveHandler(CAKeepAliveConnectedCallback ConnHandler, - CAKeepAliveDisconnectedCallback DisconnHandler); +void CARegisterKeepAliveHandler(CAKeepAliveConnectionCallback ConnHandler); #endif /** * Initialize the connectivity abstraction module. * It will initialize adapters, thread pool and other modules based on the platform * compilation options. - * + * @param[in] transportType transport type to initialize. * @return ::CA_STATUS_OK or ::CA_STATUS_FAILED or ::CA_MEMORY_ALLOC_FAILED */ -CAResult_t CAInitialize(); +CAResult_t CAInitialize(CATransportAdapter_t transportType); /** * Terminate the connectivity abstraction module. @@ -239,7 +234,16 @@ CAResult_t CAHandleRequestResponse(); CAResult_t CASetRAInfo(const CARAInfo_t *caraInfo); #endif - +#ifdef WITH_CHPROXY +/** + * This function sets uri being used for proxy. + * + * @param uri NULL terminated resource uri for CoAP-HTTP Proxy. + * + * @return ::CA_STATUS_OK or ::CA_STATUS_INVALID_PARAM + */ +CAResult_t CASetProxyUri(const char *uri); +#endif #ifdef __cplusplus } /* extern "C" */