Re: [PATCH 01/12] include: Expose voicecall related enums to plugins
Hi Slava, Also, enum ofono_clir_option (which seems to be a 27.007 thing too) is defined in include/types.h which is a bit inconsistent. It really isn't. The CLIR option is a bit special because it uses a letter 'I', 'i' or default. I suppose we could have used a 'char' type for this, but it isn't an actual number defined in 27.007. Regards, -Denis ___ ofono mailing list ofono@ofono.org https://lists.ofono.org/mailman/listinfo/ofono
Re: [PATCH 01/12] include: Expose voicecall related enums to plugins
On 25/06/18 18:40, Denis Kenzior wrote: Hi Slava, On 06/21/2018 12:20 PM, Slava Monich wrote: --- include/types.h | 31 +++ 1 file changed, 31 insertions(+) Can you help me understand what is the motivation behind this? In the past we opted not to expose OFONO enums for well-known values (e.g. those defined in 27.007). Obviously I didn't know that it was a conscious decision. Feel free to ignore all those patches then. It's just I have very low tolerance to duplicate definitions and magic numbers. common.h is not available to dynamically loadable plugins built against ofono devel package. Also, enum ofono_clir_option (which seems to be a 27.007 thing too) is defined in include/types.h which is a bit inconsistent. Oh well. -S. ___ ofono mailing list ofono@ofono.org https://lists.ofono.org/mailman/listinfo/ofono
Re: [PATCH 01/12] include: Expose voicecall related enums to plugins
Hi Slava, On 06/21/2018 12:20 PM, Slava Monich wrote: --- include/types.h | 31 +++ 1 file changed, 31 insertions(+) Can you help me understand what is the motivation behind this? In the past we opted not to expose OFONO enums for well-known values (e.g. those defined in 27.007). Internally oFono uses defines from common.h and builtin drivers can easily access that as well if code clarity is needed. Also note that certain values (e.g. DISCONNECTED) are not meant to be used outside of the core and are not defined by 27.007. They're special cases that are handled by e.g. ofono_voicecall_disconnected. Regards, -Denis ___ ofono mailing list ofono@ofono.org https://lists.ofono.org/mailman/listinfo/ofono
[PATCH 01/12] include: Expose voicecall related enums to plugins
--- include/types.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/include/types.h b/include/types.h index 2c64b20..a562bfe 100644 --- a/include/types.h +++ b/include/types.h @@ -49,6 +49,37 @@ enum ofono_clir_option { OFONO_CLIR_OPTION_SUPPRESSION, }; +/* 27.007 Section 7.6 */ +enum ofono_clip_validity { + OFONO_CLIP_VALIDITY_VALID = 0, + OFONO_CLIP_VALIDITY_WITHHELD, + OFONO_CLIP_VALIDITY_NOT_AVAILABLE +}; + +/* 27.007 Section 7.18 */ +enum ofono_call_status { + OFONO_CALL_STATUS_ACTIVE = 0, + OFONO_CALL_STATUS_HELD, + OFONO_CALL_STATUS_DIALING, + OFONO_CALL_STATUS_ALERTING, + OFONO_CALL_STATUS_INCOMING, + OFONO_CALL_STATUS_WAITING, + OFONO_CALL_STATUS_DISCONNECTED +}; + +/* 27.007 Section 7.18 */ +enum ofono_call_direction { + OFONO_CALL_DIRECTION_MOBILE_ORIGINATED = 0, + OFONO_CALL_DIRECTION_MOBILE_TERMINATED +}; + +/* 27.007 Section 7.30 */ +enum ofono_cnap_validity { + OFONO_CNAP_VALIDITY_VALID = 0, + OFONO_CNAP_VALIDITY_WITHHELD, + OFONO_CNAP_VALIDITY_NOT_AVAILABLE +}; + enum ofono_error_type { OFONO_ERROR_TYPE_NO_ERROR = 0, OFONO_ERROR_TYPE_CME, -- 1.9.1 ___ ofono mailing list ofono@ofono.org https://lists.ofono.org/mailman/listinfo/ofono