modified cainterface comment for doxygen.
authorjihwan.seo <jihwan.seo@samsung.com>
Thu, 13 Aug 2015 12:33:11 +0000 (21:33 +0900)
committerJon A. Cruz <jonc@osg.samsung.com>
Mon, 17 Aug 2015 18:44:51 +0000 (18:44 +0000)
Change-Id: I9022d3dd31e1f0e92d10964017abc1060f7d19c1
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2198
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
resource/csdk/connectivity/api/cainterface.h

index 27b4ff2..7449b28 100644 (file)
@@ -42,28 +42,25 @@ extern "C"
 #endif
 
 /**
- * @brief   Callback function type for request delivery.
- * @param   object      [OUT] Endpoint object from which the request is received. It contains
- *                            endpoint address based on the connectivity type.
- * @param   requestInfo [OUT] Info for resource model to understand about the request.
- * @return  NONE
+ * Callback function type for request delivery.
+ * @param[out]   object       Endpoint object from which the request is received.
+ *                            It contains endpoint address based on the connectivity type.
+ * @param[out]   requestInfo  Info for resource model to understand about the request.
  */
 typedef void (*CARequestCallback)(const CAEndpoint_t *object,
                                   const CARequestInfo_t *requestInfo);
 
 /**
- * @brief   Callback function type for response delivery.
- * @param   object          [OUT] Endpoint object from which the response is received.
- * @param   responseInfo    [OUT] Identifier which needs to be mapped with response.
- * @return  NONE
+ * Callback function type for response delivery.
+ * @param[out]   object           Endpoint object from which the response is received.
+ * @param[out]   responseInfo     Identifier which needs to be mapped with response.
  */
 typedef void (*CAResponseCallback)(const CAEndpoint_t *object,
                                    const CAResponseInfo_t *responseInfo);
 /**
- * @brief   Callback function type for error
- * @param   object          [OUT] remote device information
- * @param   errorInfo       [OUT] CA Error information
- * @return  NONE
+ * Callback function type for error.
+ * @param[out]   object           remote device information.
+ * @param[out]   errorInfo        CA Error information.
  */
 typedef void (*CAErrorCallback)(const CAEndpoint_t *object,
                                 const CAErrorInfo_t *errorInfo);
