Add doxygen comments to connectivity module 81/26581/8
authorpooja <pooja.k@partner.samsung.com>
Wed, 25 Jul 2018 10:19:57 +0000 (15:49 +0530)
committerAshok Babu Channa <ashok.channa@samsung.com>
Fri, 31 Aug 2018 12:27:09 +0000 (12:27 +0000)
Change-Id: Id2820a733503eb05861cf354ae3ea6a2a81a6736
Signed-off-by: pooja <pooja.k@partner.samsung.com>
14 files changed:
resource/csdk/connectivity/api/cacommon.h
resource/csdk/connectivity/inc/caadapternetdtls.h
resource/csdk/connectivity/inc/cablockwisetransfer.h
resource/csdk/connectivity/inc/caipnwmonitor.h
resource/csdk/connectivity/inc/camessagehandler.h
resource/csdk/connectivity/inc/catcpadapter.h
resource/csdk/connectivity/src/bt_edr_adapter/android/org_iotivity_ca_CaEdrInterface.h
resource/csdk/connectivity/src/bt_le_adapter/tizen/caleutil.h
resource/csdk/connectivity/src/ip_adapter/android/caifaddrs.c
resource/csdk/connectivity/src/ip_adapter/android/org_iotivity_ca_CaIpInterface.h
resource/csdk/connectivity/src/ip_adapter/caipadapter.c
resource/csdk/connectivity/src/ip_adapter/webos/caipnwmonitor.c
resource/csdk/connectivity/util/src/btpairing/android/cabtpairing.h
resource/csdk/connectivity/util/src/camanager/camanagerutil.h

index 72b9065..c7f480b 100644 (file)
@@ -1,4 +1,4 @@
-/* ****************************************************************
+/*****************************************************************
  *
  * Copyright 2014 Samsung Electronics All Rights Reserved.
  *
@@ -84,15 +84,15 @@ extern "C"
 /**
  * Max URI length.
  */
-#define CA_MAX_URI_LENGTH 512 /* maximum size of URI */
+#define CA_MAX_URI_LENGTH 512 /**< maximum size of URI */
 
 /**
  * Max PDU length supported.
  */
-#define COAP_MAX_PDU_SIZE           1400 /* maximum size of a CoAP PDU */
+#define COAP_MAX_PDU_SIZE           1400 /**< maximum size of a CoAP PDU */
 
 #ifdef WITH_BWT
-#define CA_DEFAULT_BLOCK_SIZE       CA_BLOCK_SIZE_1024_BYTE
+#define CA_DEFAULT_BLOCK_SIZE       CA_BLOCK_SIZE_1024_BYTE /**< default size of the block */
 #endif
 
 /**
@@ -108,18 +108,18 @@ extern "C"
 /**
  * option types - the highest option number 63.
  */
-#define CA_OPTION_IF_MATCH 1
-#define CA_OPTION_ETAG 4
-#define CA_OPTION_IF_NONE_MATCH 5
-#define CA_OPTION_OBSERVE 6
-#define CA_OPTION_LOCATION_PATH 8
-#define CA_OPTION_URI_PATH 11
-#define CA_OPTION_CONTENT_FORMAT 12
-#define CA_OPTION_CONTENT_TYPE COAP_OPTION_CONTENT_FORMAT
-#define CA_OPTION_MAXAGE 14
-#define CA_OPTION_URI_QUERY 15
-#define CA_OPTION_ACCEPT 17
-#define CA_OPTION_LOCATION_QUERY 20
+#define CA_OPTION_IF_MATCH 1          /**< match option */
+#define CA_OPTION_ETAG 4              /**< ETAG option */
+#define CA_OPTION_IF_NONE_MATCH 5     /**< non match option */
+#define CA_OPTION_OBSERVE 6           /**< observe option */
+#define CA_OPTION_LOCATION_PATH 8     /**< location path option */
+#define CA_OPTION_URI_PATH 11         /**< URI path option */
+#define CA_OPTION_CONTENT_FORMAT 12   /**< content format option */
+#define CA_OPTION_CONTENT_TYPE COAP_OPTION_CONTENT_FORMAT /**< content type option */
+#define CA_OPTION_MAXAGE 14           /**< max age option */
+#define CA_OPTION_URI_QUERY 15        /**< uri query option */
+#define CA_OPTION_ACCEPT 17           /**< accept option */
+#define CA_OPTION_LOCATION_QUERY 20   /**< location query option */
 
 /**
  * @def UUID_PREFIX
@@ -136,9 +136,9 @@ extern "C"
 /**
 * TODO: Move these COAP defines to CoAP lib once approved.
 */
-#define COAP_MEDIATYPE_APPLICATION_VND_OCF_CBOR 10000 // application/vnd.ocf+cbor
-#define CA_OPTION_ACCEPT_VERSION 2049
-#define CA_OPTION_CONTENT_VERSION 2053
+#define COAP_MEDIATYPE_APPLICATION_VND_OCF_CBOR 10000 /**< application/vnd.ocf+cbor */
+#define CA_OPTION_ACCEPT_VERSION 2049                 /**< accept version option */
+#define CA_OPTION_CONTENT_VERSION 2053                /**< content version option */
 
 // The Accept Version and Content-Format Version for OCF 1.0.0 (0b0000 1000 0000 0000).
 #define DEFAULT_VERSION_VALUE 2048
@@ -175,12 +175,12 @@ typedef char *CAToken_t;
  * Socket types and error definitions.
  */
 #ifdef HAVE_WINSOCK2_H
-# define OC_SOCKET_ERROR      SOCKET_ERROR
-# define OC_INVALID_SOCKET    INVALID_SOCKET
+# define OC_SOCKET_ERROR      SOCKET_ERROR           /**< Socket error */
+# define OC_INVALID_SOCKET    INVALID_SOCKET         /**< Invalid socket */
 typedef SOCKET CASocketFd_t;
 #else // HAVE_WINSOCK2_H
