api: let MMBearerIpFamily be flags instead of a enumeration
We want to expose in the Modem interface the list of supported IP families, and the easiest way to do so is to have the IP family as flags, and provide in the interface a single enum. Also, a value of 0 for a MMBearerIpFamily specifies that no flags are set, so just rename it to 'NONE'. And add a new 'ANY' value which sets all flags to 1.
This commit is contained in:
@@ -589,18 +589,20 @@ typedef enum { /*< underscore_name=mm_bearer_ip_method >*/
|
||||
|
||||
/**
|
||||
* MMBearerIpFamily:
|
||||
* @MM_BEARER_IP_FAMILY_UNKNOWN: Unknown.
|
||||
* @MM_BEARER_IP_FAMILY_NONE: None or unknown.
|
||||
* @MM_BEARER_IP_FAMILY_IPV4: IPv4.
|
||||
* @MM_BEARER_IP_FAMILY_IPV6: IPv6.
|
||||
* @MM_BEARER_IP_FAMILY_IPV4V6: IPv4 and IPv6.
|
||||
* @MM_BEARER_IP_FAMILY_ANY: Mask specifying all IP families.
|
||||
*
|
||||
* Type of IP family to be used in a given Bearer.
|
||||
*/
|
||||
typedef enum { /*< underscore_name=mm_bearer_ip_family >*/
|
||||
MM_BEARER_IP_FAMILY_UNKNOWN = 0,
|
||||
MM_BEARER_IP_FAMILY_IPV4 = 4,
|
||||
MM_BEARER_IP_FAMILY_IPV6 = 6,
|
||||
MM_BEARER_IP_FAMILY_IPV4V6 = 10
|
||||
MM_BEARER_IP_FAMILY_NONE = 0,
|
||||
MM_BEARER_IP_FAMILY_IPV4 = 1 << 0,
|
||||
MM_BEARER_IP_FAMILY_IPV6 = 1 << 1,
|
||||
MM_BEARER_IP_FAMILY_IPV4V6 = 1 << 2,
|
||||
MM_BEARER_IP_FAMILY_ANY = 0xFFFFFFFF
|
||||
} MMBearerIpFamily;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user