@@ -76,83 +73,80 @@ typedef void (*CAErrorCallback)(const CAEndpoint_t *object,
  */
 typedef struct
 {
-   unsigned char identity[DTLS_PSK_ID_LEN]; /** identity of self */
-   uint32_t num;                            /** number of credentials in this blob */
+   unsigned char identity[DTLS_PSK_ID_LEN]; /** identity of self. */
+   uint32_t num;                            /** number of credentials in this blob. */
    OCDtlsPskCreds *creds;                   /** list of credentials. Size of this
                                                 array is determined by 'num' variable. */
 } CADtlsPskCredsBlob_t;
 
 /**
- * @brief   Callback function type for getting DTLS credentials.
- * @param   credInfo          [OUT] DTLS credentials info. Handler has to allocate new memory for
- *                                  both credInfo and credInfo->creds which is then freed by CA
- * @return  NONE
+ * Callback function type for getting DTLS credentials.
+ * @param[out]   credInfo     DTLS credentials info. Handler has to allocate new memory for.
+ *                            both credInfo and credInfo->creds which is then freed by CA.
  */
 typedef void (*CAGetDTLSCredentialsHandler)(CADtlsPskCredsBlob_t **credInfo);
 #endif //__WITH_DTLS__
 
 /**
- * @brief   Initialize the connectivity abstraction module.
- *          It will initialize adapters, thread pool and other modules based on the platform
- *          compilation options.
+ * Initialize the connectivity abstraction module.
+ * It will initialize adapters, thread pool and other modules based on the platform
+ * compilation options.
  *
- * @return  #CA_STATUS_OK or #CA_STATUS_FAILED or #CA_MEMORY_ALLOC_FAILED
+ * @return  ::CA_STATUS_OK or ::CA_STATUS_FAILED or ::CA_MEMORY_ALLOC_FAILED
  */
 CAResult_t CAInitialize();
 
 /**
- * @brief   Terminate the connectivity abstraction module.
- *          All threads, data structures are destroyed for next initializations.
- * @return  NONE
+ * Terminate the connectivity abstraction module.
+ * All threads, data structures are destroyed for next initializations.
  */
 void CATerminate();
 
 /**
- * @brief   Starts listening servers.
- *          This API is used by resource hosting server for listening multicast requests.
- *          Based on the adapters configurations, different kinds of servers are started.
- * @return  #CA_STATUS_OK or #CA_STATUS_FAILED
+ * Starts listening servers.
+ * This API is used by resource hosting server for listening multicast requests.
+ * Based on the adapters configurations, different kinds of servers are started.
+ * @return  ::CA_STATUS_OK or ::CA_STATUS_FAILED
  */
 CAResult_t CAStartListeningServer();
 
 /**
- * @brief   Starts discovery servers.
- *          This API is used by resource required clients for listening multicast requests.
- *          Based on the adapters configurations, different kinds of servers are started.
- * @return  #CA_STATUS_OK or #CA_STATUS_FAILED
+ * Starts discovery servers.
+ * This API is used by resource required clients for listening multicast requests.
+ * Based on the adapters configurations, different kinds of servers are started.
+ * @return  ::CA_STATUS_OK or ::CA_STATUS_FAILED
  */
 CAResult_t CAStartDiscoveryServer();
 
 /**
- * @brief   Register request callbacks and response callbacks.
- *          Requests and responses are delivered these callbacks .
- * @param   ReqHandler   [IN] Request callback ( for GET,PUT ..etc)
- * @param   RespHandler  [IN] Response Handler Callback
+ * Register request callbacks and response callbacks.
+ *          Requests and responses are delivered these callbacks.
+ * @param[in]   ReqHandler    Request callback ( for GET,PUT ..etc).
+ * @param[in]   RespHandler   Response Handler Callback.
  * @see     CARequestCallback
  * @see     CAResponseCallback
  * @see     CAErrorCallback
- * @return  NONE
  */
 void CARegisterHandler(CARequestCallback ReqHandler, CAResponseCallback RespHandler,
                        CAErrorCallback ErrorHandler);
 
 #ifdef __WITH_DTLS__
 /**
- * @brief   Register callback to get DTLS PSK credentials.
- * @param   GetDTLSCredentials   [IN] GetDTLS Credetials callback
- * @return  #CA_STATUS_OK
+ * Register callback to get DTLS PSK credentials.
+ * @param[in]   GetDTLSCredentials    GetDTLS Credetials callback.
+ * @return  ::CA_STATUS_OK
  */
 CAResult_t CARegisterDTLSCredentialsHandler(CAGetDTLSCredentialsHandler GetDTLSCredentials);
 #endif //__WITH_DTLS__
 
 /**
- * @brief   Create an endpoint description
- * @param   flags               [IN]  how the adapter should be used
- * @param   adapter             [IN]  which adapter to use
- * @param   addr                [IN]  string representation of address
- * @param   port                [IN]  port (for IP_ADAPTER)
- * @param   endpoint            [OUT] Endpoint which contains the above
- * @return  #CA_STATUS_OK or #CA_STATUS_FAILED
+ * Create an endpoint description.
+ * @param[in]   flags                 how the adapter should be used.
+ * @param[in]   adapter               which adapter to use.
+ * @param[in]   addr                  string representation of address.
+ * @param[in]   port                  port (for IP_ADAPTER).
+ * @param[in]   endpoint              Endpoint which contains the above.
+ * @return  ::CA_STATUS_OK or ::CA_STATUS_FAILED
  * @remark  The created Remote endpoint can be freed using CADestroyEndpoint().
  * @see     CADestroyEndpoint
  */
@@ -163,94 +157,93 @@ CAResult_t CACreateEndpoint(CATransportFlags_t flags,
                             CAEndpoint_t **object);
 
 /**
- * @brief   Destroy the remote endpoint created
- * @param   object  [IN] Remote Endpoint object created with CACreateEndpoint
- * @return  NONE
+ * Destroy the remote endpoint created.
+ * @param[in]   object   Remote Endpoint object created with CACreateEndpoint.
  */
 void CADestroyEndpoint(CAEndpoint_t *object);
 
 /**
- * @brief   Generating the token for matching the request and response.
- * @param   token          [OUT] Token for the request
- * @param   tokenLength    [IN]  length of the token
- * @return  #CA_STATUS_OK or #CA_STATUS_FAILED or #CA_MEMORY_ALLOC_FAILED
- *          or #CA_STATUS_NOT_INITIALIZED
+ * Generating the token for matching the request and response.
+ * @param[in]   token            Token for the request.
+ * @param[in]   tokenLength      length of the token.
+ * @return  ::CA_STATUS_OK or ::CA_STATUS_FAILED or
+ *          ::CA_MEMORY_ALLOC_FAILED or ::CA_STATUS_NOT_INITIALIZED
  * @remark  Token memory is destroyed by the caller using CADestroyToken().
  * @see     CADestroyToken
  */
 CAResult_t CAGenerateToken(CAToken_t *token, uint8_t tokenLength);
 
 /**
- * @brief   Destroy the token generated by CAGenerateToken
- * @param   token   [IN] token to be freed
- * @return  NONE
+ * Destroy the token generated by CAGenerateToken.
+ * @param[in]   token    token to be freed.
  */
 void CADestroyToken(CAToken_t token);
 
 /**
- * @brief   Send control Request on a resource
- * @param   object      [IN] Endpoint where the payload need to be sent.
+ * Send control Request on a resource.
+ * @param[in]   object       Endpoint where the payload need to be sent.
  *                           This endpoint is delivered with Request or response callback.
- * @param   requestInfo [IN] Information for the request.
- * @return  #CA_STATUS_OK #CA_STATUS_FAILED #CA_MEMORY_ALLOC_FAILED
+ * @param[in]   requestInfo  Information for the request.
+ * @return  ::CA_STATUS_OK ::CA_STATUS_FAILED ::CA_MEMORY_ALLOC_FAILED
  */
 CAResult_t CASendRequest(const CAEndpoint_t *object, const CARequestInfo_t *requestInfo);
 
 /**
- * @brief   Send the response
- * @param   object          [IN] Endpoint where the payload need to be sent.
- *                               This endpoint is delivered with Request or response callback
- * @param   responseInfo    [IN] Information for the response
- * @return  #CA_STATUS_OK or  #CA_STATUS_FAILED or #CA_MEMORY_ALLOC_FAILED
+ * Send the response.
+ * @param[in]   object           Endpoint where the payload need to be sent.
+ *                               This endpoint is delivered with Request or response callback.
+ * @param[in]   responseInfo     Information for the response.
+ * @return  ::CA_STATUS_OK or  ::CA_STATUS_FAILED or ::CA_MEMORY_ALLOC_FAILED
  */
 CAResult_t CASendResponse(const CAEndpoint_t *object, const CAResponseInfo_t *responseInfo);
 
 /**
- * @brief   Send notification to the remote object
- * @param   object          [IN] Endpoint where the payload need to be sent.
+ * Send notification to the remote object.
+ * @param[in]   object           Endpoint where the payload need to be sent.
  *                               This endpoint is delivered with Request or response callback.
- * @param   responseInfo    [IN] Information for the response.
- * @return  #CA_STATUS_OK or #CA_STATUS_FAILED or #CA_MEMORY_ALLOC_FAILED
+ * @param[in]   responseInfo     Information for the response.
+ * @return  ::CA_STATUS_OK or ::CA_STATUS_FAILED or ::CA_MEMORY_ALLOC_FAILED
  */
 CAResult_t CASendNotification(const CAEndpoint_t *object,
                       const  CAResponseInfo_t *responseInfo);
 
 /**
- * @brief   Select network to use
- * @param   interestedNetwork   [IN] Connectivity Type enum
- * @return  #CA_STATUS_OK or #CA_NOT_SUPPORTED or #CA_STATUS_FAILED or #CA_NOT_SUPPORTED
+ * Select network to use.
+ * @param[in]   interestedNetwork    Connectivity Type enum.
+ * @return  ::CA_STATUS_OK or ::CA_NOT_SUPPORTED or
+ *          ::CA_STATUS_FAILED or ::CA_NOT_SUPPORTED
  */
 CAResult_t CASelectNetwork(CATransportAdapter_t interestedNetwork);
 
 /**
- * @brief   Select network to unuse
- * @param   nonInterestedNetwork    [IN] Connectivity Type enum
- * @return  #CA_STATUS_OK or #CA_NOT_SUPPORTED or #CA_STATUS_FAILED
+ * Select network to unuse.
+ * @param[in]   nonInterestedNetwork     Connectivity Type enum.
+ * @return  ::CA_STATUS_OK or ::CA_NOT_SUPPORTED or ::CA_STATUS_FAILED
  */
 CAResult_t CAUnSelectNetwork(CATransportAdapter_t nonInterestedNetwork);
 
 /**
- * @brief   Get network information
- *          It should be destroyed by the caller as it Get Information.
- * @param   info    [OUT] LocalConnectivity objects
- * @param   size    [OUT] No Of Array objects
- * @return  #CA_STATUS_OK or #CA_STATUS_FAILED or #CA_STATUS_INVALID_PARAM or
-*                #CA_MEMORY_ALLOC_FAILED
+ * Get network information.
+ * It should be destroyed by the caller as it Get Information.
+ * @param[out]   info     LocalConnectivity objects
+ * @param[out]   size     No Of Array objects
+ * @return  ::CA_STATUS_OK or ::CA_STATUS_FAILED or
+ *          ::CA_STATUS_INVALID_PARAM or ::CA_MEMORY_ALLOC_FAILED
  */
 CAResult_t CAGetNetworkInformation(CAEndpoint_t **info, uint32_t *size);
 
 /**
- * @brief    To Handle the Request or Response
- * @return   #CA_STATUS_OK
+ * To Handle the Request or Response.
+ * @return   ::CA_STATUS_OK
  */
 CAResult_t CAHandleRequestResponse();
 
 #ifdef RA_ADAPTER
 /**
- * @brief   Set Remote Access information for XMPP Client.
- * @param   caraInfo          [IN] remote access info.
+ * Set Remote Access information for XMPP Client.
+ * @param[in]   caraInfo          remote access info.
  *
- * @return  #CA_STATUS_OK
+ * @return  ::CA_STATUS_OK
  */
 CAResult_t CASetRAInfo(const CARAInfo_t *caraInfo);
 #endif
@@ -259,26 +252,26 @@ CAResult_t CASetRAInfo(const CARAInfo_t *caraInfo);
 #ifdef __WITH_DTLS__
 
 /**
- * Select the cipher suite for dtls handshake
+ * Select the cipher suite for dtls handshake.
  *
- * @param[IN] cipher  cipher suite (Note : Make sure endianness)
- *                               0xC018 : TLS_ECDH_anon_WITH_AES_128_CBC_SHA
- *                               0xC0A8 : TLS_PSK_WITH_AES_128_CCM_8
- *                               0xC0AE : TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8
+ * @param[in] cipher  cipher suite (Note : Make sure endianness).
+ *                    0xC018 : TLS_ECDH_anon_WITH_AES_128_CBC_SHA
+ *                    0xC0A8 : TLS_PSK_WITH_AES_128_CCM_8
+ *                    0xC0AE : TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8
  *
- * @retval  CA_STATUS_OK    Successful
- * @retval  CA_STATUS_INVALID_PARAM  Invalid input argumets
- * @retval  CA_STATUS_FAILED Operation failed
+ * @retval  ::CA_STATUS_OK    Successful.
+ * @retval  ::CA_STATUS_INVALID_PARAM  Invalid input arguments.
+ * @retval  ::CA_STATUS_FAILED Operation failed.
  */
 CAResult_t CASelectCipherSuite(const uint16_t cipher);
 
 /**
- * Enable TLS_ECDH_anon_WITH_AES_128_CBC_SHA cipher suite in dtls
+ * Enable TLS_ECDH_anon_WITH_AES_128_CBC_SHA cipher suite in dtls.
  *
- * @param[IN] enable  TRUE/FALSE enables/disables anonymous cipher suite
+ * @param[in] enable  TRUE/FALSE enables/disables anonymous cipher suite.
  *
- * @retval  CA_STATUS_OK    Successful
- * @retval  CA_STATUS_FAILED Operation failed
+ * @retval  ::CA_STATUS_OK    Successful.
+ * @retval  ::CA_STATUS_FAILED Operation failed.
  *
  * @note anonymous cipher suite should only be enabled for 'JustWorks' provisioning.
  */
@@ -286,23 +279,23 @@ CAResult_t CAEnableAnonECDHCipherSuite(const bool enable);
 
 
 /**
- * Generate ownerPSK using PRF
+ * Generate ownerPSK using PRF.
  * OwnerPSK = TLS-PRF('master key' , 'oic.sec.doxm.jw',
- *                                    'ID of new device(Resource Server)',
- *                                    'ID of owner smart-phone(Provisioning Server)')
+ *                    'ID of new device(Resource Server)',
+ *                    'ID of owner smart-phone(Provisioning Server)')
  *
- * @param[IN] endpoint  information of network address
- * @param[IN] label  Ownership transfer method e.g)"oic.sec.doxm.jw"
- * @param[IN] labelLen  Byte length of label
- * @param[IN] rsrcServerDeviceID  ID of new device(Resource Server)
- * @param[IN] rsrcServerDeviceIDLen  Byte length of rsrcServerDeviceID
- * @param[IN] provServerDeviceID  label of previous owner
- * @param[IN] provServerDeviceIDLen  byte length of provServerDeviceID
- * @param[IN,OUT] ownerPSK  Output buffer for owner PSK
- * @param[IN] ownerPSKSize  Byte length of the ownerPSK to be generated
+ * @param[in] endpoint  information of network address.
+ * @param[in] label  Ownership transfer method e.g)"oic.sec.doxm.jw".
+ * @param[in] labelLen  Byte length of label.
+ * @param[in] rsrcServerDeviceID  ID of new device(Resource Server).
+ * @param[in] rsrcServerDeviceIDLen  Byte length of rsrcServerDeviceID.
+ * @param[in] provServerDeviceID  label of previous owner.
+ * @param[in] provServerDeviceIDLen  byte length of provServerDeviceID.
+ * @param[in,out] ownerPSK  Output buffer for owner PSK.
+ * @param[in] ownerPSKSize  Byte length of the ownerPSK to be generated.
  *
- * @retval  CA_STATUS_OK    Successful
- * @retval  CA_STATUS_FAILED Operation failed
+ * @retval  ::CA_STATUS_OK    Successful.
+ * @retval  ::CA_STATUS_FAILED Operation failed.
  */
 CAResult_t CAGenerateOwnerPSK(const CAEndpoint_t *endpoint,
                               const uint8_t* label, const size_t labelLen,
@@ -313,22 +306,22 @@ CAResult_t CAGenerateOwnerPSK(const CAEndpoint_t *endpoint,
                               uint8_t* ownerPSK, const size_t ownerPSKSize);
 
 /**
- * Initiate DTLS handshake with selected cipher suite
+ * Initiate DTLS handshake with selected cipher suite.
  *
- * @param[IN] endpoint  information of network address
+ * @param[in] endpoint  information of network address.
  *
- * @retval  CA_STATUS_OK    Successful
- * @retval  CA_STATUS_FAILED Operation failed
+ * @retval  ::CA_STATUS_OK    Successful.
+ * @retval  ::CA_STATUS_FAILED Operation failed.
  */
 CAResult_t CAInitiateHandshake(const CAEndpoint_t *endpoint);
 
 /**
- * Close the DTLS session
+ * Close the DTLS session.
  *
- * @param[IN] endpoint  information of network address
+ * @param[in] endpoint  information of network address.
  *
- * @retval  CA_STATUS_OK    Successful
- * @retval  CA_STATUS_FAILED Operation failed
+ * @retval  ::CA_STATUS_OK    Successful.
+ * @retval  ::CA_STATUS_FAILED Operation failed.
  */
 CAResult_t CACloseDtlsSession(const CAEndpoint_t *endpoint);