-# define OC_SOCKET_ERROR      (-1)
-# define OC_INVALID_SOCKET    (-1)
+# define OC_SOCKET_ERROR      (-1)                   /**< Socket error */
+# define OC_INVALID_SOCKET    (-1)                   /**< Invalid socket */
 typedef int    CASocketFd_t;
 #endif
 
@@ -201,60 +201,64 @@ typedef int    CASocketFd_t;
 #define MAX_ADDR_STR_SIZE_CA (66)
 #endif
 
+/** Enums for transport adapter value */
 typedef enum
 {
-    CA_DEFAULT_ADAPTER = 0,
+    CA_DEFAULT_ADAPTER = 0,                /**< default adapter */
 
     // value zero indicates discovery
-    CA_ADAPTER_IP            = (1 << 0),   // IPv4 and IPv6, including 6LoWPAN
-    CA_ADAPTER_GATT_BTLE     = (1 << 1),   // GATT over Bluetooth LE
-    CA_ADAPTER_RFCOMM_BTEDR  = (1 << 2),   // RFCOMM over Bluetooth EDR
+    CA_ADAPTER_IP            = (1 << 0),   /**< IPv4 and IPv6, including 6LoWPAN */
+    CA_ADAPTER_GATT_BTLE     = (1 << 1),   /**< GATT over Bluetooth LE */
+    CA_ADAPTER_RFCOMM_BTEDR  = (1 << 2),   /**< RFCOMM over Bluetooth EDR */
 
 #ifdef RA_ADAPTER
-    CA_ADAPTER_REMOTE_ACCESS = (1 << 3),   // Remote Access over XMPP.
+    CA_ADAPTER_REMOTE_ACCESS = (1 << 3),   /**< Remote Access over XMPP. */
 #endif
 
-    CA_ADAPTER_TCP           = (1 << 4),   // CoAP over TCP
-    CA_ADAPTER_NFC           = (1 << 5),   // NFC Adapter
+    CA_ADAPTER_TCP           = (1 << 4),   /**< CoAP over TCP */
+    CA_ADAPTER_NFC           = (1 << 5),   /**< NFC Adapter */
 
-    CA_ALL_ADAPTERS          = 0xffffffff
+    CA_ALL_ADAPTERS          = 0xffffffff  /**< all adapters */
 } CATransportAdapter_t;
 
+/** Enums for transport flags value */
 typedef enum
 {
-    CA_DEFAULT_FLAGS = 0,
+    CA_DEFAULT_FLAGS = 0,     /**< default flags */
 
-    // Insecure transport is the default (subject to change)
-    CA_SECURE          = (1 << 4),   // secure the transport path
-    // IPv4 & IPv6 autoselection is the default
-    CA_IPV6            = (1 << 5),   // IP adapter only
-    CA_IPV4            = (1 << 6),   // IP adapter only
-    // Indication that a message was received by multicast.
+    /** Insecure transport is the default (subject to change) */
+    CA_SECURE          = (1 << 4),   /**< secure the transport path */
+    /** IPv4 & IPv6 autoselection is the default */
+    CA_IPV6            = (1 << 5),   /**< IP adapter only */
+    CA_IPV4            = (1 << 6),   /**< IP adapter only */
+    /** Indication that a message was received by multicast. */
     CA_MULTICAST       = (1 << 7),
-    // Link-Local multicast is the default multicast scope for IPv6.
-    // These correspond in both value and position to the IPv6 address bits.
-    CA_SCOPE_INTERFACE = 0x1, // IPv6 Interface-Local scope
-    CA_SCOPE_LINK      = 0x2, // IPv6 Link-Local scope (default)
-    CA_SCOPE_REALM     = 0x3, // IPv6 Realm-Local scope
-    CA_SCOPE_ADMIN     = 0x4, // IPv6 Admin-Local scope
-    CA_SCOPE_SITE      = 0x5, // IPv6 Site-Local scope
-    CA_SCOPE_ORG       = 0x8, // IPv6 Organization-Local scope
-    CA_SCOPE_GLOBAL    = 0xE, // IPv6 Global scope
+    /** Link-Local multicast is the default multicast scope for IPv6.
+      * These correspond in both value and position to the IPv6 address bits.
+      */
+    CA_SCOPE_INTERFACE = 0x1,   /**< IPv6 Interface-Local scope */
+    CA_SCOPE_LINK      = 0x2,   /**< IPv6 Link-Local scope (default) */
+    CA_SCOPE_REALM     = 0x3,   /**< IPv6 Realm-Local scope */
+    CA_SCOPE_ADMIN     = 0x4,   /**< IPv6 Admin-Local scope */
+    CA_SCOPE_SITE      = 0x5,   /**< IPv6 Site-Local scope */
+    CA_SCOPE_ORG       = 0x8,   /**< IPv6 Organization-Local scope */
+    CA_SCOPE_GLOBAL    = 0xE,   /**< IPv6 Global scope */
 } CATransportFlags_t;
 
+/** Enums for transport BT flags value */
 typedef enum
 {
-    CA_DEFAULT_BT_FLAGS = 0,
-    // flags for BLE transport
-    CA_LE_ADV_DISABLE   = 0x1,   // disable BLE advertisement.
-    CA_LE_ADV_ENABLE    = 0x2,   // enable BLE advertisement.
-    CA_LE_SERVER_DISABLE = (1 << 4),   // disable gatt server.
-    // flags for EDR transport
-    CA_EDR_SERVER_DISABLE = (1 << 7)
+    CA_DEFAULT_BT_FLAGS = 0,           /**< default BT flags. */
+    /** flags for BLE transport */
+    CA_LE_ADV_DISABLE   = 0x1,         /**< disable BLE advertisement. */
+    CA_LE_ADV_ENABLE    = 0x2,         /**< enable BLE advertisement. */
+    CA_LE_SERVER_DISABLE = (1 << 4),   /**< disable gatt server. */
+    /** flags for EDR transport */
+    CA_EDR_SERVER_DISABLE = (1 << 7)   /**< disable EDR server. */
 } CATransportBTFlags_t;
 
 #define CA_IPFAMILY_MASK (CA_IPV6|CA_IPV4)
