return ret; \
} while (0)
+#define _WEBRTC_FEATURE_NETWORK_WIFI "http://tizen.org/feature/network.wifi"
+#define _WEBRTC_FEATURE_NETWORK_TELE "http://tizen.org/feature/network.telephony"
+#define _WEBRTC_FEATURE_NETWORK_ETH "http://tizen.org/feature/network.ethernet"
+#define RET_ERR_IF_NETWORK_FEATURES_ARE_NOT_SUPPORTED() \
+do { \
+ int ret = _check_feature(_WEBRTC_FEATURE_NETWORK_WIFI); \
+ if (ret == WEBRTC_ERROR_NONE) \
+ break; \
+ ret = _check_feature(_WEBRTC_FEATURE_NETWORK_TELE); \
+ if (ret == WEBRTC_ERROR_NONE) \
+ break; \
+ ret = _check_feature(_WEBRTC_FEATURE_NETWORK_ETH); \
+ if (ret == WEBRTC_ERROR_NONE) \
+ break; \
+ return WEBRTC_ERROR_NOT_SUPPORTED; \
+} while (0)
+
#define SAFE_FREE(src) { if (src) { free(src); src = NULL; } }
#define SAFE_STR(str) (str) ? str : "null"
int ret = WEBRTC_ERROR_NONE;
webrtc_s *_webrtc = NULL;
- RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
+ RET_ERR_IF_NETWORK_FEATURES_ARE_NOT_SUPPORTED();
RET_ERR_IF_PRIVILEGE_IS_NOT_ALLOWED(_WEBRTC_PRIVILEGE_INTERNET);
+ RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
_webrtc = g_new0(webrtc_s, 1);