}
//LCOV_EXCL_STOP
+int _connection_libnet_get_metered_state(bool* is_metered)
+{
+ int rv = 0;
+ int status = 0;
+
+ rv = net_get_metered_state(&status);
+ if (rv == NET_ERR_ACCESS_DENIED) {
+ CONNECTION_LOG(CONNECTION_ERROR, "Access denied");
+ return CONNECTION_ERROR_PERMISSION_DENIED;
+ } else if (rv != NET_ERR_NONE) {
+ CONNECTION_LOG(CONNECTION_ERROR, "Failed to get metered state[%d]", rv);
+ return CONNECTION_ERROR_OPERATION_FAILED;
+ }
+
+ if (status == 1)
+ *is_metered = true;
+ else
+ *is_metered = false;
+ return CONNECTION_ERROR_NONE;
+}
+
int _connection_libnet_get_wifi_state(connection_wifi_state_e *state)
{
int rv;