-#define CA_SCOPE_MASK 0xf     // mask scope bits above
+#define CA_SCOPE_MASK 0xf              /**< mask scope bits above */
 
 /**
  * Information about the network status.
@@ -262,7 +266,7 @@ typedef enum
 typedef enum
 {
     CA_INTERFACE_DOWN,   /**< Connection is not available */
-    CA_INTERFACE_UP    /**< Connection is Available */
+    CA_INTERFACE_UP      /**< Connection is Available */
 } CANetworkStatus_t;
 
 /*
@@ -270,8 +274,8 @@ typedef enum
  */
 typedef struct
 {
-    uint16_t id_length;
-    unsigned char id[CA_MAX_ENDPOINT_IDENTITY_LEN];
+    uint16_t id_length;                             /**< identity length */
+    unsigned char id[CA_MAX_ENDPOINT_IDENTITY_LEN]; /**< remote identity */
 } CARemoteId_t;
 
 /**
@@ -283,7 +287,7 @@ typedef enum
     CA_MSG_NONCONFIRM,   /**< non-confirmable message (one-shot message) */
     CA_MSG_ACKNOWLEDGE,  /**< used to acknowledge confirmable messages */
     CA_MSG_RESET         /**< used to indicates not-interested or error (lack of context)in
-                                                  received messages */
+                              received messages */
 } CAMessageType_t;
 
 /**
@@ -309,7 +313,7 @@ typedef enum
     CA_BLOCK_SIZE_128_BYTE = 3,   /**< 128byte */
     CA_BLOCK_SIZE_256_BYTE = 4,   /**< 256byte */
     CA_BLOCK_SIZE_512_BYTE = 5,   /**< 512byte */
-    CA_BLOCK_SIZE_1024_BYTE = 6     /**< 1Kbyte */
+    CA_BLOCK_SIZE_1024_BYTE = 6   /**< 1Kbyte */
 } CABlockSize_t;
 
 /**
@@ -318,12 +322,12 @@ typedef enum
  */
 typedef struct
 {
-    CATransportAdapter_t    adapter;    // adapter type
-    CATransportFlags_t      flags;      // transport modifiers
-    uint16_t                port;       // for IP
-    char                    addr[MAX_ADDR_STR_SIZE_CA]; // address for all
-    uint32_t                ifindex;    // usually zero for default interface
-    char                    remoteId[CA_MAX_IDENTITY_SIZE]; // device ID of remote device
+    CATransportAdapter_t    adapter;    /**< adapter type  */
+    CATransportFlags_t      flags;      /**< transport modifiers */
+    uint16_t                port;       /**< for IP */
+    char                    addr[MAX_ADDR_STR_SIZE_CA]; /**< address for all */
+    uint32_t                ifindex;    /**< usually zero for default interface */
+    char                    remoteId[CA_MAX_IDENTITY_SIZE]; /**< device ID of remote device */
 #if defined (ROUTING_GATEWAY) || defined (ROUTING_EP)
     char                    routeData[MAX_ADDR_STR_SIZE_CA]; /**< GatewayId:ClientId of
                                                                     destination. **/
@@ -341,7 +345,7 @@ typedef struct
     // TODO change name to deviceId
     CARemoteId_t identity;      /**< endpoint device uuid */
     CARemoteId_t userId;        /**< endpoint user uuid */
-    uint32_t attributes;
+    uint32_t attributes;        /**< attributes */
     uint8_t publicKey[CA_SECURE_ENDPOINT_PUBLIC_KEY_MAX_LENGTH]; /**< Peer's DER-encoded public key (if using certificate) */
     size_t publicKeyLength;     /**< Length of publicKey; zero if not using certificate */
 } CASecureEndpoint_t;
@@ -404,7 +408,7 @@ typedef enum
     CA_REQUEST_ENTITY_INCOMPLETE = 408,     /**< Request Entity Incomplete */
     CA_REQUEST_ENTITY_TOO_LARGE = 413,      /**< Request Entity Too Large */
     CA_INTERNAL_SERVER_ERROR = 500,         /**< Internal Server Error */
-    CA_BAD_GATEWAY = 502,
+    CA_BAD_GATEWAY = 502,                   /**< Bad gateway */
     CA_SERVICE_UNAVAILABLE = 503,           /**< Server Unavailable */
     CA_RETRANSMIT_TIMEOUT = 504,            /**< Retransmit timeout */
     CA_PROXY_NOT_SUPPORTED = 505            /**< Proxy not enabled to service a request */
