/******************************************************************************
* neardal_start_poll: Request Neard to start polling
*****************************************************************************/
-void neardal_start_poll(char *adpName, errorCode_t *ec)
+errorCode_t neardal_start_poll(char *adpName)
{
errorCode_t err = NEARDAL_SUCCESS;
AdpProp *adpProp = NULL;
if (neardalMgr.proxy == NULL)
neardal_prv_construct(&err);
if (err != NEARDAL_SUCCESS)
- return;
+ return err;
err = neardal_mgr_prv_get_adapter(adpName, &adpProp);
err = NEARDAL_ERROR_POLLING_ALREADY_ACTIVE;
exit:
- if (ec != NULL)
- *ec = err;
+ return err;
}
/******************************************************************************
* neardal_stop_poll: Request Neard to stop polling
*****************************************************************************/
-void neardal_stop_poll(char *adpName, errorCode_t *ec)
+errorCode_t neardal_stop_poll(char *adpName)
{
errorCode_t err = NEARDAL_SUCCESS;
AdpProp *adpProp = NULL;
}
exit:
- if (ec != NULL)
- *ec = err;
+ return err;
}
/******************************************************************************
*/
void neardal_destroy();
-/*! \fn void neardal_start_poll(char *adpName, errorCode_t *ec)
+/*! \fn errorCode_t neardal_start_poll(char *adpName)
* \brief Request Neard to start polling on specific NEARDAL adapter
* \param adpName : DBus interface adapter name (as identifier)
-* \param ec : optional, pointer to store error code
+* @return errorCode_t error code
*/
-void neardal_start_poll(char *adpName, errorCode_t *ec);
+errorCode_t neardal_start_poll(char *adpName);
-/*! \fn void neardal_stop_poll(char *adpName, errorCode_t *ec)
+/*! \fn errorCode_t neardal_stop_poll(char *adpName)
* \brief Request Neard to stop polling on specific NEARDAL adapter
* \param adpName : DBus interface adapter name (as identifier)
-* \param ec : optional, pointer to store error code
+* @return errorCode_t error code
*/
-void neardal_stop_poll(char *adpName, errorCode_t *ec);
+errorCode_t neardal_stop_poll(char *adpName);
/*! \fn errorCode_t neardal_get_adapters(char ***array, int *len)
* @brief get an array of NEARDAL adapters present
Adapter interface */
gchar *name; /* DBus interface name
(as id) */
- neardal_t parent;
+ void *parent;
gboolean polling; /* adapter polling active ? */
gboolean powered; /* adapter powered ? */
gchar **protocols; /* protocols list */
/* Start polling if adapter present */
adpName = argv[1];
- neardal_start_poll(adpName, &ec);
+ ec = neardal_start_poll(adpName);
if (ec != NEARDAL_SUCCESS) {
NCL_CMD_PRINTF("NFC polling activation error:%d='%s'\n",
ec, neardal_error_get_text(ec));
ncl_cmd_install_callback();
adpName = argv[1];
- neardal_stop_poll(adpName, &ec);
+ ec = neardal_stop_poll(adpName);
if (ec != NEARDAL_SUCCESS) {
NCL_CMD_PRINTF("Stop NFC polling error:%d='%s'.\n", ec,
neardal_error_get_text(ec));