AWDIPMonitorGlobalEnums.h [plain text]
#include <stdint.h>
#ifdef __OBJC__
#include <Foundation/Foundation.h>
#endif
#ifndef NS_ENUM
#if (__cplusplus && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!__cplusplus && __has_feature(objc_fixed_enum))
#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
#else
#define NS_ENUM(_type, _name) _type _name; enum
#endif
#endif // !defined(NS_ENUM)
typedef NS_ENUM(int32_t, AWDIPMonitorInterfaceType) {
AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_OTHER = 0,
AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_WIFI = 1,
AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_CELLULAR = 2,
AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_WIRED = 3,
};
#ifdef __OBJC__
NS_INLINE NSString *AWDIPMonitorInterfaceTypeAsString(AWDIPMonitorInterfaceType value)
{
switch (value)
{
case AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_OTHER: return @"IPMONITOR_INTERFACE_TYPE_OTHER";
case AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_WIFI: return @"IPMONITOR_INTERFACE_TYPE_WIFI";
case AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_CELLULAR: return @"IPMONITOR_INTERFACE_TYPE_CELLULAR";
case AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_WIRED: return @"IPMONITOR_INTERFACE_TYPE_WIRED";
default: return [NSString stringWithFormat:@"(unknown: %i)", value];
}
}
#endif
#ifdef __OBJC__
NS_INLINE AWDIPMonitorInterfaceType StringAsAWDIPMonitorInterfaceType(NSString *value)
{
if ([value isEqualToString:@"IPMONITOR_INTERFACE_TYPE_OTHER"]) return AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_OTHER;
if ([value isEqualToString:@"IPMONITOR_INTERFACE_TYPE_WIFI"]) return AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_WIFI;
if ([value isEqualToString:@"IPMONITOR_INTERFACE_TYPE_CELLULAR"]) return AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_CELLULAR;
if ([value isEqualToString:@"IPMONITOR_INTERFACE_TYPE_WIRED"]) return AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_WIRED;
return AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_OTHER;
}
#endif