@@ -432,11 +436,11 @@ typedef enum
  */
 typedef enum
 {
-    CA_REQUEST_DATA = 1,
-    CA_RESPONSE_DATA,
-    CA_ERROR_DATA,
-    CA_RESPONSE_FOR_RES,
-    CA_SIGNALING_DATA
+    CA_REQUEST_DATA = 1,                  /**< Request data */
+    CA_RESPONSE_DATA,                     /**< Response data */
+    CA_ERROR_DATA,                        /**< Error data */
+    CA_RESPONSE_FOR_RES,                  /**< Response for resource */
+    CA_SIGNALING_DATA                     /**< Signaling data */
 } CADataType_t;
 
 /**
@@ -462,17 +466,17 @@ typedef enum
  */
 typedef enum
 {
-    CA_FORMAT_UNDEFINED = 0,            /**< Undefined enoding format */
-    CA_FORMAT_TEXT_PLAIN,
-    CA_FORMAT_APPLICATION_LINK_FORMAT,
-    CA_FORMAT_APPLICATION_XML,
-    CA_FORMAT_APPLICATION_OCTET_STREAM,
-    CA_FORMAT_APPLICATION_RDF_XML,
-    CA_FORMAT_APPLICATION_EXI,
-    CA_FORMAT_APPLICATION_JSON,
-    CA_FORMAT_APPLICATION_CBOR,
-    CA_FORMAT_APPLICATION_VND_OCF_CBOR,
-    CA_FORMAT_UNSUPPORTED
+    CA_FORMAT_UNDEFINED = 0,               /**< Undefined enoding format */
+    CA_FORMAT_TEXT_PLAIN,                  /**< Plain text */
+    CA_FORMAT_APPLICATION_LINK_FORMAT,     /**< Application link formate */
+    CA_FORMAT_APPLICATION_XML,             /**< Application XML */
+    CA_FORMAT_APPLICATION_OCTET_STREAM,    /**< Application octet stream */
+    CA_FORMAT_APPLICATION_RDF_XML,         /**< Application RDF xml */
+    CA_FORMAT_APPLICATION_EXI,             /**< Application EXI */
+    CA_FORMAT_APPLICATION_JSON,            /**< Application JSON */
+    CA_FORMAT_APPLICATION_CBOR,            /**< Application CBOR */
+    CA_FORMAT_APPLICATION_VND_OCF_CBOR,    /**< Application VND OCF CBOR */
+    CA_FORMAT_UNSUPPORTED                  /**< Unsupported formate */
 } CAPayloadFormat_t;
 
 /**
@@ -480,8 +484,8 @@ typedef enum
  */
 typedef enum
 {
-    CA_HEADER_OPTION_ID_LOCATION_PATH = 8,
-    CA_HEADER_OPTION_ID_LOCATION_QUERY = 20
+    CA_HEADER_OPTION_ID_LOCATION_PATH = 8,      /**< Header option ID location path */
+    CA_HEADER_OPTION_ID_LOCATION_QUERY = 20     /**< Header option ID location query */
 } CAHeaderOptionId_t;
 
 /**
@@ -515,7 +519,7 @@ typedef struct
                                  * otherwise, you can use it */
     CAToken_t token;            /**< Token for CA */
     uint8_t tokenLength;        /**< token length */
-    CAHeaderOption_t *options;  /** Header Options for the request */
+    CAHeaderOption_t *options;  /**< Header Options for the request */
     uint8_t numOptions;         /**< Number of Header options */
     CAPayload_t payload;        /**< payload of the request  */
     size_t payloadSize;         /**< size in bytes of the payload */
@@ -572,7 +576,7 @@ typedef struct
  */
 typedef struct
 {
-    CASignalingCode_t code;
+    CASignalingCode_t code;     /**< signaling code */
     CAInfo_t info;              /**< Information of the signaling */
 } CASignalingInfo_t;
 
@@ -589,17 +593,17 @@ typedef struct
 
 typedef struct
 {
-    CATransportFlags_t flags;
-    uint16_t messageId;
-    char token[CA_MAX_TOKEN_LEN];
-    uint8_t tokenLength;
-    uint32_t ifindex;
+    CATransportFlags_t flags;        /**< Transport flags */
+    uint16_t messageId;              /**< Message Id */
+    char token[CA_MAX_TOKEN_LEN];    /**< Token */
+    uint8_t tokenLength;             /**< Token length */
+    uint32_t ifindex;                /**< Index of interface */
 } CAHistoryItem_t;
 
 typedef struct
 {
-    int nextIndex;
-    CAHistoryItem_t items[HISTORYSIZE];
+    int nextIndex;                       /**< Next item index */
+    CAHistoryItem_t items[HISTORYSIZE];  /**< History items */
 } CAHistory_t;
 
 /**
@@ -607,7 +611,7 @@ typedef struct
  */
 typedef struct
 {
-    int32_t ifIndex; /**< network interface index */
+    int32_t ifIndex; /*!< network interface index */
 } CAIfItem_t;
 
 /**
@@ -718,8 +722,8 @@ extern CAGlobals_t caglobals;
 
 typedef enum
 {
-    CA_LOG_LEVEL_ALL = 1,             // all logs.
-    CA_LOG_LEVEL_INFO,                // debug level is disabled.
+    CA_LOG_LEVEL_ALL = 1,             /**< all logs. */
+    CA_LOG_LEVEL_INFO,                /**< debug level is disabled. */
 } CAUtilLogLevel_t;
 
 /**
index b7239ef..3d2125f 100644 (file)
@@ -1,4 +1,4 @@
-/* *****************************************************************
+/******************************************************************
  *
  * Copyright 2015 Samsung Electronics All Rights Reserved.
  *
  */
 #define MAX_SUPPORTED_ADAPTERS 2
 
+/**
+ * function poiner to send data to upper layer.
+ *
+ * @param sep         secure endpoint
+ * @param data        data to send
+ * @param dataLength  length of data
+ */
 typedef void (*CAPacketReceivedCallback)(const CASecureEndpoint_t *sep,
                                          const void *data, size_t dataLength);
 
+/**
+ * function poiner to send data to socket layer.
+ *
+ * @param endpoint    endpoint
+ * @param data        data to send
+ * @param dataLength  length of data
+ */
 typedef void (*CAPacketSendCallback)(CAEndpoint_t *endpoint,
                                      const void *data, size_t dataLength);
 
