Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

at_c: discussion on renaming atclient_monitor_response_type enums #370

Open
JeremyTubongbanua opened this issue Aug 13, 2024 · 0 comments
Open
Assignees

Comments

@JeremyTubongbanua
Copy link
Member

Currently, this is our atclient_monitor_response_type enum:

enum atclient_monitor_response_type {
  // the following 4 enums help indicate what type of message was received from the monitor connection and which field
  // of the union to access
  ATCLIENT_MONITOR_MESSAGE_TYPE_NONE,
  ATCLIENT_MONITOR_MESSAGE_TYPE_NOTIFICATION,   // indicates caller to access `notification` from the union
  ATCLIENT_MONITOR_MESSAGE_TYPE_DATA_RESPONSE,  // indicates caller to access `data_response` from the union
  ATCLIENT_MONITOR_MESSAGE_TYPE_ERROR_RESPONSE, // indicates caller to access `error_response` from the union

  // the following 3 enums help indicate what type of error occurred when reading from the monitor connection, you will
  // expect one of these enums along with a non-zero return value from atclient_monitor_read
  ATCLIENT_MONITOR_ERROR_READ, // could be a read timeout or some other error, indicates the caller to access
                               // `error_read` from the union
  ATCLIENT_MONITOR_ERROR_PARSE_NOTIFICATION,
  ATCLIENT_MONITOR_ERROR_DECRYPT_NOTIFICATION,
};

I would like to propose that it be changed to this instead:

enum atclient_monitor_response_type {
  ATCLIENT_MONITOR_RESPONSE_TYPE_NONE,
  ATCLIENT_MONITOR_RESPONSE_TYPE_NOTIFICATION
  ATCLIENT_MONITOR_RESPONSE_TYPE_DATA_RESPONSE
  ATCLIENT_MONITOR_RESPONSE_TYPE_ERROR_RESPONSE
  ATCLIENT_MONITOR_RESPONSE_TYPE_ERROR_READ,
  ATCLIENT_MONITOR_RESPONSE_TYPE_ERROR_PARSE_NOTIFICATION,
  ATCLIENT_MONITOR_RESPONSE_TYPE_ERROR_DECRYPT_NOTIFICATION,
};

Reason for this change is

  • maintain our namespacing convention by having ATCLIENT_MONITOR_RESPONSE_ as the prefix.
@JeremyTubongbanua JeremyTubongbanua changed the title at_c: at_c: discussion on renaming atclient_monitor_response_type enums Aug 13, 2024
@JeremyTubongbanua JeremyTubongbanua self-assigned this Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant