[PATCH 12/20] stkutil: Add the Call Control envelope builder
Denis Kenzior
denkenz at gmail.com
Fri Jun 11 12:34:35 PDT 2010
Hi Andrew,
> >> +/* Used both in the ENVELOPE message to UICC and response from UICC */
> >> +struct stk_envelope_call_control {
> >> + /* Exactly one of the following 5 fields must be present */
> >
> > Why are we not using a union then?
>
> We don't know which one of 5 is valid if it's a union. We could add a
> field to indicate that but I guess it's simpler the way it is.
It seems like a type + union might be better for the consumers of this
structure though. Otherwise they have to check up to 5 structs for emptiness
before figuring out what the type actually is. Your call.
Regards,
-Denis
More information about the ofono
mailing list