@@ -68,8 +82,8 @@ typedef struct stCADtlsContext
  */
 typedef struct stPacketInfo
 {
-    uint8_t *dataAddress;
-    uint16_t dataLen;
+    uint8_t *dataAddress;    /**< hold decrypted data address */
+    uint16_t dataLen;        /**< length  of data */
 } stPacketInfo_t;
 
 /**
@@ -78,9 +92,9 @@ typedef struct stPacketInfo
  */
 typedef enum
 {
-    DTLS_OK = 0,
-    DTLS_FAIL,
-    DTLS_SESSION_INITIATED,
+    DTLS_OK = 0,             /**< success dtls result */
+    DTLS_FAIL,               /**< failure dtls result */
+    DTLS_SESSION_INITIATED,  /**< dtls session is initiated */
     DTLS_HS_MSG
 } eDtlsRet_t;
 
@@ -107,8 +121,8 @@ typedef struct
  */
 typedef struct CACacheMessage
 {
-    void *data;
-    uint32_t dataLen;
+    void *data;        /**< cache message information */
+    uint32_t dataLen;  /**< length of data */
     stCADtlsAddrInfo_t destSession;
 } stCACacheMessage_t;
 
index b37f0a5..2a0595b 100644 (file)
@@ -1,4 +1,4 @@
-/* *****************************************************************
+/******************************************************************
  *
  * Copyright 2015 Samsung Electronics All Rights Reserved.
  *
@@ -97,7 +97,7 @@ typedef struct
     coap_block_t block1;                /**< block1 option. */
     coap_block_t block2;                /**< block2 option. */
     uint16_t type;                      /**< block option type. */
-    CABlockDataID_t* blockDataId;        /**< ID set of CABlockData. */
+    CABlockDataID_t* blockDataId;       /**< ID set of CABlockData. */
     CAData_t *sentData;                 /**< sent request or response data information. */
     CAPayload_t payload;                /**< payload buffer. */
     size_t payloadLength;               /**< the total payload length to be received. */
@@ -109,17 +109,17 @@ typedef struct
  */
 typedef enum
 {
-    CA_BLOCK_UNKNOWN = 0,
-    CA_OPTION1_RESPONSE,
-    CA_OPTION1_REQUEST_LAST_BLOCK,
-    CA_OPTION1_REQUEST_BLOCK,
-    CA_OPTION2_FIRST_BLOCK,
-    CA_OPTION2_LAST_BLOCK,
-    CA_OPTION2_RESPONSE,
-    CA_OPTION2_REQUEST,
-    CA_BLOCK_INCOMPLETE,
-    CA_BLOCK_TOO_LARGE,
-    CA_BLOCK_RECEIVED_ALREADY
+    CA_BLOCK_UNKNOWN = 0,          /**< unknow block */
+    CA_OPTION1_RESPONSE,           /**< option1 response */
+    CA_OPTION1_REQUEST_LAST_BLOCK, /**< option1 request last block */
+    CA_OPTION1_REQUEST_BLOCK,      /**< option1 request block */
+    CA_OPTION2_FIRST_BLOCK,        /**< option2 first block */
+    CA_OPTION2_LAST_BLOCK,         /**< option2 last block */
+    CA_OPTION2_RESPONSE,           /**< option2 response */
+    CA_OPTION2_REQUEST,            /**< option2 request */
+    CA_BLOCK_INCOMPLETE,           /**< incomplete block */
+    CA_BLOCK_TOO_LARGE,            /**< too large block */
+    CA_BLOCK_RECEIVED_ALREADY      /**< already received block */
 } CABlockState_t;
 
 /**
index 835b848..c816ae8 100644 (file)
@@ -63,9 +63,9 @@ typedef struct
 
 typedef struct CAIPCBData_t
 {
-    struct CAIPCBData_t *next;
-    CATransportAdapter_t adapter;
-    CAIPAdapterStateChangeCallback callback;
+    struct CAIPCBData_t *next;               /**< pointer to next node */
+    CATransportAdapter_t adapter;            /**< transport adapter */
+    CAIPAdapterStateChangeCallback callback; /**< adapter state change callback */
 } CAIPCBData_t;
 
 /**
index dd08737..87eb2fd 100644 (file)
@@ -1,4 +1,4 @@
-/* *****************************************************************
+/******************************************************************
  *
  * Copyright 2014 Samsung Electronics All Rights Reserved.
  *
@@ -34,19 +34,19 @@ goto memory_error_exit;} }
 
 typedef enum
 {
-    SEND_TYPE_MULTICAST = 0,
-    SEND_TYPE_UNICAST
+    SEND_TYPE_MULTICAST = 0,  /**< multicast type */
+    SEND_TYPE_UNICAST         /**< unicast type */
 } CASendDataType_t;
 
 typedef struct
 {
-    CASendDataType_t type;
-    CAEndpoint_t *remoteEndpoint;
-    CARequestInfo_t *requestInfo;
-    CAResponseInfo_t *responseInfo;
-    CAErrorInfo_t *errorInfo;
-    CASignalingInfo_t *signalingInfo;
-    CADataType_t dataType;
+    CASendDataType_t type;            /**< data type */
+    CAEndpoint_t *remoteEndpoint;     /**< remote endpoint */
+    CARequestInfo_t *requestInfo;     /**< request information */
+    CAResponseInfo_t *responseInfo;   /**< response information */
+    CAErrorInfo_t *errorInfo;         /**< error information */
+    CASignalingInfo_t *signalingInfo; /**< signaling information */
+    CADataType_t dataType;            /**< data type */
 } CAData_t;
 
 #ifdef __cplusplus
