void flom_handle_set_lock_mode(flom_handle_t *handle, flom_lock_mode_t value) { FLOM_TRACE(("flom_handle_set_lock_mode: " "old value=%d, new value=%d\n", flom_config_get_lock_mode(handle->config), value)); flom_config_set_lock_mode(handle->config, value); }
int flom_handle_set_lock_mode(flom_handle_t *handle, flom_lock_mode_t value) { FLOM_TRACE(("flom_handle_set_lock_mode: " "old value=%d, new value=%d\n", flom_config_get_lock_mode(handle->config), value)); switch (handle->state) { case FLOM_HANDLE_STATE_INIT: case FLOM_HANDLE_STATE_CONNECTED: case FLOM_HANDLE_STATE_DISCONNECTED: flom_config_set_lock_mode(handle->config, value); break; default: FLOM_TRACE(("flom_handle_set_lock_mode: state %d " \ "is not compatible with set operation\n", handle->state)); return FLOM_RC_API_IMMUTABLE_HANDLE; } /* switch (handle->state) */ return FLOM_RC_OK; }
flom_lock_mode_t flom_handle_get_lock_mode(const flom_handle_t *handle) { FLOM_TRACE(("flom_handle_get_lock_mode: value=%d\n", flom_config_get_lock_mode(handle->config))); return flom_config_get_lock_mode(handle->config); }