Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24c3416b authored by Rambo Wang's avatar Rambo Wang
Browse files

Update Barring HAL Structures to nest single-use unions/structs

Bug: 148102466
Test: compilation for both cuttlefish and sargo
Change-Id: I8a8e734011909b038c0d735c2bfde7ea773b71e6
parent d9939b58
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -679,7 +679,7 @@ a64467bae843569f0d465c5be7f0c7a5b987985b55a3ef4794dd5afc68538650 android.hardwar
def77c7db95d374f11a111bfc4ed60f92451303642a43276c4e291988fcee625 android.hardware.wifi.supplicant@1.3::ISupplicantStaIfaceCallback
def77c7db95d374f11a111bfc4ed60f92451303642a43276c4e291988fcee625 android.hardware.wifi.supplicant@1.3::ISupplicantStaIfaceCallback
62cf050c593c1ec34b49178b5bdde72dd9b80d9bad3eb184e4f0cd564d28678c android.hardware.wifi.supplicant@1.3::ISupplicantStaNetwork
62cf050c593c1ec34b49178b5bdde72dd9b80d9bad3eb184e4f0cd564d28678c android.hardware.wifi.supplicant@1.3::ISupplicantStaNetwork
98592d193a717066facf91428426e5abe211e3bd718bc372e29fb944ddbe6e7c android.hardware.wifi.supplicant@1.3::types
98592d193a717066facf91428426e5abe211e3bd718bc372e29fb944ddbe6e7c android.hardware.wifi.supplicant@1.3::types
88fb40d98b89cfaafad33b06c95e5dcd51c4470962e8fbe80ed22884407f98a1 android.hardware.radio@1.5::types
e1d34b83188a8ef3c507ec53c0ebcf714863c746da7f4a05460453f7c4c09389 android.hardware.radio@1.5::types
8062d0a1a03594dd8b448adcf6f08856b5720f7e33f9b785a21d3ef74a4f211d android.hardware.radio@1.5::IRadio
8062d0a1a03594dd8b448adcf6f08856b5720f7e33f9b785a21d3ef74a4f211d android.hardware.radio@1.5::IRadio
e96ae1c3a9c0689002ec2318e9c587f4f607c16a75a3cd38788b77eb91072021 android.hardware.radio@1.5::IRadioIndication
e96ae1c3a9c0689002ec2318e9c587f4f607c16a75a3cd38788b77eb91072021 android.hardware.radio@1.5::IRadioIndication
7f2439b48bda2961c6d629d0415eee66d519142cf9537f05e9d285153c70ca85 android.hardware.radio@1.5::IRadioResponse
7f2439b48bda2961c6d629d0415eee66d519142cf9537f05e9d285153c70ca85 android.hardware.radio@1.5::IRadioResponse
+102 −111
Original line number Original line Diff line number Diff line
@@ -692,6 +692,7 @@ safe_union CellIdentity {
    CellIdentityNr nr;
    CellIdentityNr nr;
};
};


struct BarringInfo {
    /**
    /**
     * Combined list of barring services for UTRAN, EUTRAN, and NGRAN.
     * Combined list of barring services for UTRAN, EUTRAN, and NGRAN.
     *
     *
@@ -700,7 +701,7 @@ safe_union CellIdentity {
     * -EUTRAN - 3gpp 36.331 Sec 6.3.1 SystemInformationBlockType2
     * -EUTRAN - 3gpp 36.331 Sec 6.3.1 SystemInformationBlockType2
     * -NGRAN - 3gpp 38.331 Sec 6.3.2 UAC-BarringInfo and 22.261 Sec 6.22.2.[2-3]
     * -NGRAN - 3gpp 38.331 Sec 6.3.2 UAC-BarringInfo and 22.261 Sec 6.22.2.[2-3]
     */
     */
enum BarringServiceType : int32_t {
    enum ServiceType : int32_t {
        /** Applicable to UTRAN */
        /** Applicable to UTRAN */
        /** Barring for all CS services, including registration */
        /** Barring for all CS services, including registration */
        CS_SERVICE,
        CS_SERVICE,
@@ -760,8 +761,9 @@ enum BarringServiceType : int32_t {
        OPERATOR_30 = 1030,
        OPERATOR_30 = 1030,
        OPERATOR_31 = 1031,
        OPERATOR_31 = 1031,
        OPERATOR_32 = 1032,
        OPERATOR_32 = 1032,
};
    } serviceType;


    /** The type of barring applied to the service */
    enum BarringType : int32_t {
    enum BarringType : int32_t {
        /** Device is not barred for the given service */
        /** Device is not barred for the given service */
        NONE,
        NONE,
@@ -769,14 +771,20 @@ enum BarringType : int32_t {
        CONDITIONAL,
        CONDITIONAL,
        /* Device is unconditionally barred */
        /* Device is unconditionally barred */
        UNCONDITIONAL,
        UNCONDITIONAL,
};
    } barringType;

    /** Type-specific barring info if applicable */
    safe_union BarringTypeSpecificInfo {
        /** Barring type is either none or unconditional */
        Monostate noinit;


struct ConditionalBarringInfo {
        /** Must be included if barring is conditional */
        struct Conditional {
            /** The barring factor as a percentage 0-100 */
            /** The barring factor as a percentage 0-100 */
    int32_t barringFactor;
            int32_t factor;


            /** The number of seconds between re-evaluations of barring */
            /** The number of seconds between re-evaluations of barring */
    int32_t barringTimeSeconds;
            int32_t timeSeconds;


            /**
            /**
             * Indicates whether barring is currently being applied.
             * Indicates whether barring is currently being applied.
@@ -792,25 +800,8 @@ struct ConditionalBarringInfo {
             * despite conditional barring.
             * despite conditional barring.
             */
             */
            bool isBarred;
            bool isBarred;
};
        } conditional;

    } barringTypeSpecificInfo;
safe_union BarringTypeSpecificInfo {
    /** Barring type is either none or unconditional */
    Monostate noinit;

    /** Must be included if barring is conditional */
    ConditionalBarringInfo conditionalBarringInfo;
};

struct BarringInfo {
    /** Barring service */
    BarringServiceType service;

    /** The type of barring applied to the service */
    BarringType type;

    /** Type-specific barring info if applicable */
    BarringTypeSpecificInfo typeSpecificInfo;
};
};


enum IndicationFilter : @1.2::IndicationFilter {
enum IndicationFilter : @1.2::IndicationFilter {