index f34eebe..c631ec3 100644 (file)
@@ -1,4 +1,4 @@
-/* ****************************************************************
+/*****************************************************************
  *
  * Copyright 2015 Samsung Electronics All Rights Reserved.
  *
@@ -39,9 +39,9 @@ extern "C"
 
 typedef enum CAProtocol
 {
-    UNKNOWN = 0,
-    TLS,
-    COAP
+    UNKNOWN = 0,  /**< unknown protocol */
+    TLS,          /**< TLS protocol */
+    COAP          /**< COAP protocol */
 } CAProtocol_t;
 
 /**
@@ -49,9 +49,9 @@ typedef enum CAProtocol
  */
 typedef enum
 {
-    CONNECTING = 0,
-    CONNECTED,
-    DISCONNECTED
+    CONNECTING = 0,  /**< connecting state */
+    CONNECTED,       /**< connected state */
+    DISCONNECTED     /**< disconnected state */
 } CATCPConnectionState_t;
 
 /**
@@ -61,10 +61,10 @@ typedef enum
  */
 typedef enum
 {
-    NONE = 0,
-    SENT,
-    RECEIVED,
-    SENT_RECEIVED
+    NONE = 0,      /**< none state */
+    SENT,          /**< sent state */
+    RECEIVED,      /**< received state */
+    SENT_RECEIVED  /**< sent and received state */
 } CACSMExchangeState_t;
 
 /**
index eb79e93..066a580 100644 (file)
@@ -19,7 +19,7 @@
  ******************************************************************/
 
 #include <jni.h>
-/* Header for class org_iotivity_ca_CaEdrInterface */
+/** Header for class org_iotivity_ca_CaEdrInterface */
 
 #ifndef Included_org_iotivity_ca_CaEdrInterface
 #define Included_org_iotivity_ca_CaEdrInterface
 extern "C"
 {
 #endif
-/*
- * Class:     org_iotivity_ca_CaEdrInterface
- * Method:    caEdrStateChangedCallback
- * Signature: (I)V
+/**
+ * @class:     org_iotivity_ca_CaEdrInterface
+ * Method:     caEdrStateChangedCallback
+ * Signature:  (I)V
  */
 JNIEXPORT void JNICALL
 Java_org_iotivity_ca_CaEdrInterface_caEdrStateChangedCallback
 (JNIEnv *, jobject, jint);
 
-/*
- * Class:     org_iotivity_ca_CaEdrInterface
- * Method:    caEdrBondStateChangedCallback
- * Signature: (java/lang/String)V
+/**
+ * @class:     org_iotivity_ca_CaEdrInterface
+ * Method:     caEdrBondStateChangedCallback
+ * Signature:  (java/lang/String)V
  */
 JNIEXPORT void JNICALL
 Java_org_iotivity_ca_CaEdrInterface_caEdrBondStateChangedCallback
 (JNIEnv *, jobject, jstring);
 
-/*
- * Class:     org_iotivity_ca_CaEdrInterface
- * Method:    caEdrConnectionStateChangedCallback
- * Signature: (java/lang/String;I)V
+/**
+ * @class:     org_iotivity_ca_CaEdrInterface
+ * Method:     caEdrConnectionStateChangedCallback
+ * Signature:  (java/lang/String;I)V
  */
 JNIEXPORT void JNICALL
 Java_org_iotivity_ca_CaEdrInterface_caEdrConnectionStateChangedCallback
index e0d6b2f..a3b0d32 100644 (file)
@@ -1,4 +1,4 @@
-/* ****************************************************************
+/*****************************************************************
  *
  * Copyright 2014 Samsung Electronics All Rights Reserved.
  *
 
 typedef struct
 {
-    void *data;
-    uint32_t dataLength;
+    void *data;            /**< LE data */
+    uint32_t dataLength;   /**< length of data */
 } LEData;
 
 typedef struct _LEDataList
 {
-    LEData *data;
-    struct _LEDataList *next;
+    LEData *data;              /**< LE data */
+    struct _LEDataList *next ; /**< pointer to next */
 } LEDataList;
 
 typedef enum
 {
-    LE_STATUS_INVALID = 0,
-    LE_STATUS_UNICAST_PENDING,
-    LE_STATUS_DISCOVERED,
-    LE_STATUS_CONNECTION_INITIATED,
-    LE_STATUS_CONNECTED,
-    LE_STATUS_SERVICES_DISCOVERED
+    LE_STATUS_INVALID = 0,             /**< Invalid device status */
+    LE_STATUS_UNICAST_PENDING,         /**< Unicast pending */
+    LE_STATUS_DISCOVERED,              /**< device discovered */
+    LE_STATUS_CONNECTION_INITIATED,    /**< connection initiated */
+    LE_STATUS_CONNECTED,               /**< connected state */
+    LE_STATUS_SERVICES_DISCOVERED      /**< services discovered */
 } LEDeviceStatus;
 
 typedef struct
 {
-    bt_gatt_client_h clientHandle;
-    bt_gatt_h serviceHandle;
-    bt_gatt_h readChar;
-    bt_gatt_h writeChar;
-    char *remoteAddress;
-    LEDataList *pendingDataList;
-    LEDeviceStatus status;
+    bt_gatt_client_h clientHandle;   /**< client handle */
+    bt_gatt_h serviceHandle;         /**< service handle */
+    bt_gatt_h readChar;              /**< read char */
+    bt_gatt_h writeChar;             /**< write char */
+    char *remoteAddress;             /**< remote address */
+    LEDataList *pendingDataList;     /**< pointer to data list */
+    LEDeviceStatus status;           /**< device status */
 } LEServerInfo;
 
 typedef struct _LEServerInfoList
 {
-    LEServerInfo *serverInfo;
-    struct _LEServerInfoList *next;
+    LEServerInfo *serverInfo;       /**< server information */
+    struct _LEServerInfoList *next; /**< pointer to next node */
 } LEServerInfoList;
 
 typedef struct _LEClientInfoList
 {
-    char *remoteAddress;
-    struct _LEClientInfoList *next;
+    char *remoteAddress;             /**< remote address */
+    struct _LEClientInfoList *next;  /**< pointer to next node */
 } LEClientInfoList;
 
 /**
index ed82278..a8ca159 100644 (file)
@@ -1,4 +1,4 @@
-/* *****************************************************************
+/******************************************************************
  *
  * Copyright 2016 Samsung Electronics All Rights Reserved.
  *
@@ -47,7 +47,15 @@ typedef struct {
     struct ifaddrmsg    ifaddrInfo;
 } CANetlintReq_t;
 
-
+/**
+ * send message.
+ *
+ * @param netlinkFd      netlink fd.
+ * @param data           data to send.
+ * @param len            length of data to send.
+ *
+ * @return true or false.
+ */
 static bool CASendNetlinkMessage(int netlinkFd, const void* data, size_t len)
 {
     ssize_t sentByteCount = 0;
index 2c5cf38..52eeac4 100644 (file)
@@ -19,7 +19,7 @@
  ******************************************************************/
 
 #include <jni.h>
-/* Header for class org_iotivity_ca_CaIpInterface */
+/** Header for class org_iotivity_ca_CaIpInterface */
 
 #ifndef _Included_org_iotivity_ca_CaIpInterface
 #define _Included_org_iotivity_ca_CaIpInterface
 extern "C"
 {
 #endif
-/*
- * Class:     org_iotivity_ca_caIpInterface
- * Method:    CaIpStateEnabled
- * Signature: ()V
+/**
+ * @class:     org_iotivity_ca_caIpInterface
+ * Method:     CaIpStateEnabled
+ * Signature:  ()V
  */
 JNIEXPORT void JNICALL
 Java_org_iotivity_ca_CaIpInterface_caIpStateEnabled(JNIEnv *, jclass);
 
-/*
- * Class:     org_iotivity_ca_caIpInterface
- * Method:    CaIpStateDisabled
- * Signature: ()V
+/**
+ * @class:     org_iotivity_ca_caIpInterface
+ * Method:     CaIpStateDisabled
+ * Signature:  ()V
  */
 JNIEXPORT void JNICALL
 Java_org_iotivity_ca_CaIpInterface_caIpStateDisabled(JNIEnv *, jclass);
index 6201483..eeef303 100644 (file)
@@ -90,21 +90,47 @@ static ssize_t CAIPPacketSendCB(CAEndpoint_t *endpoint,
                                 const void *data, size_t dataLength);
 #endif
 
+/**
+ * update stored IP adapter information.
+ */
 static void CAUpdateStoredIPAddressInfo(CANetworkStatus_t status);
 
-
+/**
+ * Initialize send queue.
+ *
+ * @return OK if success, otherwise ERROR CODE.
+ */
 static CAResult_t CAIPInitializeQueueHandles(void);
 
+/**
+ * Deinitialize send queue.
+ */
 static void CAIPDeinitializeQueueHandles(void);
 
 static void CAIPSendDataThread(void *threadData);
 
+/**
+ * create IP data.
+ *
+ * @param remoteEndpoint    Remote Endpoint information.
+ * @param data              Data which is created.
+ * @param dataLength        Size of data to create.
+ * @param isMulticast       check for multicast value.
+ *
+ * @return Ip data.
+ */
 static CAIPData_t *CACreateIPData(const CAEndpoint_t *remoteEndpoint,
                                   const void *data, uint32_t dataLength,
                                   bool isMulticast);
 
 void CAFreeIPData(CAIPData_t *ipData);
 
+/**
+ * Destroy data.
+ *
+ * @param data    data to destroy.
+ * @param size    size of data to destroy.
+ */
 static void CADataDestroyer(void *data, uint32_t size);
 
 CAResult_t CAIPInitializeQueueHandles(void)
@@ -189,6 +215,11 @@ void CAIPAdapterHandler(CATransportAdapter_t adapter, CANetworkStatus_t status)
     }
 }
 
+/**
+ * update stored IP adapter information
+ *
+ * @param status    update information according to status.
+ */
 static void CAUpdateStoredIPAddressInfo(CANetworkStatus_t status)
 {
     if (CA_INTERFACE_UP == status)
@@ -227,6 +258,15 @@ static void CAUpdateStoredIPAddressInfo(CANetworkStatus_t status)
 }
 
 #ifdef __WITH_DTLS__
+/**
+ * send Ip packet callback.
+ *
+ * @param endpoint      Remote Endpoint information
+ * @param data          data to send.
+ * @param dataLength    sizze of data to send.
+ *
+ * @return length of data.
+ */
 static ssize_t CAIPPacketSendCB(CAEndpoint_t *endpoint, const void *data, size_t dataLength)
 {
     VERIFY_NON_NULL_RET(endpoint, TAG, "endpoint is NULL", -1);
@@ -288,6 +328,9 @@ void CAIPErrorHandler(const CAEndpoint_t *endpoint, const void *data,
     }
 }
 
+/**
+ * Initialize IP globals.
+ */
 static void CAInitializeIPGlobals(void)
 {
     caglobals.ip.u6.fd  = OC_INVALID_SOCKET;
index 4dd9b18..4f5abc2 100644 (file)
@@ -120,6 +120,11 @@ static void CAIPPassNetworkChangesToAdapter(CANetworkStatus_t status);
 static CAInterface_t *CANewInterfaceItem(int index, const char *name, int family,
                                          const char *addr, int flags);
 
+/**
+ * Initialize network monitor list.
+ *
+ * @return OK if intialized success, otherwise FAIL.
+ */
 static CAResult_t CAIPInitializeNetworkMonitorList()
 {
     if (!g_networkMonitorContextMutex)
@@ -145,6 +150,9 @@ static CAResult_t CAIPInitializeNetworkMonitorList()
     return CA_STATUS_OK;
 }
 
+/**
+ * Destroy network monitor list.
+ */
 static void CAIPDestroyNetworkMonitorList()
 {
     if (g_netInterfaceList)
@@ -160,6 +168,13 @@ static void CAIPDestroyNetworkMonitorList()
     }
 }
 
+/**
+ * Compare network list.
+ *
+ * @param ifiindex  interface index.
+ *
+ * @return true if index found, otherwise false.
+ */
 static bool CACmpNetworkList(uint32_t ifiindex)
 {
 #if NETWORK_INTERFACE_CHANGED_LOGGING
@@ -189,6 +204,11 @@ static bool CACmpNetworkList(uint32_t ifiindex)
     return false;
 }
 
+/**
+ * Add to network monitor list.
+ *
+ * @return OK if success, otherwise FAIL.
+ */
 static CAResult_t CAAddNetworkMonitorList(CAInterface_t *ifitem)
 {
     OIC_LOG_V(DEBUG, TAG, "IN %s", __func__);
@@ -208,6 +228,11 @@ static CAResult_t CAAddNetworkMonitorList(CAInterface_t *ifitem)
     return CA_STATUS_OK;
 }
 
+/**
+ * Remove from network monitor list.
+ *
+ * @param ifiindex  interface index.
+ */
 static void CARemoveNetworkMonitorList(int ifiindex)
 {
     VERIFY_NON_NULL_VOID(g_netInterfaceList, TAG, "g_netInterfaceList is NULL");
@@ -234,6 +259,9 @@ static void CARemoveNetworkMonitorList(int ifiindex)
     return;
 }
 
+/**
+ * Get connection status callback.
+ */
 static bool get_connection_status_cb(LSHandle *sh, LSMessage *message, void *ctx)
 {
     OIC_LOG(DEBUG, TAG, "Callback for com.webos.service.connectionmanager/getstatus is invoked...");
index 9852abe..c728781 100644 (file)
@@ -19,7 +19,9 @@
  ******************************************************************/
 
 #include "jni.h"
-/* Header for class org_iotivity_ca_CaBtPairingInterface */
+/**
+ * Header for class org_iotivity_ca_CaBtPairingInterface
+ */
 
 #ifndef Included_org_iotivity_ca_CaBtPairingInterface
 #define Included_org_iotivity_ca_CaBtPairingInterface
@@ -28,28 +30,28 @@ extern "C"
 {
 #endif
 
-/*
- * Class:     org_iotivity_ca_CaBtPairingInterface
- * Method:    oicEdrStateChangedCallback
- * Signature: (I)V
+/**
+ * @class:     org_iotivity_ca_CaBtPairingInterface
+ * Method:     oicEdrStateChangedCallback
+ * Signature:  (I)V
  */
 JNIEXPORT void JNICALL
 org_iotivity_ca_CaBtPairingInterface_oicEdrStateChangedCallback
 (JNIEnv *, jobject, jint);
 
-/*
- * Class:     org_iotivity_ca_OicBtUtilClientInterface
- * Method:    oicEdrBondStateChangedCallback
- * Signature: (java/lang/String;)V
+/**
+ * @class:     org_iotivity_ca_OicBtUtilClientInterface
+ * Method:     oicEdrBondStateChangedCallback
+ * Signature:  (java/lang/String;)V
  */
 JNIEXPORT void JNICALL
 org_iotivity_ca_CaBtPairingInterface_oicEdrBondStateChangedCallback
 (JNIEnv *, jobject, jstring);
 
-/*
- * Class:     org_iotivity_ca_OicBtUtilClientInterface
- * Method:    oicEdrFoundDeviceCallback
- * Signature: (Landroid/bluetooth/BluetoothDevice;)V
+/**
+ * @class:     org_iotivity_ca_OicBtUtilClientInterface
+ * Method:     oicEdrFoundDeviceCallback
+ * Signature:  (Landroid/bluetooth/BluetoothDevice;)V
  */
 JNIEXPORT void JNICALL
 org_iotivity_ca_CaBtPairingInterface_oicEdrFoundDeviceCallback
index 9e9b7f1..088fc16 100644 (file)
@@ -1,4 +1,4 @@
-/* *****************************************************************
+/******************************************************************
  *
  * Copyright 2016 Samsung Electronics All Rights Reserved.
  *
@@ -38,11 +38,11 @@ extern "C"
  */
 typedef struct
 {
-    CATransportAdapter_t adapter;
-    CATransportFlags_t flags;
-    char *addr;
-    uint16_t udpPort;
-    uint16_t tcpPort;
+    CATransportAdapter_t adapter; /**< transport adapter */
+    CATransportFlags_t flags;     /**< transport flag */
+    char *addr;                   /**< address */
+    uint16_t udpPort;             /**< udp port information */
+    uint16_t tcpPort;             /**< tcp port information */
 } CMIpInfo_t;
 
 /**
@@ -50,9 +50,9 @@ typedef struct
  */
 typedef struct
 {
-    char *deviceId;
-    CMIpInfo_t d2dInfo;
-    CMIpInfo_t d2sInfo;
+    char *deviceId;     /**< device Id */
+    CMIpInfo_t d2dInfo; /**< device to device information */
+    CMIpInfo_t d2sInfo; /**< device to server information */
 } CMDeviceInfo_t;
 
 /**
@@ -60,8 +60,8 @@ typedef struct
  */
 typedef struct CMDeviceInfoList
 {
-    CMDeviceInfo_t *deviceInfo;
-    struct CMDeviceInfoList *next;
+    CMDeviceInfo_t *deviceInfo;    /**< device information */
+    struct CMDeviceInfoList *next; /**< pointer to next node */
 } CMDeviceInfoList_t;
 
 /**